Merge lp:~martin-borho/ubuntu-weather-app/fix-1355835-twc-link into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Martin Borho
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 🦄
Approved revision: 378
Merged at revision: 379
Proposed branch: lp:~martin-borho/ubuntu-weather-app/fix-1355835-twc-link
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 52 lines (+13/-6)
1 file modified
components/TabFooter.qml (+13/-6)
To merge this branch: bzr merge lp:~martin-borho/ubuntu-weather-app/fix-1355835-twc-link
Reviewer Review Type Date Requested Status
Alan Pope 🍺🐧🐱 🦄 (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+238020@code.launchpad.net

Commit message

Set mobile links as default for TWC in footer.

Description of the change

Set mobile links as default for TWC in footer, until TWC has its mobile-switch fixed.

To post a comment you must log in.
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
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

Looks good! Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/TabFooter.qml'
2--- components/TabFooter.qml 2014-09-20 10:55:31 +0000
3+++ components/TabFooter.qml 2014-10-10 18:27:58 +0000
4@@ -27,28 +27,34 @@
5 }
6
7 function openTWCLink(type) {
8+ // See https://bugs.launchpad.net/ubuntu-weather-app/+bug/1355835
9+ // Mobile links are set as default until TWC has its mobile-switch fixed
10 var serviceId = locationTab.locationData.location.services["weatherchannel"],
11- loc_name = Qt.locale().name, url = "http://";
12+ loc_name = Qt.locale().name, url = "http://m.";
13 print("Open link for "+type+" - "+loc_name)
14 if(loc_name.search(/^de_/) > -1) {
15 url += "de.weather.com/";
16 if(type) url += ((type === "10day") ? "10tage/" : "stündlich/");
17
18 } else if(loc_name === "en_US" || loc_name === "en-CA") {
19- url += "www.weather.com/";
20+ //url += "www.weather.com/"; //desktop
21+ url += "m.weather.com/";
22 if(type) url += "weather/"+((type === "10day") ? "tenday/" : "hourbyhour/graph/");
23
24 } else if(loc_name.search(/^en_/) > -1) {
25 url += "uk.weather.com/";
26- if(type) url += "weather/"+((type === "10day") ? "10day-" : "hourByHour-");
27+ //if(type) url += "weather/"+((type === "10day") ? "10day-" : "hourByHour-"); //desktop
28+ if(type) url += ((type === "10day") ? "10day/" : "hourly/");
29
30 } else if(loc_name.search(/^fr_/) > -1) {
31 url += "fr.weather.com/";
32 if(type) url += ((type === "10day") ? "10jours/" : "horaire/");
33
34 } else if(loc_name.search(/^es_/) > -1) {
35- url += "espanol.weather.com/";
36- if(type) url += "weather/"+((type === "10day") ? "10day-" : "hourByHour-");
37+ //url += "espanol.weather.com/"; //desktop
38+ // if(type) url += "weather/"+((type === "10day") ? "10day-" : "hourByHour-"); //desktop
39+ url += "es.weather.com/";
40+ if(type) url += ((type === "10day") ? "10días/" : "por_hora/");
41
42 } else if(loc_name === "ja_JP") {
43 url += "ja.weather.com/";
44@@ -70,7 +76,8 @@
45 url += "ru.weather.com/";
46 if(type) url += ((type === "10day") ? "10дней/" : "ежечасно/");
47 } else {
48- url += "www.weather.com/";
49+ //url += "www.weather.com/"; //desktop
50+ url += "m.weather.com/";
51 if(type) url += "weather/"+((type === "10day") ? "tenday/" : "hourbyhour/graph/");
52 }
53

Subscribers

People subscribed via source and target branches