From 759ca45820ed8de2da5bc7fd6ac85225ff6018a1 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 18 Feb 2022 22:15:02 +0200 Subject: [Editor] Fix "en" editor translation detection. --- core/string/translation.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/string') 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 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 { -- cgit v1.2.3