Skip to content

Commit 112963b

Browse files
committed
Use a a always-install-into-package-directory-and-it-just-works
1 parent 5361e2b commit 112963b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bpython/translations/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import gettext
2+
import os.path
23
from sys import version_info
34

45

@@ -14,7 +15,9 @@ def _(message):
1415

1516
def init(locale_dir=None, languages=None):
1617
global translator
18+
if locale_dir is None:
19+
locale_dir = os.path.join('bpython', 'translations')
20+
1721
translator = gettext.translation('bpython', locale_dir, languages,
1822
fallback=True)
1923

20-
init()

0 commit comments

Comments
 (0)