GNOME Bugzilla – Bug 123860
Please use ngettext for handling plurals in Gnumeric
Last modified: 2006-06-22 22:40:16 UTC
(Following paragraphs copied from bug 116236 verbatim) As mentioned in http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals, the common way of handling plurals is broken for many locales. A way to solve this is by using ngettext instead, as mentioned in that document. A simple code example of code using ngettext: g_printf (ngettext ("Found %d file.", "Found %d files.", nbr_of_files), nbr_of_files); These are the relevant messages. #: plugins/excel/ms-excel-write.c:3753 #, c-format msgid "" "Some content will be lost when saving as MS Excel (tm) 95. It only supports %" "d rows, and this workbook has %d" #: plugins/excel/ms-excel-write.c:3760 #, c-format msgid "" "Some content will be lost when saving as MS Excel (tm). It only supports %d " "rows, and this workbook has %d" #: src/commands.c:4797 #, c-format msgid "Appending %i Sheets" #: src/dialogs/dialog-stf-format-page.c:126 #, c-format msgid "A maximum of %d columns can be imported." #: src/dialogs/dialog-stf-main-page.c:144 #, c-format msgid "%d of %d lines to import"
Grumble. You are right, of course. We currently have a strings freeze. We can get back to this after we thaw. Any idea about the proper way to handle msgid "%d of %d lines to import" where _two_ numbers are involved?
Of course it's fine to wait on this. Actually, since Gnome Office is following the Gnome release schedule (right?), and only Gnome 2.5 and Gnome 2.6 will include ngettext fixes, it'd be okay to do the same with Gnumeric. On the "%d of %d somethings", you should 'pluralize' that on the second %d. The more troublesome would be cases like "%d cars of %d vehicles" (nouns or adjectives take different forms depending on the number), but there's no such case in here, so nothing to worry about.
We'll look at this after we branch (hopefully next week)
Any news here?
We are open for this kind of change, just havne't gotten around to it. Any chance for a patch?
fixed in cvs