Bug 106197 - Please use ngettext for handling plurals in redhat-config-soundcard
Please use ngettext for handling plurals in redhat-config-soundcard
Product: Red Hat Linux Beta
Classification: Retired
Component: redhat-config-soundcard (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
David Lawrence
Depends On:
Blocks: 106150
  Show dependency treegraph
Reported: 2003-10-03 11:49 EDT by Christian Rose
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-10-07 23:27:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christian Rose 2003-10-03 11:49:47 EDT
#. 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-07 23:27:26 EDT
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.