diff --git a/docs/package/gluon-config-mode-geo-location.rst b/docs/package/gluon-config-mode-geo-location.rst index 920a1aa8..8bb86134 100644 --- a/docs/package/gluon-config-mode-geo-location.rst +++ b/docs/package/gluon-config-mode-geo-location.rst @@ -5,9 +5,17 @@ This package allows the user to set latitude, longitude and optionally altitude to be advertised from within the config mode. There are two types of this package: -It is possible to include ``gluon-config-mode-geo-location`` or +It is possible to include **either** ``gluon-config-mode-geo-location`` **or** ``gluon-config-mode-geo-location-with-map`` in the ``site.mk``. +If you want to use ``gluon-config-mode-geo-location-with-map`` together with +the GLUON_FEATURE ``web-wizard`` then you have to exclude +``gluon-config-mode-geo-location``, i.e.: + + GLUON_SITE_PACKAGES += \ + -gluon-config-mode-geo-location \ + gluon-config-mode-geo-location-with-map + gluon-config-mode-geo-location-with-map --------------------------------------- @@ -26,23 +34,23 @@ config_mode.geo_location.show_altitude \: optional - ``false`` the altitude section in config mode is hidden - defaults to ``false`` -All following options are only valid for the package -``gluon-config-mode-geo-location-with-map``. +The remaining options are only valid for the +``gluon-config-mode-geo-location-with-map`` package: config_mode.geo_location.map_lon \: optional - - represents the default longitude center of the location picker map. + - represents the default longitude value to use for the center of the map. - defaults to ``0.0`` config_mode.geo_location.map_lat \: optional - - represents the default latitude center of the location picker map. + - represents the default latitude value to use for the center of the map. - defaults to ``0.0`` The map will center to the position defined in map_lat and map_lon, unless a -+location was already defined. The new defined location will become the +location was already defined. The new defined location will become the new center. -config_mode.geo_location.olurl \: optional - - ``url`` set an url for OpenStreetMap layers. +config_mode.geo_location.openlayers_js_url \: optional + - ``url`` set an URL for OpenStreetMap layers. - defaults to ``http://dev.openlayers.org/OpenLayers.js`` Example:: @@ -51,7 +59,7 @@ Example:: geo_location = { map_lon = 52.951947558, map_lat = 7.844238281, - olurl = 'http://osm.ffnw.de/.static/ol/OpenLayers.js', + openlayers_js_url = 'http://osm.ffnw.de/.static/ol/OpenLayers.js', show_altitude = true, }, }, diff --git a/package/gluon-config-mode-geo-location/Makefile b/package/gluon-config-mode-geo-location/Makefile index 81b1056d..f7840b7e 100644 --- a/package/gluon-config-mode-geo-location/Makefile +++ b/package/gluon-config-mode-geo-location/Makefile @@ -6,13 +6,13 @@ PKG_VERSION:=1 include ../gluon.mk define Package/gluon-config-mode-geo-location - TITLE:=Set geographic location of a node manually and share it. + TITLE:=Set geographic location of a node and share it. CONFLICTS:=+gluon-config-mode-geo-location-with-map DEPENDS:=+gluon-config-mode-core +gluon-node-info endef define Package/gluon-config-mode-geo-location-with-map - TITLE:=Set geographic location of a node manually and share it, optionally show a map if internet is available. + TITLE:=Set geographic location of a node and share it, additionally show a map if internet is available. CONFLICTS:=+gluon-config-mode-geo-location DEPENDS:=+gluon-config-mode-core +gluon-node-info +gluon-web-osm endef diff --git a/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in b/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in index fafbcb26..9b011f10 100644 --- a/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in +++ b/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in @@ -25,7 +25,7 @@ return function(form, uci) end local function show_olurl() - return site.config_mode.geo_location.olurl('http://dev.openlayers.org/OpenLayers.js') + return site.config_mode.geo_location.openlayers_js_url('http://dev.openlayers.org/OpenLayers.js') end #endif @@ -36,12 +36,12 @@ return function(form, uci) end local text = site_i18n._translate("gluon-config-mode:geo-location-help") or pkg_i18n.translate( - 'If you want the location of your node to be displayed on the map, you can ' .. + 'If you want the location of your node to be displayed on the map, you may ' .. 'enter its coordinates here. ' .. #ifdef WITHMAP - 'If your PC is connected to the internet you may also click on the map displayed below. ' .. + 'If your PC is connected to the internet you may also select your position on the map displayed below. ' .. #endif @@ -77,7 +77,6 @@ return function(form, uci) local s = form:section(Section, nil, text) - local uci_share_location = uci:get_bool("gluon-node-info", location, "share_location") local geolocation = s:option(ListValue, "geolocation", pkg_i18n.translate("Geo-Location")) diff --git a/package/gluon-config-mode-geo-location/src/check_site.lua.in b/package/gluon-config-mode-geo-location/src/check_site.lua.in index fdab8963..6a64bb22 100644 --- a/package/gluon-config-mode-geo-location/src/check_site.lua.in +++ b/package/gluon-config-mode-geo-location/src/check_site.lua.in @@ -1,6 +1,6 @@ need_boolean(in_site({'config_mode', 'geo_location', 'show_altitude'}), false) #ifdef WITHMAP -need_string(in_site({'config_mode', 'geo_location', 'olurl'}), false) +need_string(in_site({'config_mode', 'geo_location', 'openlayers_js_url'}), false) need_number(in_site({'config_mode', 'geo_location', 'map_lon'}), false) need_number(in_site({'config_mode', 'geo_location', 'map_lat'}), false) #endif diff --git a/package/gluon-config-mode-geo-location/src/de.po.in b/package/gluon-config-mode-geo-location/src/de.po.in index d8fee7fe..441e1f3f 100644 --- a/package/gluon-config-mode-geo-location/src/de.po.in +++ b/package/gluon-config-mode-geo-location/src/de.po.in @@ -15,21 +15,21 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "" -"If you want the location of your node to be displayed on the map, you can " +"If you want the location of your node to be displayed on the map, you may " "enter its coordinates here. " #ifdef WITHMAP -"If your PC is connected to the internet you may also click on the map displayed below. " +"If your PC is connected to the internet you may also select your position on the map displayed below. " #endif "Please keep in mind setting a location can also enhance the network quality." msgstr "" "Um deinen Router auf der Karte anzeigen zu können, benötigen wir seine " "Koordinaten. Hier hast du die Möglichkeit, " -"die Koordinaten händisch zu hinterlegen." +"die Koordinaten von Hand einzutragen." #ifdef WITHMAP "Wenn dein Computer mit dem du den Router einrichtest eine Internetverbindung hat, " "hast du die Möglichkeit die Position des Routers auf der Karte auszuwählen." #endif -"Bitte berücksichtige, dass das Setzen einer Position die Netzwerk Qualität verbessern kann." +"Bitte berücksichtige, dass das Setzen einer Position die Netzwerkqualität verbessern kann." msgid "Geo-Location" msgstr "Geo-Position" diff --git a/package/gluon-config-mode-geo-location/src/fr.po.in b/package/gluon-config-mode-geo-location/src/fr.po.in index 02c9fa47..91726dae 100644 --- a/package/gluon-config-mode-geo-location/src/fr.po.in +++ b/package/gluon-config-mode-geo-location/src/fr.po.in @@ -15,10 +15,10 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "" -"If you want the location of your node to be displayed on the map, you can " +"If you want the location of your node to be displayed on the map, you may " "enter its coordinates here. " #ifdef WITHMAP -"If your PC is connected to the internet you may also click on the map displayed below. " +"If your PC is connected to the internet you may also select your position on the map displayed below. " #endif "Please keep in mind setting a location can also enhance the network quality." msgstr "" diff --git a/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in b/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in index fa850916..abdab55d 100644 --- a/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in +++ b/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in @@ -2,10 +2,10 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" msgid "" -"If you want the location of your node to be displayed on the map, you can " +"If you want the location of your node to be displayed on the map, you may " "enter its coordinates here. " #ifdef WITHMAP -"If your PC is connected to the internet you may also click on the map displayed below. " +"If your PC is connected to the internet you may also select your position on the map displayed below. " #endif "Please keep in mind setting a location can also enhance the network quality." msgstr ""