Updated English, german and italian pluralization function

This commit is contained in:
Wofsauge committed 2026-01-13 18:22:26 +01:00
1 parent a71b41e32e
commit d3f24e321b
3 files changed
+17 -14

No files matched your search

+4 -1
View File
@@ -725,8 +725,11 @@ EID.descriptions[languageCode].transformations={
-- Each language can do their own algorithm to modify the given text to their needs
EID.descriptions[languageCode].PluralizeFunction = function(text, amount)
text = EID:ReplaceVariableStr(text, "singular_r", amount > 1 and "" or "r") -- add "r" to word if singular
text = EID:ReplaceVariableStr(text, "plural_n", amount > 1 and "e" or "") -- add "n" to word
text = EID:ReplaceVariableStr(text, "plural_e", amount > 1 and "e" or "") -- add "e" to word
text = EID:ReplaceVariableStr(text, "plural_en", amount > 1 and "en" or "") -- add "en" to word
text = EID:ReplaceVariableStr(text, "plural_n", amount > 1 and "n" or "") -- add "n" to word
text = EID:ReplaceVariableStr(text, "plural_e_sing_en", amount > 1 and "e" or "en") -- add "en" or "e" to word
text = EID:ReplaceVariableStr(text, "plural_e_sing_es", amount > 1 and "e" or "es") -- add "es" or "e" to word
text = EID:ReplaceVariableStr(text, "plural_s", amount > 1 and "s" or "") -- add "s" to word
return text
end