Merge pull request #58288 from bruvzg/fix_editor_en_locale

[Editor] Fix "en" editor translation detection.
This commit is contained in:
Rémi Verschelde 2022-02-18 22:49:13 +01:00 committed by GitHub
commit c944c9e572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
{