X Tutup
Skip to content

Commit 37a521b

Browse files
committed
i18n: locale path revisited
1 parent 6f21f5d commit 37a521b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
try:
3030
from babel.messages.frontend import compile_catalog as _compile_catalog
31-
from babel.messages.frontend import extract_messages# as _extract_messages
31+
from babel.messages.frontend import extract_messages
3232

3333
class compile_catalog(_compile_catalog):
3434
def initialize_options(self):
@@ -37,7 +37,8 @@ def initialize_options(self):
3737
_compile_catalog.initialize_options(self)
3838

3939
self.domain = 'bpython'
40-
self.directory = os.path.join('i18n', 'locale')
40+
self.directory = os.path.join('i18n')
41+
self.use_fuzzy = True
4142

4243
build.sub_commands.append(('compile_catalog', None))
4344
using_translations = True
@@ -59,9 +60,9 @@ def initialize_options(self):
5960
]
6061
# localization
6162
if using_translations:
62-
for lang in os.listdir(os.path.join('i18n', 'locale')):
63-
lang_path = os.sep + os.path.join('locale', lang, 'LC_MESSAGES', 'bpython.mo')
64-
data_files.append(('share'+lang_path, ['i18n'+lang_path]))
63+
for lang in os.listdir('i18n'):
64+
data_files.append((os.path.join('share', 'locale', lang, 'LC_MESSAGES'),
65+
['i18n/%s/LC_MESSAGES/bpython.mo' % lang]))
6566

6667
cmdclass = dict(build_py=build_py,
6768
build = build)

0 commit comments

Comments
 (0)
X Tutup