diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-18 22:49:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 22:49:13 +0100 |
commit | c944c9e572e616c2f0eba1e392fd17ca030625ec (patch) | |
tree | 6e4b35808e265533f71133dd08290e63afeacbfe /core/string | |
parent | dfa5c5db12a16eedc16c0ecb86ab9f15406c70ae (diff) | |
parent | 759ca45820ed8de2da5bc7fd6ac85225ff6018a1 (diff) |
Merge pull request #58288 from bruvzg/fix_editor_en_locale
[Editor] Fix "en" editor translation detection.
Diffstat (limited to 'core/string')
-rw-r--r-- | core/string/translation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/string/translation.cpp b/core/string/translation.cpp index 811ae95e9f..c41828de05 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -685,8 +685,12 @@ Ref<Translation> TranslationServer::get_tool_translation() const { String TranslationServer::get_tool_locale() { #ifdef TOOLS_ENABLED - if (TranslationServer::get_singleton()->get_tool_translation().is_valid() && (Engine::get_singleton()->is_editor_hint() || Engine::get_singleton()->is_project_manager_hint())) { - return tool_translation->get_locale(); + if (Engine::get_singleton()->is_editor_hint() || Engine::get_singleton()->is_project_manager_hint()) { + if (TranslationServer::get_singleton()->get_tool_translation().is_valid()) { + return tool_translation->get_locale(); + } else { + return "en"; + } } else { #else { |