luci-app-accesscontrol: trans po

This commit is contained in:
coolsnowwolf 2018-12-29 02:58:57 +08:00
parent 97ef6703de
commit 0e3c437d91
3 changed files with 26 additions and 7 deletions

View File

@ -11,7 +11,7 @@ LUCI_DEPENDS:=
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-accesscontrol
PKG_VERSION:=1
PKG_RELEASE:=5
PKG_RELEASE:=6
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -74,7 +74,7 @@ s = mr:section(TypedSection, "rule", translate("Client Rules"))
return Flag.write(self, section, value)
end
o = s:option(Value, "name", translate("Description"))
--o = s:option(Value, "name", translate("Description"))
-- o.rmempty = false -- force validate
-- -- better validate, then: o.datatype = "minlength(1)"
-- o.validate = function(self, val, sid)
@ -113,12 +113,12 @@ s = mr:section(TypedSection, "rule", translate("Client Rules"))
o.size = 5
local Days = {'Mon','Tue','Wed','Thu','Fri','Sat','Sun'}
local Days1 = translate("MTWTFSS")
local Days1 = {'Mon','Tue','Wed','Thu','Fri','Sat','Sun'}
function make_day (nday)
local day = Days[nday]
local label = Days1:sub (nday,nday)
local o = s:option(Flag, day, label)
local label = Days1[nday]
local o = s:option(Flag, day, translate(label))
o.default = '1'
o.rmempty = false -- always call write

View File

@ -22,6 +22,25 @@ msgstr "开始时间"
msgid "End time"
msgstr "结束时间"
msgid ""MTWTFSS"
msgstr "一二三四五六日"
msgid "Mon"
msgstr "一"
msgid "Tue"
msgstr "二"
msgid "Wed"
msgstr "三"
msgid "Thu"
msgstr "四"
msgid "Fri"
msgstr "五"
msgid "Sat"
msgstr "六"
msgid "Sun"
msgstr "日"