Skip to content
Snippets Groups Projects
Commit c2b39759 authored by Jan-Tarek Butt's avatar Jan-Tarek Butt
Browse files

add package ffnw-config-mode-contact-info

parent 4ea3a8b0
No related branches found
No related tags found
No related merge requests found
include $(TOPDIR)/rules.mk
PKG_NAME:=ffnw-config-mode-contact-info
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(GLUONDIR)/include/package.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/ffnw-config-mode-contact-info
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Set a custom string that will be distributed in the mesh.
DEPENDS:=gluon-config-mode-core-virtual +ffnw-node-info
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,ffnw-config-mode-contact-info,i18n)
endef
define Package/ffnw-config-mode-contact-info/install
$(CP) ./files/* $(1)/
$(call GluonInstallI18N,ffnw-config-mode-contact-info,$(1))
endef
$(eval $(call BuildPackage,ffnw-config-mode-contact-info))
local cbi = require "luci.cbi"
local i18n = require "luci.i18n"
local uci = luci.model.uci.cursor()
local M = {}
function M.section(form)
local s = form:section(cbi.SimpleSection, nil, i18n.translate(
'You can provide your contact information here to '
.. 'allow others to contact you. Please note that '
.. 'this information will be visible <em>publicly</em> '
.. 'on the internet together with your node\'s coordinates.'
)
)
local o = s:option(cbi.Value, "_contact", i18n.translate("Contact info"))
o.default = uci:get_first("gluon-node-info", "owner", "contact", "")
o.rmempty = true
o.datatype = "string"
o.description = i18n.translate("e.g. E-mail or phone number")
o.maxlen = 140
end
function M.handle(data)
if data._contact ~= nil then
uci:set("gluon-node-info", uci:get_first("gluon-node-info", "owner"), "contact", data._contact)
else
uci:delete("gluon-node-info", uci:get_first("gluon-node-info", "owner"), "contact")
end
uci:save("gluon-node-info")
uci:commit("gluon-node-info")
end
return M
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-03-19 01:32+0100\n"
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Contact info"
msgstr "Kontakt"
msgid ""
"You can provide your contact information here to allow others to contact "
"you. Please note that this information will be visible <em>publicly</em> on "
"the internet together with your node's coordinates."
msgstr ""
"Hier kannst du einen <em>öffentlichen</em> Hinweis hinterlegen, um anderen "
"zu ermöglichen, Kontakt mit dir aufzunehmen. Bitte beachte, dass "
"dieser Hinweis auch öffentlich im Internet, zusammen mit den Koordinaten "
"deines Knotens, einsehbar sein wird."
msgid "e.g. E-mail or phone number"
msgstr "z.B. E-Mail oder Telefonnummer"
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Contact info"
msgstr ""
msgid ""
"You can provide your contact information here to allow others to contact "
"you. Please note that this information will be visible <em>publicly</em> on "
"the internet together with your node's coordinates."
msgstr ""
msgid "e.g. E-mail or phone number"
msgstr ""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment