flare-engine icon indicating copy to clipboard operation
flare-engine copied to clipboard

"%s seconds" needs plural form

Open gunchleoc opened this issue 9 years ago • 2 comments

Is it possible to fetch the following string with ngettext?

%s seconds

../../../src/Utils.cpp:358

In my language, we have:

2 dhiog 3 diogan 11 diog 12 dhiog 13 diogan 20 diog ...

Slavic languages are also affected by this.

gunchleoc avatar Sep 17 '16 14:09 gunchleoc

This problem has been discussed a bit here: https://github.com/clintbellanger/flare-game/issues/254

So our options seem to be:

  • Use something like GNU GetText, which probably won't happen due to it using a binary format for translation files (according to the posts in that thread).
  • Roll our own version of ngettext() into our GetText implementation.
  • Do nothing and have translators disregard 100% grammar correctness, much like we do in English with item quantities.

dorkster avatar Sep 17 '16 18:09 dorkster

  1. What would be the problem with the binary translation format? Translators would still be working on the po files, and you could add the creation of the mo files to the script that does the msgmerge (assuming that you have one). Translators can easily create mo files themselves with Virtaal or Poedit, if they don't know how to use the command line.
  2. GNU gettext also has a pgettext function for disambiguation, which would help with the hero gender problem discussed in the other bug. Would you then reimplement that function as well? Rolling your own should be avoided if possible - duplication of effort, potential for new bugs, ...
  3. English speakers are used to computer text not following the grammar rules, e.g. the article is usually dropped where one would never do so in normal speech, abbreviations and acronyms abound... languages that are rich in inflection don't like to take these shortcuts though.

gunchleoc avatar Sep 18 '16 07:09 gunchleoc