| 6010 | } |
| 6011 | |
| 6012 | String RTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) { |
| 6013 | if (TranslationServer::get_singleton()) { |
| 6014 | String rtr = TranslationServer::get_singleton()->tool_translate_plural(p_text, p_text_plural, p_n, p_context); |
| 6015 | if (rtr.is_empty() || rtr == p_text || rtr == p_text_plural) { |
| 6016 | return TranslationServer::get_singleton()->translate_plural(p_text, p_text_plural, p_n, p_context); |
| 6017 | } |
| 6018 | return rtr; |
| 6019 | } |
| 6020 | |
| 6021 | // Return message based on English plural rule if translation is not possible. |
| 6022 | if (p_n == 1) { |
| 6023 | return p_text; |
| 6024 | } |
| 6025 | return p_text_plural; |
| 6026 | } |
nothing calls this directly
no test coverage detected