Bug 106197 - Please use ngettext for handling plurals in redhat-config-soundcard
Summary: Please use ngettext for handling plurals in redhat-config-soundcard
Alias: None
Product: Red Hat Linux Beta
Classification: Retired
Component: redhat-config-soundcard
Version: beta2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Brent Fox
QA Contact: David Lawrence
URL: http://developer.gnome.org/doc/tutori...
Depends On:
Blocks: 106150
TreeView+ depends on / blocked
Reported: 2003-10-03 15:49 UTC by Christian Rose
Modified: 2007-04-18 16:58 UTC (History)
0 users

Clone Of:
Last Closed: 2003-10-08 03:27:26 UTC

Attachments (Terms of Use)

Description Christian Rose 2003-10-03 15:49:47 UTC
#. There is only one card, so hide the tab and border
#: ../src/soundcard.py:143
msgid "The following audio device was detected."

#. There is more than one card, so show the primary device option menu
#: ../src/soundcard.py:149
msgid "The following audio devices were detected."

As mentioned in
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),

Something similar should work in Python too.

Comment 1 Brent Fox 2003-10-08 03:27:26 UTC
I may be wrong, but I believe that ngettext was introduced in Python 2.3.  We
will be staying with Python 2.2 for Cambridge, so I'll defer this to a future

Note You need to log in before you can comment on or make changes to this bug.