the update-mananager localization is malformed

Bug #46421 reported by Sami POTIRCA
50
Affects Status Importance Assigned to Milestone
language-pack-gnome-ro-base (Ubuntu)
Fix Released
High
Unassigned

Bug Description

When language is set to Romanian, the update-manager fails to start with this error:

$ sudo update-manager
/usr/lib/python2.4/site-packages/apt/__init__.py:17: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 50, in ?
    parser = OptionParser()
  File "/usr/lib/python2.4/optparse.py", line 1109, in __init__
    self.set_usage(usage)
  File "/usr/lib/python2.4/optparse.py", line 1167, in set_usage
    self.usage = _("%prog [options]")
  File "/usr/lib/python2.4/gettext.py", line 578, in gettext
    return dgettext(_current_domain, message)
  File "/usr/lib/python2.4/gettext.py", line 542, in dgettext
    codeset=_localecodesets.get(domain))
  File "/usr/lib/python2.4/gettext.py", line 490, in translation
    t = _translations.setdefault(key, class_(open(mofile, 'rb')))
  File "/usr/lib/python2.4/gettext.py", line 178, in __init__
    self._parse(fp)
  File "/usr/lib/python2.4/gettext.py", line 303, in _parse
    self.plural = c2py(plural)
  File "/usr/lib/python2.4/gettext.py", line 87, in c2py
    raise ValueError, \
ValueError: plural forms expression error, maybe unbalanced parenthesis

Revision history for this message
Sami POTIRCA (spotirca) wrote : a patch that solves the problem

Only 2 lines modified in update-manager.po (the patch is self-explainatory).

Revision history for this message
Removed by request (removed637280) wrote :

the same when language is set to Polish
$ set | grep LANG
LANG=pl_PL.UTF-8
LANGUAGE=pl_PL:pl:en_GB:en

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

I fixed this in update-manager locally now too for both ro and pl

Revision history for this message
Marius Mihai (psihopatii) wrote :

I've been searching for this solution, but now i don't fiind any update-manager.po file on my system to patch, only update-manager.mo.

Revision history for this message
Sami POTIRCA (spotirca) wrote : Re: [Bug 46421] Re: the update-mananager localization is malformed

On 10/13/06, Marius Mihai <email address hidden> wrote:
>
> I've been searching for this solution, but now i don't fiind any update-
> manager.po file on my system to patch, only update-manager.mo.

That's because the .po file is a source file, whilst the .mo file is the
result (binary file) :)
You can download de .po file from launchpad, apply the patch and then use
msgfmt
in order to create de .mo file:

msgfmt update-manager.po -o update-manager.mo

et voila.

Enjoy,
Spami.

Revision history for this message
Marius Mihai (psihopatii) wrote :

Thanks :P

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

This sounds like another instance of bug #63344.

Changed in language-pack-gnome-ro-base:
status: Unconfirmed → Confirmed
Revision history for this message
Draku (mailselector) wrote :

On Edgy Beta the problem was resolved but with the 1:6.10+20061019 romanian language pack update the problem is still there.

Revision history for this message
Dan Damian (dand) wrote :

I can confirm this bug still exists in edgy, with the latest langpack updates. It's most likely a result of bug #2322.

Any chance we can get a fix for this included in the next langpack update?

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

As commented in a duplicate report of this bug, the problem is related with the plural form expression we had for Romanian. It's now fixed and next language pack update for Dapper, Edgy and Feisty should fix this issue.

Michael Vogt (mvo)
Changed in language-pack-gnome-ro-base:
status: Confirmed → Fix Committed
Revision history for this message
Ovidiu Geaboc (ovidiurg) wrote :

Plural form line is still broken in file update-manager.po from latest update available for edgy. You can see update-manager.po in the source package here https://launchpad.net/ubuntu/+source/language-pack-gnome-ro/1:6.10+20070311

"POT-Creation-Date: 2007-01-23 12:43+0000\n"
"PO-Revision-Date: 2007-02-15 06:52+0000\n"
"Last-Translator: Daniel Comsa <email address hidden>\n"
"Language-Team: Romanian <email address hidden>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=((n == 1 ? 0: (((n %\n"
"100 > 19) || ((n % 100 == 0) && (n != 0))) ? 2: 1)));\n"
"X-Rosetta-Export-Date: 2007-03-11 08:20:32+0000\n"

Revision history for this message
Ovidiu Geaboc (ovidiurg) wrote :

Actually every .po file in language-pack-gnome-ro_6.10+20070311.tar.gz has a malformed plural line.

The correct plural line should be:
"Plural-Forms: nplurals=3; plural=((n == 1 ? 0: (((n % 100 > 19) || ((n % 100 == 0) && (n != 0))) ? 2: 1)))\n"

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Which is normal because we fixed it this week and the data in that package was generated before the fix was done.

We already fixed the plural line the way you suggest, don't worry.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Please, test new exports using the following apt repository:

deb http://people.ubuntu.com/~pitti/langpacks/daily/feisty ./

If you are running dapper or edgy, use this:

deb http://people.ubuntu.com/~pitti/langpacks/daily/edgy-updates ./
or
deb http://people.ubuntu.com/~pitti/langpacks/daily/dapper-updates ./

Thank you.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Given that I didn't get any input, I will assume this is fixed.

Changed in language-pack-gnome-ro-base:
status: Fix Committed → Fix Released
Revision history for this message
Ovidiu Geaboc (ovidiurg) wrote :

Just updated my Edgy with new language packs and so far looks fine. update-manager works in romanian. Thank you.

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.