Skip to content

Commit

Permalink
URL localizzato per Wikidata; fix bug url encoding
Browse files Browse the repository at this point in the history
Bump di versione build; fix url WLM
  • Loading branch information
ferdi2005 committed Aug 12, 2022
1 parent 381d06f commit 0e46a8f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/controllers/about/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
11 changes: 4 additions & 7 deletions app/controllers/home/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions app/controllers/upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion tiapp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:ti="http://ti.appcelerator.org">
<id>it.wikimedia.wikilovesmonuments</id>
<name>WLM Italia</name>
<version>2.5.1</version>
<version>2.5.1.1</version>
<publisher>Ferdinando Traversa</publisher>
<url>https://cerca.wikilovesmonuments.it</url>
<description>App per trovare i monumenti partecipanti a Wiki Loves Monuments con la propria posizione.</description>
Expand Down

0 comments on commit 0e46a8f

Please sign in to comment.