def build_updatepot(): if ISOSX: print("Updating Cocoa strings file.") # We need to have strings from *all* editions in here, so we'll call xibless for all editions # in dummy subfolders. build_cocoalib_xibless('cocoalib/autogen') loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj') for edition in ('se', 'me', 'pe'): build_xibless(edition, op.join('cocoa', 'autogen', edition)) loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/base/en.lproj') print("Building .pot files from source files") print("Building core.pot") all_cores = ['core', 'core_se', 'core_me', 'core_pe'] loc.generate_pot(all_cores, op.join('locale', 'core.pot'), ['tr']) print("Building columns.pot") loc.generate_pot(all_cores, op.join('locale', 'columns.pot'), ['coltr']) print("Building ui.pot") # When we're not under OS X, we don't want to overwrite ui.pot because it contains Cocoa locs # We want to merge the generated pot with the old pot in the most preserving way possible. ui_packages = ['qt', op.join('cocoa', 'inter')] loc.generate_pot(ui_packages, op.join('locale', 'ui.pot'), ['tr'], merge=(not ISOSX)) print("Building qtlib.pot") loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr']) if ISOSX: print("Building cocoalib.pot") cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot') os.remove(cocoalib_pot) loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot) print("Enhancing ui.pot with Cocoa's strings files") loc.strings2pot( op.join('cocoa', 'base', 'en.lproj', 'Localizable.strings'), op.join('locale', 'ui.pot') )
def build_updatepot(): if ISOSX: print("Updating Cocoa strings file.") build_cocoalib_xibless('cocoalib/autogen') loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj') build_xibless() loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/en.lproj') print("Building .pot files from source files") print("Building core.pot") loc.generate_pot(['core'], op.join('locale', 'core.pot'), ['tr']) print("Building columns.pot") loc.generate_pot(['core'], op.join('locale', 'columns.pot'), ['coltr']) print("Building ui.pot") # When we're not under OS X, we don't want to overwrite ui.pot because it contains Cocoa locs # We want to merge the generated pot with the old pot in the most preserving way possible. ui_packages = ['qt', op.join('cocoa', 'inter')] loc.generate_pot(ui_packages, op.join('locale', 'ui.pot'), ['tr'], merge=(not ISOSX)) print("Building qtlib.pot") loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr']) if ISOSX: print("Building cocoalib.pot") cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot') os.remove(cocoalib_pot) loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot) print("Enhancing ui.pot with Cocoa's strings files") loc.strings2pot( op.join('cocoa', 'en.lproj', 'Localizable.strings'), op.join('locale', 'ui.pot') )
def build_updatepot(): if ISOSX: print("Updating Cocoa strings file.") build_cocoalib_xibless('cocoalib/autogen') loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj') # If we don't delete 'cocoalib/autogen', it messes with compilation shutil.rmtree('cocoalib/autogen') build_xibless() loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/en.lproj') print("Building .pot files from source files") print("Building core.pot") loc.generate_pot(['core'], op.join('locale', 'core.pot'), ['tr']) print("Building columns.pot") loc.generate_pot(['core'], op.join('locale', 'columns.pot'), ['trcol']) print("Building ui.pot") # When we're not under OS X, we don't want to overwrite ui.pot because it contains Cocoa locs # We want to merge the generated pot with the old pot in the most preserving way possible. loc.generate_pot(['qt'], op.join('locale', 'ui.pot'), ['tr'], merge=(not ISOSX)) print("Building hscommon.pot") loc.generate_pot(['hscommon'], op.join('hscommon', 'locale', 'hscommon.pot'), ['tr']) print("Building qtlib.pot") loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr']) if ISOSX: print("Building cocoalib.pot") cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot') os.remove(cocoalib_pot) loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot) print("Enhancing ui.pot with Cocoa's strings files") loc.strings2pot(op.join('cocoa', 'en.lproj', 'Localizable.strings'), op.join('locale', 'ui.pot'))
def build_updatepot(): if ISOSX: print("Updating Cocoa strings file.") # We need to have strings from *all* editions in here, so we'll call xibless for all editions # in dummy subfolders. build_cocoalib_xibless('cocoalib/autogen') loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj') for edition in ('se', 'me', 'pe'): build_xibless(edition, op.join('cocoa', 'autogen', edition)) loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/base/en.lproj') print("Building .pot files from source files") print("Building core.pot") all_cores = ['core', 'core_se', 'core_me', 'core_pe'] loc.generate_pot(all_cores, op.join('locale', 'core.pot'), ['tr']) print("Building columns.pot") loc.generate_pot(all_cores, op.join('locale', 'columns.pot'), ['coltr']) print("Building ui.pot") # When we're not under OS X, we don't want to overwrite ui.pot because it contains Cocoa locs # We want to merge the generated pot with the old pot in the most preserving way possible. ui_packages = ['qt', op.join('cocoa', 'inter')] loc.generate_pot(ui_packages, op.join('locale', 'ui.pot'), ['tr'], merge=(not ISOSX)) print("Building hscommon.pot") loc.generate_pot(['hscommon'], op.join('hscommon', 'locale', 'hscommon.pot'), ['tr']) print("Building qtlib.pot") loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr']) if ISOSX: print("Building cocoalib.pot") cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot') os.remove(cocoalib_pot) loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot) print("Enhancing ui.pot with Cocoa's strings files") loc.strings2pot(op.join('cocoa', 'base', 'en.lproj', 'Localizable.strings'), op.join('locale', 'ui.pot'))
def build_updatepot(): if ISOSX: print("Updating Cocoa strings file.") build_cocoalib_xibless("cocoalib/autogen") loc.generate_cocoa_strings_from_code("cocoalib", "cocoalib/en.lproj") # If we don't delete 'cocoalib/autogen', it messes with compilation shutil.rmtree("cocoalib/autogen") build_xibless() loc.generate_cocoa_strings_from_code("cocoa", "cocoa/en.lproj") print("Building .pot files from source files") print("Building core.pot") loc.generate_pot(["core"], op.join("locale", "core.pot"), ["tr"]) print("Building columns.pot") loc.generate_pot(["core"], op.join("locale", "columns.pot"), ["trcol"]) print("Building ui.pot") # When we're not under OS X, we don't want to overwrite ui.pot because it contains Cocoa locs # We want to merge the generated pot with the old pot in the most preserving way possible. loc.generate_pot(["qt"], op.join("locale", "ui.pot"), ["tr"], merge=(not ISOSX)) print("Building qtlib.pot") loc.generate_pot(["qtlib"], op.join("qtlib", "locale", "qtlib.pot"), ["tr"]) if ISOSX: print("Building cocoalib.pot") cocoalib_pot = op.join("cocoalib", "locale", "cocoalib.pot") os.remove(cocoalib_pot) loc.strings2pot(op.join("cocoalib", "en.lproj", "cocoalib.strings"), cocoalib_pot) print("Enhancing ui.pot with Cocoa's strings files") loc.strings2pot(op.join("cocoa", "en.lproj", "Localizable.strings"), op.join("locale", "ui.pot"))
def build_updatepot(): if ISOSX: print("Updating Cocoa strings file.") build_cocoalib_xibless('cocoalib/autogen') loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj') build_xibless('se', op.join('cocoa', 'autogen', 'se')) loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/en.lproj') print("Building .pot files from source files") print("Building core.pot") loc.generate_pot(['core'], op.join('locale', 'core.pot'), ['tr']) print("Building columns.pot") loc.generate_pot(['core'], op.join('locale', 'columns.pot'), ['coltr']) print("Building ui.pot") # When we're not under OS X, we don't want to overwrite ui.pot because it contains Cocoa locs # We want to merge the generated pot with the old pot in the most preserving way possible. ui_packages = ['qt', op.join('cocoa', 'inter')] loc.generate_pot(ui_packages, op.join('locale', 'ui.pot'), ['tr'], merge=(not ISOSX)) print("Building qtlib.pot") loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr']) if ISOSX: print("Building cocoalib.pot") cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot') os.remove(cocoalib_pot) loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot) print("Enhancing ui.pot with Cocoa's strings files") loc.strings2pot( op.join('cocoa', 'en.lproj', 'Localizable.strings'), op.join('locale', 'ui.pot') )
def build_updatepot(): print("Updating Cocoa strings file.") build_cocoalib_xibless('cocoalib/autogen') loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj') # If we don't delete 'cocoalib/autogen', it messes with compilation shutil.rmtree('cocoalib/autogen') build_xibless() loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/en.lproj') print("Building .pot files from source files") print("Building cocoalib.pot") cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot') os.remove(cocoalib_pot) loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot) print("Enhancing ui.pot with Cocoa's strings files") loc.strings2pot(op.join('cocoa', 'en.lproj', 'Localizable.strings'), op.join('locale', 'ui.pot'))