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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1327419

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1327419/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to