Infographic's language not updated until the metric value is changed

Bug #1327419 reported by Andrew Hayzen on 2014-06-06
48
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Medium
Unassigned
Ubuntu Music App
Undecided
Unassigned
Ubuntu Translations
Medium
Unassigned
camera-app (Ubuntu)
Medium
Unassigned
libusermetrics (Ubuntu)
High
Unassigned
libusermetrics (Ubuntu RTM)
High
Unassigned

Bug Description

1) Start the music app
2) Play a track for more than 10 seconds to trigger the metric update
3) Lock and unlock to show the infographic
4) Note, for example, "1 song played today" appears (double tap to cycle through to find music if required)
5) Goto system settings and change the language
6) Restart the device
7) Note the infographic's language has not been updated and it still states '1 song played today'
8) Start the music app
9) Play a track for more than 10 seconds to trigger the metric update
10) Lock and unlock to show the infographic
11) Now notice the infographic's language is now correct, for example "2 Morceaux joues aujourd'hui"

It was expected that step 7 the infographic would show the correct language.

Related branches

Michał Sawicz (saviq) wrote :

This will become even more true with lp:~unity-team/libusermetrics/file-based-infographics, where we'll need to regenerate the infographics on language change or so.

Changed in libusermetrics:
status: New → Confirmed
David Planella (dpm) on 2014-07-29
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Medium
tags: added: touch
Pete Woods (pete-woods) on 2014-09-09
no longer affects: libusermetrics
Nicholas Skaggs (nskaggs) wrote :

This is still in effect. I noticed this without the music application, but changing language causes the infographic to stay in the original language (seemingly until it's value would be changed)

Víctor R. Ruiz (vrruiz) on 2014-11-07
tags: added: touch-l10n
Changed in libusermetrics (Ubuntu):
importance: Undecided → High
status: New → Confirmed
John McAleely (john.mcaleely) wrote :

It seems likely this will appear at launch, when we ship Spanish images that get flipped to english by some users: bug #1404890

John McAleely (john.mcaleely) wrote :

Can someone triage this on to a milestone for canonical-device-system image please?

Changed in libusermetrics (Ubuntu):
assignee: nobody → Thomas Strehl (strehl-t)
Changed in canonical-devices-system-image:
importance: Undecided → Medium
milestone: none → ww09-2015
status: New → Confirmed
Thomas Strehl (strehl-t) on 2015-01-26
Changed in libusermetrics (Ubuntu):
assignee: Thomas Strehl (strehl-t) → Pete Woods (pete-woods)
Pete Woods (pete-woods) on 2015-01-27
Changed in libusermetrics (Ubuntu):
status: Confirmed → In Progress
Noemí (noemi-gallego) wrote :

I've detected that when the device language is in portuguese, the today page is written in english. Do you know if this is happening in any other languages?
In spanish it doesn't happen.

Pete Woods (pete-woods) wrote :

I've attached a branch that allows the infographics to read translations from click packages in addition to the standard language packs.

I've confirmed that this works.

However, the translations for the music app infographics need updating. In its codebase it actually pre-translates the strings before it sends them to the infographics server. What it *should* be doing is tagging the strings from translation, but not translating them itself. Usually you can do this with a dummy pass-through function as below:

    function translateMe(s) {
        return s;
    }

    Metric {
        id: songsMetric
        name: "music-metrics"
        format: translateMe("Songs played today: <b>%1</b>")
        emptyFormat: translateMe("No songs played today")
        domain: "com.ubuntu.music"
    }

and then configure gettext to extract this function.

Pete Woods (pete-woods) wrote :

I've attached a branch for the music app that does the programming part of the fix. Now we need to update the translated strings.

Pete Woods (pete-woods) wrote :

Blocked on bug #1417031

Noemí (noemi-gallego) wrote :

Hi,
This is a list of things that appear in english while having the device in a different language:
German:
- Today Scope -> Settings -> Enable location data.
- Nearby scope -> Settings -> Enable location data
- App scope -> Options -> All os them in english
- Music scope: popular tracks on souncloud, popular tracks on youtube
- Music scope -> Settings -> Half of the options in english
- Video scope: vimeo features
- Video scope -> Settings -> Half in english
- System settings -> Rotation lock

French:
- Today Scope -> Settings -> Enable location data.
- Nearby scope -> Settings -> Enable location data
- App scope -> Options -> All os them in english
- Music scope: popular tracks on souncloud, popular tracks on youtube
- Music scope -> Settings -> Half of the options in english
- Video scope -> Settings -> Half in english

Italian:
- Today Scope -> Settings -> Enable location data.
- Nearby scope -> Settings -> Enable location data
- App scope -> Options -> All os them in english
- Music scope: popular tracks on souncloud, popular tracks on youtube
- Music scope -> Settings -> Half of the options in english
- Video scope -> Settings -> Half in english
- Alarm -> New alarm -> All in english
- Notification bar -> Rotation lock

Portugues:
- Today Scope -> Settings -> Enable location data.
- Today Scope -> Add your fitbit account
- Nearby scope -> Settings -> Enable location data
- App scope -> Options -> All os them in english
- Music scope: popular tracks on souncloud, popular tracks on youtube
- Music scope -> Settings -> Half of the options in english
- Video scope -> Settings -> Half in english

Changed in canonical-devices-system-image:
assignee: nobody → Thomas Strehl (strehl-t)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libusermetrics - 1.1.1+15.04.20150219-0ubuntu1

---------------
libusermetrics (1.1.1+15.04.20150219-0ubuntu1) vivid; urgency=medium

  [ Pete Woods ]
  * Read translations from click packages (LP: #1327419)
 -- CI Train Bot <email address hidden> Thu, 19 Feb 2015 09:31:29 +0000

Changed in libusermetrics (Ubuntu):
status: In Progress → Fix Released
Pete Woods (pete-woods) on 2015-02-23
Changed in libusermetrics (Ubuntu RTM):
importance: Undecided → High
status: New → In Progress
assignee: nobody → Pete Woods (pete-woods)
Changed in camera-app:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Pete Woods (pete-woods)
Changed in music-app:
status: New → In Progress
assignee: nobody → Pete Woods (pete-woods)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libusermetrics - 1.1.1+15.04.20150219~rtm-0ubuntu1

---------------
libusermetrics (1.1.1+15.04.20150219~rtm-0ubuntu1) 14.09; urgency=medium

  [ Pete Woods ]
  * Read translations from click packages (LP: #1327419)
 -- CI Train Bot <email address hidden> Thu, 19 Feb 2015 09:31:21 +0000

Changed in libusermetrics (Ubuntu RTM):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
milestone: ww09-2015 → ww13-ota
status: Confirmed → Fix Released
Noemí (noemi-gallego) wrote :

Hi,
We have done some testing translating the device into russian. The overall feedback is that the translation into Russian is OK but we have found 5 strings in English instead of Russian. Please see the following screenshots:

Pat McGowan (pat-mcgowan) wrote :

@Naomi this should really be a new bug, would you mind?

Noemí (noemi-gallego) wrote :

@Pat done. Here is the new one: https://bugs.launchpad.net/barajas/+bug/1429752

Changed in camera-app:
importance: High → Medium
Changed in camera-app (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Pete Woods (pete-woods)
no longer affects: camera-app
Pete Woods (pete-woods) on 2017-04-10
Changed in canonical-devices-system-image:
assignee: Thomas Strehl (strehl-t) → nobody
Changed in camera-app (Ubuntu):
assignee: Pete Woods (pete-woods) → nobody
Changed in music-app:
assignee: Pete Woods (pete-woods) → nobody
Changed in libusermetrics (Ubuntu RTM):
assignee: Pete Woods (pete-woods) → nobody
Changed in libusermetrics (Ubuntu):
assignee: Pete Woods (pete-woods) → nobody
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

Bug attachments