File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -347,9 +347,9 @@ def finalize_options(self):
347
347
348
348
349
349
def run (self ):
350
- paths = glob ('nbclassic/i18n/??_?? ' )
350
+ paths = glob ('nbclassic/i18n/*/LC_MESSAGES ' )
351
351
for p in paths :
352
- LANG = p [ - 5 : ]
352
+ LANG = p . split ( os . path . sep )[ - 2 ]
353
353
for component in ['nbclassic' , 'nbui' ]:
354
354
run (['pybabel' , 'compile' ,
355
355
'-D' , component ,
@@ -557,7 +557,7 @@ def build_main(self, name):
557
557
run (['node' , 'tools/build-main.js' , name ])
558
558
559
559
def build_jstranslation (self , trd ):
560
- lang = trd [ - 5 : ]
560
+ lang = trd . split ( os . path . sep )[ - 2 ]
561
561
run ([
562
562
pjoin ('node_modules' , '.bin' , 'po2json' ),
563
563
'-p' , '-F' ,
@@ -573,7 +573,7 @@ def run(self):
573
573
env ['PATH' ] = npm_path
574
574
pool = ThreadPool ()
575
575
pool .map (self .build_main , self .apps )
576
- pool .map (self .build_jstranslation , glob ('nbclassic/i18n/??_?? ' ))
576
+ pool .map (self .build_jstranslation , glob ('nbclassic/i18n/*/LC_MESSAGES ' ))
577
577
# update package data in case this created new files
578
578
update_package_data (self .distribution )
579
579
You can’t perform that action at this time.
0 commit comments