[Hardy] Single quote prevents synaptic from running in language-selector

Bug #241904 reported by Angelo P. Castellani on 2008-06-21
40
Affects Status Importance Assigned to Milestone
language-selector
Fix Released
Undecided
Unassigned
language-selector (Ubuntu)
Undecided
Unassigned
Nominated for Hardy by Angelo P. Castellani
Jaunty
Undecided
Unassigned

Bug Description

Binary package hint: language-selector

A single quote present in the italian translation prevents GtkLanguageSelector to run synaptic.
The single quote is present in the string got by gettext as the finish-str of synaptic.
This bug makes the program abort the commit, *no changes at all* are done to the system.
I attach a quick and dirty patch to the problem, it isn't for sure a good solution.
The same problem could be present in other locations, by a quick look I haven't spot it however.

Test case:

1. use language-selector to install the basic translations for Italian
2. Unset the "Keep same" checkbox.
3. set "For my menus and windows, use:" to "Italiano (Italia)"
4. log out and in again. Your interface should now be in Italian.
5. Start language-selector again (Sistema -> Amministrazione -> Supporto lingue)
6. Click on the "Installa/Rimuovi lingue..." button
7. select or deselect any language component
8. Click on "Applica modifiche"
9. synaptic should be started and installing or removing the component you have selected.
10. When finished the dialogbox like shown in the attachment should appear.

Related branches

Angelo P. Castellani (ang3l0) wrote :
Angelo P. Castellani (ang3l0) wrote :

For the sake of clearness, I mean with single quote the apostophe (').

Which is tipically a special character of many shells (bash!).

Maurizio Moriconi (bugman) wrote :

Assigned to Italian Translation Team

Changed in language-selector:
assignee: nobody → ubuntu-it-l10n
Milo Casagrande (milo) wrote :

I think, IMO, this problem should be addressed within the program. We can provide an alternative translation anyway, but the apostrophe is a common character in italian and the problem could come out again.

BTW, is it really because of that string that the program doesn't work?

Sergio Zanchetta (primes2h) wrote :

In fact there is no malformed string in language-selector italian translator.
I think it is a language-selector bug itself.

Launching it from terminal I got this error message:

(gnome-language-selector:8273): libglade-WARNING **: Error loading image: Apertura del file «/usr/share/language-selector//data/config-language» fallita: Nessun file o directory

(gnome-language-selector:8273): libglade-WARNING **: could not convert string to type `GdkPixbuf' for property `icon'
/usr/lib/python2.5/site-packages/LanguageSelector/gtk/GtkLanguageSelector.py:571: GtkWarning: gtk_cell_view_set_cell_data: assertion `cell_view->priv->displayed_row != NULL' failed
  cell = combo.get_child().get_cell_renderers()[0]

If I select another language (e.g. English) in addition to Italian to install, It does nothing.

Reassigning this Bug.

Changed in language-selector:
assignee: ubuntu-it-l10n → ubuntu-desktop
status: New → Confirmed
Sergio Zanchetta (primes2h) wrote :

I suspect it is a more general problem, not just related to Italian language.

Sergio Zanchetta (primes2h) wrote :

Reassigned to desktop-bugs. Sorry.

Changed in language-selector:
assignee: ubuntu-desktop → desktop-bugs
Angelo P. Castellani (ang3l0) wrote :

Hi all and thanks for the interest.

The current italian translation is correct, the problem is present in the program (as you can see by the attached patch).

Removing the apostrophe in the italian translation isn't a solution to the problem, but only a quick workaround. I don't even know if apostrophe is present in other translations.

I hope this bug could be properly addressed in the program.

Thanks for the support

Sergio Zanchetta (primes2h) wrote :

I just found out a dupe of this bug happening in another language so it's clear it is a more general problem.

Changed in language-selector:
assignee: desktop-bugs → nobody
Kyle Nitzsche (knitzsche) wrote :

If the --finish-str is commented out, as in the previous patch, synaptic's *default* finish message is displayed in a pop-up, which is generic to package installation instead of being specific to language availability.

This is not a terrible solution, although language installation is already a bit confusing, therefore I prefer the following:

Search the returned translation for apostrophes and replace them with... with what? This is the question. I have tried replacement with escaped single quotes, with the whole thing surrounded in double quotes, and various other approaches, none of which worked. However, if the apostrophe is replaced with an accent grave character: ` (U+0060), it works and *looks* (almost) like an apostrophe. While this is technically a little incorrect language-wise, I propose that it is close enough that it should be comprehensible to the user.

This approach leverages the existing translations, is generic to all languages (not just Italian), provides the user with the intended language-specific message instead of the generic synaptic finish-str message.

I'll attach an image of the Italian pop-up with my fix and a patch.

Kyle Nitzsche (knitzsche) wrote :
Arne Goetje (arnegoetje) wrote :
description: updated
Arne Goetje (arnegoetje) wrote :

fixed in rev. 244 in the bzr trunk

Changed in language-selector:
status: New → Fix Released
Michael Vogt (mvo) wrote :

Uploading to jaunty-proposed, please also copy to karmic

Martin Pitt (pitti) wrote :

Accepted language-selector into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in language-selector (Ubuntu Jaunty):
status: New → Fix Committed
tags: added: verification-needed
Changed in language-selector (Ubuntu):
status: Confirmed → Fix Committed
Sebastien Bacher (seb128) wrote :

there is nothing else to sponsor so unsubscribing the team now

Loïc Minier (lool) wrote :

Fix was uploaded to karmic, but upload without -v caused this bug to remain open.

Changed in language-selector (Ubuntu):
status: Fix Committed → Fix Released
Kyle Nitzsche (knitzsche) wrote :

I tested version 0.4.2.3 from jaunty-proposed, and it fixes the bug (when in Italian locale, you can install new languages).

Can this be pushed to jaunty-updates? We'd like it in oem.

Martin Pitt (pitti) on 2009-07-02
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

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

---------------
language-selector (0.4.2.3) jaunty-proposed; urgency=low

  * LanguageSelector/gtk/GtkLanguageSelector.py:
    - escape "'" to workaround problem with gksu and its
      parameter parsing (LP: #241904)

 -- Michael Vogt <email address hidden> Tue, 28 Apr 2009 18:50:12 +0200

Changed in language-selector (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Michael Terry (mterry) on 2009-10-28
tags: added: oem-services
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