Merge lp:~paulliu/unity/i18n into lp:unity/phablet

Proposed by Ying-Chun Liu
Status: Merged
Approved by: Ying-Chun Liu
Approved revision: no longer in the source branch.
Merged at revision: 711
Proposed branch: lp:~paulliu/unity/i18n
Merge into: lp:unity/phablet
Diff against target: 206 lines (+115/-9)
4 files modified
Dash/DashApps.qml (+16/-1)
Dash/DashHome.qml (+19/-1)
po/unity8.pot (+39/-3)
po/zh_TW.po (+41/-4)
To merge this branch: bzr merge lp:~paulliu/unity/i18n
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Review via email: mp+166287@code.launchpad.net

Commit message

Add more strings for translation.

Description of the change

Add more strings for translation.

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~paulliu/unity/i18n/+merge/166287/+edit-commit-message

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Btw, I would have used the index for switching. That would allow you to remove the strings twice and reduce likelyhood of typos. Example:

ListModel {
 ListElement { component: "ApplicationsFilterGrid"; modelName: "InstalledApplicationsModel" }
 ListElement { component: "ApplicationsFilterGrid"; modelName: AppsAvailableForDownloadModel" }
}
 function category(index) {
   switch(index) {
     case 0:
       return i18n.tr("Running apps");
     case 1:
       return i18n.tr("Frequently used");
   }
 }

Another possiblity would be to completely generate the model at runtime:

ListModel {
  id: someModel
  Component.onCompleted: {
    someModel.append( {category: qsTr("Running apps"), modelName: "RunningAppsModel"} )
    someModel.append( {category: qsTr("Frequently used"), modelName: "FrequentAppsModel"} )
  }
}

Both solutions seem cleaner to me than the current approach of typing the same string 3 times.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Dash/DashApps.qml'
--- Dash/DashApps.qml 2013-05-24 13:16:26 +0000
+++ Dash/DashApps.qml 2013-05-29 15:32:28 +0000
@@ -60,6 +60,21 @@
60 ListElement { category: "Frequently used"; component: "ApplicationsFilterGrid"; modelName: "FrequentlyUsedAppsModel" }60 ListElement { category: "Frequently used"; component: "ApplicationsFilterGrid"; modelName: "FrequentlyUsedAppsModel" }
61 ListElement { category: "Installed"; component: "ApplicationsFilterGrid"; modelName: "InstalledApplicationsModel" }61 ListElement { category: "Installed"; component: "ApplicationsFilterGrid"; modelName: "InstalledApplicationsModel" }
62 ListElement { category: "Available for download"; component: "ApplicationsFilterGrid"; modelName: "AppsAvailableForDownloadModel" }62 ListElement { category: "Available for download"; component: "ApplicationsFilterGrid"; modelName: "AppsAvailableForDownloadModel" }
63 function getCategory(category1) {
64 if (category1 === "Running apps") {
65 return i18n.tr("Running apps");
66 }
67 if (category1 === "Frequently used") {
68 return i18n.tr("Frequently used");
69 }
70 if (category1 === "Installed") {
71 return i18n.tr("Installed");
72 }
73 if (category1 === "Available for download") {
74 return i18n.tr("Available for download");
75 }
76 return ""
77 }
63 }78 }
6479
65 FrequentlyUsedAppsModel { id: frequentlyUsedAppsModel }80 FrequentlyUsedAppsModel { id: frequentlyUsedAppsModel }
@@ -155,7 +170,7 @@
155 sectionProperty: "category"170 sectionProperty: "category"
156 sectionDelegate: Header {171 sectionDelegate: Header {
157 width: categoryView.width172 width: categoryView.width
158 text: section173 text: categoryListModel.getCategory(section)
159 }174 }
160 pageHeader: PageHeader {175 pageHeader: PageHeader {
161 id: pageHeader176 id: pageHeader
162177
=== modified file 'Dash/DashHome.qml'
--- Dash/DashHome.qml 2013-05-24 13:16:26 +0000
+++ Dash/DashHome.qml 2013-05-29 15:32:28 +0000
@@ -38,6 +38,24 @@
38 ListElement { category: "People Recently in Touch"; component: "PeopleGrid"; modelName: "RecentModel" }38 ListElement { category: "People Recently in Touch"; component: "PeopleGrid"; modelName: "RecentModel" }
39 ListElement { category: "Recent Music"; component: "MusicGrid"; modelName: "MusicModel" }39 ListElement { category: "Recent Music"; component: "MusicGrid"; modelName: "MusicModel" }
40 ListElement { category: "Videos Popular Online"; component: "VideosGrid"; modelName: "VideosModel" }40 ListElement { category: "Videos Popular Online"; component: "VideosGrid"; modelName: "VideosModel" }
41 function getCategory(category1) {
42 if (category1 === "Frequent Apps") {
43 return i18n.tr("Frequent Apps");
44 }
45 if (category1 === "Favourite People") {
46 return i18n.tr("Favourite People");
47 }
48 if (category1 === "People Recently in Touch") {
49 return i18n.tr("People Recently in Touch");
50 }
51 if (category1 === "Recent Music") {
52 return i18n.tr("Recent Music");
53 }
54 if (category1 === "Videos Popular Online") {
55 return i18n.tr("Videos Popular Online");
56 }
57 return ""
58 }
41 }59 }
4260
43 FrequentlyUsedAppsModel { id: appsModel }61 FrequentlyUsedAppsModel { id: appsModel }
@@ -172,7 +190,7 @@
172 sectionProperty: "category"190 sectionProperty: "category"
173 sectionDelegate: Header {191 sectionDelegate: Header {
174 width: listView.width192 width: listView.width
175 text: section193 text: listView.model.getCategory(section)
176 }194 }
177 pageHeader: PageHeader {195 pageHeader: PageHeader {
178 width: listView.width196 width: listView.width
179197
=== modified file 'po/unity8.pot'
--- po/unity8.pot 2013-05-24 13:54:54 +0000
+++ po/unity8.pot 2013-05-29 15:32:28 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: unity8\n"9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2013-05-24 21:36+0800\n"11"POT-Creation-Date: 2013-05-29 23:27+0800\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,11 +21,47 @@
21msgid "Recent searches"21msgid "Recent searches"
22msgstr ""22msgstr ""
2323
24#: Dash/DashApps.qml:16324#: Dash/DashApps.qml:65
25msgid "Running apps"
26msgstr ""
27
28#: Dash/DashApps.qml:68
29msgid "Frequently used"
30msgstr ""
31
32#: Dash/DashApps.qml:71
33msgid "Installed"
34msgstr ""
35
36#: Dash/DashApps.qml:74
37msgid "Available for download"
38msgstr ""
39
40#: Dash/DashApps.qml:178
25msgid "Apps"41msgid "Apps"
26msgstr ""42msgstr ""
2743
28#: Dash/DashHome.qml:179 plugins/Unity/lenses.cpp:3844#: Dash/DashHome.qml:43
45msgid "Frequent Apps"
46msgstr ""
47
48#: Dash/DashHome.qml:46
49msgid "Favourite People"
50msgstr ""
51
52#: Dash/DashHome.qml:49
53msgid "People Recently in Touch"
54msgstr ""
55
56#: Dash/DashHome.qml:52
57msgid "Recent Music"
58msgstr ""
59
60#: Dash/DashHome.qml:55
61msgid "Videos Popular Online"
62msgstr ""
63
64#: Dash/DashHome.qml:197 plugins/Unity/lenses.cpp:38
29msgid "Home"65msgid "Home"
30msgstr ""66msgstr ""
3167
3268
=== modified file 'po/zh_TW.po'
--- po/zh_TW.po 2013-05-26 05:40:19 +0000
+++ po/zh_TW.po 2013-05-29 15:32:28 +0000
@@ -7,26 +7,63 @@
7msgstr ""7msgstr ""
8"Project-Id-Version: unity\n"8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: \n"9"Report-Msgid-Bugs-To: \n"
10"POT-Creation-Date: 2013-05-24 21:36+0800\n"10"POT-Creation-Date: 2013-05-29 23:27+0800\n"
11"PO-Revision-Date: 2013-05-25 17:21+0000\n"11"PO-Revision-Date: 2013-05-25 17:21+0000\n"
12"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"12"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
13"Language-Team: Ubuntu Touch Team <ubuntu-phone@lists.ubuntu.com>\n"13"Language-Team: Ubuntu Touch Team <ubuntu-phone@lists.ubuntu.com>\n"
14"Language: \n"
14"MIME-Version: 1.0\n"15"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"16"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"17"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2013-05-26 05:40+0000\n"18"X-Launchpad-Export-Date: 2013-05-26 05:40+0000\n"
18"X-Generator: Launchpad (build 16640)\n"19"X-Generator: Launchpad (build 16640)\n"
19"Language: \n"
2020
21#: Components/PageHeader.qml:30021#: Components/PageHeader.qml:300
22msgid "Recent searches"22msgid "Recent searches"
23msgstr "最近搜尋"23msgstr "最近搜尋"
2424
25#: Dash/DashApps.qml:16325#: Dash/DashApps.qml:65
26msgid "Running apps"
27msgstr "正在執行中的程式"
28
29#: Dash/DashApps.qml:68
30msgid "Frequently used"
31msgstr "最常使用"
32
33#: Dash/DashApps.qml:71
34msgid "Installed"
35msgstr "己安裝"
36
37#: Dash/DashApps.qml:74
38msgid "Available for download"
39msgstr "可被下載的"
40
41#: Dash/DashApps.qml:178
26msgid "Apps"42msgid "Apps"
27msgstr "程式"43msgstr "程式"
2844
29#: Dash/DashHome.qml:179 plugins/Unity/lenses.cpp:3845#: Dash/DashHome.qml:43
46msgid "Frequent Apps"
47msgstr "常用的程式"
48
49#: Dash/DashHome.qml:46
50msgid "Favourite People"
51msgstr "喜歡的朋友"
52
53#: Dash/DashHome.qml:49
54msgid "People Recently in Touch"
55msgstr "最近接觸的朋友"
56
57#: Dash/DashHome.qml:52
58#, fuzzy
59msgid "Recent Music"
60msgstr "最近搜尋"
61
62#: Dash/DashHome.qml:55
63msgid "Videos Popular Online"
64msgstr "線上最熱門的影片"
65
66#: Dash/DashHome.qml:197 plugins/Unity/lenses.cpp:38
30msgid "Home"67msgid "Home"
31msgstr "家屋"68msgstr "家屋"
3269

Subscribers

People subscribed via source and target branches