* "Docs TRanslate". Used for the editor class reference documentation, * handling descriptions extracted from the XML. * It also replaces `$DOCS_URL` with the actual URL to the documentation's branch, * to allow dehardcoding it in the XML and doing proper substitutions everywhere. */
| 5727 | * to allow dehardcoding it in the XML and doing proper substitutions everywhere. |
| 5728 | */ |
| 5729 | String DTR(const String& p_text, const String& p_context) |
| 5730 | { |
| 5731 | // Comes straight from the XML, so remove indentation and any trailing whitespace. |
| 5732 | const String text = p_text.dedent().strip_edges(); |
| 5733 | |
| 5734 | if (TranslationServer::get_singleton()) |
| 5735 | { |
| 5736 | return String(TranslationServer::get_singleton()->doc_translate(text, p_context)).replace("$DOCS_URL", VERSION_DOCS_URL); |
| 5737 | } |
| 5738 | |
| 5739 | return text.replace("$DOCS_URL", VERSION_DOCS_URL); |
| 5740 | } |
| 5741 | |
| 5742 | /** |
| 5743 | * "Docs TRanslate for N items". Used for the editor class reference documentation |
nothing calls this directly
no test coverage detected