mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Generate docs even if some translation files are missing
This commit is contained in:
parent
d0e18178c6
commit
d0fcf88b31
@ -10,7 +10,6 @@ from importlib import reload
|
|||||||
# Languages already translated or translating the documentation.
|
# Languages already translated or translating the documentation.
|
||||||
documentation_languages = ["en", "es", "fr", "de", "it", "gl", "ja", "ru", "ro", "eu", "ca", "da", "sr"]
|
documentation_languages = ["en", "es", "fr", "de", "it", "gl", "ja", "ru", "ro", "eu", "ca", "da", "sr"]
|
||||||
|
|
||||||
|
|
||||||
# Changelog translated languages.
|
# Changelog translated languages.
|
||||||
changelog_languages = ["en", "ca", "de", "es", "eu", "fr", "gl", "ja", "ro", "ru", "sr"]
|
changelog_languages = ["en", "ca", "de", "es", "eu", "fr", "gl", "ja", "ro", "ru", "sr"]
|
||||||
|
|
||||||
@ -29,8 +28,13 @@ def get_translations(name):
|
|||||||
langs = changelog_languages
|
langs = changelog_languages
|
||||||
for l in langs:
|
for l in langs:
|
||||||
if l != "en":
|
if l != "en":
|
||||||
|
try:
|
||||||
_ = gettext.translation(name, os.path.join(paths.app_path(), "locales"), languages=[l])
|
_ = gettext.translation(name, os.path.join(paths.app_path(), "locales"), languages=[l])
|
||||||
translations[l] = _
|
translations[l] = _
|
||||||
|
print(l, name)
|
||||||
|
except FileNotFoundError:
|
||||||
|
_ = gettext.NullTranslations()
|
||||||
|
translations[l] = _
|
||||||
else:
|
else:
|
||||||
_ = gettext.NullTranslations()
|
_ = gettext.NullTranslations()
|
||||||
translations[l] = _
|
translations[l] = _
|
||||||
|
Loading…
Reference in New Issue
Block a user