diff --git a/package/gluon-config-mode-manman-sync/i18n/de.po b/package/gluon-config-mode-manman-sync/i18n/de.po index 0f692b16..5f4e4ed9 100644 --- a/package/gluon-config-mode-manman-sync/i18n/de.po +++ b/package/gluon-config-mode-manman-sync/i18n/de.po @@ -15,18 +15,22 @@ msgstr "" msgid "Enable ManMan sync" msgstr "ManMan synchronisierung aktivieren" -msgid "ManMan location ID" -msgstr "ManMan Standort-ID" +msgid "ManMan location" +msgstr "ManMan Standort" msgid "ManMan node (optional)" msgstr "ManMan Knoten (optional)" +msgid "Required if multiple nodes in location" +msgstr "Erforderlich wenn mehrere Knoten am Standort" + msgid "" -"Sync configuration from ManMan by entering ManMan location id here.\n" -"This will automatically keep name, location and ips in sync with the values " -"specified in ManMan." +"Sync configuration from ManMan " +"by entering ManMan location and node name here.
" +"This will automatically keep name, location and ips " +"in sync with the values specified in ManMan." msgstr "" -"Synchronisiere die Konfiguration aus ManMan, indem du hier die ManMan " -"Standort-ID eingibst.\n" +"Synchronisiere die Konfiguration aus ManMan, indem du hier den ManMan " +"Standort-Namen und, optional, Knoten-Namen eingibst.\n" "Dadurch werden Name, Standort und IP-Addressen automatisch mit den in " "ManMan angegebenen Werten synchronisiert." diff --git a/package/gluon-config-mode-manman-sync/i18n/gluon-config-mode-manman-sync.pot b/package/gluon-config-mode-manman-sync/i18n/gluon-config-mode-manman-sync.pot index e68f6185..de04aa66 100644 --- a/package/gluon-config-mode-manman-sync/i18n/gluon-config-mode-manman-sync.pot +++ b/package/gluon-config-mode-manman-sync/i18n/gluon-config-mode-manman-sync.pot @@ -4,15 +4,18 @@ msgstr "Content-Type: text/plain; charset=UTF-8" msgid "Enable ManMan sync" msgstr "" -msgid "ManMan location ID" +msgid "ManMan location" msgstr "" msgid "ManMan node (optional)" msgstr "" +msgid "Required if multiple nodes in location" +msgstr "" + msgid "" "Sync configuration from ManMan " -"by entering ManMan location id here.\n" +"by entering ManMan location and node name here.
" "This will automatically keep name, location and ips " "in sync with the values specified in ManMan." msgstr "" diff --git a/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua b/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua index 6fe84420..42fa863e 100644 --- a/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua +++ b/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua @@ -3,7 +3,7 @@ return function(form, uci) local msg = pkg_i18n.translate( 'Sync configuration from ManMan ' .. - 'by entering ManMan location id here.\n' .. + 'by entering ManMan location and node name here.
' .. 'This will automatically keep name, location and ips ' .. 'in sync with the values specified in ManMan.' ) @@ -18,20 +18,23 @@ return function(form, uci) uci:set('gluon-manman-sync', 'sync', 'enabled', data) end - local id = s:option(Value, 'manman_id', pkg_i18n.translate('ManMan location ID')) + local id = s:option(Value, 'manman_location', pkg_i18n.translate('ManMan location')) id:depends(manman, true) - id.default = uci:get('gluon-manman-sync', 'sync', 'location_id') - id.datatype = 'uinteger' + id.default = uci:get('gluon-manman-sync', 'sync', 'location') + id.datatype = 'maxlength(16)' function id:write(data) - uci:set('gluon-manman-sync', 'sync', 'location_id', data) + -- clear ID, gets fetched from manman-sync + uci:set('gluon-manman-sync', 'sync', 'location_id', nil) + + uci:set('gluon-manman-sync', 'sync', 'location', data) end - local id = s:option(Value, 'manman_node', pkg_i18n.translate('ManMan node (optional)')) + local id = s:option(Value, 'manman_node', pkg_i18n.translate('ManMan node (optional)'), pkg_i18n.translate('Required if multiple nodes in location')) id:depends(manman, true) id.default = uci:get('gluon-manman-sync', 'sync', 'node') id.datatype = 'maxlength(16)' function id:write(data) - -- so ID gets fetched from manman-sync again + -- clear ID, gets fetched from manman-sync uci:set('gluon-manman-sync', 'sync', 'node_id', nil) uci:set('gluon-manman-sync', 'sync', 'node', data)