Fix some translations not properly falling back

This commit is contained in:
Michael Alexsander 2024-03-14 16:09:39 -03:00
parent da945ce626
commit 05f6c56a48
No known key found for this signature in database
GPG key ID: A9C91EE110F4EABA
2 changed files with 6 additions and 6 deletions

View file

@ -1537,7 +1537,7 @@ String Object::tr(const StringName &p_message, const StringName &p_context) cons
if (Engine::get_singleton()->is_editor_hint()) {
String tr_msg = TranslationServer::get_singleton()->extractable_translate(p_message, p_context);
if (!tr_msg.is_empty()) {
if (!tr_msg.is_empty() && tr_msg != p_message) {
return tr_msg;
}
@ -1558,7 +1558,7 @@ String Object::tr_n(const StringName &p_message, const StringName &p_message_plu
if (Engine::get_singleton()->is_editor_hint()) {
String tr_msg = TranslationServer::get_singleton()->extractable_translate_plural(p_message, p_message_plural, p_n, p_context);
if (!tr_msg.is_empty()) {
if (!tr_msg.is_empty() && tr_msg != p_message && tr_msg != p_message_plural) {
return tr_msg;
}