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
1=== modified file 'Dash/DashApps.qml'
2--- Dash/DashApps.qml 2013-05-24 13:16:26 +0000
3+++ Dash/DashApps.qml 2013-05-29 15:32:28 +0000
4@@ -60,6 +60,21 @@
5 ListElement { category: "Frequently used"; component: "ApplicationsFilterGrid"; modelName: "FrequentlyUsedAppsModel" }
6 ListElement { category: "Installed"; component: "ApplicationsFilterGrid"; modelName: "InstalledApplicationsModel" }
7 ListElement { category: "Available for download"; component: "ApplicationsFilterGrid"; modelName: "AppsAvailableForDownloadModel" }
8+ function getCategory(category1) {
9+ if (category1 === "Running apps") {
10+ return i18n.tr("Running apps");
11+ }
12+ if (category1 === "Frequently used") {
13+ return i18n.tr("Frequently used");
14+ }
15+ if (category1 === "Installed") {
16+ return i18n.tr("Installed");
17+ }
18+ if (category1 === "Available for download") {
19+ return i18n.tr("Available for download");
20+ }
21+ return ""
22+ }
23 }
24
25 FrequentlyUsedAppsModel { id: frequentlyUsedAppsModel }
26@@ -155,7 +170,7 @@
27 sectionProperty: "category"
28 sectionDelegate: Header {
29 width: categoryView.width
30- text: section
31+ text: categoryListModel.getCategory(section)
32 }
33 pageHeader: PageHeader {
34 id: pageHeader
35
36=== modified file 'Dash/DashHome.qml'
37--- Dash/DashHome.qml 2013-05-24 13:16:26 +0000
38+++ Dash/DashHome.qml 2013-05-29 15:32:28 +0000
39@@ -38,6 +38,24 @@
40 ListElement { category: "People Recently in Touch"; component: "PeopleGrid"; modelName: "RecentModel" }
41 ListElement { category: "Recent Music"; component: "MusicGrid"; modelName: "MusicModel" }
42 ListElement { category: "Videos Popular Online"; component: "VideosGrid"; modelName: "VideosModel" }
43+ function getCategory(category1) {
44+ if (category1 === "Frequent Apps") {
45+ return i18n.tr("Frequent Apps");
46+ }
47+ if (category1 === "Favourite People") {
48+ return i18n.tr("Favourite People");
49+ }
50+ if (category1 === "People Recently in Touch") {
51+ return i18n.tr("People Recently in Touch");
52+ }
53+ if (category1 === "Recent Music") {
54+ return i18n.tr("Recent Music");
55+ }
56+ if (category1 === "Videos Popular Online") {
57+ return i18n.tr("Videos Popular Online");
58+ }
59+ return ""
60+ }
61 }
62
63 FrequentlyUsedAppsModel { id: appsModel }
64@@ -172,7 +190,7 @@
65 sectionProperty: "category"
66 sectionDelegate: Header {
67 width: listView.width
68- text: section
69+ text: listView.model.getCategory(section)
70 }
71 pageHeader: PageHeader {
72 width: listView.width
73
74=== modified file 'po/unity8.pot'
75--- po/unity8.pot 2013-05-24 13:54:54 +0000
76+++ po/unity8.pot 2013-05-29 15:32:28 +0000
77@@ -8,7 +8,7 @@
78 msgstr ""
79 "Project-Id-Version: unity8\n"
80 "Report-Msgid-Bugs-To: \n"
81-"POT-Creation-Date: 2013-05-24 21:36+0800\n"
82+"POT-Creation-Date: 2013-05-29 23:27+0800\n"
83 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
84 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
85 "Language-Team: LANGUAGE <LL@li.org>\n"
86@@ -21,11 +21,47 @@
87 msgid "Recent searches"
88 msgstr ""
89
90-#: Dash/DashApps.qml:163
91+#: Dash/DashApps.qml:65
92+msgid "Running apps"
93+msgstr ""
94+
95+#: Dash/DashApps.qml:68
96+msgid "Frequently used"
97+msgstr ""
98+
99+#: Dash/DashApps.qml:71
100+msgid "Installed"
101+msgstr ""
102+
103+#: Dash/DashApps.qml:74
104+msgid "Available for download"
105+msgstr ""
106+
107+#: Dash/DashApps.qml:178
108 msgid "Apps"
109 msgstr ""
110
111-#: Dash/DashHome.qml:179 plugins/Unity/lenses.cpp:38
112+#: Dash/DashHome.qml:43
113+msgid "Frequent Apps"
114+msgstr ""
115+
116+#: Dash/DashHome.qml:46
117+msgid "Favourite People"
118+msgstr ""
119+
120+#: Dash/DashHome.qml:49
121+msgid "People Recently in Touch"
122+msgstr ""
123+
124+#: Dash/DashHome.qml:52
125+msgid "Recent Music"
126+msgstr ""
127+
128+#: Dash/DashHome.qml:55
129+msgid "Videos Popular Online"
130+msgstr ""
131+
132+#: Dash/DashHome.qml:197 plugins/Unity/lenses.cpp:38
133 msgid "Home"
134 msgstr ""
135
136
137=== modified file 'po/zh_TW.po'
138--- po/zh_TW.po 2013-05-26 05:40:19 +0000
139+++ po/zh_TW.po 2013-05-29 15:32:28 +0000
140@@ -7,26 +7,63 @@
141 msgstr ""
142 "Project-Id-Version: unity\n"
143 "Report-Msgid-Bugs-To: \n"
144-"POT-Creation-Date: 2013-05-24 21:36+0800\n"
145+"POT-Creation-Date: 2013-05-29 23:27+0800\n"
146 "PO-Revision-Date: 2013-05-25 17:21+0000\n"
147 "Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
148 "Language-Team: Ubuntu Touch Team <ubuntu-phone@lists.ubuntu.com>\n"
149+"Language: \n"
150 "MIME-Version: 1.0\n"
151 "Content-Type: text/plain; charset=UTF-8\n"
152 "Content-Transfer-Encoding: 8bit\n"
153 "X-Launchpad-Export-Date: 2013-05-26 05:40+0000\n"
154 "X-Generator: Launchpad (build 16640)\n"
155-"Language: \n"
156
157 #: Components/PageHeader.qml:300
158 msgid "Recent searches"
159 msgstr "最近搜尋"
160
161-#: Dash/DashApps.qml:163
162+#: Dash/DashApps.qml:65
163+msgid "Running apps"
164+msgstr "正在執行中的程式"
165+
166+#: Dash/DashApps.qml:68
167+msgid "Frequently used"
168+msgstr "最常使用"
169+
170+#: Dash/DashApps.qml:71
171+msgid "Installed"
172+msgstr "己安裝"
173+
174+#: Dash/DashApps.qml:74
175+msgid "Available for download"
176+msgstr "可被下載的"
177+
178+#: Dash/DashApps.qml:178
179 msgid "Apps"
180 msgstr "程式"
181
182-#: Dash/DashHome.qml:179 plugins/Unity/lenses.cpp:38
183+#: Dash/DashHome.qml:43
184+msgid "Frequent Apps"
185+msgstr "常用的程式"
186+
187+#: Dash/DashHome.qml:46
188+msgid "Favourite People"
189+msgstr "喜歡的朋友"
190+
191+#: Dash/DashHome.qml:49
192+msgid "People Recently in Touch"
193+msgstr "最近接觸的朋友"
194+
195+#: Dash/DashHome.qml:52
196+#, fuzzy
197+msgid "Recent Music"
198+msgstr "最近搜尋"
199+
200+#: Dash/DashHome.qml:55
201+msgid "Videos Popular Online"
202+msgstr "線上最熱門的影片"
203+
204+#: Dash/DashHome.qml:197 plugins/Unity/lenses.cpp:38
205 msgid "Home"
206 msgstr "家屋"
207

Subscribers

People subscribed via source and target branches