Пример #1
0
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"))
Пример #2
0
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))
Пример #3
0
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'))
Пример #4
0
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'))
Пример #5
0
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'))
Пример #6
0
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'))
Пример #7
0
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))
Пример #8
0
def build_qt_localizations():
    loc.compile_all_po(op.join('qtlib', 'locale'))
    loc.merge_locale_dir(op.join('qtlib', 'locale'), 'locale')
Пример #9
0
def build_qt_localizations():
    loc.compile_all_po(op.join("qtlib", "locale"))
    loc.merge_locale_dir(op.join("qtlib", "locale"), "locale")
Пример #10
0
def build_qt_localizations():
    loc.compile_all_po(op.join('qtlib', 'locale'))
    loc.merge_locale_dir(op.join('qtlib', 'locale'), 'locale')
Пример #11
0
def build_base_localizations():
    loc.compile_all_po('locale')
Пример #12
0
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')
Пример #13
0
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')
Пример #14
0
def build_qt_localizations():
    loc.compile_all_po(op.join("qtlib", "locale"))
    loc.merge_locale_dir(op.join("qtlib", "locale"), "locale")
Пример #15
0
def build_base_localizations():
    loc.compile_all_po("locale")