mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Merge pull request #89519 from YeldhamDev/are_you_kidding_me_right_now
Fix translation fallback not working in the Project Manager
This commit is contained in:
commit
68ad520da4
1 changed files with 2 additions and 2 deletions
|
@ -1535,7 +1535,7 @@ String Object::tr(const StringName &p_message, const StringName &p_context) cons
|
||||||
return p_message;
|
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);
|
String tr_msg = TranslationServer::get_singleton()->extractable_translate(p_message, p_context);
|
||||||
if (!tr_msg.is_empty() && tr_msg != p_message) {
|
if (!tr_msg.is_empty() && tr_msg != p_message) {
|
||||||
return tr_msg;
|
return tr_msg;
|
||||||
|
@ -1556,7 +1556,7 @@ String Object::tr_n(const StringName &p_message, const StringName &p_message_plu
|
||||||
return p_message_plural;
|
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);
|
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) {
|
if (!tr_msg.is_empty() && tr_msg != p_message && tr_msg != p_message_plural) {
|
||||||
return tr_msg;
|
return tr_msg;
|
||||||
|
|
Loading…
Add table
Reference in a new issue