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 123852 - Please use ngettext in rhythmbox
Please use ngettext in rhythmbox
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other other
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-10-04 21:31 UTC by Danilo Segan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Danilo Segan 2003-10-04 21:31:36 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.

#: lib/widgets/rb-song-info.c:1101
#, c-format
msgid " (%d channels)"

#: library/rb-library.c:1643
#, c-format
msgid "<b>%.1f</b> days (%ld songs)"

#: library/rb-library.c:1646
#, c-format
msgid "<b>%ld</b> hours and <b>%ld</b> minutes (%ld songs)"

#: sources/rb-audiocd-source.c:1231
#, c-format
msgid "%d songs, %d:%02d:%02d total time"

#: sources/rb-iradio-source.c:486
#, c-format
msgid "<b>%d</b> total stations in <b>%d</b> distinct genres"
Comment 1 Colin Walters 2003-10-07 17:15:03 UTC
Along with this, we should remove the bold too, and add total file size.
Comment 2 Colin Walters 2003-11-05 07:47:31 UTC
Done.
Comment 3 Danilo Segan 2003-11-05 12:10:32 UTC
One message is still left unmodified:

#: sources/rb-audiocd-source.c:1231
#, c-format
msgid "%d songs, %d:%02d:%02d total time"

This should be "pluralized" on "%d songs".

Thanks
Comment 4 Colin Walters 2003-11-05 15:44:02 UTC
Ah, sorry, that file isn't used at the moment (and isn't likely to be
anytime soon).  I've added it to POTFILES.skip.