def build_localizations(): loc.compile_all_po("locale") build_qt_localizations() locale_dest = Path("build", "locale") if locale_dest.exists(): shutil.rmtree(locale_dest) shutil.copytree("locale", locale_dest, ignore=shutil.ignore_patterns("*.po", "*.pot"))
def build_localizations(ui, edition): loc.compile_all_po('locale') if ui == 'cocoa': app = cocoa_app(edition) loc.build_cocoa_localizations(app, en_stringsfile=op.join( 'cocoa', 'base', 'en.lproj', 'Localizable.strings')) locale_dest = op.join(app.resources, 'locale') elif ui == 'qt': build_qt_localizations() locale_dest = op.join('build', 'locale') if op.exists(locale_dest): shutil.rmtree(locale_dest) shutil.copytree('locale', locale_dest, ignore=shutil.ignore_patterns('*.po', '*.pot')) if ui == 'qt' and not ISLINUX: print("Copying qt_*.qm files into the 'locale' folder") from PyQt5.QtCore import QLibraryInfo trfolder = QLibraryInfo.location(QLibraryInfo.TranslationsPath) for lang in loc.get_langs('locale'): qmname = 'qt_%s.qm' % lang src = op.join(trfolder, qmname) if op.exists(src): copy(src, op.join('build', 'locale', qmname))
def build_localizations(): loc.compile_all_po('locale') build_qt_localizations() locale_dest = op.join('build', 'locale') if op.exists(locale_dest): shutil.rmtree(locale_dest) shutil.copytree('locale', locale_dest, ignore=shutil.ignore_patterns('*.po', '*.pot'))
def build_localizations(ui): loc.compile_all_po('locale') if ui == 'cocoa': app = cocoa_app() loc.build_cocoa_localizations(app, en_stringsfile=op.join('cocoa', 'en.lproj', 'Localizable.strings')) locale_dest = op.join(app.resources, 'locale') elif ui == 'qt': build_qt_localizations() locale_dest = op.join('build', 'locale') if op.exists(locale_dest): shutil.rmtree(locale_dest) shutil.copytree('locale', locale_dest, ignore=shutil.ignore_patterns('*.po', '*.pot'))
def build_localizations(): if not op.exists('locale'): os.symlink('dupeguru/locale', 'locale') loc.compile_all_po('locale') loc.generate_cocoa_strings_from_xib(op.join('cocoa', 'Base.lproj')) loc.localize_all_stringsfiles(op.join('cocoa', 'Base.lproj'), 'cocoa') loc.generate_cocoa_strings_from_xib(op.join('cocoalib', 'Base.lproj')) loc.localize_all_stringsfiles(op.join('cocoalib', 'Base.lproj'), 'cocoalib') locale_dest = op.join('build', 'locale') if op.exists(locale_dest): shutil.rmtree(locale_dest) shutil.copytree('locale', locale_dest, ignore=shutil.ignore_patterns('*.po', '*.pot'))
def build_localizations(ui, edition): loc.compile_all_po('locale') if ui == 'cocoa': app = cocoa_app(edition) loc.build_cocoa_localizations(app, en_stringsfile=op.join('cocoa', 'base', 'en.lproj', 'Localizable.strings')) locale_dest = op.join(app.resources, 'locale') elif ui == 'qt': build_qt_localizations() locale_dest = op.join('build', 'locale') if op.exists(locale_dest): shutil.rmtree(locale_dest) shutil.copytree('locale', locale_dest, ignore=shutil.ignore_patterns('*.po', '*.pot')) if ui == 'qt' and not ISLINUX: print("Copying qt_*.qm files into the 'locale' folder") from PyQt5.QtCore import QLibraryInfo trfolder = QLibraryInfo.location(QLibraryInfo.TranslationsPath) for lang in loc.get_langs('locale'): qmname = 'qt_%s.qm' % lang src = op.join(trfolder, qmname) if op.exists(src): copy(src, op.join('build', 'locale', qmname))
def build_qt_localizations(): loc.compile_all_po(op.join('qtlib', 'locale')) loc.merge_locale_dir(op.join('qtlib', 'locale'), 'locale')
def build_qt_localizations(): loc.compile_all_po(op.join("qtlib", "locale")) loc.merge_locale_dir(op.join("qtlib", "locale"), "locale")
def build_base_localizations(): loc.compile_all_po('locale')
def build_base_localizations(): loc.compile_all_po('locale') loc.compile_all_po(op.join('hscommon', 'locale')) loc.merge_locale_dir(op.join('hscommon', 'locale'), 'locale')
def build_base_localizations(): loc.compile_all_po("locale")