From 61cf3442858ddb8794efb91b336113929325e302 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 23 Jan 2018 21:48:28 +0300 Subject: fixed dynapoint.lua, there was no translation Signed-off-by: Vladimir --- applications/luci-app-simple-adblock/Makefile | 5 +++-- .../luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'applications/luci-app-simple-adblock') diff --git a/applications/luci-app-simple-adblock/Makefile b/applications/luci-app-simple-adblock/Makefile index d7be6850ba..31055f1207 100644 --- a/applications/luci-app-simple-adblock/Makefile +++ b/applications/luci-app-simple-adblock/Makefile @@ -7,9 +7,10 @@ PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Stan Grishin LUCI_TITLE:=Simple Adblock Web UI -LUCI_DEPENDS:=+simple-adblock +LUCI_DESCRIPTION:=Provides Web UI for simple-adblock service. +LUCI_DEPENDS:=+luci +simple-adblock LUCI_PKGARCH:=all -PKG_RELEASE:=2 +PKG_RELEASE:=5 include ../../luci.mk diff --git a/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua b/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua index ff4638e9b8..e80cfb39eb 100644 --- a/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua +++ b/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua @@ -11,10 +11,11 @@ end function e.write(self, section, value) if value == "1" then - luci.sys.call("/etc/init.d/simple-adblock enable >/dev/null") - luci.sys.call("/etc/init.d/simple-adblock start >/dev/null") + luci.sys.init.enable("simple-adblock") + luci.sys.init.start("simple-adblock") else - luci.sys.call("/etc/init.d/simple-adblock stop >/dev/null") + luci.sys.init.stop("simple-adblock") + luci.sys.init.disable("simple-adblock") end return Flag.write(self, section, value) end -- cgit v1.2.3 From 870c176ca705b92a286e0bb7bb0d9a761c662c13 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Thu, 25 Jan 2018 15:05:28 -0800 Subject: luci-app-simple-adblock: bugfix for service start/stop Signed-off-by: Stan Grishin --- .../luasrc/model/cbi/simpleadblock.lua | 15 ++------------- .../po/templates/simple-adblock.pot | 6 +++--- 2 files changed, 5 insertions(+), 16 deletions(-) (limited to 'applications/luci-app-simple-adblock') diff --git a/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua b/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua index e80cfb39eb..22672124fc 100644 --- a/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua +++ b/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua @@ -2,20 +2,11 @@ m = Map("simple-adblock", translate("Simple AdBlock Settings")) s = m:section(NamedSection, "config", "simple-adblock") -- General options -e = s:option(Flag, "enabled", translate("Enable/start service")) +e = s:option(Flag, "enabled", translate("Start Simple Adblock service")) e.rmempty = false - -function e.cfgvalue(self, section) - return self.map:get(section, "enabled") == "1" and luci.sys.init.enabled("simple-adblock") and self.enabled or self.disabled -end - function e.write(self, section, value) - if value == "1" then - luci.sys.init.enable("simple-adblock") - luci.sys.init.start("simple-adblock") - else + if value ~= "1" then luci.sys.init.stop("simple-adblock") - luci.sys.init.disable("simple-adblock") end return Flag.write(self, section, value) end @@ -33,7 +24,6 @@ o3:value("1", translate("Force Router DNS server to all local devices")) o3.rmempty = false o3.default = 1 - local sysfs_path = "/sys/class/leds/" local leds = {} if nixio.fs.access(sysfs_path) then @@ -50,7 +40,6 @@ if #leds ~= 0 then end end - s2 = m:section(NamedSection, "config", "simple-adblock") -- Whitelisted Domains d1 = s2:option(DynamicList, "whitelist_domain", translate("Whitelisted Domains"), translate("Individual domains to be whitelisted")) diff --git a/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot b/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot index 4cfff964a3..1a71cae624 100644 --- a/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot +++ b/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot @@ -13,9 +13,6 @@ msgstr "" msgid "Controls system log and console output verbosity" msgstr "" -msgid "Enable/start service" -msgstr "" - msgid "Force Router DNS" msgstr "" @@ -52,6 +49,9 @@ msgstr "" msgid "Some output" msgstr "" +msgid "Start Simple Adblock service" +msgstr "" + msgid "Suppress output" msgstr "" -- cgit v1.2.3