Onboard crashes due to mixup in Catalan Translation

Bug #999155 reported by marmuta on 2012-05-14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
onboard (Ubuntu)

Bug Description

In response to https://bugs.launchpad.net/ubuntu/+source/onboard/+bug/930891/comments/13:

There is a translation mixup with the Catalan language in the 0.97 branch of Onboard.
"{description} '{filepath}' found." was translated as
"S'ha trobat {description} «{filename}»."

Onboard 0.97.0 fails to start:

Traceback (most recent call last):
  File "/usr/bin/onboard", line 16, in <module>
    ob = Onboard()
  File "/usr/lib/python2.7/dist-packages/Onboard/OnboardGtk.py", line 64, in __init__
  File "/usr/lib/python2.7/dist-packages/Onboard/OnboardGtk.py", line 86, in init
  File "/usr/lib/python2.7/dist-packages/Onboard/OnboardGtk.py", line 350, in reload_layout
  File "/usr/lib/python2.7/dist-packages/Onboard/Config.py", line 387, in get_layout_filename
  File "/usr/lib/python2.7/dist-packages/Onboard/ConfigUtils.py", line 233, in _get_user_sys_filename_gs
  File "/usr/lib/python2.7/dist-packages/Onboard/ConfigUtils.py", line 276, in _get_user_sys_filename
    .format(description=description, filepath=filepath))
KeyError: 'filename'

Onboard 0.97.1 just prints warnings:

WARNING:utils: _format: Skipping bad translation msgid='{description} '{filepath}' found.' msgstr='S'ha trobat {description} «{filename}».' KeyError: u'filename'

marmuta (marmuta) wrote :
Changed in onboard (Ubuntu):
status: New → Confirmed
marmuta (marmuta) on 2012-05-14
Changed in onboard:
status: New → Fix Committed
tags: added: a11y
David Planella (dpm) wrote :

Hm, it sounds suspicious to me that two translation teams (Spanish, Catalan) who are very active and do peer review of translations got exactly the same one wrong.

Was it because someone in the development team automatically unfuzzied translations after a code change from {filename} to {filepath}?

Note that I'm not trying to blame anyone here. It may well be that we translators got it wrong, but this is a Critical bug, and I'd like to find out how many languages it will potentially affect, as we will need to release language packs to fix it.


Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Critical
marmuta (marmuta) wrote :

There are two more besides Catalan:
$ grep -A 2 -e '{description} .{filepath}. found' po/*.po | grep filename
po/ast.po-msgstr "{description} «{filename}» alcontrada."
po/ca.po-msgstr "S'ha trobat {description} «{filename}»."
po/ug.po-msgstr "{description} '{filename}' تېپىلدى."

I'm wondering myself what happened. We're not touching the po files directly, so far translations were only ever imported into bzr, never changed manually. I'm just correcting the occasional translation in launchpad when I find something obvious.

In the source, the last string change was in rev. 533, from "{} '{}' found." to the current "{description} '{filepath}' found.". It appears that {filename} was never part of this string.

My guess is as good as yours, but what I assumed had happened was that translators copied from surrounding translations. In the source code that string is the odd one out, i.e. the only one with {filepath}, the ones before use {filename}. I'll try to avoid that confusion in the future, but it's probably better to keep that string as it is now.

marmuta (marmuta) wrote :

I've changed the Asturian one here

but only suggested the Uyghur one, someone better look at this. I'm not used to right-toleft writing.

Let me know if you need separate bug reports.

Francesco Fumanti (frafu) wrote :


Could the problem of translations being unfuzzied be caused when I export translations from launchpad into our branch? Here is the procedure that I use:

As you probably know, Onboard uses the Ubuntu translator team for upstream and downstream; so the translations are shared both ways. However, we do not use the automatic export of translations to get new translations into our branch. When we want to update the translations in our branch, I do the following:

- I ask launchpad for a tarball with the po files
- after adjusting the filenames of the files in the tarball, I replace the po files in our branch with the files of the tarball
- I call "./setup.py build_i18n --merge-po" and "./setup.py clean -a", commit and push the changes

Could it be the "./setup.py build_i18n --merge-po" command that causes the trouble?

marmuta (marmuta) on 2012-05-17
description: updated
marmuta (marmuta) wrote :

Francesco, looking through the source, "./setup.py build_i18n --merge-po" basically calls intltool-update without the -p option. The only thing touching the po files then appears to be msgmerge. That notorious string was pretty unique since revision 533, as in the only one with '{filepath]' as a field name. I tend to think this makes it unlikely that anything went wrong with the merge, but I'm not the expert.

I had a look at the other relevant branches, 0.96 and trunk, but there is no record of '{filename}' in this string. Before rev. 533, '{filename}' wasn't in any other string either.

AlbertJB (albertjb) wrote :

I am still not able to run onboard on gnome-classic no effects locale catalan. Any news on that?

AlbertJB (albertjb) wrote :

Sorry, I forgot to add the error message:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/Onboard/OnboardGtk.py", line 86, in do_activate
  File "/usr/lib/python2.7/dist-packages/Onboard/OnboardGtk.py", line 101, in init
  File "/usr/lib/python2.7/dist-packages/Onboard/Config.py", line 256, in init
  File "/usr/lib/python2.7/dist-packages/Onboard/Config.py", line 547, in apply_theme
    theme_filename = self.theme_filename
  File "/usr/lib/python2.7/dist-packages/Onboard/Config.py", line 519, in get_theme_filename
    "." + Theme.extension()))
  File "/usr/lib/python2.7/dist-packages/Onboard/ConfigUtils.py", line 275, in _get_user_sys_filename_gs
  File "/usr/lib/python2.7/dist-packages/Onboard/ConfigUtils.py", line 318, in _get_user_sys_filename
    .format(description=description, filepath=filepath))
KeyError: u'filename'

marmuta (marmuta) wrote :

Gosset, there are a couple of options until the translation is updated:

Try temporarily running with the English or Spanish user interface:
$ LANGUAGE=en onboard
$ LANGUAGE=es onboard

or, disable the catalan translation (will be restored when language-pack-gnome-ca-base is updated):
$ sudo mv /usr/share/locale-langpack/ca/LC_MESSAGES/onboard.mo{,_}

or get the latest Onboard from our PPA, quoting Francesco:
"You can find Onboard 0.97.1, that contains the fix to this problem in our Stable PPA for oneiric, precise and quantal: https://launchpad.net/~onboard/+archive/stable"

AlbertJB (albertjb) wrote :

Thanks marmuta, it's not urgent for me to use the onboard, but I might try running it in English if I really need it some day. It's good news to know it will be a new version of Onboard which will fix this.



You can change the Exec line at:

/usr/share/applications/onboard.desktop or ~/.local/share/applications/onboard.desktop


Exec=env LANGUAGE=es onboard

and you will have onboard running in Spanish language.

marmuta (marmuta) wrote :

Closing for upstream Onboard as the fix has been released with Onboard 0.97.1, available in Ubuntu 12.10.

Changed in onboard:
status: Fix Committed → Fix Released
AlbertJB (albertjb) wrote :

I didn't see your response, @Josep Pujades.

I've changed the exec line in both .desktop files with no luck :( Obviously I'm still on Ubuntu 12.04, locale ca_ES, gnome classic no effects. Maybe the Exec=env fails?

I have not the intention of upgrading to 12.10. @marmuta, aren't you fixing this bug for Ubuntu 12.04? :(

Francesco Fumanti (frafu) wrote :

We have filed a bug report to have the version of Onboard in precise updated to 0.97.1, that should contain the fix.

In the meantime, you can get it from our PPA:

Stéphane Graber (stgraber) wrote :

Marking In Progress as it's in the unapproved queue, however it looks like this bug would need some updating to match SRU criteria (missing test case, missing rational and missing regression potential sections).

Changed in onboard (Ubuntu):
status: Confirmed → In Progress
Francesco Fumanti (frafu) wrote :

In reply to comment #14 and #15:

Here is the SRU that I mentioned in comment #14:

However, the delta between version 0.97.0 and 0.97.1 was considered to huge for an SRU, so we were asked whether we could cherry-pick only the fix for the translation bug in order to add it to the 0.97.0 package available in the main repository for precise. marmuta, the main coder of Onboard since quite some time, derived a patch from version 0.97.1 to fix the translation bug in 0.97.0 in order to propose it as an alternative SRU for precise. Here it is:

The SRU criteria are essentially the same as described in the second SRU bug thread; in this thread, it is a bug in another language file that causes Onboard to crash. The purpose of the fix is to have Onboard ignore the translation strings with errors and keep on running. This is important, because people using an on-screen keyboard lose their main interaction device if the on-screen keyboard, which is Onboard in Ubuntu, crashes.

If the catalan language file has not been updated in the meanwhile (there was a language pack update a few days ago), the fix can simply be tested by running Onboard with the catalan language. The details about how to do it can be found in the second SRU bug thread mentioned here.

Hello marmuta, or anyone else affected,

Accepted onboard into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/onboard/0.97.0-0ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
marmuta (marmuta) wrote :

Tested Onboard 0.97.0-0ubuntu4 proposed in Precise and didn't experience any crashes with the Catalan translation. No warning in the console either, so the Catalan translation seems to have been updated in the meantime.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package onboard - 0.97.0-0ubuntu4

onboard (0.97.0-0ubuntu4) precise-proposed; urgency=low

  * Request for sponsorship: Update available (LP: #1023434)
  * Do not crash on errors in translation files (LP: #999155)
  * debian/control: Update Standards-Version to 3.9.3
 -- Francesco Fumanti <email address hidden> Thu, 12 Jul 2012 20:58:55 +0200

Changed in onboard (Ubuntu):
status: In Progress → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

David Planella (dpm) on 2012-10-18
Changed in ubuntu-translations:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers