2828
2929try :
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
6162if 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
6667cmdclass = dict (build_py = build_py ,
6768 build = build )
0 commit comments