Merge lp:~jakobunt/ubuntu-start-page/fix-lang into lp:ubuntu-start-page

Proposed by Jakob Unterwurzacher
Status: Merged
Approved by: Martin Albisetti
Approved revision: 101
Merged at revision: 100
Proposed branch: lp:~jakobunt/ubuntu-start-page/fix-lang
Merge into: lp:ubuntu-start-page
Diff against target: 411 lines (+38/-0)
34 files modified
translation-scripts/translation-functions.sh (+5/-0)
www/10.04/index.html.ar (+1/-0)
www/10.04/index.html.ast (+1/-0)
www/10.04/index.html.bg (+1/-0)
www/10.04/index.html.bn (+1/-0)
www/10.04/index.html.ca (+1/-0)
www/10.04/index.html.crh (+1/-0)
www/10.04/index.html.da (+1/-0)
www/10.04/index.html.de (+1/-0)
www/10.04/index.html.el (+1/-0)
www/10.04/index.html.en (+1/-0)
www/10.04/index.html.es (+1/-0)
www/10.04/index.html.fi (+1/-0)
www/10.04/index.html.fr (+1/-0)
www/10.04/index.html.gl (+1/-0)
www/10.04/index.html.he (+1/-0)
www/10.04/index.html.hr (+1/-0)
www/10.04/index.html.hu (+1/-0)
www/10.04/index.html.id (+1/-0)
www/10.04/index.html.is (+1/-0)
www/10.04/index.html.it (+1/-0)
www/10.04/index.html.ja (+1/-0)
www/10.04/index.html.ko (+1/-0)
www/10.04/index.html.lv (+1/-0)
www/10.04/index.html.nds (+1/-0)
www/10.04/index.html.nl (+1/-0)
www/10.04/index.html.pt-br (+1/-0)
www/10.04/index.html.ro (+1/-0)
www/10.04/index.html.ru (+1/-0)
www/10.04/index.html.sk (+1/-0)
www/10.04/index.html.sv (+1/-0)
www/10.04/index.html.th (+1/-0)
www/10.04/index.html.vi (+1/-0)
www/10.04/index.html.zh-cn (+1/-0)
To merge this branch: bzr merge lp:~jakobunt/ubuntu-start-page/fix-lang
Reviewer Review Type Date Requested Status
Martin Albisetti (community) Approve
Roman Yepishev (community) Approve
Review via email: mp+24307@code.launchpad.net

Description of the change

r100:
Correct the language of the google results by inserting a hidden hl field
<input type="hidden" name="hl" value="$lang" />
in all the index.html.$lang

r101:
Add logic to translation-functions.sh to translate hidden hl field
                  <input type="hidden" name="hl" value="en" />
automatically.

Tested to produce the exact same output files as we have from r100.

To post a comment you must log in.
Revision history for this message
Roman Yepishev (rye) wrote :

Verified that Google language is indeed changed by modifying the content of the <form> in firebug by adding respective items for Russian (ru) and German (de).

review: Approve
101. By jakob <jakob@laj>

Add logic to translation-functions.sh to translate hidden hl field
                <input type="hidden" name="hl" value="en" />
automatically.

Revision history for this message
Martin Albisetti (beuno) wrote :

This looks good. I'll look into deploying it after the Lucid launch. Thanks for working on it.

review: Approve
Revision history for this message
Paul Sladen (sladen) wrote :

Any chance we could have this merged *before* the release tomorrow. (It is asynchronous with the CD image, so not blocking anything).

First impressions of workingness really count, as this whole exercise is somewhat defeated if user fires up their browser, is ultimately then disappointed and then chooses to override their start page with something else.

Revision history for this message
Martin Albisetti (beuno) wrote :

Very very very unlikely, the sysadmins are all tied up due to the release, and it's going to be impossible to grab their attention.
Not to say that I won't try... :)

Revision history for this message
Paul Sladen (sladen) wrote :

Duuuudes. Please apply the Google CSE results language patch to make non-English Users' efforts meaningful.

Pretty please with chocolate fountains on top.

And cherries.

Revision history for this message
Martin Albisetti (beuno) wrote :

Sorry Paul, I will get to it today and file the RT for re-deployment.

Revision history for this message
Martin Albisetti (beuno) wrote :

Merged into trunk, RT filed for this to be rolled out, I don't have an ETA for that yet.

Revision history for this message
Paul Sladen (sladen) wrote :

Would be perfect timing to deploy this, based on this week's Brainstorm top 5:

 * Non-internationalized search results via the Ubuntu Start Page -
   http://brainstorm.ubuntu.com/idea/24888/

Then somebody can take the credit for swiftly reacting.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'translation-scripts/translation-functions.sh'
2--- translation-scripts/translation-functions.sh 2010-04-27 20:23:27 +0000
3+++ translation-scripts/translation-functions.sh 2010-04-28 18:05:37 +0000
4@@ -94,6 +94,11 @@
5 "s/<title>$title_en<\/title>/<title>$title_po<\/title>/" \
6 ${output_page}
7
8+ #translate hidden hl field
9+ #google wants ll-cc format, not ll_CC
10+ googlelangcode=`echo $lang | sed 's/\(.*\)/\L\1/;y/_/-/'`
11+ sed -i -e "s/name=\"hl\" value=\"en\"/name=\"hl\" value=\"$googlelangcode\"/" ${output_page}
12+
13 #translate search text
14 search_po=`msggrep --no-wrap -K -e "$search_en" $po | \
15 grep msgstr | grep -v "msgstr \"\"" | \
16
17=== modified file 'www/10.04/index.html.ar'
18--- www/10.04/index.html.ar 2010-04-27 19:47:21 +0000
19+++ www/10.04/index.html.ar 2010-04-28 18:05:37 +0000
20@@ -178,6 +178,7 @@
21 <input type="hidden" name="ie" value="UTF-8" />
22 <input type="hidden" name="sa" value="Search" />
23 <input name="q" value="" id="sbi" />
24+ <input type="hidden" name="hl" value="ar" />
25 <button>ابحث</button>
26 </form>
27 </div>
28
29=== modified file 'www/10.04/index.html.ast'
30--- www/10.04/index.html.ast 2010-04-27 19:47:21 +0000
31+++ www/10.04/index.html.ast 2010-04-28 18:05:37 +0000
32@@ -178,6 +178,7 @@
33 <input type="hidden" name="ie" value="UTF-8" />
34 <input type="hidden" name="sa" value="Search" />
35 <input name="q" value="" id="sbi" />
36+ <input type="hidden" name="hl" value="ast" />
37 <button>Guetar</button>
38 </form>
39 </div>
40
41=== modified file 'www/10.04/index.html.bg'
42--- www/10.04/index.html.bg 2010-04-27 19:47:21 +0000
43+++ www/10.04/index.html.bg 2010-04-28 18:05:37 +0000
44@@ -178,6 +178,7 @@
45 <input type="hidden" name="ie" value="UTF-8" />
46 <input type="hidden" name="sa" value="Search" />
47 <input name="q" value="" id="sbi" />
48+ <input type="hidden" name="hl" value="bg" />
49 <button>Търсене</button>
50 </form>
51 </div>
52
53=== modified file 'www/10.04/index.html.bn'
54--- www/10.04/index.html.bn 2010-04-27 19:47:21 +0000
55+++ www/10.04/index.html.bn 2010-04-28 18:05:37 +0000
56@@ -178,6 +178,7 @@
57 <input type="hidden" name="ie" value="UTF-8" />
58 <input type="hidden" name="sa" value="Search" />
59 <input name="q" value="" id="sbi" />
60+ <input type="hidden" name="hl" value="bn" />
61 <button>অনুসন্ধান</button>
62 </form>
63 </div>
64
65=== modified file 'www/10.04/index.html.ca'
66--- www/10.04/index.html.ca 2010-04-27 19:47:21 +0000
67+++ www/10.04/index.html.ca 2010-04-28 18:05:37 +0000
68@@ -178,6 +178,7 @@
69 <input type="hidden" name="ie" value="UTF-8" />
70 <input type="hidden" name="sa" value="Search" />
71 <input name="q" value="" id="sbi" />
72+ <input type="hidden" name="hl" value="ca" />
73 <button>Cerca</button>
74 </form>
75 </div>
76
77=== modified file 'www/10.04/index.html.crh'
78--- www/10.04/index.html.crh 2010-04-27 19:47:21 +0000
79+++ www/10.04/index.html.crh 2010-04-28 18:05:37 +0000
80@@ -178,6 +178,7 @@
81 <input type="hidden" name="ie" value="UTF-8" />
82 <input type="hidden" name="sa" value="Search" />
83 <input name="q" value="" id="sbi" />
84+ <input type="hidden" name="hl" value="crh" />
85 <button>Qıdır</button>
86 </form>
87 </div>
88
89=== modified file 'www/10.04/index.html.da'
90--- www/10.04/index.html.da 2010-04-27 19:47:21 +0000
91+++ www/10.04/index.html.da 2010-04-28 18:05:37 +0000
92@@ -178,6 +178,7 @@
93 <input type="hidden" name="ie" value="UTF-8" />
94 <input type="hidden" name="sa" value="Search" />
95 <input name="q" value="" id="sbi" />
96+ <input type="hidden" name="hl" value="da" />
97 <button>Søg</button>
98 </form>
99 </div>
100
101=== modified file 'www/10.04/index.html.de'
102--- www/10.04/index.html.de 2010-04-27 19:47:21 +0000
103+++ www/10.04/index.html.de 2010-04-28 18:05:37 +0000
104@@ -178,6 +178,7 @@
105 <input type="hidden" name="ie" value="UTF-8" />
106 <input type="hidden" name="sa" value="Search" />
107 <input name="q" value="" id="sbi" />
108+ <input type="hidden" name="hl" value="de" />
109 <button>Suche</button>
110 </form>
111 </div>
112
113=== modified file 'www/10.04/index.html.el'
114--- www/10.04/index.html.el 2010-04-27 19:47:21 +0000
115+++ www/10.04/index.html.el 2010-04-28 18:05:37 +0000
116@@ -178,6 +178,7 @@
117 <input type="hidden" name="ie" value="UTF-8" />
118 <input type="hidden" name="sa" value="Search" />
119 <input name="q" value="" id="sbi" />
120+ <input type="hidden" name="hl" value="el" />
121 <button>Αναζήτηση</button>
122 </form>
123 </div>
124
125=== modified file 'www/10.04/index.html.en'
126--- www/10.04/index.html.en 2010-04-27 19:36:01 +0000
127+++ www/10.04/index.html.en 2010-04-28 18:05:37 +0000
128@@ -178,6 +178,7 @@
129 <input type="hidden" name="ie" value="UTF-8" />
130 <input type="hidden" name="sa" value="Search" />
131 <input name="q" value="" id="sbi" />
132+ <input type="hidden" name="hl" value="en" />
133 <button>Search</button>
134 </form>
135 </div>
136
137=== modified file 'www/10.04/index.html.es'
138--- www/10.04/index.html.es 2010-04-27 19:47:21 +0000
139+++ www/10.04/index.html.es 2010-04-28 18:05:37 +0000
140@@ -178,6 +178,7 @@
141 <input type="hidden" name="ie" value="UTF-8" />
142 <input type="hidden" name="sa" value="Search" />
143 <input name="q" value="" id="sbi" />
144+ <input type="hidden" name="hl" value="es" />
145 <button>Buscar</button>
146 </form>
147 </div>
148
149=== modified file 'www/10.04/index.html.fi'
150--- www/10.04/index.html.fi 2010-04-27 19:47:21 +0000
151+++ www/10.04/index.html.fi 2010-04-28 18:05:37 +0000
152@@ -178,6 +178,7 @@
153 <input type="hidden" name="ie" value="UTF-8" />
154 <input type="hidden" name="sa" value="Search" />
155 <input name="q" value="" id="sbi" />
156+ <input type="hidden" name="hl" value="fi" />
157 <button>Hae</button>
158 </form>
159 </div>
160
161=== modified file 'www/10.04/index.html.fr'
162--- www/10.04/index.html.fr 2010-04-27 19:47:21 +0000
163+++ www/10.04/index.html.fr 2010-04-28 18:05:37 +0000
164@@ -178,6 +178,7 @@
165 <input type="hidden" name="ie" value="UTF-8" />
166 <input type="hidden" name="sa" value="Search" />
167 <input name="q" value="" id="sbi" />
168+ <input type="hidden" name="hl" value="fr" />
169 <button>Rechercher</button>
170 </form>
171 </div>
172
173=== modified file 'www/10.04/index.html.gl'
174--- www/10.04/index.html.gl 2010-04-27 19:47:21 +0000
175+++ www/10.04/index.html.gl 2010-04-28 18:05:37 +0000
176@@ -178,6 +178,7 @@
177 <input type="hidden" name="ie" value="UTF-8" />
178 <input type="hidden" name="sa" value="Search" />
179 <input name="q" value="" id="sbi" />
180+ <input type="hidden" name="hl" value="gl" />
181 <button>Buscar</button>
182 </form>
183 </div>
184
185=== modified file 'www/10.04/index.html.he'
186--- www/10.04/index.html.he 2010-04-27 19:47:21 +0000
187+++ www/10.04/index.html.he 2010-04-28 18:05:37 +0000
188@@ -178,6 +178,7 @@
189 <input type="hidden" name="ie" value="UTF-8" />
190 <input type="hidden" name="sa" value="Search" />
191 <input name="q" value="" id="sbi" />
192+ <input type="hidden" name="hl" value="he" />
193 <button>חיפוש</button>
194 </form>
195 </div>
196
197=== modified file 'www/10.04/index.html.hr'
198--- www/10.04/index.html.hr 2010-04-27 19:47:21 +0000
199+++ www/10.04/index.html.hr 2010-04-28 18:05:37 +0000
200@@ -178,6 +178,7 @@
201 <input type="hidden" name="ie" value="UTF-8" />
202 <input type="hidden" name="sa" value="Search" />
203 <input name="q" value="" id="sbi" />
204+ <input type="hidden" name="hl" value="hr" />
205 <button>Traži</button>
206 </form>
207 </div>
208
209=== modified file 'www/10.04/index.html.hu'
210--- www/10.04/index.html.hu 2010-04-27 19:47:21 +0000
211+++ www/10.04/index.html.hu 2010-04-28 18:05:37 +0000
212@@ -178,6 +178,7 @@
213 <input type="hidden" name="ie" value="UTF-8" />
214 <input type="hidden" name="sa" value="Search" />
215 <input name="q" value="" id="sbi" />
216+ <input type="hidden" name="hl" value="hu" />
217 <button>Keresés</button>
218 </form>
219 </div>
220
221=== modified file 'www/10.04/index.html.id'
222--- www/10.04/index.html.id 2010-04-27 19:47:21 +0000
223+++ www/10.04/index.html.id 2010-04-28 18:05:37 +0000
224@@ -178,6 +178,7 @@
225 <input type="hidden" name="ie" value="UTF-8" />
226 <input type="hidden" name="sa" value="Search" />
227 <input name="q" value="" id="sbi" />
228+ <input type="hidden" name="hl" value="id" />
229 <button>Cari</button>
230 </form>
231 </div>
232
233=== modified file 'www/10.04/index.html.is'
234--- www/10.04/index.html.is 2010-04-27 19:47:21 +0000
235+++ www/10.04/index.html.is 2010-04-28 18:05:37 +0000
236@@ -178,6 +178,7 @@
237 <input type="hidden" name="ie" value="UTF-8" />
238 <input type="hidden" name="sa" value="Search" />
239 <input name="q" value="" id="sbi" />
240+ <input type="hidden" name="hl" value="is" />
241 <button>Leita</button>
242 </form>
243 </div>
244
245=== modified file 'www/10.04/index.html.it'
246--- www/10.04/index.html.it 2010-04-27 19:47:21 +0000
247+++ www/10.04/index.html.it 2010-04-28 18:05:37 +0000
248@@ -178,6 +178,7 @@
249 <input type="hidden" name="ie" value="UTF-8" />
250 <input type="hidden" name="sa" value="Search" />
251 <input name="q" value="" id="sbi" />
252+ <input type="hidden" name="hl" value="it" />
253 <button>Cerca</button>
254 </form>
255 </div>
256
257=== modified file 'www/10.04/index.html.ja'
258--- www/10.04/index.html.ja 2010-04-27 19:47:21 +0000
259+++ www/10.04/index.html.ja 2010-04-28 18:05:37 +0000
260@@ -178,6 +178,7 @@
261 <input type="hidden" name="ie" value="UTF-8" />
262 <input type="hidden" name="sa" value="Search" />
263 <input name="q" value="" id="sbi" />
264+ <input type="hidden" name="hl" value="ja" />
265 <button>検索</button>
266 </form>
267 </div>
268
269=== modified file 'www/10.04/index.html.ko'
270--- www/10.04/index.html.ko 2010-04-27 19:47:21 +0000
271+++ www/10.04/index.html.ko 2010-04-28 18:05:37 +0000
272@@ -178,6 +178,7 @@
273 <input type="hidden" name="ie" value="UTF-8" />
274 <input type="hidden" name="sa" value="Search" />
275 <input name="q" value="" id="sbi" />
276+ <input type="hidden" name="hl" value="ko" />
277 <button>찾기</button>
278 </form>
279 </div>
280
281=== modified file 'www/10.04/index.html.lv'
282--- www/10.04/index.html.lv 2010-04-27 19:47:21 +0000
283+++ www/10.04/index.html.lv 2010-04-28 18:05:37 +0000
284@@ -178,6 +178,7 @@
285 <input type="hidden" name="ie" value="UTF-8" />
286 <input type="hidden" name="sa" value="Search" />
287 <input name="q" value="" id="sbi" />
288+ <input type="hidden" name="hl" value="lv" />
289 <button>Meklēšana</button>
290 </form>
291 </div>
292
293=== modified file 'www/10.04/index.html.nds'
294--- www/10.04/index.html.nds 2010-04-27 19:47:21 +0000
295+++ www/10.04/index.html.nds 2010-04-28 18:05:37 +0000
296@@ -178,6 +178,7 @@
297 <input type="hidden" name="ie" value="UTF-8" />
298 <input type="hidden" name="sa" value="Search" />
299 <input name="q" value="" id="sbi" />
300+ <input type="hidden" name="hl" value="nds" />
301 <button>Sök</button>
302 </form>
303 </div>
304
305=== modified file 'www/10.04/index.html.nl'
306--- www/10.04/index.html.nl 2010-04-27 19:47:21 +0000
307+++ www/10.04/index.html.nl 2010-04-28 18:05:37 +0000
308@@ -178,6 +178,7 @@
309 <input type="hidden" name="ie" value="UTF-8" />
310 <input type="hidden" name="sa" value="Search" />
311 <input name="q" value="" id="sbi" />
312+ <input type="hidden" name="hl" value="nl" />
313 <button>Zoeken</button>
314 </form>
315 </div>
316
317=== modified file 'www/10.04/index.html.pt-br'
318--- www/10.04/index.html.pt-br 2010-04-27 20:23:27 +0000
319+++ www/10.04/index.html.pt-br 2010-04-28 18:05:37 +0000
320@@ -178,6 +178,7 @@
321 <input type="hidden" name="ie" value="UTF-8" />
322 <input type="hidden" name="sa" value="Search" />
323 <input name="q" value="" id="sbi" />
324+ <input type="hidden" name="hl" value="pt-br" />
325 <button>Pesquisar</button>
326 </form>
327 </div>
328
329=== modified file 'www/10.04/index.html.ro'
330--- www/10.04/index.html.ro 2010-04-27 19:47:21 +0000
331+++ www/10.04/index.html.ro 2010-04-28 18:05:37 +0000
332@@ -178,6 +178,7 @@
333 <input type="hidden" name="ie" value="UTF-8" />
334 <input type="hidden" name="sa" value="Search" />
335 <input name="q" value="" id="sbi" />
336+ <input type="hidden" name="hl" value="ro" />
337 <button>Caută</button>
338 </form>
339 </div>
340
341=== modified file 'www/10.04/index.html.ru'
342--- www/10.04/index.html.ru 2010-04-27 19:47:21 +0000
343+++ www/10.04/index.html.ru 2010-04-28 18:05:37 +0000
344@@ -178,6 +178,7 @@
345 <input type="hidden" name="ie" value="UTF-8" />
346 <input type="hidden" name="sa" value="Search" />
347 <input name="q" value="" id="sbi" />
348+ <input type="hidden" name="hl" value="ru" />
349 <button>Поиск</button>
350 </form>
351 </div>
352
353=== modified file 'www/10.04/index.html.sk'
354--- www/10.04/index.html.sk 2010-04-27 19:47:21 +0000
355+++ www/10.04/index.html.sk 2010-04-28 18:05:37 +0000
356@@ -178,6 +178,7 @@
357 <input type="hidden" name="ie" value="UTF-8" />
358 <input type="hidden" name="sa" value="Search" />
359 <input name="q" value="" id="sbi" />
360+ <input type="hidden" name="hl" value="sk" />
361 <button>Hľadať</button>
362 </form>
363 </div>
364
365=== modified file 'www/10.04/index.html.sv'
366--- www/10.04/index.html.sv 2010-04-27 19:47:21 +0000
367+++ www/10.04/index.html.sv 2010-04-28 18:05:37 +0000
368@@ -178,6 +178,7 @@
369 <input type="hidden" name="ie" value="UTF-8" />
370 <input type="hidden" name="sa" value="Search" />
371 <input name="q" value="" id="sbi" />
372+ <input type="hidden" name="hl" value="sv" />
373 <button>Sök</button>
374 </form>
375 </div>
376
377=== modified file 'www/10.04/index.html.th'
378--- www/10.04/index.html.th 2010-04-27 19:47:21 +0000
379+++ www/10.04/index.html.th 2010-04-28 18:05:37 +0000
380@@ -178,6 +178,7 @@
381 <input type="hidden" name="ie" value="UTF-8" />
382 <input type="hidden" name="sa" value="Search" />
383 <input name="q" value="" id="sbi" />
384+ <input type="hidden" name="hl" value="th" />
385 <button>ค้นหา</button>
386 </form>
387 </div>
388
389=== modified file 'www/10.04/index.html.vi'
390--- www/10.04/index.html.vi 2010-04-27 19:47:21 +0000
391+++ www/10.04/index.html.vi 2010-04-28 18:05:37 +0000
392@@ -178,6 +178,7 @@
393 <input type="hidden" name="ie" value="UTF-8" />
394 <input type="hidden" name="sa" value="Search" />
395 <input name="q" value="" id="sbi" />
396+ <input type="hidden" name="hl" value="vi" />
397 <button>Tìm kiếm</button>
398 </form>
399 </div>
400
401=== modified file 'www/10.04/index.html.zh-cn'
402--- www/10.04/index.html.zh-cn 2010-04-27 20:23:27 +0000
403+++ www/10.04/index.html.zh-cn 2010-04-28 18:05:37 +0000
404@@ -178,6 +178,7 @@
405 <input type="hidden" name="ie" value="UTF-8" />
406 <input type="hidden" name="sa" value="Search" />
407 <input name="q" value="" id="sbi" />
408+ <input type="hidden" name="hl" value="zh-cn" />
409 <button>搜索</button>
410 </form>
411 </div>

Subscribers

People subscribed via source and target branches