Three messages should be in a singular/plural form

Bug #351665 reported by Osama Khalid
2
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Robert Roth

Bug Description

Binary package hint: update-manager

The messages:
"0 KB" (Located in ../DistUpgrade/utils.py:233 ../UpdateManager/Core/utils.py:233),
"1 KB" (Located in ../DistUpgrade/utils.py:236 ../UpdateManager/Core/utils.py:236) and
"%.0f KB" (Located in ../DistUpgrade/utils.py:239 ../UpdateManager/Core/utils.py:239).

Should be in a singular/plural form instead of one. Some languages (like Arabic) has more than just two forms. singular/plural form will handle this.

Related branches

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

We are currently in string freeze, do you think we should break that freeze for the plural change? If so we should coordinate with <email address hidden>, if they do not have objections I will do the change.

Changed in update-manager (Ubuntu):
assignee: nobody → mvo
importance: Undecided → Medium
milestone: none → later
status: New → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :

Here is the code in question:

def humanize_size(bytes):
    """
    Convert a given size in bytes to a nicer better readable unit
    """
    if bytes == 0:
        # TRANSLATORS: download size is 0
        return _("0 KB")
    elif bytes < 1024:
        # TRANSLATORS: download size of very small updates
        return _("1 KB")
    elif bytes < 1024 * 1024:
        # TRANSLATORS: download size of small updates, e.g. "250 KB"
        return locale.format(_("%.0f KB"), bytes/1024)
    else:
        # TRANSLATORS: download size of updates, e.g. "2.3 MB"
        return locale.format(_("%.1f MB"), bytes / 1024 / 1024)

Michael Vogt (mvo)
Changed in update-manager (Ubuntu):
assignee: Michael Vogt (mvo) → nobody
Robert Roth (evfool)
Changed in update-manager (Ubuntu):
assignee: nobody → Robert Roth (evfool)
status: Triaged → In Progress
Robert Roth (evfool)
Changed in update-manager (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.156.3

---------------
update-manager (1:0.156.3) precise; urgency=low

  [ Jean-Baptiste Lallement ]
  * lp:~jibel/update-manager/AutoUpgradeTester-desktoptests:
    New tests for Ubuntu Desktop LTS upgrade:
    * autologin check
    * user settings check: wallpaper, theme, keyboard layout, custom
      launchers (desktop and panel)
  * lp:~jibel/update-manager/AutoUpgradeTester-portlocking:
    - automatically allocate free ssh/vnc ports

  [ Colin Watson ]
  * Clean up a few pyflakes warnings.
  * DistUpgrade/DistUpgradeMain.py
    - Make sure main.log is actually created.
  * DistUpgrade/removal_blacklist.cfg:
    - Only blacklist unity, not all packages whose names start with unity.

  [ Robert Roth ]
  * lp:~evfool/update-manager/lp351665:
    - Use ngettext to humanize size (LP: #351665)
  * lp:~evfool/update-manager/distupgradefixes:
    - DistUpgrade changes dialog text fixes
      (LP: #348517, LP: #513908)
    - Fix resize on changes dialog to stretch the details
      (LP: #294293)

  [ Michael Vogt ]
  * add humanize_size() test
  * pyflakes fixes
  * tests/test_pyflakes.py:
    - always pyflakes as part of the pre-build process to ensure
      we are clean
  * disable apply_dselect_upgrades()
 -- Michael Vogt <email address hidden> Fri, 03 Feb 2012 09:56:29 +0100

Changed in update-manager (Ubuntu):
status: Fix Committed → 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.