summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-11 14:35:03 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-11 14:35:03 +0100
commit5c5f1452db762bbbd9c92b4c416803abada571b8 (patch)
treecf5efc9f66d720365e25b9b354ff3893a20f2219 /core
parent9e4d378b39661f94bed19d1d3da3e088a6ec7595 (diff)
parent52b4014362d019e6807702ba467028610db68e92 (diff)
Merge pull request #73075 from timothyqiu/ttrn-single
Don't warn when using `TTRN()` in a language without plurals
Diffstat (limited to 'core')
-rw-r--r--core/string/translation_po.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp
index 2d3a9c7575..6b1595174a 100644
--- a/core/string/translation_po.cpp
+++ b/core/string/translation_po.cpp
@@ -254,11 +254,6 @@ StringName TranslationPO::get_plural_message(const StringName &p_src_text, const
}
ERR_FAIL_COND_V_MSG(translation_map[p_context][p_src_text].is_empty(), StringName(), "Source text \"" + String(p_src_text) + "\" is registered but doesn't have a translation. Please report this bug.");
- if (translation_map[p_context][p_src_text].size() == 1) {
- WARN_PRINT("Source string \"" + String(p_src_text) + "\" doesn't have plural translations. Use singular translation API for such as tr(), TTR() to translate \"" + String(p_src_text) + "\"");
- return translation_map[p_context][p_src_text][0];
- }
-
int plural_index = _get_plural_index(p_n);
ERR_FAIL_COND_V_MSG(plural_index < 0 || translation_map[p_context][p_src_text].size() < plural_index + 1, StringName(), "Plural index returned or number of plural translations is not valid. Please report this bug.");