X Tutup
Skip to content

Commit 677276e

Browse files
committed
load translations from package_dir
1 parent 112963b commit 677276e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bpython/translations/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os.path
33
from sys import version_info
44

5+
from bpython import package_dir
56

67
translator = None
78

@@ -16,7 +17,7 @@ def _(message):
1617
def init(locale_dir=None, languages=None):
1718
global translator
1819
if locale_dir is None:
19-
locale_dir = os.path.join('bpython', 'translations')
20+
locale_dir = os.path.join(package_dir, 'translations')
2021

2122
translator = gettext.translation('bpython', locale_dir, languages,
2223
fallback=True)

0 commit comments

Comments
 (0)
X Tutup