Merge lp:~ahayzen/music-app/fix-1369050-content-hub-fix-translations into lp:music-app/trusty
- fix-1369050-content-hub-fix-translations
- Merge into trusty
Status: | Merged |
---|---|
Approved by: | Victor Thompson |
Approved revision: | 635 |
Merged at revision: | 633 |
Proposed branch: | lp:~ahayzen/music-app/fix-1369050-content-hub-fix-translations |
Merge into: | lp:music-app/trusty |
Diff against target: |
305 lines (+45/-93) 2 files modified
music-app.qml (+11/-53) po/com.ubuntu.music.pot (+34/-40) |
To merge this branch: | bzr merge lp:~ahayzen/music-app/fix-1369050-content-hub-fix-translations |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Victor Thompson | Approve | ||
Review via email: mp+234572@code.launchpad.net |
Commit message
* Fix missing translations
* Change path to ~/Music/
* Remove unused dialogue code
* Update .pot
Description of the change
* Fix missing translations
* Change path to ~/Music/
* Remove unused dialogue code
* Update .pot
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Victor Thompson (vthompson) wrote : | # |
1) Aren't we expecting "Music" to always be the name of the music directory regardless of what the locale is? If not, shouldn't we use a system call to determine the name of the folder? I do not think it should be left up to the translator to determine what the name of this folder is.
2) Why are we putting imported files into a deeper folder layout? Personally, I liked having all the imported files in one place. But I can see how this might be overwhelming if we import multiple files at a time.
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
For 2) the folder does get pretty unwieldy with a lot of downloaded music. It's hard to find full albums amongst a big file list in something like nautilus over MTP, for copying them off - for example.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:628
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:629
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andrew Hayzen (ahayzen) wrote : | # |
It has been decided that the path will be fixed to ~/Music/Imported/* for now as this then allows for confinement as stated in bug 1315386.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:631
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Victor Thompson (vthompson) wrote : | # |
See inline comments.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:633
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Victor Thompson (vthompson) wrote : | # |
This looks good, but I'm still confused as to what our intent is for the future. Are we honestly considering having the Music and import directories be the name specified in translations? I don't understand how this would be a good idea. The directory itself needs to be seen by MTP. If we imported into "~/Musica" would that automatically be shown via MTP? I just want to make sure we're not planning to do anything silly.
Andrew Hayzen (ahayzen) wrote : | # |
I thought we were fixing them so they are not being translated? As in the code didn't I remove any tr() around Music and Imported?
Victor Thompson (vthompson) wrote : | # |
You did, but you left a comment that suggests the only reason you did so is because the app can not be confined if it were to do so...
Andrew Hayzen (ahayzen) wrote : | # |
"Imported" we could translate if we could figure out how to do the apparmor profiles, as you said Music could be more tricky. IIRC dpm said it is fine to fix them for now due to the concerns you said but when we start using a converged desktop "Music" may have to be translated as well, but that is a larger problem to solve another time.
Basically for the short-medium term we won't be translating Music/Imported.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:634
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Victor Thompson (vthompson) wrote : | # |
Ok perfect. I still don't think it will ever be a good idea to rely on the in-app translation of "Music" to get the user's music folder. Instead, we should use Xdg (XDG_MUSIC_DIR) to detect the user's chosen Music directory based on localization.
Andrew Hayzen (ahayzen) wrote : | # |
Same, but we would need a way in QML to be able to access XDG_.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) : | # |
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
Unapproved changes made after approval.
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Victor Thompson (vthompson) : | # |
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:635
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'music-app.qml' |
2 | --- music-app.qml 2014-09-23 02:15:55 +0000 |
3 | +++ music-app.qml 2014-09-23 16:28:17 +0000 |
4 | @@ -303,7 +303,8 @@ |
5 | url = importItems[i].url.toString() |
6 | console.debug("Triggered content-hub import for item", url) |
7 | |
8 | - path = "~/Music/Imported/" + Qt.formatDateTime(new Date(), "yyyyMMddhhmmss") + "-" + url.split("/").pop() |
9 | + // fixed path allows for apparmor protection |
10 | + path = "~/Music/Imported/" + Qt.formatDateTime(new Date(), "yyyy/MM/dd/hhmmss") + "-" + url.split("/").pop() |
11 | res = contentHub.importFile(importItems[i], path) |
12 | |
13 | if (res !== true) { |
14 | @@ -330,9 +331,11 @@ |
15 | function importFile(contentItem, path) { |
16 | var contentUrl = contentItem.url.toString() |
17 | |
18 | - if (path.indexOf("~/Music/") !== 0) { |
19 | - console.debug("Invalid dest (not in ~/Music/)") |
20 | - return i18n.tr("Filepath must start with ~/Music/") |
21 | + if (path.indexOf("~/Music/Imported/") !== 0) { |
22 | + console.debug("Invalid dest (not in ~/Music/Imported/)") |
23 | + |
24 | + // TRANSLATORS: This string represents that the target destination filepath does not start with ~/Music/Imported/ |
25 | + return i18n.tr("Filepath must start with") + " ~/Music/Imported/" |
26 | } |
27 | else { |
28 | // extract /home/$USER (or $HOME) from contentitem url |
29 | @@ -356,10 +359,14 @@ |
30 | |
31 | if (filename === "") { |
32 | console.debug("Invalid dest (filename blank)") |
33 | + |
34 | + // TRANSLATORS: This string represents that a blank filepath destination has been used |
35 | return i18n.tr("Filepath must be a file") |
36 | } |
37 | else if (!contentItem.move(dir, filename)) { |
38 | console.debug("Move failed! DIR:", dir, "FILE:", filename) |
39 | + |
40 | + // TRANSLATORS: This string represents that there was failure moving the file to the target destination |
41 | return i18n.tr("Failed to move file") |
42 | } |
43 | else { |
44 | @@ -489,55 +496,6 @@ |
45 | } |
46 | } |
47 | |
48 | - Component { |
49 | - id: contentHubImport |
50 | - Dialog { |
51 | - id: dialogContentHubImport |
52 | - title: i18n.tr("Import") |
53 | - text: i18n.tr("Target destination") |
54 | - |
55 | - property var contentItem |
56 | - |
57 | - TextField { |
58 | - id: pathField |
59 | - text: "~/Music/Imported/" + Date("YYYYMMDDHHMMSS") + "-" + contentItem.url.split("/").pop() |
60 | - } |
61 | - |
62 | - Label { |
63 | - id: contentHubOutput |
64 | - color: styleMusic.common.black |
65 | - visible: false // should only be visible when an error is made. |
66 | - } |
67 | - |
68 | - Button { |
69 | - text: i18n.tr("Import") |
70 | - onClicked: { |
71 | - contentHubOutput.visible = false |
72 | - |
73 | - var out = contentHub.importFile(contentItem, pathField.text.toString()) |
74 | - |
75 | - if (out === true) { |
76 | - PopupUtils.close(dialogContentHubImport) |
77 | - |
78 | - contentHubWaitForFile.dialog = PopupUtils.open(contentHubWait, mainView) |
79 | - contentHubWaitForFile.searchPaths = contentHub.searchPaths; |
80 | - contentHubWaitForFile.start(); |
81 | - } |
82 | - else { |
83 | - contentHubOutput.visible = true |
84 | - contentHubOutput.text = out |
85 | - } |
86 | - } |
87 | - } |
88 | - |
89 | - Button { |
90 | - text: i18n.tr("Cancel") |
91 | - color: styleMusic.dialog.buttonColor |
92 | - onClicked: PopupUtils.close(dialogContentHubImport) |
93 | - } |
94 | - } |
95 | - } |
96 | - |
97 | // UserMetrics to show Music stuff on welcome screen |
98 | Metric { |
99 | id: songsMetric |
100 | |
101 | === modified file 'po/com.ubuntu.music.pot' |
102 | --- po/com.ubuntu.music.pot 2014-09-18 16:00:27 +0000 |
103 | +++ po/com.ubuntu.music.pot 2014-09-23 16:28:17 +0000 |
104 | @@ -8,7 +8,7 @@ |
105 | msgstr "" |
106 | "Project-Id-Version: music-app\n" |
107 | "Report-Msgid-Bugs-To: \n" |
108 | -"POT-Creation-Date: 2014-09-18 16:58+0100\n" |
109 | +"POT-Creation-Date: 2014-09-23 13:43+0100\n" |
110 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
111 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
112 | "Language-Team: LANGUAGE <LL@li.org>\n" |
113 | @@ -54,11 +54,11 @@ |
114 | msgid "You forgot to set your username and/or password" |
115 | msgstr "" |
116 | |
117 | -#: ../MusicAlbums.qml:35 ../MusicStart.qml:388 |
118 | +#: ../MusicAlbums.qml:35 ../MusicStart.qml:392 |
119 | msgid "Albums" |
120 | msgstr "" |
121 | |
122 | -#: ../MusicAlbums.qml:152 ../MusicStart.qml:200 ../MusicStart.qml:450 |
123 | +#: ../MusicAlbums.qml:152 ../MusicStart.qml:200 ../MusicStart.qml:454 |
124 | #: ../common/AlbumsPage.qml:264 |
125 | msgid "Album" |
126 | msgstr "" |
127 | @@ -67,14 +67,14 @@ |
128 | msgid "Artists" |
129 | msgstr "" |
130 | |
131 | -#: ../MusicArtists.qml:108 ../common/AlbumsPage.qml:112 |
132 | +#: ../MusicArtists.qml:107 ../common/AlbumsPage.qml:112 |
133 | #, qt-format |
134 | msgid "%1 album" |
135 | msgid_plural "%1 albums" |
136 | msgstr[0] "" |
137 | msgstr[1] "" |
138 | |
139 | -#: ../MusicArtists.qml:114 ../MusicPlaylists.qml:180 ../MusicStart.qml:369 |
140 | +#: ../MusicArtists.qml:113 ../MusicPlaylists.qml:180 ../MusicStart.qml:371 |
141 | #: ../MusicaddtoPlaylist.qml:106 ../common/AlbumsPage.qml:331 |
142 | #: ../common/SongsPage.qml:123 ../common/SongsPage.qml:124 |
143 | #, qt-format |
144 | @@ -83,7 +83,7 @@ |
145 | msgstr[0] "" |
146 | msgstr[1] "" |
147 | |
148 | -#: ../MusicArtists.qml:124 |
149 | +#: ../MusicArtists.qml:123 |
150 | msgid "Artist" |
151 | msgstr "" |
152 | |
153 | @@ -114,16 +114,15 @@ |
154 | msgid "Change" |
155 | msgstr "" |
156 | |
157 | -#: ../MusicPlaylists.qml:96 ../music-app.qml:998 |
158 | +#: ../MusicPlaylists.qml:96 ../music-app.qml:956 |
159 | msgid "Playlist already exists" |
160 | msgstr "" |
161 | |
162 | -#: ../MusicPlaylists.qml:100 ../music-app.qml:1003 |
163 | +#: ../MusicPlaylists.qml:100 ../music-app.qml:961 |
164 | msgid "Please type in a name." |
165 | msgstr "" |
166 | |
167 | -#: ../MusicPlaylists.qml:105 ../music-app.qml:486 ../music-app.qml:534 |
168 | -#: ../music-app.qml:1009 |
169 | +#: ../MusicPlaylists.qml:105 ../music-app.qml:493 ../music-app.qml:967 |
170 | msgid "Cancel" |
171 | msgstr "" |
172 | |
173 | @@ -225,7 +224,7 @@ |
174 | msgid "Clean everything!" |
175 | msgstr "" |
176 | |
177 | -#: ../MusicStart.qml:35 ../music-app.qml:631 ../music-app.qml:1192 |
178 | +#: ../MusicStart.qml:35 ../music-app.qml:589 ../music-app.qml:1150 |
179 | #: com.ubuntu.music_music.desktop.in.in.h:1 |
180 | msgid "Music" |
181 | msgstr "" |
182 | @@ -238,11 +237,11 @@ |
183 | msgid "Clear History" |
184 | msgstr "" |
185 | |
186 | -#: ../MusicStart.qml:225 |
187 | +#: ../MusicStart.qml:227 |
188 | msgid "Genres" |
189 | msgstr "" |
190 | |
191 | -#: ../MusicStart.qml:314 ../MusicStart.qml:316 ../common/SongsPage.qml:123 |
192 | +#: ../MusicStart.qml:316 ../MusicStart.qml:318 ../common/SongsPage.qml:123 |
193 | #: ../common/SongsPage.qml:162 ../common/SongsPage.qml:240 |
194 | msgid "Genre" |
195 | msgstr "" |
196 | @@ -265,11 +264,11 @@ |
197 | msgstr "" |
198 | |
199 | #: ../common/AlbumsPage.qml:211 ../common/AlbumsPage.qml:400 |
200 | -#: ../common/SongsPage.qml:200 ../music-app.qml:930 |
201 | +#: ../common/SongsPage.qml:200 ../music-app.qml:888 |
202 | msgid "Add to queue" |
203 | msgstr "" |
204 | |
205 | -#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:944 |
206 | +#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:902 |
207 | msgid "Add to playlist" |
208 | msgstr "" |
209 | |
210 | @@ -363,76 +362,71 @@ |
211 | msgid "Music Settings" |
212 | msgstr "" |
213 | |
214 | -#: ../music-app.qml:335 |
215 | -msgid "Filepath must start with ~/Music/" |
216 | +#. TRANSLATORS: This string represents that the target destination filepath does not start with ~/Music/Imported/ |
217 | +#: ../music-app.qml:338 |
218 | +msgid "Filepath must start with" |
219 | msgstr "" |
220 | |
221 | -#: ../music-app.qml:359 |
222 | +#. TRANSLATORS: This string represents that a blank filepath destination has been used |
223 | +#: ../music-app.qml:364 |
224 | msgid "Filepath must be a file" |
225 | msgstr "" |
226 | |
227 | -#: ../music-app.qml:363 |
228 | +#. TRANSLATORS: This string represents that there was failure moving the file to the target destination |
229 | +#: ../music-app.qml:370 |
230 | msgid "Failed to move file" |
231 | msgstr "" |
232 | |
233 | -#: ../music-app.qml:440 |
234 | +#: ../music-app.qml:447 |
235 | msgid "Waiting for file(s)..." |
236 | msgstr "" |
237 | |
238 | -#: ../music-app.qml:459 |
239 | +#: ../music-app.qml:466 |
240 | msgid "OK" |
241 | msgstr "" |
242 | |
243 | -#: ../music-app.qml:472 |
244 | +#: ../music-app.qml:479 |
245 | msgid "Imported file not found" |
246 | msgstr "" |
247 | |
248 | -#: ../music-app.qml:476 |
249 | +#: ../music-app.qml:483 |
250 | msgid "Wait" |
251 | msgstr "" |
252 | |
253 | -#: ../music-app.qml:496 ../music-app.qml:513 |
254 | -msgid "Import" |
255 | -msgstr "" |
256 | - |
257 | -#: ../music-app.qml:497 |
258 | -msgid "Target destination" |
259 | -msgstr "" |
260 | - |
261 | #. TRANSLATORS: this refers to a number of songs greater than one. The actual number will be prepended to the string automatically (plural forms are not yet fully supported in usermetrics, the library that displays that string) |
262 | -#: ../music-app.qml:546 |
263 | +#: ../music-app.qml:504 |
264 | msgid "songs played today" |
265 | msgstr "" |
266 | |
267 | -#: ../music-app.qml:547 |
268 | +#: ../music-app.qml:505 |
269 | msgid "No songs played today" |
270 | msgstr "" |
271 | |
272 | -#: ../music-app.qml:655 |
273 | +#: ../music-app.qml:613 |
274 | msgid "Debug: " |
275 | msgstr "" |
276 | |
277 | -#: ../music-app.qml:967 |
278 | +#: ../music-app.qml:925 |
279 | msgid "New Playlist" |
280 | msgstr "" |
281 | |
282 | -#: ../music-app.qml:968 |
283 | +#: ../music-app.qml:926 |
284 | msgid "Name your playlist." |
285 | msgstr "" |
286 | |
287 | -#: ../music-app.qml:972 |
288 | +#: ../music-app.qml:930 |
289 | msgid "Name" |
290 | msgstr "" |
291 | |
292 | -#: ../music-app.qml:982 |
293 | +#: ../music-app.qml:940 |
294 | msgid "Create" |
295 | msgstr "" |
296 | |
297 | -#: ../music-app.qml:1218 |
298 | +#: ../music-app.qml:1176 |
299 | msgid "No music found" |
300 | msgstr "" |
301 | |
302 | -#: ../music-app.qml:1225 |
303 | +#: ../music-app.qml:1183 |
304 | msgid "Please import music" |
305 | msgstr "" |
306 |
PASSED: Continuous integration, rev:627 91.189. 93.70:8080/ job/music- app-ci/ 1126/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 321 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 321/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/music- app-utopic- amd64-ci/ 350
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/music- app-ci/ 1126/rebuild
http://