Translation is always a pain in the ass if developers are monolingual in English.
On every project I ever worked on somebody had thingCount == 1 ? 'thing' : 'things' somewhere and it drives me up the wall having to explain that and pgettext thingy
it can largely be turned into six categories of behavior, with tons of languages choosing different boundaries for those categories. ios/osx and android have tools for this, and probably others (I'm just personally familiar with these).
and even English isn't even that simple in the way many treat it - you don't pluralize sentences, parts of sentences change in contrast to each other (a car drives vs cars drive). so e.g. widely used APIs like https://apidock.com/rails/v7.1.3.4/String/pluralize are blatantly misleading merely by existing, and it leads to mistakes in many (most?) languages, and also English, even though the authors of the API speak English.
It is a solved problem with tools that help to do it right, but nobody does it right. People wrote that cursed function for every language long time ago, but you as a developer need to know it exists and use it
yeah, I mean `toUpper(string)` exists in basically every language and it's equally cursed. it's nothing even slightly new, just another sigh-inducer when you see people using it.
Making it plural doesn't always mean "replace one word by another".
The right thing to do it:
add_one = "Add one thing"
add_multiple = "Add {n} things"
Then you'll provide the full sentence for each language. Of course some languages will need more cases, like slavic language where it's 1, 2-4, 5+, so depending on the languages you need to support you need to put more than 2 strings.
On every project I ever worked on somebody had thingCount == 1 ? 'thing' : 'things' somewhere and it drives me up the wall having to explain that and pgettext thingy