From 0e46a8f820b9031108cb93ee14632874e86ff706 Mon Sep 17 00:00:00 2001 From: ferdi2005 Date: Fri, 12 Aug 2022 18:03:59 +0100 Subject: [PATCH] URL localizzato per Wikidata; fix bug url encoding Bump di versione build; fix url WLM --- app/controllers/about/info.js | 2 +- app/controllers/home/show.js | 11 ++++------- app/controllers/upload/index.js | 4 ---- tiapp.xml | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/controllers/about/info.js b/app/controllers/about/info.js index c6466d4..87f19e0 100644 --- a/app/controllers/about/info.js +++ b/app/controllers/about/info.js @@ -17,5 +17,5 @@ if (OS_ANDROID) { } $.site.addEventListener("click", function(e){ - Ti.Platform.openURL("https://wikilovesmonuments.it"); + Ti.Platform.openURL("https://wikimedia.it/wiki-loves-monuments"); }); \ No newline at end of file diff --git a/app/controllers/home/show.js b/app/controllers/home/show.js index 2edfa4c..0815056 100644 --- a/app/controllers/home/show.js +++ b/app/controllers/home/show.js @@ -227,8 +227,8 @@ var client = Ti.Network.createHTTPClient({ $.Info.addEventListener('click', function (e) { var info_url; - var reasonator_url = "http://reasonator.toolforge.org/?q=" + response.item + "&lang=it"; - var wikidata_url = "http://www.wikidata.org/wiki/" + response.item; + var reasonator_url = "http://reasonator.toolforge.org/?q=" + response.item + "&lang=" + Ti.Locale.currentLanguage; + var wikidata_url = "http://www.wikidata.org/wiki/" + response.item + "?uselang=" + Ti.Locale.currentLanguage; var message = Ti.UI.createAlertDialog({message: String.format(L("more_information"), response.itemlabel), buttonNames: ["Wikidata", "Reasonator"]}); message.addEventListener("click", function(e){ @@ -293,12 +293,9 @@ var client = Ti.Network.createHTTPClient({ $.allphotos.addEventListener("click", function(e) { if (Dialog.isSupported()) { - if (OS_IOS) { - var allphotos_url = encodeURI(response.allphotos); - } else { var allphotos_url = response.allphotos; - } - if (OS_ANDROID || !Dialog.isOpen()) { + + if (OS_ANDROID || !Dialog.isOpen()) { Dialog.open({ title: response.itemlabel, url: allphotos_url diff --git a/app/controllers/upload/index.js b/app/controllers/upload/index.js index 2a0af64..87f3ffc 100644 --- a/app/controllers/upload/index.js +++ b/app/controllers/upload/index.js @@ -35,10 +35,6 @@ keychainItem.addEventListener("read", function(k){ var user_url = "https://commons.wikimedia.org/wiki/Special:ListFiles/" + userInfo.username; } - if (OS_IOS) { - var user_url = encodeURI(user_url); - } - $.photos_on_commons.addEventListener("click", function(e) { if (Dialog.isSupported()) { if (OS_ANDROID || !Dialog.isOpen()) { diff --git a/tiapp.xml b/tiapp.xml index e04a52b..183a5fa 100644 --- a/tiapp.xml +++ b/tiapp.xml @@ -3,7 +3,7 @@ xmlns:ti="http://ti.appcelerator.org"> it.wikimedia.wikilovesmonuments WLM Italia - 2.5.1 + 2.5.1.1 Ferdinando Traversa https://cerca.wikilovesmonuments.it App per trovare i monumenti partecipanti a Wiki Loves Monuments con la propria posizione.