After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 123860 - Please use ngettext for handling plurals in Gnumeric
Please use ngettext for handling plurals in Gnumeric
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other All
: Low minor
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2003-10-04 22:18 UTC by Danilo Segan
Modified: 2006-06-22 22:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Danilo Segan 2003-10-04 22:18:41 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"
Comment 1 Morten Welinder 2003-10-04 22:45:29 UTC
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?
Comment 2 Danilo Segan 2003-10-04 23:12:41 UTC
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.
Comment 3 Jody Goldberg 2003-10-17 04:57:51 UTC
We'll look at this after we branch (hopefully next week)
Comment 4 Danilo Segan 2005-07-28 10:02:04 UTC
Any news here?
Comment 5 Morten Welinder 2005-07-28 15:11:33 UTC
We are open for this kind of change, just havne't gotten around to it.

Any chance for a patch?
Comment 6 Andreas J. Guelzow 2006-06-22 22:39:41 UTC
fixed in cvs