gnome-language-selector crashed with TypeError in check_status()

Bug #363990 reported by Shahar Or
30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Undecided
Unassigned
language-selector (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: language-selector

Dear friends,

I'm not sure when this happened.

Many blessings.

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/gnome-language-selector
InterpreterPath: /usr/bin/python2.6
Package: language-selector 0.4.2.2
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/gnome-language-selector
ProcEnviron:
 LANG=he_IL.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/gnome-language-selector']
SourcePackage: language-selector
Title: gnome-language-selector crashed with TypeError in check_status()
Uname: Linux 2.6.28-11-generic i686
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse netdev plugdev scanner tape video

Revision history for this message
Shahar Or (mightyiam) wrote :
tags: removed: need-duplicate-check
Colin Watson (cjwatson)
visibility: private → public
Revision history for this message
David Planella (dpm) wrote :

This is due to translations of plurals not including the %d variables from the original string.

Launchpad should be in general checking this, but I've filed bug 456210 in case it doesn't do it in all cases. Colin also mentions that 'msgfmt --check-format' does not seem to catch these errors on python-format strings.

I've also contacted the Hebrew translator to fix them in Launchpad, but in the meantime I've demoted the translations to suggestions so that at least they will not be included in the next translations export to avoid the crash.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.4.16

---------------
language-selector (0.4.16) karmic; urgency=low

  * Add --show-installed option to check-language-support, so that ubiquity
    can arrange to keep language support packages installed that are already
    present in the live filesystem.
  * Enable translation for check-language-support.
  * Mark Arabic translations of "%d to install" and "%d to remove" as fuzzy,
    until such time as they're corrected in Launchpad (LP: #409785).
  * ... and likewise for Hebrew (LP: #363990).

 -- Colin Watson <email address hidden> Tue, 20 Oct 2009 13:02:27 +0100

Changed in language-selector (Ubuntu):
status: New → Fix Released
David Planella (dpm)
tags: added: l10n
Revision history for this message
David Planella (dpm) wrote :

I've noticed that there were more incorrectly translated %s variables in Hebrew, which I've now reported as bug 456290

Revision history for this message
Shahar Or (mightyiam) wrote :

Thanks for good work, David.

Revision history for this message
Yaron (sh-yaron) wrote :

So we have a different problem
The rule in Hebrew is to enumerate a single item with words instead of numerical enumeration
Meaning:
Instead of writing 1 apple as in English in Hebrew it should be One apple
When there are several items they should be enumerated numerically (3 apples)

So changing the strings back to %d won't do the trick...
Ignoring the %d trick was done previously at the "update manager" package, the translation there is "One hour" instead of "%d hour", I'm not sure its working as expected (I reported a misbehave of the app before) but its not crashing either

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

So it seems that in some languages (Arabic as well, see bug 409785) skipping the variable is required in some plural forms. Here's an example for Orca in Arabic (I couldn't quickly find any Hebrew example for a Python app)

#: ../src/orca/braille_generator.py:166
#, python-format
msgid "(%d dialog)"
msgid_plural "(%d dialogs)"
msgstr[0] "(لا حوار)"
msgstr[1] "(حوار واحد)"
msgstr[2] "(حواران)"
msgstr[3] "(%d حوارات)"
msgstr[4] "(%d حوارا)"
msgstr[5] "(%d حوارا)"

> I'm not sure its working as expected (I reported a misbehave of the app before) but its not crashing either

Yaron, do you think you could post a link to the bug you reported against update-manager as well?

Revision history for this message
Yaron (sh-yaron) wrote : Re: [Bug 363990] Re: gnome-language-selector crashed with TypeError in check_status()

> > I'm not sure its working as expected (I reported a misbehave of the
> app before) but its not crashing either
>
> Yaron, do you think you could post a link to the bug you reported
> against update-manager as well?
>

Well off course:
https://bugs.edge.launchpad.net/ubuntu/+source/language-pack-he/+bug/349378

I am the only subscriber to this bug and there are no comments so I guess
that means the bug was completely ignored, I'm glad its useful now

Arabic use 6 plural forms, from what I see in your report for each %d lower
than 3 (until 0 including) they use word based enumeration, each number
higher than 2 uses the %d variable

I'm looking forward to your comments,
Best Regards,
Yaron

Shahar Or (mightyiam)
tags: added: hebrew
Shahar Or (mightyiam)
tags: added: arabic
Revision history for this message
Khaled Hosny (khaledhosny) wrote :

For Arabic, the first 3 forms can be read like "no books", "one book", "three books" where using the word form of the numbers is mandatory because it has morphological and grammatical considerations (i.e. the Arabic phrase for "two books" is one word etc.)

Adi Roiban (adiroiban)
Changed in ubuntu-translations:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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