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 0000000..a324f2d Binary files /dev/null and b/languages/wp-gpx-maps-ru_RU.mo differ 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 @@ +