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 106696 - Please use ngettext for handling plurals in gdm
Please use ngettext for handling plurals in gdm
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
Trevor Curtis
Depends on:
Blocks: 116236
 
 
Reported: 2003-02-21 10:03 UTC by Christian Rose
Modified: 2005-02-03 20:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Proposed patch. (5.36 KB, patch)
2003-10-02 17:46 UTC, Christian Neumair
none Details | Review
Proposed patch, 2nd try. Last one was bogus. (5.25 KB, patch)
2003-10-02 17:49 UTC, Christian Neumair
none Details | Review

Description Christian Rose 2003-02-21 10:03:32 UTC
#: gui/gdmlogin.c:218 gui/greeter/greeter_parser.c:948
#: gui/greeter/themes/circles/circles.xml.in.h:4
#: gui/greeter/themes/happygnome/happygnome.xml.in.h:4
#, no-c-format
msgid "User %s will login in %d seconds"

#: gui/gdmphotosetup.c:194
#, c-format
msgid ""
"The picture is too large and the system administrator\n"
"disallowed pictures larger then %d bytes to\n"
"show in the face browser"

#: vicious-extensions/glade-helper.c:234
#, c-format
msgid ""
"An error occured while loading the user interface\n"
"element %s%s from file %s.\n"
"CList type widget should have %d columns.\n"
"Possibly the glade interface description was corrupted.\n"
"%s cannot continue and will exit now.\n"
"You should check your installation of %s or reinstall %s."


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 Danilo Segan 2003-07-13 19:48:30 UTC
All of this applies to following message too.

#: gui/gdmchooser.c:811
#, c-format
msgid ""
"Did not receive any response from host \"%s\" in %d seconds.  Perhaps
the "
"host is not turned on, or is not willing to support a login session
right "
"now.  Please try again later."
Comment 2 Christian Rose 2003-09-30 08:25:27 UTC
Can we revisit this issue now?
Comment 3 Christian Neumair 2003-10-02 17:46:14 UTC
Created attachment 20441 [details] [review]
Proposed patch.
Comment 4 Christian Neumair 2003-10-02 17:49:15 UTC
Created attachment 20442 [details] [review]
Proposed patch, 2nd try. Last one was bogus.
Comment 5 Danilo Segan 2004-02-01 20:29:07 UTC
String freeze time is fast approaching (February 9th), and this is one
of the rare outstanding ngettext related bugs for Gnome 2.6.  Could we
have it fixed ASAP?
Comment 6 Christian Rose 2004-04-07 10:42:41 UTC
gdm2 hasn't branched for gnome-2-6 yet, but when it does this should be fixed on
HEAD.
Comment 7 Christian Rose 2004-08-06 23:05:04 UTC
Could this be fixed this time around?
Comment 8 Christian Neumair 2004-08-07 07:34:55 UTC
The main problem is that there are still some GDM theme XML files lurking around
that AFAIK can't use ngettext, because that would mean that the ngettextized
attributes are neither invariant nor unambiguous.
So maybe we have to use a placeholder and do actual ngettextizing in source.

regs,
 Chris
Comment 9 Kjartan Maraas 2005-01-03 16:21:21 UTC
Would be nice to get the string changes in ASAP.
Comment 10 Brian Cameron 2005-02-03 20:40:37 UTC
Fixed in CVS head.