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 116986 - Please use ngettext for plural forms in mailcheck in gnome-applets
Please use ngettext for plural forms in mailcheck in gnome-applets
Status: RESOLVED DUPLICATE of bug 106698
Product: gnome-applets
Classification: Other
Component: mailcheck
git master
Other other
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 118019 (view as bug list)
Depends on:
Blocks: 116236
 
 
Reported: 2003-07-08 13:43 UTC by Danilo Segan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
Use ngettext() in mailcheck.c (949 bytes, patch)
2003-07-08 14:20 UTC, Danilo Segan
none Details | Review

Description Danilo Segan 2003-07-08 13:43:30 UTC
I'd suggest to use "plural forms" feature of gettext so some strings would
be translateable to much more languages.

You do that using ngettext() calls (check the GNU gettext info manual with
"info gettext").

The particular examples in gnome-applets mailcheck module are:

#: mailcheck/mailcheck.c:925
#, c-format
msgid "%d unread/ %d messages"
msgstr ""

#: mailcheck/mailcheck.c:927
#, c-format
msgid "%d messages"
msgstr ""
Comment 1 Danilo Segan 2003-07-08 14:20:32 UTC
Created attachment 18135 [details] [review]
Use ngettext() in mailcheck.c
Comment 2 Danilo Segan 2003-07-08 14:22:34 UTC
Here's a simple patch that uses ngettext() instead of _(). Because
there's a need to use two separate strings for "unread" and
"messages", the first is split into two strings, and later g_strconcat-ed.

This isn't tested, so please be cautious.
Comment 3 Christian Rose 2003-07-09 09:41:48 UTC
More details on why plurals cause problems and why ngettext is needed
can be found on
http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals.
Comment 4 Kevin Vandersloot 2003-07-26 22:28:41 UTC
*** Bug 118019 has been marked as a duplicate of this bug. ***
Comment 5 Christian Neumair 2003-09-21 07:02:53 UTC

*** This bug has been marked as a duplicate of 106698 ***