gluon-config-mode-geo-location-with-map: apply spell change requests

This commit is contained in:
Jan-Tarek Butt 2018-07-22 09:09:23 +02:00
parent 70052f2617
commit 33573168fa
7 changed files with 31 additions and 24 deletions

View File

@ -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 to be advertised from within the config mode. There are two types of this
package: 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``. ``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 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 - ``false`` the altitude section in config mode is hidden
- defaults to ``false`` - defaults to ``false``
All following options are only valid for the package The remaining options are only valid for the
``gluon-config-mode-geo-location-with-map``. ``gluon-config-mode-geo-location-with-map`` package:
config_mode.geo_location.map_lon \: optional 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`` - defaults to ``0.0``
config_mode.geo_location.map_lat \: optional 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`` - defaults to ``0.0``
The map will center to the position defined in map_lat and map_lon, unless a 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. new center.
config_mode.geo_location.olurl \: optional config_mode.geo_location.openlayers_js_url \: optional
- ``url`` set an url for OpenStreetMap layers. - ``url`` set an URL for OpenStreetMap layers.
- defaults to ``http://dev.openlayers.org/OpenLayers.js`` - defaults to ``http://dev.openlayers.org/OpenLayers.js``
Example:: Example::
@ -51,7 +59,7 @@ Example::
geo_location = { geo_location = {
map_lon = 52.951947558, map_lon = 52.951947558,
map_lat = 7.844238281, 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, show_altitude = true,
}, },
}, },

View File

@ -6,13 +6,13 @@ PKG_VERSION:=1
include ../gluon.mk include ../gluon.mk
define Package/gluon-config-mode-geo-location 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 CONFLICTS:=+gluon-config-mode-geo-location-with-map
DEPENDS:=+gluon-config-mode-core +gluon-node-info DEPENDS:=+gluon-config-mode-core +gluon-node-info
endef endef
define Package/gluon-config-mode-geo-location-with-map 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 CONFLICTS:=+gluon-config-mode-geo-location
DEPENDS:=+gluon-config-mode-core +gluon-node-info +gluon-web-osm DEPENDS:=+gluon-config-mode-core +gluon-node-info +gluon-web-osm
endef endef

View File

@ -25,7 +25,7 @@ return function(form, uci)
end end
local function show_olurl() 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 end
#endif #endif
@ -36,12 +36,12 @@ return function(form, uci)
end end
local text = site_i18n._translate("gluon-config-mode:geo-location-help") or pkg_i18n.translate( 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. ' .. 'enter its coordinates here. ' ..
#ifdef WITHMAP #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 #endif
@ -77,7 +77,6 @@ return function(form, uci)
local s = form:section(Section, nil, text) local s = form:section(Section, nil, text)
local uci_share_location = uci:get_bool("gluon-node-info", location, "share_location") local uci_share_location = uci:get_bool("gluon-node-info", location, "share_location")
local geolocation = s:option(ListValue, "geolocation", pkg_i18n.translate("Geo-Location")) local geolocation = s:option(ListValue, "geolocation", pkg_i18n.translate("Geo-Location"))

View File

@ -1,6 +1,6 @@
need_boolean(in_site({'config_mode', 'geo_location', 'show_altitude'}), false) need_boolean(in_site({'config_mode', 'geo_location', 'show_altitude'}), false)
#ifdef WITHMAP #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_lon'}), false)
need_number(in_site({'config_mode', 'geo_location', 'map_lat'}), false) need_number(in_site({'config_mode', 'geo_location', 'map_lat'}), false)
#endif #endif

View File

@ -15,21 +15,21 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "" 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. " "enter its coordinates here. "
#ifdef WITHMAP #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 #endif
"Please keep in mind setting a location can also enhance the network quality." "Please keep in mind setting a location can also enhance the network quality."
msgstr "" msgstr ""
"Um deinen Router auf der Karte anzeigen zu können, benötigen wir seine " "Um deinen Router auf der Karte anzeigen zu können, benötigen wir seine "
"Koordinaten. Hier hast du die Möglichkeit, " "Koordinaten. Hier hast du die Möglichkeit, "
"die Koordinaten händisch zu hinterlegen." "die Koordinaten von Hand einzutragen."
#ifdef WITHMAP #ifdef WITHMAP
"Wenn dein Computer mit dem du den Router einrichtest eine Internetverbindung hat, " "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." "hast du die Möglichkeit die Position des Routers auf der Karte auszuwählen."
#endif #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" msgid "Geo-Location"
msgstr "Geo-Position" msgstr "Geo-Position"

View File

@ -15,10 +15,10 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "" 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. " "enter its coordinates here. "
#ifdef WITHMAP #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 #endif
"Please keep in mind setting a location can also enhance the network quality." "Please keep in mind setting a location can also enhance the network quality."
msgstr "" msgstr ""

View File

@ -2,10 +2,10 @@ msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "" 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. " "enter its coordinates here. "
#ifdef WITHMAP #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 #endif
"Please keep in mind setting a location can also enhance the network quality." "Please keep in mind setting a location can also enhance the network quality."
msgstr "" msgstr ""