From bae9eb7fe967c2605e4edbdfd6c243e377ed4c29 Mon Sep 17 00:00:00 2001 From: rubo77 Date: Tue, 30 Aug 2016 14:39:33 +0200 Subject: [PATCH] Rename Altitude to Storey --- .../config-mode/wizard/0400-geo-location.lua | 15 ++++++++------- package/gluon-config-mode-geo-location/i18n/de.po | 11 +++++------ package/gluon-config-mode-geo-location/i18n/fr.po | 9 ++++----- .../i18n/gluon-config-mode-geo-location.pot | 6 +++--- .../gluon/upgrade/520-node-info-whitespace-fix | 2 +- package/gluon-node-info/src/respondd.c | 6 +++--- 6 files changed, 24 insertions(+), 25 deletions(-) diff --git a/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua b/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua index e8c9976d..7dfb4987 100644 --- a/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua +++ b/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua @@ -7,8 +7,9 @@ local M = {} function M.section(form) local s = form:section(cbi.SimpleSection, nil, i18n.translate( 'If you want the location of your node to be displayed on the map, ' - .. 'you can enter its coordinates here. Specifying the altitude ' - .. 'is optional and should only be done if a proper value is known.')) + .. 'you can enter its coordinates here. Specifying the storey ' + .. 'is optional and can be aproximated by an imaginary storey with ' + .. '3m per storey.')) local o @@ -31,8 +32,8 @@ function M.section(form) o.datatype = "float" o.description = i18n.translatef("e.g. %s", "10.689901") - o = s:option(cbi.Value, "_altitude", i18n.translate("Altitude")) - o.default = uci:get_first("gluon-node-info", "location", "altitude") + o = s:option(cbi.Value, "_storey", i18n.translate("Storey")) + o.default = uci:get_first("gluon-node-info", "location", "storey") o:depends("_location", "1") o.rmempty = true o.datatype = "float" @@ -47,10 +48,10 @@ function M.handle(data) if data._location and data._latitude ~= nil and data._longitude ~= nil then uci:set("gluon-node-info", sname, "latitude", data._latitude:trim()) uci:set("gluon-node-info", sname, "longitude", data._longitude:trim()) - if data._altitude ~= nil then - uci:set("gluon-node-info", sname, "altitude", data._altitude:trim()) + if data._storey ~= nil then + uci:set("gluon-node-info", sname, "storey", data._storey:trim()) else - uci:delete("gluon-node-info", sname, "altitude") + uci:delete("gluon-node-info", sname, "storey") end end uci:save("gluon-node-info") diff --git a/package/gluon-config-mode-geo-location/i18n/de.po b/package/gluon-config-mode-geo-location/i18n/de.po index a2850d5b..0506ff33 100644 --- a/package/gluon-config-mode-geo-location/i18n/de.po +++ b/package/gluon-config-mode-geo-location/i18n/de.po @@ -12,13 +12,12 @@ msgstr "" msgid "" "If you want the location of your node to be displayed on the map, you can " -"enter its coordinates here. Specifying the altitude is optional and should " -"only be done if a proper value is known." +"enter its coordinates here. Specifying the storey is optional and can be " +"aproximated by an imaginary storey with 3m per storey." msgstr "" "Um deinen Knoten auf der Karte anzeigen zu können, benötigen wir seine " "Koordinaten. Hier hast du die Möglichkeit, diese zu hinterlegen. Die " -"Höhenangabe ist optional und sollte nur gesetzt werden, wenn ein exakter " -"Wert bekannt ist." +"Stockwerk ist optional und kann geschätzt werden mit gedachten Stockwerken à 3m Höhe." msgid "Latitude" msgstr "Breitengrad" @@ -26,8 +25,8 @@ msgstr "Breitengrad" msgid "Longitude" msgstr "Längengrad" -msgid "Altitude" -msgstr "Höhe" +msgid "Storey" +msgstr "Stockwerk" msgid "Show node on the map" msgstr "Knoten auf der Karte anzeigen" diff --git a/package/gluon-config-mode-geo-location/i18n/fr.po b/package/gluon-config-mode-geo-location/i18n/fr.po index 15d79e2b..5ac9a1bf 100644 --- a/package/gluon-config-mode-geo-location/i18n/fr.po +++ b/package/gluon-config-mode-geo-location/i18n/fr.po @@ -12,12 +12,11 @@ msgstr "" msgid "" "If you want the location of your node to be displayed on the map, you can " -"enter its coordinates here. Specifying the altitude is optional and should " -"only be done if a proper value is known." +"enter its coordinates here. Specifying the storey is optional and can be " +"aproximated by an imaginary storey with 3m per storey." msgstr "" "Pour Afficher votre nœud sur la Carte nous avons besoin de ses coordonnées. " -"Ici vous pouvez entrer sa position. La altitude est optionelle " -"et ne devrait que être ajoutée si la valeur exacte est connue. " +"Ici vous pouvez entrer sa position. La storey est optionelle. " msgid "Latitude" msgstr "Latitude" @@ -25,7 +24,7 @@ msgstr "Latitude" msgid "Longitude" msgstr "Longitude" -msgid "Altitude" +msgid "Storey" msgstr "Hauteur" msgid "Show node on the map" diff --git a/package/gluon-config-mode-geo-location/i18n/gluon-config-mode-geo-location.pot b/package/gluon-config-mode-geo-location/i18n/gluon-config-mode-geo-location.pot index a2be4fdf..2c87150d 100644 --- a/package/gluon-config-mode-geo-location/i18n/gluon-config-mode-geo-location.pot +++ b/package/gluon-config-mode-geo-location/i18n/gluon-config-mode-geo-location.pot @@ -3,8 +3,8 @@ 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 " -"enter its coordinates here. Specifying the altitude is optional and should " -"only be done if a proper value is known." +"enter its coordinates here. Specifying the storey is optional and can be " +"aproximated by an imaginary storey with 3m per storey." msgstr "" msgid "Latitude" @@ -13,7 +13,7 @@ msgstr "" msgid "Longitude" msgstr "" -msgid "Altitude" +msgid "Storey" msgstr "" msgid "Show node on the map" diff --git a/package/gluon-node-info/files/lib/gluon/upgrade/520-node-info-whitespace-fix b/package/gluon-node-info/files/lib/gluon/upgrade/520-node-info-whitespace-fix index 49e7053d..4f32c233 100755 --- a/package/gluon-node-info/files/lib/gluon/upgrade/520-node-info-whitespace-fix +++ b/package/gluon-node-info/files/lib/gluon/upgrade/520-node-info-whitespace-fix @@ -3,7 +3,7 @@ local uci = require('luci.model.uci').cursor() local sname = uci:get_first('gluon-node-info', 'location') if sname then - local options = {'longitude', 'latitude', 'altitude'} + local options = {'longitude', 'latitude', 'storey'} for _, option in ipairs(options) do local value = uci:get('gluon-node-info', sname, option) if value then diff --git a/package/gluon-node-info/src/respondd.c b/package/gluon-node-info/src/respondd.c index dfbfd3f8..26a09da6 100644 --- a/package/gluon-node-info/src/respondd.c +++ b/package/gluon-node-info/src/respondd.c @@ -86,9 +86,9 @@ static struct json_object * get_location(struct uci_context *ctx, struct uci_pac if (longitude) json_object_object_add(ret, "longitude", longitude); - struct json_object *altitude = get_number(ctx, s, "altitude"); - if (altitude) - json_object_object_add(ret, "altitude", altitude); + struct json_object *storey = get_number(ctx, s, "storey"); + if (storey) + json_object_object_add(ret, "storey", storey); return ret; }