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

Function TTRN

core/string/ustring.cpp:5961–5971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5959}
5960
5961String TTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) {
5962 if (TranslationServer::get_singleton()) {
5963 return TranslationServer::get_singleton()->tool_translate_plural(p_text, p_text_plural, p_n, p_context);
5964 }
5965
5966 // Return message based on English plural rule if translation is not possible.
5967 if (p_n == 1) {
5968 return p_text;
5969 }
5970 return p_text_plural;
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.

Callers 15

_update_nodeMethod · 0.85
_update_items_treeMethod · 0.85
_notificationMethod · 0.85
_translation_addMethod · 0.85
_translation_res_addMethod · 0.85
_pot_addMethod · 0.85

Calls 1

tool_translate_pluralMethod · 0.80

Tested by 1

_notificationMethod · 0.68