From 0ef758eaeeb5b2f44e132865f0f10baf692e972f Mon Sep 17 00:00:00 2001 From: SkyJJ Date: Fri, 7 Aug 2020 13:17:12 +0200 Subject: Updated Translation architecture to have TranslationPO, did some commit fixes and updated class Reference. --- core/object.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/object.cpp') 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); } -- cgit v1.2.3