1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 05:34:36 +00:00

Added edition-specific .strings in the build's --updatepot action.

This commit is contained in:
Virgil Dupras 2011-11-28 13:00:36 -05:00
parent 54d6fb080c
commit f8af6dbd18

View File

@ -118,13 +118,15 @@ def build_localizations(ui, edition):
shutil.copytree('locale', op.join('build', 'locale'), ignore=shutil.ignore_patterns('*.po', '*.pot'))
if ui == 'cocoa':
print("Creating lproj folders based on .po files")
enlproj = op.join('cocoa', 'base', 'en.lproj')
for lang in loc.get_langs('locale'):
if lang == 'en':
continue
pofile = op.join('locale', lang, 'LC_MESSAGES', 'ui.po')
dest_lproj = op.join('cocoa', 'base', lang + '.lproj')
for edition_folder in ['base', 'se', 'me', 'pe']:
enlproj = op.join('cocoa', edition_folder, 'en.lproj')
dest_lproj = op.join('cocoa', edition_folder, lang + '.lproj')
loc.po2allxibstrings(pofile, enlproj, dest_lproj)
if edition_folder == 'base':
loc.po2strings(pofile, op.join(enlproj, 'Localizable.strings'), op.join(dest_lproj, 'Localizable.strings'))
pofile = op.join('cocoalib', 'locale', lang, 'LC_MESSAGES', 'cocoalib.po')
loc.po2allxibstrings(pofile, op.join('cocoalib', 'en.lproj'), op.join('cocoalib', lang + '.lproj'))