diff options
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 7dbaed9fbe..cfb547742a 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -4338,13 +4338,14 @@ String TTR(const String &p_text) { } String DTR(const String &p_text) { + // Comes straight from the XML, so remove indentation and any trailing whitespace. + const String text = p_text.dedent().strip_edges(); + if (TranslationServer::get_singleton()) { - // Comes straight from the XML, so remove indentation and any trailing whitespace. - const String text = p_text.dedent().strip_edges(); return TranslationServer::get_singleton()->doc_translate(text); } - return p_text; + return text; } #endif |