← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/test-ngettext into lp:widelands

 

According to the gettext manual, "a simple gettext call with a form suitable for all values will do"[1] -- something like http://pastebin.com/raw/R2tGW9XH. The CLDR tables[2] clearly disprove this rule being universal, though.

Flooring produces incorrect results for Slovak and I bet a lot of other languages too, including English. Actually, assuming the information in the CLDR table is correct (and that my understanding of it is correct), Scottish Gaelic suffers as well.

I haven't really looked into it, but I think a fully-featured floating-point version of ngettext wouldn't be possible without writing our own i18n system/forking gettext. We'd probably need to extend the plural expression format and who knows if/how that would work with Transifex.

I'd really like to know how other projects deal with this issue, that is if they care at all. Perhaps we'd be better off using an abbreviation or a universal unit symbol, like "%d s", for the time being.

[1] http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Plural-forms.html (at the end of the page)
[2] http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html

-- 
https://code.launchpad.net/~widelands-dev/widelands/test-ngettext/+merge/291587
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/test-ngettext.


References