Additional drivers tab crashes if locale is sv and recommended driver available

Bug #1319257 reported by Joakim Fogelström Hardingz
30
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
High
Unassigned
language-pack-sv (Ubuntu)
Fix Released
High
Martin Pitt
Saucy
Fix Released
Undecided
Martin Pitt
Trusty
Fix Released
Undecided
Unassigned
Utopic
Fix Released
High
Martin Pitt
software-properties (Ubuntu)
Invalid
High
Unassigned
Utopic
Invalid
High
Unassigned

Bug Description

Additional drivers tab crashes on swedish locale if there are "recommended" drivers available. This is because the keyword/property "licence" mistakenly has been translated to "license" (note the "s"). See bug #1268134 for further info

Source: language-pack-sv-base/data/sv/LC_MESSAGES/software-properties.po

.
.

   #: ../softwareproperties/gtk/SoftwarePropertiesGtk.py:1276
   #, python-brace-format
   msgid "{base_description} ({licence}, tested)"
   msgstr "{base_description} ({license}, testad)"

.
.
.

This error has already been corrected in the translation on launchpad, but when can we expect it to be pushed out?

description: updated
Revision history for this message
Josef Andersson (northar) wrote :

A query has been forwarded to the mailinglist for translators too, about updates trickling down https://lists.ubuntu.com/archives/ubuntu-translators/2014-May/thread.html
There should really be a warning for translators - do not translate.( I dont see any point in translating it partially (testad)).

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Well, my point is that '{licence}' - as it is inside braces, is the name of a text string used to carry either "open source" or "proprietary" depending on the conditions met, while 'tested' is a text that can be translated. But things like this may not be obvious to the translator if he/she don't recognize python syntax, leaving room for errors like this. So there should be a note to translators about this. But even better would be to change the source code to something like this:

SoftwarePropertiesGtk.py, line1276

   base_string = "{base_description} ({licence}, " + _("tested)")

This way the translator would only have to translate "tested)"

But what i really don't get is line 1278

   base_string = _("{base_description} ({licence})")

There is nothing that may be translated on that line so it should really be:

   base_string = "{base_description} ({licence})"

tags: added: i18n
Changed in software-properties (Ubuntu):
importance: Undecided → High
Changed in ubuntu-translations:
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
David Planella (dpm)
Changed in ubuntu-translations:
status: New → Triaged
importance: High → Critical
Revision history for this message
David Planella (dpm) wrote :

A few notes to answer some of the questions:

- The original string is correctly marked for translation. The reason all arguments are marked for translation is so that languages that need to do so rearrange these arguments in a way that is readable for users.
- Mistranslation of one of the arguments is something gettext should have caught. I know gettext supports error checking using {} formatting strings (albeit since relatively recently), so I'm a bit puzzled as to why it didn't issue a warning in Launchpad. Perhaps LP is running on an Ubuntu version that does not yet include the latest gettext?

As for the fix:
- For Ubuntu 14.10 we're setting up translations and language packs, so it should be fixed automatically shortly
- For Ubuntu 14.04 we're now setting up a schedule [1] for language pack updates and should be fixed there shortly
- For Ubuntu 13.10, we'll need to release an on-demand language pack update.

Changed in software-properties (Ubuntu):
importance: High → Critical
Revision history for this message
David Planella (dpm) wrote :

So looking at the translations exports for 13.10, it seems the latest delta [1] includes the fix already, so we could pick up that file and prepare an SRU, or generate saucy langpacks for sv in the PPA and release that.

/rosetta-saucy/sv/LC_MESSAGES/software-properties.po

#: ../softwareproperties/gtk/SoftwarePropertiesGtk.py:1274
msgid "{base_description} ({licence}, tested)"
msgstr "{base_description} ({licence}, tested)"

[1] http://launchpadlibrarian.net/176039093/ubuntu-saucy-translations-update.tar.gz

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

"The original string is correctly marked for translation. The reason all arguments are marked for translation is so that languages that need to do so rearrange these arguments in a way that is readable for users."

Ah, that makes sense. Didn't think about that :)

Regarding gettext not catching the errors, I would say there is a chance similar bugs like this one may be out there. Somebody ought to take a look at that.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

David Planella wrote:
> The original string is correctly marked for translation. The reason
> all arguments are marked for translation is so that languages that
> need to do so rearrange these arguments in a way that is readable for
> users.

Well, if that's the reason for gettexting it all, I think that line 1276 in SoftwarePropertiesGtk.py ought to be:

base_string = _("%s (%s, tested)") % ("{base_description}", "{licence}")

which would result in

msgid "%s (%s, tested)"

That way the risk for mistakes as the one described in this bug report would be eliminated, but the translators would still be able to reorder the arguments.

Changed in ubuntu-translations:
importance: Critical → High
status: Triaged → Fix Committed
Changed in software-properties (Ubuntu):
importance: Critical → High
status: Confirmed → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

This is fixed in the language-pack-sv package in trusty-proposed. Please test and double-check that it works now. Thanks!

affects: software-properties (Ubuntu) → language-pack-sv (Ubuntu)
Changed in language-pack-sv (Ubuntu Trusty):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

We didn't yet get an utopic langpack export from LP, but once we do this will get fixed in Utopic as well.

Changed in language-pack-sv (Ubuntu Utopic):
status: Triaged → Fix Committed
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

I uploaded language-pack-sv 13.10+20131012ubuntu1 to saucy-proposed which updates to the latest translations and also fixes this crash. Can you please test and confirm that it works now? Thanks!

Changed in language-pack-sv (Ubuntu Saucy):
status: New → Fix Committed
assignee: nobody → Martin Pitt (pitti)
tags: added: verification-needed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Martin: Even if the immediate issue is about to be fixed, I think there is room for improvement of the software-properties code (comment #7), so I add back a software-properties task.

no longer affects: software-properties (Ubuntu Saucy)
no longer affects: software-properties (Ubuntu Trusty)
Changed in software-properties (Ubuntu Utopic):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 1319257] Re: Additional drivers tab crashes if locale is sv and recommended driver available

Gunnar Hjalmarsson [2014-06-02 10:40 -0000]:
> @Martin: Even if the immediate issue is about to be fixed, I think there
> is room for improvement of the software-properties code (comment #7), so
> I add back a software-properties task.

Agreed, thanks.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Installed language-pack-sv 1:13.10+20131012ubuntu1 from saucy-proposed
and can confirm that it fixes the issue in this report.

As regards language-pack-sv in trusty-proposed, it was also successfully
tested as reported at
https://wiki.ubuntu.com/Translations/LanguagePackUpdatesQA

tags: added: verification-done
removed: verification-needed
Revision history for this message
Lars Nyström (xetea) wrote :

I installed language-pack-sv 1:14.04+20140522 from trusty proposed and can confirm that it fixes the issue on trusty as well.

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

This bug was fixed in the package language-pack-sv - 1:13.10+20131012ubuntu1

---------------
language-pack-sv (1:13.10+20131012ubuntu1) saucy-proposed; urgency=medium

  * Add current software-properties translations to fix the "{licence} →
    {license}" crash and get some updated translations. (LP: #1319257)
 -- Martin Pitt <email address hidden> Mon, 02 Jun 2014 10:27:41 +0200

Changed in language-pack-sv (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for language-pack-sv 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.

Revision history for this message
Martin Pitt (pitti) wrote :

Trusty update copied as well.

Changed in language-pack-sv (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Fixed in Utopic with language-pack-sv 1:14.10+20140605.

Changed in language-pack-sv (Ubuntu Utopic):
status: Fix Committed → Fix Released
Changed in ubuntu-translations:
status: Fix Committed → Triaged
Revision history for this message
Josef Andersson (northar) wrote :

Shouldnt this bug be closed, fix commited a long time ago

Martin Pitt (pitti)
Changed in software-properties (Ubuntu):
status: Triaged → Invalid
Changed in software-properties (Ubuntu Utopic):
status: Triaged → Invalid
Changed in ubuntu-translations:
status: Triaged → 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.