Merge lp:~vthompson/music-app/fix-songs-translation-1357626 into lp:music-app/trusty

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 573
Merged at revision: 587
Proposed branch: lp:~vthompson/music-app/fix-songs-translation-1357626
Merge into: lp:music-app/trusty
Diff against target: 27 lines (+3/-3)
2 files modified
common/AlbumsPage.qml (+2/-2)
common/SongsPage.qml (+1/-1)
To merge this branch: bzr merge lp:~vthompson/music-app/fix-songs-translation-1357626
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
David Planella Needs Fixing
Review via email: mp+231057@code.launchpad.net

Commit message

* Fix inability to translate 'song'

Description of the change

This MP fixes the app's inability to translate 'song' in AlbumsPage and SongsPage. This is rather important given the push for RTM.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

LGTM, nice touch in simplifying the strings for translators!

I wonder if Qt makes it possible to have mixed types of arguments in a string. The MP is good as it is, as the strings in question are not probably something that translators need to rearrange the order of. But for other types of strings, it'd be great if something like this could be possible, so that translators have full control in reordering the elements of the string. E.g.:

"%s | %1 song"

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Ah, this has a conflict here:

<<<<<<< TREE
                text: isAlbum && line1 !== i18n.tr("Genre") ? i18n.tr(year + " | %1 song", year + " | %1 songs", albumtrackslist.count).arg(albumtrackslist.count)
=======
                text: isAlbum && line1 !== "Genre" ? year + " | " + i18n.tr("%1 song", "%1 songs", albumtrackslist.count).arg(albumtrackslist.count)
>>>>>>> MERGE-SOURCE
                                                   : i18n.tr("%1 song", "%1 songs", albumtrackslist.count).arg(albumtrackslist.count)

So you'll need to merge trunk and fix the conflict before this can land.

review: Needs Fixing
573. By Victor Thompson

merge trunk and resolve conflict

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'common/AlbumsPage.qml'
2--- common/AlbumsPage.qml 2014-08-09 22:52:40 +0000
3+++ common/AlbumsPage.qml 2014-08-16 13:38:54 +0000
4@@ -325,8 +325,8 @@
5 anchors.right: parent.right
6 anchors.rightMargin: units.gu(1.5)
7 elide: Text.ElideRight
8- text: i18n.tr(songAlbumArtistModelRepeater.year + " | %1 song",
9- songAlbumArtistModelRepeater.year + " | %1 songs",
10+ text: songAlbumArtistModelRepeater.year + " | " +
11+ i18n.tr("%1 song", "%1 songs",
12 songAlbumArtistModelRepeater.count).arg(songAlbumArtistModelRepeater.count)
13 }
14
15
16=== modified file 'common/SongsPage.qml'
17--- common/SongsPage.qml 2014-08-16 05:40:39 +0000
18+++ common/SongsPage.qml 2014-08-16 13:38:54 +0000
19@@ -119,7 +119,7 @@
20 anchors.right: parent.right
21 anchors.rightMargin: units.gu(1.5)
22 elide: Text.ElideRight
23- text: isAlbum && line1 !== i18n.tr("Genre") ? i18n.tr(year + " | %1 song", year + " | %1 songs", albumtrackslist.count).arg(albumtrackslist.count)
24+ text: isAlbum && line1 !== i18n.tr("Genre") ? year + " | " + i18n.tr("%1 song", "%1 songs", albumtrackslist.count).arg(albumtrackslist.count)
25 : i18n.tr("%1 song", "%1 songs", albumtrackslist.count).arg(albumtrackslist.count)
26
27 }

Subscribers

People subscribed via source and target branches

to status/vote changes: