From 142829500ff94af00f11f71b8c0b0323508650a9 Mon Sep 17 00:00:00 2001 From: bozdoz Date: Thu, 25 Jan 2018 18:12:22 -0400 Subject: [PATCH] getting ready for translations --- class.leaflet-map.php | 31 +-- class.plugin-option.php | 15 +- class.plugin-settings.php | 299 +++++++++++++++---------- languages/leaflet-map.pot | 383 +++++++++++++++++++++++++++++++++ leaflet-map.php | 4 +- package.json | 1 + readme.txt | 4 +- templates/settings.php | 39 ++-- templates/shortcode-helper.php | 46 ++-- 9 files changed, 644 insertions(+), 178 deletions(-) create mode 100644 languages/leaflet-map.pot diff --git a/class.leaflet-map.php b/class.leaflet-map.php index ff45b77..7b5b485 100644 --- a/class.leaflet-map.php +++ b/class.leaflet-map.php @@ -13,13 +13,13 @@ class Leaflet_Map { * Used for asset file cache-busting * @var string major minor patch version */ - public static $version = '2.9.1'; + public static $version = '2.10.0'; /** * Leaflet version * @var string major minor patch version */ - public static $leaflet_version = '1.2.0'; + public static $leaflet_version = '1.3.1'; /** * Number of maps on page; used for unique map ids @@ -83,7 +83,6 @@ public static function init() { * Leaflet_Map Constructor */ private function __construct() { - $this->includes(); $this->init_hooks(); $this->add_shortcodes(); @@ -91,27 +90,19 @@ private function __construct() { do_action('leaflet-map-loaded'); } - /** - * - * include classes - * - */ - private function includes() { - // Leaflet_Map_Plugin_Settings - include_once(LEAFLET_MAP__PLUGIN_DIR . 'class.plugin-settings.php'); - // Leaflet_Map_Admin - include_once(LEAFLET_MAP__PLUGIN_DIR . 'class.admin.php'); - } - /** * * add actions and filters * */ private function init_hooks() { + // Leaflet_Map_Admin + include_once(LEAFLET_MAP__PLUGIN_DIR . 'class.admin.php'); // init admin Leaflet_Map_Admin::init(); + + add_action( 'plugins_loaded', array('Leaflet_Map', 'load_text_domain' )); add_action( 'wp_enqueue_scripts', array('Leaflet_Map', 'enqueue_and_register') ); @@ -154,6 +145,14 @@ public static function uninstall () { Leaflet_Geocoder::remove_caches(); } + /** + * Loads Translations + * + */ + public static function load_text_domain() { + load_plugin_textdomain( 'leaflet-map', false, dirname( plugin_basename( LEAFLET_MAP__PLUGIN_FILE ) ) . '/languages/' ); + } + /** * Enqueue and register styles and scripts (called in __construct) * @@ -161,6 +160,8 @@ public static function uninstall () { public static function enqueue_and_register () { /* defaults from db */ + // Leaflet_Map_Plugin_Settings + include_once(LEAFLET_MAP__PLUGIN_DIR . 'class.plugin-settings.php'); $settings = Leaflet_Map_Plugin_Settings::init(); $js_url = $settings->get('js_url'); diff --git a/class.plugin-option.php b/class.plugin-option.php index 2c53a35..1486918 100644 --- a/class.plugin-option.php +++ b/class.plugin-option.php @@ -36,13 +36,14 @@ function __construct ($details = array()) { } $option_filter = array( - 'default' => null, - 'type' => FILTER_SANITIZE_STRING, - 'options' => array( - 'filter' => FILTER_SANITIZE_STRING, - 'flags' => FILTER_FORCE_ARRAY - ), - 'helptext' => FILTER_SANITIZE_STRING + 'display_name' => FILTER_SANITIZE_STRING, + 'default' => null, + 'type' => FILTER_SANITIZE_STRING, + 'options' => array( + 'filter' => FILTER_SANITIZE_STRING, + 'flags' => FILTER_FORCE_ARRAY + ), + 'helptext' => FILTER_SANITIZE_STRING ); // get matching keys only diff --git a/class.plugin-settings.php b/class.plugin-settings.php index 1116bc4..3437f5a 100644 --- a/class.plugin-settings.php +++ b/class.plugin-settings.php @@ -27,116 +27,12 @@ class Leaflet_Map_Plugin_Settings { private static $instance = null; /** - * Default values and admin form information + * Default values and admin form information + * Needs to be created within __construct + * in order to use a function such as __() * @var array $options */ - public $options = array( - 'default_lat' => array( - 'default'=>'44.67', - 'type' => 'text', - 'helptext' => 'Default latitude for maps or adjust for each map like so:
[leaflet-map lng="44.67"]' - ), - 'default_lng' => array( - 'default'=>'-63.61', - 'type' => 'text', - 'helptext' => 'Default longitude for maps or adjust for each map like so:
[leaflet-map lng="-63.61"]' - ), - 'default_zoom' => array( - 'default'=>'12', - 'type' => 'text', - 'helptext' => 'Can set per map in shortcode or adjust for all maps here; e.g.
[leaflet-map zoom="5"]' - ), - 'default_height' => array( - 'default'=>'250', - 'type' => 'text', - 'helptext' => 'Can set per map in shortcode or adjust for all maps here. Values can include "px" but it is not necessary. Can also be %; e.g.
[leaflet-map height="250"]' - ), - 'default_width' => array( - 'default'=>'100%', - 'type' => 'text', - 'helptext' => 'Can set per map in shortcode or adjust for all maps here. Values can include "px" but it is not necessary. Can also be %; e.g.
[leaflet-map width="100%"]' - ), - 'fit_markers' => array( - 'default' => '0', - 'type' => 'checkbox', - 'helptext' => 'If enabled, all markers on each map will alter the view of the map; i.e. the map will fit to the bounds of all of the markers on the map. You can also change this per map in the shortcode: e.g.
[leaflet-map fit_markers="1"]' - ), - 'show_zoom_controls' => array( - 'default' => '0', - 'type' => 'checkbox', - 'helptext' => 'The zoom buttons can be large and annoying. Enabled or disable per map in shortcode:
[leaflet-map zoomcontrol="0"]' - ), - 'scroll_wheel_zoom' => array( - 'default' => '0', - 'type' => 'checkbox', - 'helptext' => 'Disable zoom with mouse scroll wheel. Sometimes someone wants to scroll down the page, and not zoom the map. Enable or disable per map in shortcode:
[leaflet-map scrollwheel="0"]' - ), - 'double_click_zoom' => array( - 'default' => '0', - 'type' => 'checkbox', - 'helptext' => 'If enabled, your maps will zoom with a double click. By default it is disabled: If we\'re going to remove zoom controls and have scroll wheel zoom off by default, we might as well stick to our guns and not zoom the map. Enable or disable per map in shortcode:
[leaflet-map doubleClickZoom=false]' - ), - 'default_min_zoom' => array( - 'default' => '0', - 'type' => 'text', - 'helptext' => 'Restrict the viewer from zooming in past the minimum zoom. Can set per map in shortcode or adjust for all maps here; e.g.
[leaflet-map min_zoom="1"]' - ), - 'default_max_zoom' => array( - 'default' => '20', - 'type' => 'text', - 'helptext' => 'Restrict the viewer from zooming out past the maximum zoom. Can set per map in shortcode or adjust for all maps here; e.g.
[leaflet-map max_zoom="10"]' - ), - 'default_tiling_service' => array( - 'default' => 'other', - 'type' => 'select', - 'options' => array( - 'other' => 'I will provide my own map tile URL', - 'mapquest' => 'MapQuest (I have an app key)', - ), - 'helptext' => 'Choose a tiling service or provide your own.' - ), - 'mapquest_appkey' => array( - 'default' => 'supply-an-app-key-if-you-choose-mapquest', - 'type' => 'text', - 'noreset' => true, - 'helptext' => 'If you choose MapQuest, you must provide an app key. Sign up, then Create a new app then supply the "Consumer Key" here.' - ), - 'map_tile_url' => array( - 'default'=>'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', - 'type' => 'text', - 'helptext' => 'See more tile servers here: here. Please note(!): free tiles from MapQuest have been discontinued without use of an app key (free accounts available) (see blog post). Can be set per map with the shortcode
[leaflet-map tileurl=http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg subdomains=abcd]' - ), - 'map_tile_url_subdomains' => array( - 'default'=>'abc', - 'type' => 'text', - 'helptext' => 'Some maps get tiles from multiple servers with subdomains such as a,b,c,d or 1,2,3,4; can be set per map with the shortcode
[leaflet-map subdomains="1234"]', - ), - 'js_url' => array( - 'default'=>'https://unpkg.com/leaflet@%s/dist/leaflet.js', - 'type' => 'text', - 'helptext' => 'If you host your own Leaflet files, specify the URL here.' - ), - 'css_url' => array( - 'default'=>'https://unpkg.com/leaflet@%s/dist/leaflet.css', - 'type' => 'text', - 'helptext' => 'Same as above.' - ), - 'default_attribution' => array( - 'default' => "Leaflet; \r\n© OpenStreetMap contributors", - 'type' => 'textarea', - 'helptext' => 'Attribution to a custom tile url. Use semi-colons (;) to separate multiple.' - ), - 'geocoder' => array( - 'default' => 'google', - 'type' => 'select', - 'options' => array( - 'google' => 'Google Maps', - 'osm' => 'OpenStreetMap Nominatim', - 'dawa' => 'Danmarks Adressers' - ), - 'helptext' => 'Select the Geocoding provider to use to retrieve addresses defined in shortcode.' - ) - ); + public $options = array(); /** * Singleton @@ -155,10 +51,191 @@ private function __construct () { /* update leaflet version from main class */ $leaflet_version = Leaflet_Map::$leaflet_version; - $this->options['js_url']['default'] = sprintf($this->options['js_url']['default'], $leaflet_version); - $this->options['css_url']['default'] = sprintf($this->options['css_url']['default'], $leaflet_version); + $foreachmap = __('You can also change this for each map'); - foreach ($this->options as $name => $details) { + /* + * initiate options using internationalization! + */ + $this->options = array( + 'default_lat' => array( + 'display_name'=>__('Default Latitude', 'leaflet-map'), + 'default'=>'44.67', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map lat="44.67"]', + __('Default latitude for maps.', 'leaflet-map'), + $foreachmap + ) + ), + 'default_lng' => array( + 'display_name'=>__('Default Longitude', 'leaflet-map'), + 'default'=>'-63.61', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map lng="-63.61"]', + __('Default longitude for maps.', 'leaflet-map'), + $foreachmap + ) + ), + 'default_zoom' => array( + 'display_name'=>__('Default Zoom', 'leaflet-map'), + 'default'=>'12', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map zoom="5"]', + __('Default zoom for maps.', 'leaflet-map'), + $foreachmap + ) + ), + 'default_height' => array( + 'display_name'=>__('Default Height', 'leaflet-map'), + 'default'=>'250', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map height="250"]', + __('Default height for maps. Values can include "px" but it is not necessary. Can also be "%". ', 'leaflet-map'), + $foreachmap + ) + ), + 'default_width' => array( + 'display_name'=>__('Default Width', 'leaflet-map'), + 'default'=>'100%', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map width="100%"]', + __('Default width for maps. Values can include "px" but it is not necessary. Can also be "%".', 'leaflet-map'), + $foreachmap + ) + ), + 'fit_markers' => array( + 'display_name'=>__('Fit Markers', 'leaflet-map'), + 'default' => '0', + 'type' => 'checkbox', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map fit_markers="1"]', + __('If enabled, all markers on each map will alter the view of the map; i.e. the map will fit to the bounds of all of the markers on the map.', 'leaflet-map'), + $foreachmap + ) + ), + 'show_zoom_controls' => array( + 'display_name'=>__('Show Zoom Controls', 'leaflet-map'), + 'default' => '0', + 'type' => 'checkbox', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map zoomcontrol="0"]', + __('The zoom buttons can be large and annoying.', 'leaflet-map'), + $foreachmap + ) + ), + 'scroll_wheel_zoom' => array( + 'display_name'=>__('Scroll Wheel Zoom', 'leaflet-map'), + 'default' => '0', + 'type' => 'checkbox', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map scrollwheel="0"]', + __('Disable zoom with mouse scroll wheel. Sometimes someone wants to scroll down the page, and not zoom the map.', 'leaflet-map'), + $foreachmap + ) + ), + 'double_click_zoom' => array( + 'display_name'=>__('Double Click Zoom', 'leaflet-map'), + 'default' => '0', + 'type' => 'checkbox', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map doubleClickZoom=false]', + __('If enabled, your maps will zoom with a double click. By default it is disabled: If we\'re going to remove zoom controls and have scroll wheel zoom off by default, we might as well stick to our guns and not zoom the map.', 'leaflet-map'), + $foreachmap + ) + ), + 'default_min_zoom' => array( + 'display_name'=>__('Default Min Zoom', 'leaflet-map'), + 'default' => '0', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map min_zoom="1"]', + __('Restrict the viewer from zooming in past the minimum zoom. Can set per map in shortcode or adjust for all maps here.', 'leaflet-map'), + $foreachmap + ) + ), + 'default_max_zoom' => array( + 'display_name'=>__('Default Max Zoom', 'leaflet-map'), + 'default' => '20', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2%s
%3$s', + __('Restrict the viewer from zooming out past the maximum zoom. Can set per map in shortcode or adjust for all maps here', 'leaflet-map'), + $foreachmap, + '[leaflet-map max_zoom="10"]' + ) + ), + 'default_tiling_service' => array( + 'display_name'=>__('Default Tiling Service', 'leaflet-map'), + 'default' => 'other', + 'type' => 'select', + 'options' => array( + 'other' => __('I will provide my own map tile URL', 'leaflet-map'), + 'mapquest' => __('MapQuest (I have an app key)', 'leaflet-map'), + ), + 'helptext' => __('Choose a tiling service or provide your own.', 'leaflet-map') + ), + 'mapquest_appkey' => array( + 'display_name'=>__('MapQuest App Key', 'leaflet-map'), + 'default' => __('Supply an app key if you choose MapQuest', 'leaflet-map'), + 'type' => 'text', + 'noreset' => true, + 'helptext' => sprintf('%1$s %2$s , %3$s %4$s %5$s', + __('If you choose MapQuest, you must provide an app key.', 'leaflet-map'), + __('Sign up', 'leaflet-map'), + __('then', 'leaflet-map'), + __('Create a new app', 'leaflet-map'), + __('then supply the "Consumer Key" here.', 'leaflet-map') + ) + ), + 'map_tile_url' => array( + 'display_name'=>__('Map Tile URL', 'leaflet-map'), + 'default'=>'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', + 'type' => 'text', + 'helptext' => sprintf('%1$s: %2$s . %3$s: %4$s . %5$s
[leaflet-map tileurl=http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg subdomains=abcd]', + __('See more tile servers', 'leaflet-map'), + __('here', 'leaflet-map'), + __('Please note: free tiles from MapQuest have been discontinued without use of an app key', 'leaflet-map'), + __('blog post', 'leaflet-map'), + $foreachmap + ) + ), + 'map_tile_url_subdomains' => array( + 'display_name'=>__('Map Tile URL Subdomains', 'leaflet-map'), + 'default'=>'abc', + 'type' => 'text', + 'helptext' => sprintf('%1$s %2$s
[leaflet-map subdomains="1234"]', + __('Some maps get tiles from multiple servers with subdomains such as a,b,c,d or 1,2,3,4', 'leaflet-map'), + $foreachmap + ) + ), + 'js_url' => array( + 'display_name'=>__('JavaScript URL', 'leaflet-map'), + 'default' => sprintf('https://unpkg.com/leaflet@%s/dist/leaflet.js', $leaflet_version), + 'type' => 'text', + 'helptext' => __('If you host your own Leaflet files, then paste the URL here.', 'leaflet-map') + ), + 'css_url' => array( + 'display_name'=>__('CSS URL', 'leaflet-map'), + 'default' => sprintf('https://unpkg.com/leaflet@%s/dist/leaflet.css', $leaflet_version), + 'type' => 'text', + 'helptext' => __('Same as above.', 'leaflet-map') + ), + 'default_attribution' => array( + 'display_name'=>__('Default Attribution', 'leaflet-map'), + 'default' => sprintf('Leaflet; \r\n© OpenStreetMap %2$s', + __("A JS library for interactive maps", 'leaflet-map'), + __("contributors", 'leaflet-map') + ), + 'type' => 'textarea', + 'helptext' => __('Attribution to a custom tile url. Use semi-colons (;) to separate multiple.', 'leaflet-map') + ), + 'geocoder' => array( + 'display_name'=>__('Geocoder', 'leaflet-map'), + 'default' => 'google', + 'type' => 'select', + 'options' => array( + 'google' => __('Google Maps', 'leaflet-map'), + 'osm' => __('OpenStreetMap Nominatim', 'leaflet-map'), + 'dawa' => __('Denmark Addresses', 'leaflet-map') + ), + 'helptext' => __('Select the Geocoding provider to use to retrieve addresses defined in shortcode.', 'leaflet-map') + ) + ); + + foreach ($this->options as $name => $details) { $this->options[ $name ] = new Leaflet_Map_Plugin_Option( $details ); } } diff --git a/languages/leaflet-map.pot b/languages/leaflet-map.pot new file mode 100644 index 0000000..b96e151 --- /dev/null +++ b/languages/leaflet-map.pot @@ -0,0 +1,383 @@ +# Copyright (C) 2018 Leaflet Map +# This file is distributed under the same license as the Leaflet Map package. +msgid "" +msgstr "" +"Project-Id-Version: Leaflet Map 2.10.0\n" +"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/leaflet-map\n" +"POT-Creation-Date: 2018-01-25 22:02:00+00:00\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" + +#: class.plugin-settings.php:54 +msgid "You can also change this for each map" +msgstr "" + +#: class.plugin-settings.php:61 +msgid "Default Latitude" +msgstr "" + +#: class.plugin-settings.php:65 +msgid "Default latitude for maps." +msgstr "" + +#: class.plugin-settings.php:70 +msgid "Default Longitude" +msgstr "" + +#: class.plugin-settings.php:74 +msgid "Default longitude for maps." +msgstr "" + +#: class.plugin-settings.php:79 +msgid "Default Zoom" +msgstr "" + +#: class.plugin-settings.php:83 +msgid "Default zoom for maps." +msgstr "" + +#: class.plugin-settings.php:88 +msgid "Default Height" +msgstr "" + +#: class.plugin-settings.php:92 +msgid "" +"Default height for maps. Values can include \"px\" but it is not necessary. " +"Can also be \"%\". " +msgstr "" + +#: class.plugin-settings.php:97 +msgid "Default Width" +msgstr "" + +#: class.plugin-settings.php:101 +msgid "" +"Default width for maps. Values can include \"px\" but it is not necessary. " +"Can also be \"%\"." +msgstr "" + +#: class.plugin-settings.php:106 +msgid "Fit Markers" +msgstr "" + +#: class.plugin-settings.php:110 +msgid "" +"If enabled, all markers on each map will alter the view of the map; i.e. the " +"map will fit to the bounds of all of the markers on the map." +msgstr "" + +#: class.plugin-settings.php:115 +msgid "Show Zoom Controls" +msgstr "" + +#: class.plugin-settings.php:119 +msgid "The zoom buttons can be large and annoying." +msgstr "" + +#: class.plugin-settings.php:124 +msgid "Scroll Wheel Zoom" +msgstr "" + +#: class.plugin-settings.php:128 +msgid "" +"Disable zoom with mouse scroll wheel. Sometimes someone wants to scroll " +"down the page, and not zoom the map." +msgstr "" + +#: class.plugin-settings.php:133 +msgid "Double Click Zoom" +msgstr "" + +#: class.plugin-settings.php:137 +msgid "" +"If enabled, your maps will zoom with a double click. By default it is " +"disabled: If we're going to remove zoom controls and have scroll wheel zoom " +"off by default, we might as well stick to our guns and not zoom the map." +msgstr "" + +#: class.plugin-settings.php:142 +msgid "Default Min Zoom" +msgstr "" + +#: class.plugin-settings.php:146 +msgid "" +"Restrict the viewer from zooming in past the minimum zoom. Can set per map " +"in shortcode or adjust for all maps here." +msgstr "" + +#: class.plugin-settings.php:151 +msgid "Default Max Zoom" +msgstr "" + +#: class.plugin-settings.php:155 +msgid "" +"Restrict the viewer from zooming out past the maximum zoom. Can set per map " +"in shortcode or adjust for all maps here" +msgstr "" + +#: class.plugin-settings.php:161 +msgid "Default Tiling Service" +msgstr "" + +#: class.plugin-settings.php:165 +msgid "I will provide my own map tile URL" +msgstr "" + +#: class.plugin-settings.php:166 +msgid "MapQuest (I have an app key)" +msgstr "" + +#: class.plugin-settings.php:168 +msgid "Choose a tiling service or provide your own." +msgstr "" + +#: class.plugin-settings.php:171 +msgid "MapQuest App Key" +msgstr "" + +#: class.plugin-settings.php:172 +msgid "Supply an app key if you choose MapQuest" +msgstr "" + +#: class.plugin-settings.php:176 +msgid "If you choose MapQuest, you must provide an app key." +msgstr "" + +#: class.plugin-settings.php:177 +msgid "Sign up" +msgstr "" + +#: class.plugin-settings.php:178 +msgid "then" +msgstr "" + +#: class.plugin-settings.php:179 +msgid "Create a new app" +msgstr "" + +#: class.plugin-settings.php:180 +msgid "then supply the \"Consumer Key\" here." +msgstr "" + +#: class.plugin-settings.php:184 +msgid "Map Tile URL" +msgstr "" + +#: class.plugin-settings.php:188 +msgid "See more tile servers" +msgstr "" + +#: class.plugin-settings.php:189 +msgid "here" +msgstr "" + +#: class.plugin-settings.php:190 +msgid "" +"Please note: free tiles from MapQuest have been discontinued without use of " +"an app key" +msgstr "" + +#: class.plugin-settings.php:191 +msgid "blog post" +msgstr "" + +#: class.plugin-settings.php:196 +msgid "Map Tile URL Subdomains" +msgstr "" + +#: class.plugin-settings.php:200 +msgid "" +"Some maps get tiles from multiple servers with subdomains such as a,b,c,d or " +"1,2,3,4" +msgstr "" + +#: class.plugin-settings.php:205 +msgid "JavaScript URL" +msgstr "" + +#: class.plugin-settings.php:208 +msgid "If you host your own Leaflet files, then paste the URL here." +msgstr "" + +#: class.plugin-settings.php:211 +msgid "CSS URL" +msgstr "" + +#: class.plugin-settings.php:214 +msgid "Same as above." +msgstr "" + +#: class.plugin-settings.php:217 +msgid "Default Attribution" +msgstr "" + +#: class.plugin-settings.php:219 +msgid "A JS library for interactive maps" +msgstr "" + +#: class.plugin-settings.php:220 +msgid "contributors" +msgstr "" + +#: class.plugin-settings.php:223 +msgid "" +"Attribution to a custom tile url. Use semi-colons (;) to separate multiple." +msgstr "" + +#: class.plugin-settings.php:226 +msgid "Geocoder" +msgstr "" + +#: class.plugin-settings.php:230 +msgid "Google Maps" +msgstr "" + +#: class.plugin-settings.php:231 +msgid "OpenStreetMap Nominatim" +msgstr "" + +#: class.plugin-settings.php:232 +msgid "Denmark Addresses" +msgstr "" + +#: class.plugin-settings.php:234 +msgid "" +"Select the Geocoding provider to use to retrieve addresses defined in " +"shortcode." +msgstr "" + +#. #-#-#-#-# leaflet-map.pot (Leaflet Map 2.10.0) #-#-#-#-# +#. Description of the plugin/theme +#: templates/settings.php:3 +msgid "" +"A plugin for creating a Leaflet JS map with a shortcode. Boasts two free map " +"tile services and three free geocoders." +msgstr "" + +#: templates/settings.php:26 +msgid "Options Updated!" +msgstr "" + +#: templates/settings.php:33 +msgid "Options have been reset to default values!" +msgstr "" + +#: templates/settings.php:41 +msgid "Location caches have been cleared!" +msgstr "" + +#: templates/settings.php:50 +msgid "Settings" +msgstr "" + +#: templates/settings.php:85 +msgid "Save Changes" +msgstr "" + +#: templates/settings.php:90 +msgid "Reset to Defaults" +msgstr "" + +#: templates/settings.php:95 +msgid "Clear Geocoder Cache" +msgstr "" + +#: templates/shortcode-helper.php:17 +msgid "Drag Me" +msgstr "" + +#: templates/shortcode-helper.php:26 +msgid "Interactive Shortcodes:" +msgstr "" + +#: templates/shortcode-helper.php:27 +msgid "Move the map and the marker to generate shortcodes below:" +msgstr "" + +#: templates/shortcode-helper.php:28 +msgid "Map Shortcode" +msgstr "" + +#: templates/shortcode-helper.php:29 +msgid "Marker Shortcode" +msgstr "" + +#: templates/shortcode-helper.php:31 +msgid "Examples" +msgstr "" + +#: templates/shortcode-helper.php:35 +msgid "Standard" +msgstr "" + +#: templates/shortcode-helper.php:38 +msgid "Many Markers!" +msgstr "" + +#: templates/shortcode-helper.php:44 +msgid "Draggable Marker" +msgstr "" + +#: templates/shortcode-helper.php:48 +msgid "Marker Icon" +msgstr "" + +#: templates/shortcode-helper.php:52 +msgid "Zoom Buttons" +msgstr "" + +#: templates/shortcode-helper.php:55 +msgid "Alternate Map Tiles w/scrollwheel" +msgstr "" + +#: templates/shortcode-helper.php:58 +msgid "Marker Popup Messages (on click)" +msgstr "" + +#: templates/shortcode-helper.php:62 +msgid "Links In Marker Messages (visible)" +msgstr "" + +#: templates/shortcode-helper.php:66 +msgid "Basic Lines w/Scrollwheel" +msgstr "" + +#: templates/shortcode-helper.php:70 +msgid "Fitted Colored Line on Addresses" +msgstr "" + +#: templates/shortcode-helper.php:74 +msgid "More Crazy Line Attributes" +msgstr "" + +#: templates/shortcode-helper.php:78 +msgid "Disable all Interaction" +msgstr "" + +#: templates/shortcode-helper.php:81 +msgid "Add GeoJSON by URL (with popups)" +msgstr "" + +#: templates/shortcode-helper.php:85 +msgid "Test Image Map" +msgstr "" + +#. Plugin Name of the plugin/theme +msgid "Leaflet Map" +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "https://wordpress.org/plugins/leaflet-map/" +msgstr "" + +#. Author of the plugin/theme +msgid "bozdoz" +msgstr "" + +#. Author URI of the plugin/theme +msgid "https://twitter.com/bozdoz/" +msgstr "" diff --git a/leaflet-map.php b/leaflet-map.php index e23e717..67db312 100644 --- a/leaflet-map.php +++ b/leaflet-map.php @@ -5,7 +5,9 @@ Description: A plugin for creating a Leaflet JS map with a shortcode. Boasts two free map tile services and three free geocoders. Author: bozdoz Author URI: https://twitter.com/bozdoz/ - Version: 2.9.1 + Text Domain: leaflet-map + Domain Path: /languages/ + Version: 2.10.0 License: GPL2 Leaflet Map is free software: you can redistribute it and/or modify diff --git a/package.json b/package.json index 9f2ebe1..7f0f422 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "index.js", "scripts": { "minify": "for file in scripts/*.js; do minify $file > ./scripts/$(basename $file .js).min.js; done", + "translate": "cd ./languages && sudo php ../../wp-trunk/tools/i18n/makepot.php wp-plugin ../", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/readme.txt b/readme.txt index b818ec0..3b8d3b5 100644 --- a/readme.txt +++ b/readme.txt @@ -7,8 +7,8 @@ Donate link: https://www.paypal.me/bozdoz Tags: leaflet, map, mobile, javascript, openstreetmap, mapquest, interactive Requires at least: 3.0.1 Tested up to: 4.9 -Version: 2.9.1 -Stable tag: 2.9.1 +Version: 2.10.0 +Stable tag: 2.10.0 License: GPLv2 License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/templates/settings.php b/templates/settings.php index 4c834a6..389b91d 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -1,16 +1,7 @@

version:

@@ -32,14 +23,14 @@ function option_label ($opt) { } ?>
-

Options Updated!

+

reset(); ?>
-

Options have been reset to default values!

+

-

Location caches have been cleared!

+

-

Settings

+