arabic translations cause a crash

Bug #269379 reported by Jonathan Riddell
12
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Undecided
Unassigned
language-pack-ar (Ubuntu)
Invalid
Undecided
Unassigned
update-manager (Ubuntu)
Fix Released
Undecided
Michael Vogt

Bug Description

Binary package hint: update-manager

When running the DistUpgrade tool with Arabic translations I get a crash. This is caused by the translation not containing the necessary %s string. I think the tool should be able to recover from this.

  File "dist-upgrade.py", line 76, in <module>
    app.run()
  File "/home/jr/src/update-manager/main/DistUpgrade/DistUpgradeController.py", line 1574, in run
    self.fullUpgrade()
  File "/home/jr/src/update-manager/main/DistUpgrade/DistUpgradeController.py", line 1536, in fullUpgrade
    if not self.askDistUpgrade()
  File "/home/jr/src/update-manager/main/DistUpgrade/DistUpgradeController.py", line 845, in askDistUpgrade
    self.cache.requiredDownload)
  File "/home/jr/src/update-manager/main/DistUpgrade/DistUpgradeViewGtk.py", line 563, in confirmChanges
    DistUpgradeView.confirmChanges(self, summary, changes, downloadSize)
  File "/home/jr/src/update-manager/main/DistUpgrade/DistUpgradeView.py", line 219, in confirmChanges
    "installed.",pkgs_inst) % pkgs_inst
TypeError: not all arguments converted during string formatting

Revision history for this message
Ossama M. Khayat (okhayat) wrote :

Can you please point me to the translation so i can fix it? Never used Launchpad for translation before, as I usually do the Debian translations and submit them to Debian directly.

Revision history for this message
Djihed (djihed) wrote :

What does DistUpgrade do? does it compile .mo files from .po files at all?

As Ossama said, we need to know where this string is coming from (if the cause is a string).

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

Thanks for your bugreport.

Just to clarify, this happens on a update from hardy to intrepid? Or when you update from gutsy to hardy ?

Changed in update-manager:
assignee: nobody → mvo
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
update-manager (1:0.93.14) intrepid; urgency=low

  * po/*.po:
    - updated to the latest launchpad translations
  * DistUpgrade/DistUpgradeGettext.py:
    - add more robust version of gettext() that does not
      crash if incorrect number arguments is passed (LP: #269379)

 -- Michael Vogt <email address hidden> Mon, 15 Sep 2008 13:07:54 +0200

Changed in update-manager:
status: Incomplete → Fix Released
Revision history for this message
Jad Madi (jad) wrote :

So it was a gettext related issue not a translation string issue?

Revision history for this message
Ahmad Gharbeia أحمد غربية (gharbeia) wrote : Re: [Bug 269379] Re: arabic translations cause a crash

gettext benefited from tightening the code, but there's still a string
messed up somewhere in the Arabic translation.

On Mon, Sep 15, 2008 at 2:18 PM, Jad Madi <email address hidden> wrote:
> So it was a gettext related issue not a translation string issue?

Revision history for this message
Adi Roiban (adiroiban) wrote :

Is this still a problem or it was fixed?

Changed in language-pack-ar (Ubuntu):
status: New → Invalid
Changed in ubuntu-translations:
status: New → Incomplete
Revision history for this message
Djihed (djihed) wrote :

Ultimately this should be fixed in Python's support of gettext.

A mis-formatted translated string shouldn't cause the application to crash - I can think of many ways to mess up the user's applications by putting such strings in a declared directory. All I need is a few files and an environment variable.

These are valid in C, BTW.

PS. Khaled: note these strings please.

Revision history for this message
David Planella (dpm) wrote :

I'm closing the Ubuntu Translations task, as I understand that this is fixed. If there are other problematic strings, please, feel free to reopen or file a new bug.

I added a comment here with an explanation on the differences on the handling of arguments in formatted strings in C and Python, and why this problem was heppening:

https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/409785/comments/9

Changed in ubuntu-translations:
status: Incomplete → 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.