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.
This commit is contained in:
Rémi Verschelde 2020-05-28 12:02:12 +02:00
parent 1a53ee66c1
commit a16031beb6
5 changed files with 16 additions and 15 deletions

View file

@ -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