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 332383 - Please use ngettext for handling plural forms
Please use ngettext for handling plural forms
Status: RESOLVED FIXED
Product: gnome-utils
Classification: Deprecated
Component: gdict
2.13.x
Other All
: Normal normal
: ---
Assigned To: gnome-utils Maintainers
gnome-utils Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-23 23:00 UTC by Gabor Kelemen
Modified: 2006-02-24 13:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed patch (614 bytes, patch)
2006-02-23 23:01 UTC, Gabor Kelemen
none Details | Review

Description Gabor Kelemen 2006-02-23 23:00:52 UTC
Please describe the problem:
In gdict-window.c, the following code is used to handle plural forms:

   if (count == -1)
     message = g_strdup (_("No definitions found"));
  else if (count == 1)
    message = g_strdup (_("A definition found"));
  else
    message = g_strdup_printf (_("%d definitions found"), count);

This is a broken design, as described at
http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals
The correct way would be using ngettext.
I'm attaching a trivial patch, but as it's string freeze, it will need approval
from gnome-i18n@, so please notify them ASAP. 

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Gabor Kelemen 2006-02-23 23:01:31 UTC
Created attachment 60028 [details] [review]
Proposed patch
Comment 2 Emmanuele Bassi (:ebassi) 2006-02-24 00:00:49 UTC
thanks, it's fixed in gnome-utils HEAD.

is this urgent enough to ask a string freeze break request or can it wait for the next release cycle?
Comment 3 Gabor Kelemen 2006-02-24 00:30:01 UTC
Well, as this problem makes translator's job harder (for some languages at least, they probably think it's urgent), i'd recommend to ask for string freeze breakage. 
Comment 4 Emmanuele Bassi (:ebassi) 2006-02-24 01:24:40 UTC
request sent, I'll wait for an approval to backport from HEAD.
Comment 5 Emmanuele Bassi (:ebassi) 2006-02-24 13:39:28 UTC
backported to gnome-2-14. I'm closing this bug.