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

Function RTR

core/string/ustring.cpp:6000–6010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5998#endif
5999
6000String RTR(const String &p_text, const String &p_context) {
6001 if (TranslationServer::get_singleton()) {
6002 String rtr = TranslationServer::get_singleton()->tool_translate(p_text, p_context);
6003 if (rtr.is_empty() || rtr == p_text) {
6004 return TranslationServer::get_singleton()->translate(p_text, p_context);
6005 }
6006 return rtr;
6007 }
6008
6009 return p_text;
6010}
6011
6012String RTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) {
6013 if (TranslationServer::get_singleton()) {

Calls 3

tool_translateMethod · 0.80
is_emptyMethod · 0.45
translateMethod · 0.45

Tested by

no test coverage detected