From bfa8d0208e3ea9a36a813bdc37b66f087fe8fd6d Mon Sep 17 00:00:00 2001 From: bastianonm Date: Wed, 1 May 2013 19:17:02 +0000 Subject: [PATCH] =?UTF-8?q?*=20Added=20Portuguese=20(Brazilian)=20translat?= =?UTF-8?q?ion,=20thanks=20to=20Andr=C3=A9=20Ramos=20*=20new=20map:=20Open?= =?UTF-8?q?=20Cycle=20Map=20-=20Transport=20*=20new=20map:=20Open=20Cycle?= =?UTF-8?q?=20Map=20-=20Landscape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WP-GPX-Maps.js | 23 ++++++++ languages/wp-gpx-maps-pt_BR.mo | Bin 0 -> 1338 bytes languages/wp-gpx-maps-pt_BR.po | 93 +++++++++++++++++++++++++++++++++ readme.txt | 27 ++++++---- wp-gpx-maps.php | 6 +-- wp-gpx-maps_admin_settings.php | 4 +- wp-gpx-maps_utils.php | 9 +++- 7 files changed, 146 insertions(+), 16 deletions(-) create mode 100644 languages/wp-gpx-maps-pt_BR.mo create mode 100644 languages/wp-gpx-maps-pt_BR.po diff --git a/WP-GPX-Maps.js b/WP-GPX-Maps.js index 35cdf91..9e1d9ad 100644 --- a/WP-GPX-Maps.js +++ b/WP-GPX-Maps.js @@ -173,6 +173,8 @@ function _wpgpxmaps(params) mapTypeIds.push("OSM1"); mapTypeIds.push("OSM2"); mapTypeIds.push("OSM3"); + mapTypeIds.push("OSM4"); + mapTypeIds.push("OSM5"); var ngImageMarkers = []; @@ -184,6 +186,8 @@ function _wpgpxmaps(params) case 'OSM1': { mapType = "OSM1"; break;} case 'OSM2': { mapType = "OSM2"; break;} case 'OSM3': { mapType = "OSM3"; break;} + case 'OSM4': { mapType = "OSM4"; break;} + case 'OSM5': { mapType = "OSM5"; break;} default: { mapType = google.maps.MapTypeId.HYBRID; break;} } @@ -214,6 +218,24 @@ function _wpgpxmaps(params) maxZoom: 18 })); + map.mapTypes.set("OSM4", new google.maps.ImageMapType({ + getTileUrl: function(coord, zoom) { + return "http://a.tile2.opencyclemap.org/transport/" + zoom + "/" + coord.x + "/" + coord.y + ".png"; + }, + tileSize: new google.maps.Size(256, 256), + name: "Open Cycle Map - Transport", + maxZoom: 18 + })); + + map.mapTypes.set("OSM5", new google.maps.ImageMapType({ + getTileUrl: function(coord, zoom) { + return "http://a.tile3.opencyclemap.org/landscape/" + zoom + "/" + coord.x + "/" + coord.y + ".png"; + }, + tileSize: new google.maps.Size(256, 256), + name: "Open Cycle Map - Landscape", + maxZoom: 18 + })); + map.mapTypes.set("OSM3", new google.maps.ImageMapType({ getTileUrl: function(coord, zoom) { return "http://toolserver.org/tiles/hikebike/" + zoom + "/" + coord.x + "/" + coord.y + ".png"; @@ -223,6 +245,7 @@ function _wpgpxmaps(params) maxZoom: 18 })); + // FULL SCREEN BUTTON var controlDiv = document.createElement('div'); controlDiv.style.padding = '5px'; diff --git a/languages/wp-gpx-maps-pt_BR.mo b/languages/wp-gpx-maps-pt_BR.mo new file mode 100644 index 0000000000000000000000000000000000000000..f7971912fff0e2abaee63b0b4b1b18f7caf7810e GIT binary patch literal 1338 zcmY+DJ&YSg6vu}UK4Kt1==hMPjnJ6&2k7Jjlsn%gIdLYIZ6c76PIJ2t-z2*;%gn6L zNlAz3kPsCGAc2B(9h68QcT|*AG!&GSwEW+C6O)m~zkP4ty!U^z&wpMz|AoMM0sCd_ zAF*G-K70f}SigWzg1>^#fWLtk!9Tz!z`w!gz<)rF6X(|U1(4%j1Y6)`@F}nla-J&< z-vytB{UP`mXh4p4AfLYra{Q-_{U!JrYJCTCz3zD-o(H!<&OZV#fFFR*f+@&(LSugd za{kX7`>Td$;3fEfZumRMck&m=@&AIH{~ScJ-isjXdI{wIFN2U(zXR%AkSK7h*2g}M z(Y$)kx?Mq+0{Ue8H}k|-0qI=wBU zlPTFqUJP|cHYG8vyoX1QT`IKQ+iMAX#t!2$z)VZ9Qg2ehU%}sG^?7T5E3at3P zWkS>}d+gmUN~1c+)J^gM!UyuSRP%DF3SEZQgi7b58il#Z)NVBoYUT#AHNG)ZLr=9f zwFl_~*-biK)k#z@k)8ga-+eXdBnbl5gcgPqZ{m6?>8ox}cD4q+H&oI?+@TIp&AhfD z*U|Zb+_9No-IEhtxFFxWUHOXl6*F(Au4o_ow{gVID_oVDkuIQVbTHcAG|_1%t)asw zvdDXOiHACj;4r^BP%9P2I}+uadH+OYCajPF}3NO#v>igBVPU=|c9HVKL+Dq*}uFS%T z3E?AGUdvnBQm(}eKj@rra$;hE5!OCio$1tx8)=nC95p<9Hi&&5ymjhg_4N|&hh1lu wT~nPexL%Gw0!ROZY20W>y`psZt6(sju?y8P+PXi3m`JwvaG9%bxS=NYKTOR}b^rhX literal 0 HcmV?d00001 diff --git a/languages/wp-gpx-maps-pt_BR.po b/languages/wp-gpx-maps-pt_BR.po new file mode 100644 index 0000000..3e9701c --- /dev/null +++ b/languages/wp-gpx-maps-pt_BR.po @@ -0,0 +1,93 @@ +msgid "" +msgstr "" +"Project-Id-Version: wp-gpx-maps\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-10-30 14:42+0100\n" +"PO-Revision-Date: 2013-04-23 18:36-0300\n" +"Last-Translator: André Ramos \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: ..\n" + +#: ../wp-gpx-maps.php:467 +msgid "Altitude" +msgstr "Altitude" + +#: ../wp-gpx-maps.php:468 +msgid "Current Position" +msgstr "Posição atual" + +#: ../wp-gpx-maps.php:469 +msgid "Speed" +msgstr "Velocidade" + +#: ../wp-gpx-maps.php:470 +msgid "Heart rate" +msgstr "Ritmo cardíaco" + +#: ../wp-gpx-maps.php:471 +msgid "Cadence" +msgstr "Cadência" + +#: ../wp-gpx-maps.php:472 +msgid "Go Full Screen" +msgstr "Tela cheia" + +#: ../wp-gpx-maps.php:473 +msgid "Exit Full Screen" +msgstr "Restaura janela" + +#: ../wp-gpx-maps.php:474 +msgid "Hide Images" +msgstr "Ocultar imagens" + +#: ../wp-gpx-maps.php:475 +msgid "Show Images" +msgstr "" + +#: ../wp-gpx-maps.php:476 +msgid "Back to center" +msgstr "Centralizar" + +#: ../wp-gpx-maps.php:489 +msgid "Total distance" +msgstr "Distância total" + +#: ../wp-gpx-maps.php:494 +msgid "Max elevation" +msgstr "Elevação máxima" + +#: ../wp-gpx-maps.php:496 +msgid "Min elevation" +msgstr "Elevação mínima" + +#: ../wp-gpx-maps.php:498 +msgid "Total climbing" +msgstr "Total subida" + +#: ../wp-gpx-maps.php:500 +msgid "Total descent" +msgstr "Total descida" + +#: ../wp-gpx-maps.php:504 +msgid "Average speed" +msgstr "Velocidade média" + +#: ../wp-gpx-maps.php:509 +msgid "Total Time" +msgstr "Tempo total" + +#: ../wp-gpx-maps.php:525 +msgid "Download" +msgstr "Baixar arquivo" + +#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151 +#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333 +#: ../wp-gpx-maps_admin_settings.php:364 +msgid "Save Changes" +msgstr "Salvar alterações" diff --git a/readme.txt b/readme.txt index 50aa669..68760c0 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i Tags: maps, gpx, gps, graph, chart, google maps, track, garmin, image, nextgen-gallery, nextgen, exif, OpenStreetMap, OpenCycleMap, Hike&Bike, heart rate, heartrate, cadence Requires at least: 2.0.0 Tested up to: 3.5 -Stable tag: 1.1.42 +Stable tag: 1.1.43 Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map. @@ -32,20 +32,21 @@ Even if you don't have a gps camera, this plugin can retrive the image position Old NGGallery Images (without gps data) and gpx: http://www.pedemontanadelgrappa.it/mappe/itinerario-3-alta-via-degli-eroi/ -Translated into 7 languages: +Translated into 11 languages: -- English (default) -- Italian it_IT -- German de_DE -- Spanish es_ES - Dutch nl_NL +- English (default) +- French fr_FR +- German de_DE +- Hungarian hu_HU +- Italian it_IT +- Polish pl_PL +- Portuguese (Brazilian) pt_BR +- Spanish es_ES - Swedish sv_SE - Turkish tr_TR -- Hungarian hu_HU -- French fr_FR -- Polish pl_PL -(many thanks to all the guys who helped me with the translations) +(many thanks to all guys who helped me with the translations) - iphone/ipad/ipod Compatible @@ -89,7 +90,7 @@ The attributes are: 1. gheight: graph height -1. mtype: map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN +1. mtype: map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN, OSM1 (Open Street Map), OSM2 (Open Cycle Map), OSM3 (Hike & Bike), OSM4 (Open Cycle Map - Transport), OSM5 (Open Cycle Map - Landscape) 1. waypoints: print the gpx waypoints inside the map (default is FALSE) @@ -180,6 +181,10 @@ Yes! 1. Altitude & Speed & Hearth rate == Changelog == += 1.1.43 = +* Added Portuguese (Brazilian) translation, thanks to André Ramos +* new map: Open Cycle Map - Transport +* new map: Open Cycle Map - Landscape = 1.1.42 = * qTranslate compatible = 1.1.41 = diff --git a/wp-gpx-maps.php b/wp-gpx-maps.php index 76c92ef..8001102 100644 --- a/wp-gpx-maps.php +++ b/wp-gpx-maps.php @@ -1,9 +1,9 @@ > TERRAIN: maps with physical features such as terrain and vegetation.
> Open Street Map
> Open Cycle Map
- > Hike & Bike
+ > Open Cycle Map - Transport
+ > Open Cycle Map - Landscape
+ > Hike & Bike
diff --git a/wp-gpx-maps_utils.php b/wp-gpx-maps_utils.php index 7f810b1..eeddf5c 100644 --- a/wp-gpx-maps_utils.php +++ b/wp-gpx-maps_utils.php @@ -158,6 +158,8 @@ $gpx->registerXPathNamespace('11', 'http://www.topografix.com/GPX/1/1'); $gpx->registerXPathNamespace('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1'); + $count_wpt = count( $gpx->xpath('//wpt | //10:wpt | //11:wpt') ); + $nodes = $gpx->xpath('//trk | //10:trk | //11:trk'); //normal gpx @@ -489,7 +491,12 @@ } else { - echo "Empty Gpx or not supported File!"; + + if ($count_wpt == 0) + { + echo "Empty Gpx or not supported File!"; + } + } }