Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 106197

Summary: Please use ngettext for handling plurals in redhat-config-soundcard
Product: [Retired] Red Hat Linux Beta Reporter: Christian Rose <menthos>
Component: redhat-config-soundcardAssignee: Brent Fox <bfox>
Status: CLOSED DEFERRED QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: beta2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-08 03:27:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 106150    

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
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);

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
release.