Plural strings need named arguments to be properly translatable in all languages

Bug #630955 reported by David Planella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Medium
Mohamed Amine Ilidrissi
software-center (Ubuntu)
Fix Released
Medium
Mohamed Amine Ilidrissi

Bug Description

Binary package hint: software-center

The following translatable strings in the code are correctly marked for plural translation:

Install %s Item
_Hide %i technical item_
_Show %i technical item_

However, they use unnamed arguments (%s, %i), which do not allow some languages such as Arabic and Hebrew to correctly translate the strings. Named arguments should be used instead (e.g. %(item)s, %(tech_item)i ).

The use of unnamed arguments in python plural strings is also a potential crasher, since gettext does not support error checking of those (see http://savannah.gnu.org/bugs/?30854)

Related branches

David Planella (dpm)
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Medium
Changed in software-center (Ubuntu):
status: New → In Progress
assignee: nobody → Mohamed Amine IL Idrissi (ilidrissi.amine)
Changed in ubuntu-translations:
status: Triaged → In Progress
assignee: nobody → Mohamed Amine IL Idrissi (ilidrissi.amine)
Changed in software-center (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Kiwinote (kiwinote) wrote :

Hi Mohamed! Thanks for working on this. It would seem that a few revisions of your branch got lost somewhere along the way (I assume due to string freeze), so I've updated them to current trunk and pushed it into a branch which should make it into trunk shortly. Thanks again for your help!

Changed in software-center (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 3.1.3

---------------
software-center (3.1.3) natty; urgency=low

  [ Michael Vogt ]
  * daily-build.recipe:
    - add daily build recipe
  * test/test_xapian.py:
    - add lowlevel test for "find more similar apps" DB query
  * softwarecenter/db/update.py:
    - generate spell checking data
  * softwarecenter/enums.py:
    - increase DB version (because we now have spell checking in the DB)
  * test/test_xapian.py:
    - add lowlevel test for spell checking feature
  * merged lp:~mvo/software-center/apthistory-pickle-cache to avoid
    (re)parsing most of the apthistory

  [ Kiwinote ]
  * apt-xapian-index-plugin/origin.py (tmp location),
    softwarecenter/db/database.py,
    softwarecenter/db/update.py:
    - make search queries containing '-' work (LP: #497708)
  * po/POTFILES.in:
    mark softwarecenter/view/softwarepane.py for translation (LP: #659955)

  [ Mohamed Amine IL Idrissi ]
  * softwarecenter/view/availablepane.py,
    softwarecenter/view/softwarepane.py:
    - use named arguments for translatable plural strings (LP: #630955)
  * softwarecenter/view/historypane.py:
    - use 'updated' instead of 'upgraded' (LP: #635196)

  [ Gary Lasker ]
  * softwarecenter/app.py:
    - remove unused code; we don't lazy-load entire history pane, rather
      we create the pane UI but then load/parse apthistory on demand
  * po/POTFILES.in:
    - mark login_sso.py, update.py, dependency_dialogs.py and
      purchasedialog.py for translation
 -- Michael Vogt <email address hidden> Tue, 30 Nov 2010 14:40:59 +0100

Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
Gabor Kelemen (kelemeng)
Changed in ubuntu-translations:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.