| 5982 | } |
| 5983 | |
| 5984 | String DTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) { |
| 5985 | const String text = p_text.dedent().strip_edges(); |
| 5986 | const String text_plural = p_text_plural.dedent().strip_edges(); |
| 5987 | |
| 5988 | if (TranslationServer::get_singleton()) { |
| 5989 | return String(TranslationServer::get_singleton()->doc_translate_plural(text, text_plural, p_n, p_context)).replace("$DOCS_URL", REDOT_VERSION_DOCS_URL); |
| 5990 | } |
| 5991 | |
| 5992 | // Return message based on English plural rule if translation is not possible. |
| 5993 | if (p_n == 1) { |
| 5994 | return text.replace("$DOCS_URL", REDOT_VERSION_DOCS_URL); |
| 5995 | } |
| 5996 | return text_plural.replace("$DOCS_URL", REDOT_VERSION_DOCS_URL); |
| 5997 | } |
| 5998 | #endif |
| 5999 | |
| 6000 | String RTR(const String &p_text, const String &p_context) { |
nothing calls this directly
no test coverage detected