Merge lp://staging/~unity-team/music-app/infographics-translations into lp://staging/music-app/remix

Proposed by Pete Woods
Status: Needs review
Proposed branch: lp://staging/~unity-team/music-app/infographics-translations
Merge into: lp://staging/music-app/remix
Diff against target: 3589 lines (+609/-565)
69 files modified
music-app.qml (+2/-2)
po/CMakeLists.txt (+1/-0)
po/am.po (+2/-2)
po/ar.po (+2/-2)
po/ast.po (+42/-38)
po/az.po (+1/-1)
po/be.po (+2/-2)
po/bg.po (+2/-2)
po/bn.po (+1/-1)
po/br.po (+2/-2)
po/ca.po (+2/-2)
po/ca@valencia.po (+43/-40)
po/ckb.po (+1/-1)
po/com.ubuntu.music.pot (+36/-36)
po/cs.po (+2/-2)
po/da.po (+2/-2)
po/de.po (+42/-38)
po/el.po (+42/-38)
po/en_AU.po (+2/-2)
po/en_GB.po (+2/-2)
po/eo.po (+1/-1)
po/es.po (+2/-2)
po/eu.po (+2/-2)
po/fa.po (+46/-42)
po/fi.po (+2/-2)
po/fo.po (+1/-1)
po/fr.po (+2/-2)
po/gd.po (+44/-40)
po/gl.po (+2/-2)
po/he.po (+2/-2)
po/hr.po (+1/-1)
po/hu.po (+2/-2)
po/id.po (+2/-2)
po/is.po (+2/-2)
po/it.po (+2/-2)
po/ja.po (+2/-2)
po/km.po (+2/-2)
po/kn.po (+1/-1)
po/ko.po (+2/-2)
po/lv.po (+1/-1)
po/mi.po (+1/-1)
po/ml.po (+1/-1)
po/mr.po (+1/-1)
po/ms.po (+2/-2)
po/my.po (+2/-2)
po/nb.po (+2/-2)
po/nl.po (+2/-2)
po/pa.po (+47/-45)
po/pl.po (+2/-2)
po/ps.po (+1/-1)
po/pt.po (+42/-38)
po/pt_BR.po (+2/-2)
po/ro.po (+44/-40)
po/ru.po (+2/-2)
po/shn.po (+1/-1)
po/si.po (+1/-1)
po/sl.po (+1/-1)
po/sq.po (+1/-1)
po/sr.po (+2/-2)
po/st.po (+1/-1)
po/sv.po (+2/-2)
po/ta.po (+1/-1)
po/te.po (+1/-1)
po/tr.po (+42/-38)
po/ug.po (+2/-2)
po/uk.po (+2/-2)
po/zh_CN.po (+45/-39)
po/zh_HK.po (+2/-2)
po/zh_TW.po (+2/-2)
To merge this branch: bzr merge lp://staging/~unity-team/music-app/infographics-translations
Reviewer Review Type Date Requested Status
Andrew Hayzen Needs Fixing
Victor Thompson Needs Fixing
David Planella Pending
Review via email: mp+248251@code.staging.launchpad.net

This proposal supersedes a proposal from 2015-01-29.

Commit message

Strings sent to infographics are no-longer translated - just extract them to translation catalogue

Description of the change

Strings sent to infographics are no-longer translated - just extract them to translation catalogue

Music app currently does:

"<b>%1</b> " + i18n.tr("songs played today")

this has to be changed to:

i18n.noop("Songs played today: <b>%1</b>")

so that the string that is sent to the infographics server is untranslated, and also so that the message catalogue contains the full string "Songs played today: <b>%1</b>"

Note that this MR is dependent on the addition of the "noop" function to i18n. See bug #1417031.

To post a comment you must log in.
Revision history for this message
Victor Thompson (vthompson) wrote : Posted in a previous version of this proposal

1 inline comment: Is there a reason for changing the format here?

If someone else can get around to testing this, that'd be great. Otherwise, I can do so tonight.

review: Needs Information
Revision history for this message
Victor Thompson (vthompson) wrote : Posted in a previous version of this proposal

Also note, we had a similar MP that was rejected by David Planella [1] for changing the format as a workaround to the singular/plural issue. I don't know if that's your intent with the format change here or not... I believe the preference would be to still use the current translation/format. Additionally, changing the format would require the string be retranslated in each language.

1 - https://code.launchpad.net/~andrew-hayzen/music-app/fix-infographics-1351421/+merge/229506/comments/558727

review: Needs Fixing
Revision history for this message
Pete Woods (pete-woods) wrote : Posted in a previous version of this proposal

The reason for changing the format string is because it's not possible to do natural translations with correct plurals, as the infographics work with floating point numbers, and gettext only supports integers.

I have done my best attempt at updating the translations here. If you want to keep the format string the same, one of the music app developers will have to make a change that is acceptable - this is just me trying to help out.

Revision history for this message
Pete Woods (pete-woods) wrote : Posted in a previous version of this proposal

Thinking about it more, I don't think we have a choice about changing the format string.

The app is doing translate(prefix + "translatable_string") -> infographics server.

The "translatable_string" gets extracted into the catalogue.

The infographics server then tries to translate translate("prefix+translatable_string"). This won't work for two reasons:
1) The catalogue contains "translatable_string" instead of "prefix+translatable_string"
2) The combined string has already been translated by the music app.

We need to simplify all that and just put a straightforward translatable format string into the catalogue, as I have done in this MR.

Revision history for this message
Victor Thompson (vthompson) wrote : Posted in a previous version of this proposal

I've added dpm to this review. It sounds like the following would still be acceptable to your solution:

format: translateMe("<b>%1</b> songs played today")

Clearly that would still require the translations to be updated, but it'd also avoid the natural language for plurals issue. But if the direction for all apps using the infographics will be to use the same workaround, then the Music app should follow.

Revision history for this message
Pete Woods (pete-woods) wrote : Posted in a previous version of this proposal

Well it won't truly avoid the plural problem, due to the issue of the different plural forms for different languages.

However I don't feel strongly about exactly what string will be used in the music app, so if you definitely want to use the one you suggest, that's fine by me.

Revision history for this message
David Planella (dpm) wrote : Posted in a previous version of this proposal

After discussing it on IRC, we've agreed that rather than introducing a new custom translation function, it would make more sense to extend the i18n.tr() API.

See bug 1417031

review: Disapprove
Revision history for this message
Pete Woods (pete-woods) wrote : Posted in a previous version of this proposal

We still need to broadly make this change, even if we use the proposed i18n.noop() function. I will update the MR accordingly.

Revision history for this message
David Planella (dpm) wrote : Posted in a previous version of this proposal

This now looks more inline with the SDK, good work!

Just two comments:
- See inline comment for RTL languages
- I know it's a separate issue that we'll handle separately, but just for the record we should see if we can find a solution or a workaround for supporting plural forms. From my understanding from talking on IRC, the limitation lies in the fact that in theory libusermetrics could be showing floating-point strings, but gettext supports only integers for plural forms.

Approve, but pending the i18n.noop() merge from the SDK upstream

review: Approve
Revision history for this message
Pete Woods (pete-woods) wrote : Posted in a previous version of this proposal

I believe I have updated the RTL languages now (I used the list of RTL languages on Wikipedia as a reference).

826. By Victor Thompson

* Allow walkthrough titles to word wrap up to 2 lines and elide if over 2 lines. Fixes: https://bugs.launchpad.net/bugs/1417043.

Approved by Andrew Hayzen, Sebastien Bacher, Ubuntu Phone Apps Jenkins Bot.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

When running $ click-buddy . I get the following error

[ 5%] Generating gd.gmo
/tmp/infographics-translations/po/gd.po:302:2: syntax error
/usr/bin/msgfmt: found 1 fatal error
po/CMakeFiles/pofiles_10.dir/build.make:51: recipe for target 'po/gd.gmo' failed
make[2]: *** [po/gd.gmo] Error 1

I assume it is because of the forward slash introduced here?
813 +/msgid "Remove"

review: Needs Fixing
Revision history for this message
Pete Woods (pete-woods) wrote :

Strange. I didn't make that change. This'll teach me to rebase.

Revision history for this message
Pete Woods (pete-woods) wrote :

Seems like the automatic merge did something wacky. Will try sorting it now.

827. By Pete Woods

Use i18n.noop function

828. By Pete Woods

Update translations with new infographics format string

Revision history for this message
Pete Woods (pete-woods) wrote :

Okay. I've cleaned up my mess now.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

This now builds correctly thanks :) I assume we need to wait for the SDK fix before we land?

review: Approve
Revision history for this message
Pete Woods (pete-woods) wrote :

Correct, yes :)

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

#blocked bug 1417031

829. By Pete Woods

Merge trunk

830. By Pete Woods

Switch to tag function as actually released in the SDK

Revision history for this message
Pete Woods (pete-woods) wrote :

Hi guys,

The dependent fix has been landed into RTM and Vivid now. So this change can go ahead :)

Revision history for this message
Victor Thompson (vthompson) wrote :

#unblocked

Revision history for this message
Victor Thompson (vthompson) wrote :

Pete, I'll test this out tonight--in 5 or 6 hours from now.

Revision history for this message
Victor Thompson (vthompson) wrote :

I think we may still have issues. Before installing this update, I had my phone in Spanish and it was displaying the infographic in Spanish. After installing this change, the phone's infographic went to English (http://i.imgur.com/nHmajrb.png). Additionally, and this may coincidental, but Unity froze when I closed that app. I changed the language to German, rebooted, and once again was greeted with English infographic text (http://i.imgur.com/VeKQ3Cr.png).

I'm running on 15.04 image #104 on devel-proposed. According to the ogra's diff logs, your change has been in vivid devel-proposed since image #95 (http://people.canonical.com/~ogra/touch-image-stats/95.changes).

Can you verify if your change works? Because from what I can see it actually breaks the translation.

One thing to note about installation of this MP. For me, I added an empty commit to push the revision of this branch to 2.0.831 because it would not install as 2.0.830 because that's the preinstalled version that comes on an image. This is probably a bug in click-buddy or its associated tools.

review: Needs Information
Revision history for this message
Victor Thompson (vthompson) wrote :

I should add that any updates to increment the metrics are still displayed in English.

Revision history for this message
Pete Woods (pete-woods) wrote :

Victor, this change in itself won't fix the problem. We are also dependent on RTM silo 7.

Revision history for this message
Pete Woods (pete-woods) wrote :

I hadn't appreciated the regression of translations if we land this without the libusermetrics change, though, so I'm glad you tested it out.

Revision history for this message
Victor Thompson (vthompson) wrote :

#blocked bug 1327419 delivery into RTM/stable

Revision history for this message
Victor Thompson (vthompson) wrote :

Vivid image #106 [1] has a new libusermetrics (1.1.1+15.04.20150219-0ubuntu1) and this still doesn't seem to be working.

1 - http://people.canonical.com/~ogra/touch-image-stats/106.changes

831. By Pete Woods

Merge trunk

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

The fix for bug 1327419 landed in rtm and vivid, so this can land now?

Revision history for this message
Victor Thompson (vthompson) wrote :

This still isn't working in vivid image #127 in devel-proposed: http://i.imgur.com/wvS92Kg.png

review: Needs Fixing
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

On rtm-proposed mako #212 I was also not able to get this working as expected.

review: Needs Fixing
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Is this still broken? Any idea where? Do we need a new bug or re-open existing?

Unmerged revisions

831. By Pete Woods

Merge trunk

830. By Pete Woods

Switch to tag function as actually released in the SDK

829. By Pete Woods

Merge trunk

828. By Pete Woods

Update translations with new infographics format string

827. By Pete Woods

Use i18n.noop function

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches