[Editor] Fix "en" editor translation detection.
This commit is contained in:
parent
0217d44dfd
commit
759ca45820
1 changed files with 6 additions and 2 deletions
|
@ -685,9 +685,13 @@ Ref<Translation> TranslationServer::get_tool_translation() const {
|
||||||
|
|
||||||
String TranslationServer::get_tool_locale() {
|
String TranslationServer::get_tool_locale() {
|
||||||
#ifdef TOOLS_ENABLED
|
#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())) {
|
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();
|
return tool_translation->get_locale();
|
||||||
} else {
|
} else {
|
||||||
|
return "en";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue