From 8e8933658b31da886f13806f275da5b6f7b9f023 Mon Sep 17 00:00:00 2001 From: bastianonm Date: Mon, 22 Jul 2013 06:55:54 +0000 Subject: [PATCH] * Added meters/miles chart unit of measure * Added Russian translation, thanks to G.A.P Old versions cleanup --- WP-GPX-Maps.js | 5 ++ languages/wp-gpx-maps-ru_RU.mo | Bin 0 -> 1523 bytes languages/wp-gpx-maps-ru_RU.po | 93 +++++++++++++++++++++++++++++++++ readme.txt | 12 +++-- wp-gpx-maps.php | 16 +++++- wp-gpx-maps_admin.php | 4 +- wp-gpx-maps_admin_settings.php | 1 + 7 files changed, 123 insertions(+), 8 deletions(-) create mode 100644 languages/wp-gpx-maps-ru_RU.mo create mode 100644 languages/wp-gpx-maps-ru_RU.po diff --git a/WP-GPX-Maps.js b/WP-GPX-Maps.js index 968598e..cee632b 100644 --- a/WP-GPX-Maps.js +++ b/WP-GPX-Maps.js @@ -625,6 +625,11 @@ function _wpgpxmaps(params) { l_x = { suf : "NM", dec : 1 }; l_y = { suf : "m", dec : 0 }; + } + else if (unit=="4") + { + l_x = { suf : "mi", dec : 1 }; + l_y = { suf : "m", dec : 0 }; } else { diff --git a/languages/wp-gpx-maps-ru_RU.mo b/languages/wp-gpx-maps-ru_RU.mo new file mode 100644 index 0000000000000000000000000000000000000000..a324f2dcf84d8d2ec8fbc8b08afc401912d1b8c8 GIT binary patch literal 1523 zcmaKqO>7%Q6vqcBU*@Y64uC)mLR_e3S+}WDTtH2nG>xcLt2Pw}L^RzU?1lBNwL8wo z3A<52G=+!?IG`dFByK%eX(KGxP9;t~&K!^s2gH#pCoV|ve``l>E{yc@^P72J|F`-5 z(1EWR&eO2xVFTC;u=no49~=Wd1X}Ph@Hg;r@K5kT@Ne)S_%BFt2k#yE&w>>9DwqRb z2Ok0FK&n$7^L_A9_~H0{4ZI)zC6MwqK&tZ%NO?bw{TtxN==n29`LhQYdl5VfJ_*Jk z-FHCJ^94wCu7jlW7WfSKD@c9*0x9kv@D=bm4Dm8}5+vUTUji?Kr1v^Vc|(x;+!_17 zfQR7!0b;!D4PZ~fFe*d&>>bGFB+^{8yS+o-V(*Ys znNSD1| zn_mqyKh+9DUhxv8BDN6kb5ARoXr4%|*y+Gme6fLMDJ#iUu0pjevudRvy34D`WyOni z8Bt)R9hyG79{Nn?EA*t~l!Q z{8V8of7s2tE&|0lwH#34N!(H4PK*3BQVPf1!|oK~&d5}YY9gaFlsZlde8HJ<%KVL* zBc0~Sh73X{X}yK8sMf-&L{-TK<|r+e<|l*a9XD5u@rfeTT5Dn`tycAG%}@r>3GUTp zk}Cb?JJnO-_#}>cexMRDA9=BleHHle3xUqPE6TC*11;WGYb$Z$r)RLT0$*A>v7{!C zvocjpsp|#q;BrAl_^-*vA0_j=bIh5Zgjev{y?Pl5!bOUcW9F*eupP5&FPbhhTefX> z%uO@2n|71qzK@qStYa_QE6jXvcDeloAw&3WyUxtFri*yG=rHpGe)R3S{mgWcZf=`h z^ONZzp=UQy9M!t^Q&?7O%WRt+6dxi17u;-f#P`k6>@xG6>EZ(K9lY4jQMHXmLrh@T z%`JO{x}hFs*cc^K={7|4kl!~wX09Q=4+T9lz%QiWA)9LZZo${Gg#VA(g8oaR{t%Ll z+JmkEsm?4@ht-fiJY@QKCU)OMq<`NwucGLV8PIMh`=-5Yzcd39b{jjv@|pPx9kF}T HK3?O0Qdtm8 literal 0 HcmV?d00001 diff --git a/languages/wp-gpx-maps-ru_RU.po b/languages/wp-gpx-maps-ru_RU.po new file mode 100644 index 0000000..38a12d6 --- /dev/null +++ b/languages/wp-gpx-maps-ru_RU.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:41+0100\n" +"PO-Revision-Date: 2013-07-17 20:50+0400\n" +"Last-Translator: G.A.P \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.7\n" +"X-Poedit-SearchPath-0: ..\n" + +#: ../wp-gpx-maps.php:467 +msgid "Altitude" +msgstr "Высота" + +#: ../wp-gpx-maps.php:468 +msgid "Current Position" +msgstr "Текущая позиция" + +#: ../wp-gpx-maps.php:469 +msgid "Speed" +msgstr "Скорость" + +#: ../wp-gpx-maps.php:470 +msgid "Heart rate" +msgstr "Пульс" + +#: ../wp-gpx-maps.php:471 +msgid "Cadence" +msgstr "Каденс" + +#: ../wp-gpx-maps.php:472 +msgid "Go Full Screen" +msgstr "На весь экран" + +#: ../wp-gpx-maps.php:473 +msgid "Exit Full Screen" +msgstr "Свернуть в окно" + +#: ../wp-gpx-maps.php:474 +msgid "Hide Images" +msgstr "Скрыть картинки" + +#: ../wp-gpx-maps.php:475 +msgid "Show Images" +msgstr "Показать картинки" + +#: ../wp-gpx-maps.php:476 +msgid "Back to center" +msgstr "По центру" + +#: ../wp-gpx-maps.php:489 +msgid "Total distance" +msgstr "Дистанция" + +#: ../wp-gpx-maps.php:494 +msgid "Max elevation" +msgstr "Максимальная высота" + +#: ../wp-gpx-maps.php:496 +msgid "Min elevation" +msgstr "Минимальная высота" + +#: ../wp-gpx-maps.php:498 +msgid "Total climbing" +msgstr "Подъём" + +#: ../wp-gpx-maps.php:500 +msgid "Total descent" +msgstr "Спуск" + +#: ../wp-gpx-maps.php:504 +msgid "Average speed" +msgstr "Средняя скорость" + +#: ../wp-gpx-maps.php:509 +msgid "Total Time" +msgstr "Время" + +#: ../wp-gpx-maps.php:525 +msgid "Download" +msgstr "Скачать" + +#: ../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 "Сохранить изменения" diff --git a/readme.txt b/readme.txt index b65fb8c..dddbafb 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.45 +Stable tag: 1.1.46 Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map. @@ -26,7 +26,7 @@ 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 11 languages: +Translated into 12 languages: - Dutch nl_NL - English (default) @@ -36,6 +36,7 @@ Translated into 11 languages: - Italian it_IT - Polish pl_PL - Portuguese (Brazilian) pt_BR +- Russian ru_RU - Spanish es_ES - Swedish sv_SE - Turkish tr_TR @@ -92,7 +93,7 @@ The attributes are: 1. pointsoffset: skip points closer than XX meters(default is 10) -1. uom: the unit of measure of distance/altitude are values are: 0, 1, 2 (0 = meters, 1 = feet/miles, 2 = meters/kilometers, 3 = meters/nautical miles) +1. uom: distance/altitude possible unit of measure are: 0, 1, 2, 3, 4 (0 = meters, 1 = feet/miles, 2 = meters/kilometers, 3 = meters/nautical miles, 4 = meters/miles) 1. mlinecolor: map line color (default is #3366cc) @@ -114,7 +115,7 @@ The attributes are: 1. glinecolorgrade: grade line color (default is #beecff) -1. uomspeed: the unit of measure of speed are: 0, 1, 2, 3, 4 (0 = m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles, 5 = Nautical Miles/Hour (Knots)) +1. uomspeed: unit of measure for speed are: 0, 1, 2, 3, 4, 5 (0 = m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles, 5 = Nautical Miles/Hour (Knots)) 1. chartFrom1: minimun value for altitude chart @@ -175,6 +176,9 @@ Yes! 1. Altitude & Speed & Hearth rate == Changelog == += 1.1.46 = +* Added meters/miles chart unit of measure +* Added Russian translation, thanks to G.A.P = 1.1.45 = * Added nautical miles as distance (Many thanks to Anders) = 1.1.44 = diff --git a/wp-gpx-maps.php b/wp-gpx-maps.php index 263df02..bf26ca6 100644 --- a/wp-gpx-maps.php +++ b/wp-gpx-maps.php @@ -3,7 +3,7 @@ Plugin Name: WP-GPX-Maps Plugin URI: http://www.devfarm.it/ Description: Draws a gpx track with altitude graph -Version: 1.1.45 +Version: 1.1.46 Author: Bastianon Massimo Author URI: http://www.pedemontanadelgrappa.it/ */ @@ -59,7 +59,7 @@ function enqueue_WP_GPX_Maps_scripts() wp_enqueue_script( 'highcharts' ); wp_deregister_script( 'WP-GPX-Maps' ); - wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery','googlemaps','highcharts'), "1.1.45"); + wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery','googlemaps','highcharts'), "1.1.46"); wp_enqueue_script( 'WP-GPX-Maps' ); } @@ -301,6 +301,10 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='') { // meters / kilometers / nautical miles $_dist = (float)($_dist / 1000 / 1.852); + } else if ($uom == '4') + { + // meters / miles + $_dist *= 0.000621371192; } $points_graph_dist .= number_format ( $_dist , 2 , '.' , '' ).','; @@ -352,6 +356,14 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='') $total_ele_up = round($total_ele_up, 0) ." m"; $total_ele_down = round($total_ele_down, 0) ." m"; } + else if ($uom == '4') { + // meters / kilometers / nautical miles + $tot_len = round($tot_len * 0.000621371192, 2)." mi"; + $max_ele = round($max_ele, 0) ." m"; + $min_ele = round($min_ele, 0) ." m"; + $total_ele_up = round($total_ele_up, 0) ." m"; + $total_ele_down = round($total_ele_down, 0) ." m"; + } else { // meters / meters $tot_len = round($tot_len, 0) ." m"; diff --git a/wp-gpx-maps_admin.php b/wp-gpx-maps_admin.php index dc95500..2351475 100644 --- a/wp-gpx-maps_admin.php +++ b/wp-gpx-maps_admin.php @@ -108,7 +108,7 @@ function WP_GPX_Maps_html_page() {
  • waypoints: print the gpx waypoints inside the map (default is FALSE)
  • donotreducegpx: print all the point without reduce it (default is FALSE)
  • pointsoffset: skip points closer than XX meters(default is 10)
  • -
  • uom: the unit of measure values are: 0, 1, 2 (0 = meters, 1 = miles/feet, 2 = meters/kilometers)
  • +
  • uom: distance/altitude possible unit of measure are: 0, 1, 2, 3, 4 (0 = meters, 1 = feet/miles, 2 = meters/kilometers, 3 = meters/nautical miles, 4 = meters/miles)
  • mlinecolor: map line color (default is #3366cc)
  • glinecolor: graph line color (default is #3366cc)
  • glinecolorspeed: speed line color (default is #ff0000)
  • @@ -119,7 +119,7 @@ function WP_GPX_Maps_html_page() {
  • showhr: show heart rate inside the chart (default is FALSE)
  • showcad: show cadence inside the chart (default is FALSE)
  • showgrade: show grade inside the chart (default is FALSE)
  • -
  • uomspeed: the unit of measure of speed are: 0, 1, 2 (0 = m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles)
  • +
  • uomspeed: unit of measure for speed are: 0, 1, 2, 3, 4 (0 = m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles, 5 = Nautical Miles/Hour (Knots))
  • chartFrom1: minimun value for altitude chart
  • chartTo1: maxumin value for altitude chart
  • chartFrom2: minimun value for speed chart
  • diff --git a/wp-gpx-maps_admin_settings.php b/wp-gpx-maps_admin_settings.php index 5bbeb9d..180e433 100644 --- a/wp-gpx-maps_admin_settings.php +++ b/wp-gpx-maps_admin_settings.php @@ -255,6 +255,7 @@ +