diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-28 12:02:12 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-28 12:02:12 +0200 |
commit | a16031beb616906178ba7c10d3d2fbb6ff006285 (patch) | |
tree | 5e1b7e4b29c8f6065cc508b33b73254b88be5c66 /core/ustring.cpp | |
parent | 1a53ee66c16c31bc0f64517f29bdf4b411a5a570 (diff) | |
download | redot-engine-a16031beb616906178ba7c10d3d2fbb6ff006285.tar.gz |
Use translated docs in PropertySelector
And do the dedent and stripping for both translated and
non-translated strings for consistency, and so that we
don't need to do it at the call site.
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 |