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 106701 - Please use ngettext for handling plurals in libgtop
Please use ngettext for handling plurals in libgtop
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Martin Baulig
Martin Baulig
Depends on:
Blocks: 116236
 
 
Reported: 2003-02-21 10:03 UTC by Christian Rose
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. Untested, compiled fine. (1.41 KB, patch)
2003-09-19 19:12 UTC, Christian Neumair
none Details | Review
Proposed patch, removed inner gettext calls. (1.39 KB, patch)
2003-09-21 07:50 UTC, Christian Neumair
none Details | Review

Description Christian Rose 2003-02-21 10:03:45 UTC
#: lib/read.c:75
#, c-format
msgid "read %d bytes"

#: lib/read_data.c:66
#, c-format
msgid "read data %d bytes"

#: lib/write.c:48
#, c-format
msgid "write %d bytes"


As mentioned in
http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals,
this 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);
Comment 1 Kjartan Maraas 2003-06-10 17:30:22 UTC
Hmm. We need to branch this package at some point. That is going to be
hard I guess. Or we could just make a stable release. and then start
doing 2.3.x releases? But this will have to be decided ASAP.
Comment 2 Christian Rose 2003-06-10 17:59:39 UTC
Good point. Should probably be brought up on desktop-devel-list.
Comment 3 Christian Neumair 2003-09-19 19:12:34 UTC
Created attachment 20110 [details] [review]
Proposed patch. Untested, compiled fine.
Comment 4 Christian Neumair 2003-09-21 07:50:42 UTC
Created attachment 20157 [details] [review]
Proposed patch, removed inner gettext calls.
Comment 5 Christian Rose 2003-09-30 08:23:31 UTC
Can we have this issue revisited now?
Comment 6 Bastien Nocera 2003-10-20 21:33:15 UTC
Applied to gnome-2-4 and HEAD

2003-10-20  Bastien Nocera  <hadess@hadess.net>
                                                                     
         
        * lib/read.c: (glibtop_read_l):
        * lib/read_data.c: (glibtop_read_data_l):
        * lib/write.c: (glibtop_write_l): apply patch for ngettext support
        by Christian Neumair <chris@gnome-de.org>
Comment 7 Danilo Segan 2003-10-22 00:59:35 UTC
I think you're safe marking this as FIXED, since the "official" target
for ngettext support is Gnome 2.6. This means that it's too late for
Gnome 2.4.

I suggest removing GNOMEVER2.3 keyword and marking this as either
fixed, _or_ marking it as WONTFIX, so it's clear what's the goal.

Unless someone thinks otherwise?