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

Method tr

core/object/object.cpp:1688–1695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1686}
1687
1688String Object::tr(const StringName &p_message, const StringName &p_context) const {
1689 if (!_can_translate || !TranslationServer::get_singleton()) {
1690 return p_message;
1691 }
1692
1693 const Ref<TranslationDomain> domain = TranslationServer::get_singleton()->get_or_add_domain(get_translation_domain());
1694 return domain->translate(p_message, p_context);
1695}
1696
1697String Object::tr_n(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context) const {
1698 if (!_can_translate || !TranslationServer::get_singleton()) {

Callers 2

atrMethod · 0.80
test_translation.hFile · 0.80

Calls 2

get_or_add_domainMethod · 0.80
translateMethod · 0.45

Tested by

no test coverage detected