INNER CODE UNIT · Python

get_translations

multitheftauto/mtasa-blue · utils/localization/build_locale_nsi.py:148

def get_translations(podir: Path) -> t.Dict[str, t.List[TranslatedLangString]]:
    translations: t.Dict[str, t.List[TranslatedLangString]] = {}
    for po_path in podir.glob("*.po"):
        locale = po_path.stem
        if not locale in locale_to_name:
            print(f"Warning: Locale {locale} not supported by NSIS")
            continue

        translations[locale] = get_default_lang_strings(locale)

        po = polib.pofile(str(po_path))
        translations[locale] += get_translations_from_pofile(po)

    return translations


def create_locale_lang_strings(
    translations: t.List[TranslatedLangString],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…