Merge lp:~dholbach/help-app/1433210 into lp:help-app

Proposed by Daniel Holbach
Status: Merged
Approved by: Daniel Holbach
Approved revision: 150
Merged at revision: 153
Proposed branch: lp:~dholbach/help-app/1433210
Merge into: lp:help-app
Diff against target: 399 lines (+72/-46)
13 files modified
content/pages/index.md (+4/-3)
internals/local/q-and-a.py (+1/-1)
internals/pelicanconf.py (+1/-1)
internals/translations/build.py (+23/-5)
po/de.po (+4/-4)
po/es.po (+5/-4)
po/fr.po (+5/-4)
po/help.pot (+4/-4)
po/it.po (+5/-4)
po/pl.po (+5/-4)
po/pt.po (+5/-4)
po/ro.po (+5/-4)
po/ru.po (+5/-4)
To merge this branch: bzr merge lp:~dholbach/help-app/1433210
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+261228@code.launchpad.net

Commit message

Readd .link-cta-ubuntu so we can use it to more prominently point out call to action links. This will also allow us to add more attr_list (https://pythonhosted.org/Markdown/extensions/attr_list.html) statements.

The CTA links now work in the web version, on the app version we're still blocked on bug 1433532.

Description of the change

Readd .link-cta-ubuntu so we can use it to more prominently point out call to action links. This will also allow us to add more attr_list (https://pythonhosted.org/Markdown/extensions/attr_list.html) statements.

The CTA links now work in the web version, on the app version we're still blocked on bug 1433532.

To post a comment you must log in.
lp:~dholbach/help-app/1433210 updated
149. By Daniel Holbach

remove test changes as they are not finished yet

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
lp:~dholbach/help-app/1433210 updated
150. By Daniel Holbach

update statement in markdown extension to how it's defined in pelicanconf too

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
Nicholas Skaggs (nskaggs) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'content/pages/index.md'
2--- content/pages/index.md 2015-03-19 11:10:25 +0000
3+++ content/pages/index.md 2015-06-05 14:27:17 +0000
4@@ -7,6 +7,7 @@
5 * Tips and tricks to make you more productive
6 * Links to get in touch with experts and other community members
7
8-[Take me to the FAQ!]({filename}faq.md)
9-
10-[Get in touch]({filename}get-in-touch.md)
11+[Take me to the FAQ!]({filename}faq.md){: .link-cta-ubuntu}
12+
13+[Get in touch]({filename}get-in-touch.md){: .link-cta-ubuntu}
14+
15
16=== modified file 'internals/local/q-and-a.py'
17--- internals/local/q-and-a.py 2015-03-30 14:38:28 +0000
18+++ internals/local/q-and-a.py 2015-06-05 14:27:17 +0000
19@@ -42,7 +42,7 @@
20 image_block = img_matches.group(0)
21 answer = answer.replace(image_block, '')
22
23- if statement == '!!QA':
24+ if statement == ' !!QA':
25 # <div class="row">
26 # <div class="eight-col">
27 # <!-- question & answer -->
28
29=== modified file 'internals/pelicanconf.py'
30--- internals/pelicanconf.py 2015-05-13 14:55:10 +0000
31+++ internals/pelicanconf.py 2015-06-05 14:27:17 +0000
32@@ -62,7 +62,7 @@
33 ]
34
35 Q_AND_A_CLASSES = [
36- '!!QA',
37+ ' !!QA',
38 ]
39
40 HIDE_FROM_POT = Q_AND_A_CLASSES + [
41
42=== modified file 'internals/translations/build.py'
43--- internals/translations/build.py 2015-05-13 17:04:59 +0000
44+++ internals/translations/build.py 2015-06-05 14:27:17 +0000
45@@ -84,17 +84,17 @@
46 self.pofile.fuzzy_entries(),
47 self.pofile.untranslated_entries()]:
48 for entry in entry_group:
49- for statement in HIDE_FROM_POT:
50- if statement in entry.comment:
51- entries += [entry]
52+ if entry.comment in HIDE_FROM_POT:
53+ entries += [entry]
54 for entry in entries:
55 if not entry.msgid.endswith(entry.comment):
56- entry.msgid += ' %s' % entry.comment
57+ entry.msgid += entry.comment
58 if entry.msgstr and not entry.msgstr.endswith(entry.comment):
59- entry.msgstr += ' %s' % entry.comment
60+ entry.msgstr += entry.comment
61 entry.comment = ''
62 self.save()
63
64+ # Make sure META_TAGS are not accidentally translated
65 def safeguard_meta_tags(self):
66 for tag in META_TAGS:
67 for entry in self.find_in_msgid(tag):
68@@ -132,16 +132,34 @@
69 link_msgstr = list(re.findall(link_regex, entry.msgstr))
70 return (link_msgid, link_msgstr)
71
72+ # All markdown links in the po file (everything starting with {filename}
73+ # need to be handled with care.
74+ # 1) In the case of Spanish translations, we want for example
75+ # 'faq.es.md' instead 'faq.md'.
76+ # 2) If we mark a link with an attr_list tag, like {: .link-cta-ubuntu},
77+ # this also needs to be preserved.
78+ #
79 def rewrite_links(self, documents, bcp47):
80+
81+ # In this specific po file, find all markdown links
82 for entry in self.find_in_msgid('{filename}'):
83 (link_msgid, link_msgstr) = \
84 self.find_link_in_markdown_message(entry)
85+
86+ # Find all links which are part of our documents (filter out
87+ # images, etc.)
88 if [doc for doc in documents.docs if doc.endswith(link_msgid)]:
89 translated_doc_fn = os.path.basename(
90 documents.translated_doc_fn(link_msgid, bcp47))
91+
92+ # If the translation part of the message does not exist,
93+ # just use the msgid
94 if not link_msgstr:
95 entry.msgstr = entry.msgid
96 link_msgstr = [link_msgid]
97+
98+ # Rewrite filename part of the translated text.
99+ # This keeps the label translated, if it already is.
100 entry.msgstr = entry.msgstr.replace(link_msgstr[0],
101 translated_doc_fn)
102 self.save()
103
104=== modified file 'po/de.po'
105--- po/de.po 2015-06-05 07:41:28 +0000
106+++ po/de.po 2015-06-05 14:27:17 +0000
107@@ -7,7 +7,7 @@
108 msgstr ""
109 "Project-Id-Version: PACKAGE VERSION\n"
110 "Report-Msgid-Bugs-To: \n"
111-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
112+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
113 "PO-Revision-Date: 2015-06-04 16:05+0000\n"
114 "Last-Translator: Daniel Holbach <daniel.holbach@ubuntu.com>\n"
115 "Language-Team: LANGUAGE <LL@li.org>\n"
116@@ -122,13 +122,13 @@
117 "Links um in Kontakt mit Experten und anderen aus der Ubuntu Gemeinschaft zu "
118 "kommen"
119
120-#. type: Plain text
121+#. {: .link-cta-ubuntu}
122 #: content/pages/index.md:11
123 msgid "[Take me to the FAQ!]({filename}faq.md)"
124 msgstr "[Bringen Sie mich zur FAQ!]({filename}faq.de.md)"
125
126-#. type: Plain text
127-#: content/pages/index.md:12
128+#. {: .link-cta-ubuntu}
129+#: content/pages/index.md:13
130 msgid "[Get in touch]({filename}get-in-touch.md)"
131 msgstr "[Kontakt]({filename}get-in-touch.de.md)"
132
133
134=== modified file 'po/es.po'
135--- po/es.po 2015-06-05 07:41:28 +0000
136+++ po/es.po 2015-06-05 14:27:17 +0000
137@@ -7,10 +7,11 @@
138 msgstr ""
139 "Project-Id-Version: ubuntu-devices-help\n"
140 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
141-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
142+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
143 "PO-Revision-Date: 2015-06-03 22:30+0000\n"
144 "Last-Translator: David Gámiz Jiménez <david.gamiz@gmail.com>\n"
145 "Language-Team: Spanish <es@li.org>\n"
146+"Language: es\n"
147 "MIME-Version: 1.0\n"
148 "Content-Type: text/plain; charset=UTF-8\n"
149 "Content-Transfer-Encoding: 8bit\n"
150@@ -109,13 +110,13 @@
151 msgid "Links to get in touch with experts and other community members"
152 msgstr ""
153
154-#. type: Plain text
155+#. {: .link-cta-ubuntu}
156 #: content/pages/index.md:11
157 msgid "[Take me to the FAQ!]({filename}faq.md)"
158 msgstr "[Take me to the FAQ!]({filename}faq.es.md)"
159
160-#. type: Plain text
161-#: content/pages/index.md:12
162+#. {: .link-cta-ubuntu}
163+#: content/pages/index.md:13
164 msgid "[Get in touch]({filename}get-in-touch.md)"
165 msgstr "[Get in touch]({filename}get-in-touch.es.md)"
166
167
168=== modified file 'po/fr.po'
169--- po/fr.po 2015-06-05 07:41:28 +0000
170+++ po/fr.po 2015-06-05 14:27:17 +0000
171@@ -7,10 +7,11 @@
172 msgstr ""
173 "Project-Id-Version: ubuntu-devices-help\n"
174 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
175-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
176+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
177 "PO-Revision-Date: 2015-02-27 12:21+0000\n"
178 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
179 "Language-Team: French <fr@li.org>\n"
180+"Language: fr\n"
181 "MIME-Version: 1.0\n"
182 "Content-Type: text/plain; charset=UTF-8\n"
183 "Content-Transfer-Encoding: 8bit\n"
184@@ -107,13 +108,13 @@
185 msgid "Links to get in touch with experts and other community members"
186 msgstr ""
187
188-#. type: Plain text
189+#. {: .link-cta-ubuntu}
190 #: content/pages/index.md:11
191 msgid "[Take me to the FAQ!]({filename}faq.md)"
192 msgstr "[Take me to the FAQ!]({filename}faq.fr.md)"
193
194-#. type: Plain text
195-#: content/pages/index.md:12
196+#. {: .link-cta-ubuntu}
197+#: content/pages/index.md:13
198 msgid "[Get in touch]({filename}get-in-touch.md)"
199 msgstr "[Get in touch]({filename}get-in-touch.fr.md)"
200
201
202=== modified file 'po/help.pot'
203--- po/help.pot 2015-06-05 07:41:28 +0000
204+++ po/help.pot 2015-06-05 14:27:17 +0000
205@@ -7,7 +7,7 @@
206 msgid ""
207 msgstr ""
208 "Project-Id-Version: PACKAGE VERSION\n"
209-"POT-Creation-Date: 2015-06-05 09:40+0200\n"
210+"POT-Creation-Date: 2015-06-05 12:37+0200\n"
211 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
212 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
213 "Language-Team: LANGUAGE <LL@li.org>\n"
214@@ -106,13 +106,13 @@
215 msgid "Links to get in touch with experts and other community members"
216 msgstr ""
217
218-#. type: Plain text
219+#. {: .link-cta-ubuntu}
220 #: content/pages/index.md:11
221 msgid "[Take me to the FAQ!]({filename}faq.md)"
222 msgstr ""
223
224-#. type: Plain text
225-#: content/pages/index.md:12
226+#. {: .link-cta-ubuntu}
227+#: content/pages/index.md:13
228 msgid "[Get in touch]({filename}get-in-touch.md)"
229 msgstr ""
230
231
232=== modified file 'po/it.po'
233--- po/it.po 2015-06-05 07:41:28 +0000
234+++ po/it.po 2015-06-05 14:27:17 +0000
235@@ -7,10 +7,11 @@
236 msgstr ""
237 "Project-Id-Version: ubuntu-devices-help\n"
238 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
239-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
240+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
241 "PO-Revision-Date: 2015-03-05 11:21+0000\n"
242 "Last-Translator: Silvia Bindelli <silvia.bindelli@ubuntu-it.org>\n"
243 "Language-Team: Italian <it@li.org>\n"
244+"Language: it\n"
245 "MIME-Version: 1.0\n"
246 "Content-Type: text/plain; charset=UTF-8\n"
247 "Content-Transfer-Encoding: 8bit\n"
248@@ -109,13 +110,13 @@
249 msgid "Links to get in touch with experts and other community members"
250 msgstr ""
251
252-#. type: Plain text
253+#. {: .link-cta-ubuntu}
254 #: content/pages/index.md:11
255 msgid "[Take me to the FAQ!]({filename}faq.md)"
256 msgstr "[Take me to the FAQ!]({filename}faq.it.md)"
257
258-#. type: Plain text
259-#: content/pages/index.md:12
260+#. {: .link-cta-ubuntu}
261+#: content/pages/index.md:13
262 msgid "[Get in touch]({filename}get-in-touch.md)"
263 msgstr "[Get in touch]({filename}get-in-touch.it.md)"
264
265
266=== modified file 'po/pl.po'
267--- po/pl.po 2015-06-05 07:41:28 +0000
268+++ po/pl.po 2015-06-05 14:27:17 +0000
269@@ -7,10 +7,11 @@
270 msgstr ""
271 "Project-Id-Version: help-app\n"
272 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
273-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
274+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
275 "PO-Revision-Date: 2015-05-15 13:17+0000\n"
276 "Last-Translator: Bartosz Kosiorek <Unknown>\n"
277 "Language-Team: Polish <pl@li.org>\n"
278+"Language: pl\n"
279 "MIME-Version: 1.0\n"
280 "Content-Type: text/plain; charset=UTF-8\n"
281 "Content-Transfer-Encoding: 8bit\n"
282@@ -107,13 +108,13 @@
283 msgid "Links to get in touch with experts and other community members"
284 msgstr ""
285
286-#. type: Plain text
287+#. {: .link-cta-ubuntu}
288 #: content/pages/index.md:11
289 msgid "[Take me to the FAQ!]({filename}faq.md)"
290 msgstr "[Take me to the FAQ!]({filename}faq.pl.md)"
291
292-#. type: Plain text
293-#: content/pages/index.md:12
294+#. {: .link-cta-ubuntu}
295+#: content/pages/index.md:13
296 msgid "[Get in touch]({filename}get-in-touch.md)"
297 msgstr "[Get in touch]({filename}get-in-touch.pl.md)"
298
299
300=== modified file 'po/pt.po'
301--- po/pt.po 2015-06-05 07:41:28 +0000
302+++ po/pt.po 2015-06-05 14:27:17 +0000
303@@ -7,10 +7,11 @@
304 msgstr ""
305 "Project-Id-Version: ubuntu-devices-help\n"
306 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
307-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
308+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
309 "PO-Revision-Date: 2015-03-19 00:27+0000\n"
310 "Last-Translator: Ivo Xavier <ivofernandes12@gmail.com>\n"
311 "Language-Team: Portuguese <pt@li.org>\n"
312+"Language: pt\n"
313 "MIME-Version: 1.0\n"
314 "Content-Type: text/plain; charset=UTF-8\n"
315 "Content-Transfer-Encoding: 8bit\n"
316@@ -109,13 +110,13 @@
317 msgid "Links to get in touch with experts and other community members"
318 msgstr ""
319
320-#. type: Plain text
321+#. {: .link-cta-ubuntu}
322 #: content/pages/index.md:11
323 msgid "[Take me to the FAQ!]({filename}faq.md)"
324 msgstr "[Take me to the FAQ!]({filename}faq.pt.md)"
325
326-#. type: Plain text
327-#: content/pages/index.md:12
328+#. {: .link-cta-ubuntu}
329+#: content/pages/index.md:13
330 msgid "[Get in touch]({filename}get-in-touch.md)"
331 msgstr "[Get in touch]({filename}get-in-touch.pt.md)"
332
333
334=== modified file 'po/ro.po'
335--- po/ro.po 2015-06-05 07:41:28 +0000
336+++ po/ro.po 2015-06-05 14:27:17 +0000
337@@ -7,10 +7,11 @@
338 msgstr ""
339 "Project-Id-Version: ubuntu-devices-help\n"
340 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
341-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
342+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
343 "PO-Revision-Date: 2015-02-27 11:15+0000\n"
344 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
345 "Language-Team: Romanian <ro@li.org>\n"
346+"Language: ro\n"
347 "MIME-Version: 1.0\n"
348 "Content-Type: text/plain; charset=UTF-8\n"
349 "Content-Transfer-Encoding: 8bit\n"
350@@ -107,13 +108,13 @@
351 msgid "Links to get in touch with experts and other community members"
352 msgstr ""
353
354-#. type: Plain text
355+#. {: .link-cta-ubuntu}
356 #: content/pages/index.md:11
357 msgid "[Take me to the FAQ!]({filename}faq.md)"
358 msgstr "[Take me to the FAQ!]({filename}faq.ro.md)"
359
360-#. type: Plain text
361-#: content/pages/index.md:12
362+#. {: .link-cta-ubuntu}
363+#: content/pages/index.md:13
364 msgid "[Get in touch]({filename}get-in-touch.md)"
365 msgstr "[Get in touch]({filename}get-in-touch.ro.md)"
366
367
368=== modified file 'po/ru.po'
369--- po/ru.po 2015-06-05 07:41:28 +0000
370+++ po/ru.po 2015-06-05 14:27:17 +0000
371@@ -7,10 +7,11 @@
372 msgstr ""
373 "Project-Id-Version: help-app\n"
374 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
375-"POT-Creation-Date: 2015-06-04 09:48+0200\n"
376+"POT-Creation-Date: 2015-06-04 17:47+0200\n"
377 "PO-Revision-Date: 2015-04-29 13:02+0000\n"
378 "Last-Translator: Aleksey Kabanov <Unknown>\n"
379 "Language-Team: Russian <ru@li.org>\n"
380+"Language: ru\n"
381 "MIME-Version: 1.0\n"
382 "Content-Type: text/plain; charset=UTF-8\n"
383 "Content-Transfer-Encoding: 8bit\n"
384@@ -107,13 +108,13 @@
385 msgid "Links to get in touch with experts and other community members"
386 msgstr ""
387
388-#. type: Plain text
389+#. {: .link-cta-ubuntu}
390 #: content/pages/index.md:11
391 msgid "[Take me to the FAQ!]({filename}faq.md)"
392 msgstr "[Take me to the FAQ!]({filename}faq.ru.md)"
393
394-#. type: Plain text
395-#: content/pages/index.md:12
396+#. {: .link-cta-ubuntu}
397+#: content/pages/index.md:13
398 msgid "[Get in touch]({filename}get-in-touch.md)"
399 msgstr "[Get in touch]({filename}get-in-touch.ru.md)"
400

Subscribers

People subscribed via source and target branches