add fallback text for gluon-config-mode:contact-note

This commit is contained in:
Ralf Jung 2018-06-06 21:02:44 +02:00
parent 993bf81a30
commit da7fbff1cf
4 changed files with 13 additions and 2 deletions

View File

@ -12,3 +12,6 @@ msgstr ""
msgid "Contact info" msgid "Contact info"
msgstr "Kontakt" msgstr "Kontakt"
msgid "e.g. E-mail or phone number"
msgstr "z.B. E-Mail oder Telefonnummer"

View File

@ -12,3 +12,6 @@ msgstr ""
msgid "Contact info" msgid "Contact info"
msgstr "Informations de Contact" msgstr "Informations de Contact"
msgid "e.g. E-mail or phone number"
msgstr "Ex : E-mail ou numéro de téléphone"

View File

@ -3,3 +3,6 @@ msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Contact info" msgid "Contact info"
msgstr "" msgstr ""
msgid "e.g. E-mail or phone number"
msgstr ""

View File

@ -1,13 +1,15 @@
return function(form, uci) return function(form, uci)
local pkg_i18n = i18n 'gluon-config-mode-contact-info' local pkg_i18n = i18n 'gluon-config-mode-contact-info'
local site_i18n = i18n 'gluon-site'
local site = require 'gluon.site' local site = require 'gluon.site'
local owner = uci:get_first("gluon-node-info", "owner") local owner = uci:get_first("gluon-node-info", "owner")
local s = form:section(Section, nil, translate("gluon-config-mode:contact-help")) local s = form:section(Section, nil, site_i18n.translate("gluon-config-mode:contact-help"))
local o = s:option(Value, "contact", pkg_i18n.translate("Contact info"), translate("gluon-config-mode:contact-note")) local o = s:option(Value, "contact", pkg_i18n.translate("Contact info"),
site_i18n._translate("gluon-config-mode:contact-note") or pkg_i18n.translate("e.g. E-mail or phone number"))
o.default = uci:get("gluon-node-info", owner, "contact") o.default = uci:get("gluon-node-info", owner, "contact")
o.optional = true o.optional = true
function o:write(data) function o:write(data)