* "Tools TRanslate". Performs string replacement for internationalization * within the editor. A translation context can optionally be specified to * disambiguate between identical source strings in translations. When * placeholders are desired, use `vformat(TTR("Example: %s"), some_string)`. * If a string mentions a quantity (and may therefore need a dynamic plural form), * use `TTRN()` inst
| 5684 | * For translations that can be supplied by exported projects, use `RTR()` instead. |
| 5685 | */ |
| 5686 | String TTR(const String& p_text, const String& p_context) |
| 5687 | { |
| 5688 | if (TranslationServer::get_singleton()) |
| 5689 | { |
| 5690 | return TranslationServer::get_singleton()->tool_translate(p_text, p_context); |
| 5691 | } |
| 5692 | |
| 5693 | return p_text; |
| 5694 | } |
| 5695 | |
| 5696 | /** |
| 5697 | * "Tools TRanslate for N items". Performs string replacement for |
nothing calls this directly
no test coverage detected