diff options
| author | Michael Alexsander <michaelalexsander@protonmail.com> | 2024-03-15 12:00:20 -0300 |
|---|---|---|
| committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2024-03-15 12:00:20 -0300 |
| commit | 11937d3a796f45bfa47958b528069d610e25a877 (patch) | |
| tree | e4ae955741486822ff32b126262e86b711ea9526 /core/object | |
| parent | 0175be8948d68cf90c55ce08e8e5bf46ea29ce40 (diff) | |
| download | redot-engine-11937d3a796f45bfa47958b528069d610e25a877.tar.gz | |
Fix translation fallback not working in the Project Manager
Diffstat (limited to 'core/object')
| -rw-r--r-- | core/object/object.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/object/object.cpp b/core/object/object.cpp index 8ec2b802bb..e0a1ddcce0 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -1535,7 +1535,7 @@ String Object::tr(const StringName &p_message, const StringName &p_context) cons return p_message; } - if (Engine::get_singleton()->is_editor_hint()) { + if (Engine::get_singleton()->is_editor_hint() || Engine::get_singleton()->is_project_manager_hint()) { String tr_msg = TranslationServer::get_singleton()->extractable_translate(p_message, p_context); if (!tr_msg.is_empty() && tr_msg != p_message) { return tr_msg; @@ -1556,7 +1556,7 @@ String Object::tr_n(const StringName &p_message, const StringName &p_message_plu return p_message_plural; } - if (Engine::get_singleton()->is_editor_hint()) { + if (Engine::get_singleton()->is_editor_hint() || Engine::get_singleton()->is_project_manager_hint()) { String tr_msg = TranslationServer::get_singleton()->extractable_translate_plural(p_message, p_message_plural, p_n, p_context); if (!tr_msg.is_empty() && tr_msg != p_message && tr_msg != p_message_plural) { return tr_msg; |
