MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / DTR

Function DTR

core/string/ustring.cpp:5973–5982  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5971}
5972
5973String DTR(const String &p_text, const String &p_context) {
5974 // Comes straight from the XML, so remove indentation and any trailing whitespace.
5975 const String text = p_text.dedent().strip_edges();
5976
5977 if (TranslationServer::get_singleton()) {
5978 return String(TranslationServer::get_singleton()->doc_translate(text, p_context)).replace("$DOCS_URL", REDOT_VERSION_DOCS_URL);
5979 }
5980
5981 return text.replace("$DOCS_URL", REDOT_VERSION_DOCS_URL);
5982}
5983
5984String DTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) {
5985 const String text = p_text.dedent().strip_edges();

Callers 3

set_create_optionsMethod · 0.85
_create_class_itemMethod · 0.85

Calls 5

strip_edgesMethod · 0.80
dedentMethod · 0.80
doc_translateMethod · 0.80
StringClass · 0.70
replaceMethod · 0.45

Tested by

no test coverage detected