diff --git a/package/lean/luci-app-adbyby-plus/Makefile b/package/lean/luci-app-adbyby-plus/Makefile index 0d9352b71..63ce76a56 100644 --- a/package/lean/luci-app-adbyby-plus/Makefile +++ b/package/lean/luci-app-adbyby-plus/Makefile @@ -10,7 +10,7 @@ LUCI_DEPENDS:=+adbyby +wget +ipset +coreutils +coreutils-nohup +dnsmasq-full LUCI_PKGARCH:=all PKG_NAME:=luci-app-adbyby-plus PKG_VERSION:=2.0 -PKG_RELEASE:=38 +PKG_RELEASE:=39 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby.lua b/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby.lua index 2e45f45b4..dd90786ac 100644 --- a/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby.lua +++ b/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby.lua @@ -4,6 +4,13 @@ local SYS = require "luci.sys" local HTTP = require "luci.http" local DISP = require "luci.dispatcher" +local DL = SYS.exec("head -1 /usr/share/adbyby/data/lazy.txt | awk -F' ' '{print $3,$4}'") +local DV = SYS.exec("head -1 /usr/share/adbyby/data/video.txt | awk -F' ' '{print $3,$4}'") +local NR = SYS.exec("grep -v '^!' /usr/share/adbyby/data/rules.txt | wc -l") +local NU = SYS.exec("cat /usr/share/adbyby/data/user.txt | wc -l") +local UD = SYS.exec("cat /tmp/adbyby.updated 2>/dev/null") +local ND = SYS.exec("cat /usr/share/adbyby/dnsmasq.adblock | wc -l") + m = Map("adbyby") m.title = translate("Adbyby Plus +") m.description = translate("Adbyby Plus + can filter all kinds of banners, popups, video ads, and prevent tracking, privacy theft and a variety of malicious websites
Plus + version combination mode can operation with Adblock Plus Host,filtering ads without losing bandwidth") @@ -34,17 +41,11 @@ mem.default = 1 mem.rmempty = false mem.description = translate("Running Adbyby in RAM.More speed,less disk consumption") -local DL = SYS.exec("head -1 /usr/share/adbyby/data/lazy.txt | awk -F' ' '{print $3,$4}'") -local DV = SYS.exec("head -1 /usr/share/adbyby/data/video.txt | awk -F' ' '{print $3,$4}'") -local NR = SYS.exec("grep -v '^!' /usr/share/adbyby/data/rules.txt | wc -l") -local NU = SYS.exec("cat /usr/share/adbyby/data/user.txt | wc -l") ---local NW = SYS.exec("uci get adbyby.@adbyby[-1].domain 2>/dev/null | wc -l") -local ND = SYS.exec("cat /usr/share/adbyby/dnsmasq.adblock | wc -l") o = s:taboption("basic", Button, "restart") o.title = translate("Adbyby and Rule state") o.inputtitle = translate("Restart Adbyby") -o.description = translate(string.format("Lazy Rule:%s   Video Rule:%s
Third Party Subscription Rule:%d lines  User-defined Rule:%d lines", DL, DV, math.abs(NR-NU), NR)) +o.description = string.format("Last Update Checked: %s
Lazy Rule:%s
Video Rule:%s", UD, DL, DV) o.inputstyle = "reload" o.write = function() SYS.call("nohup sh /usr/share/adbyby/adupdate.sh > /tmp/adupdate.log 2>&1 &") diff --git a/package/lean/luci-app-wrtbwmon/Makefile b/package/lean/luci-app-wrtbwmon/Makefile index b6a7882f9..412b35fe5 100644 --- a/package/lean/luci-app-wrtbwmon/Makefile +++ b/package/lean/luci-app-wrtbwmon/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for Wrtbwmon LUCI_DEPENDS:=+luci-app-nlbwmon LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=6 +PKG_RELEASE:=7 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/config.lua b/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/config.lua index b7f8c9328..469d4f8f2 100644 --- a/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/config.lua +++ b/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/config.lua @@ -1,9 +1,9 @@ -local m = Map("wrtbwmon", "详细设置") +local m = Map("wrtbwmon", translate("Details")) -local s = m:section(NamedSection, "general", "wrtbwmon", "通用设置") +local s = m:section(NamedSection, "general", "wrtbwmon", translate("General settings")) -local o = s:option(Flag, "persist", "写入数据库到 ROM", - "把统计数据写入 /etc/config 中避免重启或者升级后丢失 (需要占用 ROM 空间并降低闪存寿命)") +local o = s:option(Flag, "persist", translate("Persist database"), + translate("Check this to persist the database file")) o.rmempty = false function o.write(self, section, value) diff --git a/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/custom.lua b/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/custom.lua index f8e3eeeb7..671879b4c 100644 --- a/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/custom.lua +++ b/package/lean/luci-app-wrtbwmon/luasrc/model/cbi/wrtbwmon/custom.lua @@ -3,8 +3,8 @@ local USER_FILE_PATH = "/etc/config/wrtbwmon.user" local fs = require "nixio.fs" local f = SimpleForm("wrtbwmon", - "自定义MAC地址对应的主机名", - "每一行的格式为 00:aa:bb:cc:ee:ff,username (不支持中文主机名)") + translate("Usage - Custom User File"), + translate("This file is used to match users with MAC addresses and it must have the following format: 00:aa:bb:cc:ee:ff,username")) local o = f:field(Value, "_custom") diff --git a/package/lean/luci-app-wrtbwmon/luasrc/view/wrtbwmon.htm b/package/lean/luci-app-wrtbwmon/luasrc/view/wrtbwmon.htm index a42e6f08c..68713b123 100644 --- a/package/lean/luci-app-wrtbwmon/luasrc/view/wrtbwmon.htm +++ b/package/lean/luci-app-wrtbwmon/luasrc/view/wrtbwmon.htm @@ -1,35 +1,35 @@ <%+header%> -

客户端实时流量监测

+

<%=translate("Usage")%>

- +


diff --git a/package/lean/luci-app-wrtbwmon/po/zh-cn/wrtbwmon.po b/package/lean/luci-app-wrtbwmon/po/zh-cn/wrtbwmon.po index 47e8ea29d..3eb050e3f 100644 --- a/package/lean/luci-app-wrtbwmon/po/zh-cn/wrtbwmon.po +++ b/package/lean/luci-app-wrtbwmon/po/zh-cn/wrtbwmon.po @@ -1,3 +1,6 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + msgid "Usage" msgstr "实时流量监测" @@ -19,12 +22,35 @@ msgstr "通用设置" msgid "Persist database" msgstr "写入数据库到硬盘" -msgid "Check this to persist the database file under /etc/config. " -msgstr "把统计数据写入 /etc/config 中避免重启或者升级后丢失 (需要占用空间并降低ROM寿命)" +msgid "Check this to persist the database file" +msgstr "把统计数据写入 /etc/config 中避免重启或者升级后丢失" msgid "Usage - Custom User File" msgstr "自定义MAC地址对应的主机名" msgid "This file is used to match users with MAC addresses and it must have the following format: 00:aa:bb:cc:ee:ff,username" -msgstr "每一行的格式为 00:aa:bb:cc:ee:ff,username (不支持中文主机名)" +msgstr "每一行的格式为 00:aa:bb:cc:ee:ff,username" +msgid "Reset Database" +msgstr "重置数据库" + +msgid "Auto Refresh Interval" +msgstr "自动刷新间隔" + +msgid "Disabled" +msgstr "禁用" + +msgid "Second" +msgstr "秒" + +msgid "Seconds" +msgstr "秒" + +msgid "Minutes" +msgstr "分钟" + +msgid "Per-host Totals" +msgstr "合并每一客户端数据" + +msgid "Loading..." +msgstr "加载中..." diff --git a/package/lean/luci-app-wrtbwmon/root/etc/wrtbwmon.include b/package/lean/luci-app-wrtbwmon/root/etc/wrtbwmon.include index fcf2de7ca..39bcf43a1 100755 --- a/package/lean/luci-app-wrtbwmon/root/etc/wrtbwmon.include +++ b/package/lean/luci-app-wrtbwmon/root/etc/wrtbwmon.include @@ -1 +1 @@ -/etc/init.d/wrtbwmon restart +/etc/init.d/wrtbwmon restart >/dev/null 2>&1