diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-05-24 12:06:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-24 12:06:11 +0200 |
commit | 71d46fffcf39719fe2bfe9e64e78a08774546cb7 (patch) | |
tree | a8ceebf3a515f9e76a75cb5c8bf1a2567bf7402e | |
parent | 0fcd2bf982463fec9663b74fdd0b1413d3585d24 (diff) | |
parent | 92f67ceef329923a0d0e7c34c8ca389dd2b3c6bb (diff) |
Merge pull request #29066 from akien-mga/i18n-skip-unsupported-locales
i18n: Skip unsupported locales for editor translations
-rw-r--r-- | editor/editor_settings.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index cb40926ce3..79dcbca7a2 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -268,6 +268,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { String host_lang = OS::get_singleton()->get_locale(); host_lang = TranslationServer::standardize_locale(host_lang); + // Some locales are not properly supported currently in Godot due to lack of font shaping + // (e.g. Arabic or Hindi), so even though we have work in progress translations for them, + // we skip them as they don't render properly. (GH-28577) + const Vector<String> locales_to_skip = String("ar,bn,fa,he,hi,ml,si,ta,te,ur").split(","); + String best; EditorTranslationList *etl = _editor_translations; @@ -275,6 +280,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { while (etl->data) { const String &locale = etl->lang; + + // Skip locales which we can't render properly (see above comment). + // Test against language code without regional variants (e.g. ur_PK). + String lang_code = locale.get_slice("_", 0); + if (locales_to_skip.find(lang_code) != -1) { + etl++; + continue; + } + lang_hint += ","; lang_hint += locale; |