summaryrefslogtreecommitdiffstats
path: root/core/object/object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/object/object.cpp')
-rw-r--r--core/object/object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/object/object.cpp b/core/object/object.cpp
index e5d771844b..8ec2b802bb 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -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;
}