summaryrefslogtreecommitdiffstats
path: root/core/object.cpp
diff options
context:
space:
mode:
authorSkyJJ <jjchai01@hotmail.com>2020-08-07 13:17:12 +0200
committerSkyJJ <jjchai01@hotmail.com>2020-08-19 03:01:53 +0200
commit0ef758eaeeb5b2f44e132865f0f10baf692e972f (patch)
tree6e30ec08277fdeb8605050154b9f54002e11e5b0 /core/object.cpp
parent396f2eee827293d9b096e6fc954a57c92bf21f95 (diff)
downloadredot-engine-0ef758eaeeb5b2f44e132865f0f10baf692e972f.tar.gz
Updated Translation architecture to have TranslationPO, did some commit fixes and updated class Reference.
Diffstat (limited to 'core/object.cpp')
-rw-r--r--core/object.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 9d38f36009..67c605c39b 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1432,7 +1432,7 @@ void Object::initialize_class() {
initialized = true;
}
-StringName Object::tr(const StringName &p_message, const StringName &p_context) const {
+String Object::tr(const StringName &p_message, const StringName &p_context) const {
if (!_can_translate || !TranslationServer::get_singleton()) {
return p_message;
}
@@ -1444,9 +1444,8 @@ String Object::tr_n(const StringName &p_message, const StringName &p_message_plu
// Return message based on English plural rule if translation is not possible.
if (p_n == 1) {
return p_message;
- } else {
- return p_message_plural;
}
+ return p_message_plural;
}
return TranslationServer::get_singleton()->translate_plural(p_message, p_message_plural, p_n, p_context);
}