glib translations are not included in the touch langpacks

Bug #1478208 reported by Nicolas Delvaux
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
langpack-o-matic
Fix Released
High
Martin Pitt

Bug Description

When updating a click package or the system image, the download progress is not properly internationalized. Same thing in the Storage view, all units are displayed the English way.

After investigating, the following string:
http://bazaar.launchpad.net/~system-settings-touch/ubuntu-system-settings/trunk/view/head:/plugins/system-update/PageComponent.qml#L525

is translated in my language, except for the size unit. For example, "12 MB" should be displayed as "12 Mo" in French.

Apparently, this all boils down to http://bazaar.launchpad.net/~system-settings-touch/ubuntu-system-settings/trunk/view/head:/src/utils.cpp#L72 , which calls g_format_size(), which does not return a localised string as it is supposed too.

Maybe this is because of a missing environment variable, or a missing glib initialisation (setlocale()?)
In fact, are the glib translations even installed on the phone?

Tags: touch-l10n
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Nicolas Delvaux (malizor) wrote :

In fact this is just that: GLib translations are not included in the phone.

I simply copied "/usr/share/locale-langpack/fr/LC_MESSAGES/glib20.mo" from my Ubuntu 15.04 desktop to the same location on the phone and, after restarting the Settings app, all size units are properly translated.

I see two possibilities here:
* include glib translation files by default on the phone (where should this be reported?)
* use something else than glib to format sizes in ubuntu-system-settings (are there other applications using glib on the phone?)

Revision history for this message
Nicolas Delvaux (malizor) wrote :

I sent a mail to the ubuntu-translators mailing list about this, we will see.

Revision history for this message
Sebastien Bacher (seb128) wrote :

http://bazaar.launchpad.net/~ubuntu-langpack/langpack-o-matic/main/view/head:/maps/pkglist-touch-wily includes the glib domain, unsure what else is needed, dpm or pitti, can you help there?

summary: - File size units are not localized
+ glib translations are not included in the touch langpacks
affects: ubuntu-system-settings (Ubuntu) → langpack-o-matic
Revision history for this message
Nicolas Delvaux (malizor) wrote :

The file contains "glib2.0", but I guess it should rather contain "glib20", as this is the name of the .po/.mo.

In fact, the upstream GLib gettext domain is "glib20".
https://git.gnome.org/browse/glib/tree/configure.ac#n475

I guess these map files from langpack-o-matic are generated via a script or something, and this is what should be fixed.
Unfortunately I can't investigate further for now.

Víctor R. Ruiz (vrruiz)
tags: added: touch-l10n
Revision history for this message
David Planella (dpm) wrote :

Looking at the template settings in Launchpad, I can see:

- Source package: glib2.0
- Template imported: po/glib20.pot
- Translation domain: glib20
- Priority: 1300

So it seems to me that the domain already matches what upstream expects, so the exported file should be glib20.mo. pitti should be able to tell us if langpack-o-matic skips the file for any particular reason when creating the -touch language pack.

Changed in langpack-o-matic:
importance: Undecided → High
assignee: nobody → Martin Pitt (pitti)
status: New → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

Seems there are several issues there

- the touch want a minimal priority of 1500, maybe glib needs to be updated then?

- the code on http://bazaar.launchpad.net/~ubuntu-langpack/langpack-o-matic/main/view/head:/import#L392 disagrees with the actual naming of the files 'ubuntu_vivid_potemplates' vs 'vivid-potemplates'

- is the fallback case for rtm still needed now that rtm is deprecated?

Revision history for this message
Sebastien Bacher (seb128) wrote :

David changed the priority to 1600, let's see if that fixes it in the next update

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

We had a local hack on macquarie for the changed format on http://people.canonical.com/~dpm/data/ubuntu-l10n/ , but this only considered utopic. I fixed this properly now: http://bazaar.launchpad.net/~ubuntu-langpack/langpack-o-matic/main/revision/535

So it will take the current vivid stats into account. However,

 - http://people.canonical.com/~dpm/data/ubuntu-l10n/ubuntu_vivid_potemplate-stats.json still says "priority 1300" for glib20

 - http://people.canonical.com/~dpm/data/ubuntu-l10n/ubuntu_wily_potemplate-stats.json does not exist yet. I'll add a local hack to use vivid's stats for wily.

I contacted David about both issues.

At the moment we only include templates with a priority >= 1500, to avoid unnecessary translations on the phone. If this should be adjusted, please tell me the new threshold.

> is the fallback case for rtm still needed now that rtm is deprecated?

We might want to go back to RTM for translations in case we cannot make it work with PPAs? (But I've been out of the loop on this for a few weeks)

Changed in langpack-o-matic:
assignee: Martin Pitt (pitti) → David Planella (dpm)
Revision history for this message
David Planella (dpm) wrote :

For the first issue, last afternoon I changed the priority to 1600 for both vivid and wily:

https://translations.launchpad.net/ubuntu/vivid/+source/glib2.0/+pots/glib20/+edit
https://translations.launchpad.net/ubuntu/wily/+source/glib2.0/+pots/glib20/+edit

Looking at http://people.canonical.com/~dpm/data/ubuntu-l10n/ubuntu_vivid_potemplate-stats.json the file is not yet up-to-date, as the next update is today, at 11:10 UTC. So in about ~1h 20 it should be updated with the new priority.

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

For the second issue, I've sent a MP to enable exports of the wily translations data. Once we've got ubuntu-rtm/15.04 up and running, I'll do the same for that distro/series.

https://code.launchpad.net/~dpm/lp-production-crontabs/add-wily-l10n-stats/+merge/266073

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

Thanks David! Back to me, for re-running wily export once the stats are updated.

Changed in langpack-o-matic:
assignee: David Planella (dpm) → Martin Pitt (pitti)
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I built fresh -touch langpacks after the fixed po template stats, and they now contain glib2.0.po. See e. g. http://launchpadlibrarian.net/213027698/language-pack-touch-de_1%3A15.10%2B20150709_1%3A15.10%2B20150723.diff.gz

Changed in langpack-o-matic:
status: In Progress → Fix Released
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.