| 1686 | } |
| 1687 | |
| 1688 | String 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 | |
| 1697 | String 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()) { |
no test coverage detected