diff options
Diffstat (limited to 'applications')
18 files changed, 928 insertions, 166 deletions
diff --git a/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua b/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua index 096724f735..4358374440 100644 --- a/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua +++ b/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua @@ -1,19 +1,19 @@ -- Copyright 2015 Jonathan Bennett <jbennett@incomsystems.biz> -- Licensed to the public under the GNU General Public License v2. - +tmp = 0 m = Map("fwknopd", translate("Firewall Knock Operator")) s = m:section(TypedSection, "global", translate("Enable Uci/Luci control")) -- Set uci control on or off s.anonymous=true s:option(Flag, "uci_enabled", translate("Enable config overwrite"), translate("When unchecked, the config files in /etc/fwknopd will be used as is, ignoring any settings here.")) -qr = s:option(DummyValue, "note0", "dummy") -qr.template = "fwknopd-qr" -qr:depends("uci_enabled", "1") s = m:section(TypedSection, "access", translate("access.conf stanzas")) -- set the access.conf settings s.anonymous=true s.addremove=true -s.dynamic=true +qr = s:option(DummyValue, "note0", "dummy") +qr.tmp = tmp +qr.template = "fwknopd-qr" +qr:depends("uci_enabled", "1") s:option(Value, "SOURCE", "SOURCE", translate("Use ANY for any source ip")) k1 = s:option(Value, "KEY", "KEY", translate("Define the symmetric key used for decrypting an incoming SPA packet that is encrypted by the fwknop client with Rijndael.")) k1:depends("keytype", translate("Normal Key")) @@ -40,15 +40,13 @@ s:option(Value, "REQUIRE_SOURCE_ADDRESS", "REQUIRE_SOURCE_ADDRESS", translate("F This makes it impossible to use the -s command line argument on the fwknop client command line, so either -R \ has to be used to automatically resolve the external address (if the client behind a NAT) or the client must \ know the external IP and set it via the -a argument.")) -s:option(DummyValue, "note1", translate("Enter custom access.conf variables below:")) s = m:section(TypedSection, "config", translate("fwknopd.conf config options")) s.anonymous=true -s.dynamic=true s:option(Value, "MAX_SPA_PACKET_AGE", "MAX_SPA_PACKET_AGE", translate("Maximum age in seconds that an SPA packet will be accepted. defaults to 120 seconds")) s:option(Value, "PCAP_INTF", "PCAP_INTF", translate("Specify the ethernet interface on which fwknopd will sniff packets.")) s:option(Value, "ENABLE_IPT_FORWARDING", "ENABLE_IPT_FORWARDING", translate("Allow SPA clients to request access to services through an iptables firewall instead of just to it.")) -s:option(DummyValue, "note2", translate("Enter custom fwknopd.conf variables below:")) +s:option(Value, "ENABLE_NAT_DNS", "ENABLE_NAT_DNS", translate("Allow SPA clients to request forwarding destination by DNS name.")) return m diff --git a/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm b/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm index 9e6e8185fa..5773f523e5 100644 --- a/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm +++ b/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm @@ -1 +1,2 @@ -<% print(luci.sys.exec("sh /usr/sbin/gen-qr.sh")) %> +<% print(luci.sys.exec("sh /usr/sbin/gen-qr.sh " .. self.tmp)) %> +<% self.tmp = self.tmp + 1 %> diff --git a/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd b/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd index 01b85de25f..65ef012450 100644 --- a/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd +++ b/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd @@ -16,6 +16,7 @@ uci set fwknopd.@access[0].hkeytype='Base 64 key' uci set fwknopd.@access[0].KEY_BASE64=`fwknopd --key-gen | awk '/^KEY/ {print $2;}'` uci set fwknopd.@access[0].HMAC_KEY_BASE64=`fwknopd --key-gen | awk '/^HMAC/ {print $2;}'` uci set fwknopd.@config[0].ENABLE_IPT_FORWARDING='y' +uci set fwknopd.@config[0].ENABLE_NAT_DNS='y' uci commit fwknopd rm -f /tmp/luci-indexcache diff --git a/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh b/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh index 97493dafed..abca5d3e5a 100644 --- a/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh +++ b/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh @@ -1,9 +1,13 @@ #!/bin/sh +entry_num=0 +if [ "$1" != "" ]; then +entry_num=$1 +fi -key_base64=$(uci get fwknopd.@access[0].KEY_BASE64) -key=$(uci get fwknopd.@access[0].KEY) -hmac_key_base64=$(uci get fwknopd.@access[0].HMAC_KEY_BASE64) -hmac_key=$(uci get fwknopd.@access[0].HMAC_KEY) +key_base64=$(uci get fwknopd.@access[$entry_num].KEY_BASE64) +key=$(uci get fwknopd.@access[$entry_num].KEY) +hmac_key_base64=$(uci get fwknopd.@access[$entry_num].HMAC_KEY_BASE64) +hmac_key=$(uci get fwknopd.@access[$entry_num].HMAC_KEY) if [ $key_base64 != "" ]; then qr="KEY_BASE64:$key_base64" diff --git a/applications/luci-app-olsr/luasrc/controller/olsr.lua b/applications/luci-app-olsr/luasrc/controller/olsr.lua index 9a997bdc12..0564bd4ea7 100644 --- a/applications/luci-app-olsr/luasrc/controller/olsr.lua +++ b/applications/luci-app-olsr/luasrc/controller/olsr.lua @@ -87,8 +87,8 @@ function action_json() local v4_port = uci:get("olsrd", "olsrd_jsoninfo", "port") or 9090 local v6_port = uci:get("olsrd6", "olsrd_jsoninfo", "port") or 9090 - jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 " .. v4_port .. ") 2>/dev/null" ) - jsonreq6 = utl.exec("(echo /status | nc ::1 " .. v6_port .. ") 2>/dev/null") + jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 " .. v4_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null" ) + jsonreq6 = utl.exec("(echo /status | nc ::1 " .. v6_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null") http.prepare_content("application/json") if not jsonreq4 or jsonreq4 == "" then jsonreq4 = "{}" @@ -375,8 +375,8 @@ function fetch_jsoninfo(otable) local v4_port = uci:get("olsrd", "olsrd_jsoninfo", "port") or 9090 local v6_port = uci:get("olsrd6", "olsrd_jsoninfo", "port") or 9090 - jsonreq4 = utl.exec("(echo /" .. otable .. " | nc 127.0.0.1 " .. v4_port .. ") 2>/dev/null") - jsonreq6 = utl.exec("(echo /" .. otable .. " | nc ::1 " .. v6_port .. ") 2>/dev/null") + jsonreq4 = utl.exec("(echo /" .. otable .. " | nc 127.0.0.1 " .. v4_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null") + jsonreq6 = utl.exec("(echo /" .. otable .. " | nc ::1 " .. v6_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null") local jsondata4 = {} local jsondata6 = {} local data4 = {} diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm index 31dd7d05ac..c077c20486 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm @@ -12,8 +12,8 @@ local i = 1 if luci.http.formvalue("status") == "1" then local rv = {} for k, link in ipairs(links) do - link.linkCost = tonumber(link.linkCost)/1024 or 0 - if link.linkCost == 4096 then + link.linkCost = tonumber(link.linkCost) or 0 + if link.linkCost == 4194304 then link.linkCost = 0 end local color = olsrtools.etx_color(link.linkCost) @@ -129,8 +129,8 @@ end <tbody id="olsr_neigh_table"> <% local i = 1 for k, link in ipairs(links) do - link.linkCost = tonumber(link.linkCost)/1024 or 0 - if link.linkCost == 4096 then + link.linkCost = tonumber(link.linkCost) or 0 + if link.linkCost == 4194304 then link.linkCost = 0 end diff --git a/applications/luci-app-privoxy/po/zh-cn/privoxy.po b/applications/luci-app-privoxy/po/zh-cn/privoxy.po index 75d1a921cf..778422b8bb 100644 --- a/applications/luci-app-privoxy/po/zh-cn/privoxy.po +++ b/applications/luci-app-privoxy/po/zh-cn/privoxy.po @@ -2,14 +2,14 @@ msgid "" msgstr "" "Project-Id-Version: luci-app-privoxy\n" "POT-Creation-Date: 2015-06-10 20:16+0100\n" -"PO-Revision-Date: 2015-06-10 20:16+0100\n" +"PO-Revision-Date: 2017-01-05 18:01+0800\n" "Last-Translator: maz-1 <ohmygod19993 at gmail dotcom>\n" "Language-Team: \n" -"Language: zh-cn\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 1.8.11\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" @@ -21,10 +21,10 @@ msgstr "当用户试图访问不受信任的页面时,错误页面所显示的 msgid "" "A URL to documentation about the local Privoxy setup, configuration or " "policies." -msgstr "指向Privoxy安装、设置和规则说明文档的URL" +msgstr "指向 Privoxy 安装、设置和规则说明文档的 URL" msgid "A directory where Privoxy can create temporary files." -msgstr "Privoxy存放临时文件的目录。" +msgstr "Privoxy 存放临时文件的目录。" msgid "Access Control" msgstr "访问控制" @@ -36,18 +36,18 @@ msgid "An alternative directory where the templates are loaded from." msgstr "可选的目录,放在里面的模板会被加载。" msgid "An email address to reach the Privoxy administrator." -msgstr "用于联系privoxy管理员的邮箱地址。" +msgstr "用于联系 Privoxy 管理员的邮箱地址。" msgid "" "Assumed server-side keep-alive timeout (in seconds) if not specified by the " "server." -msgstr "当服务端没有指定超时时间时假定的超时时间(单位秒)。" +msgstr "当服务端没有指定超时时间时假定的超时时间(单位:秒)。" msgid "Boot delay" -msgstr "" +msgstr "启动延时" msgid "CGI user interface" -msgstr "CGI用户界面" +msgstr "CGI 用户界面" msgid "Common Log Format" msgstr "通用日志格式" @@ -57,14 +57,14 @@ msgid "" "proxies. Note that parent proxies can severely decrease your privacy level. " "Also specified here are SOCKS proxies." msgstr "" -"在这里设置http请求所经过的多重代理链。注意父级代理可能严重降低你的隐私安全" -"度。在这里还可以设置SOCKS代理。" +"在这里设置 HTTP 请求所经过的多重代理链。注意:父级代理可能严重降低你的隐私安" +"全度。在这里还可以设置 SOCKS 代理。" msgid "Debug GIF de-animation" msgstr "GIF动画日志" msgid "Debug force feature" -msgstr "force feature日志" +msgstr "Force feature 日志" msgid "Debug redirects" msgstr "重定向日志" @@ -73,7 +73,7 @@ msgid "Debug regular expression filters" msgstr "正则表达式日志" msgid "Delay (in seconds) during system boot before Privoxy start" -msgstr "" +msgstr "Privoxy 自启动延迟时间(单位:秒)" msgid "Directory does not exist!" msgstr "目录不存在!" @@ -82,20 +82,20 @@ msgid "Disabled == Transparent Proxy Mode" msgstr "禁用 == 透明代理模式" msgid "Documentation" -msgstr "" +msgstr "记录信息" msgid "During delay ifup-events are not monitored !" -msgstr "" +msgstr "在延迟期间无法检测到 ifup 事件!" msgid "Enable proxy authentication forwarding" msgstr "允许转发代理认证" msgid "" "Enable/Disable autostart of Privoxy on system startup and interface events" -msgstr "开启/关闭Privoxy在系统启动或者设置界面更改时自动启动。" +msgstr "开启/关闭 Privoxy 在系统启动或接口事件时自动启动。" msgid "Enable/Disable filtering when Privoxy starts." -msgstr "Privoxy启动时开启/关闭过滤。" +msgstr "Privoxy 启动时开启/关闭过滤。" msgid "Enabled" msgstr "已开启" @@ -103,10 +103,10 @@ msgstr "已开启" msgid "" "Enabling this option is NOT recommended if there is no parent proxy that " "requires authentication!" -msgstr "父级代理不需要认证时不推荐开启这个选项!" +msgstr "如果没有需要认证的父级代理时,不推荐开启这个选项!" msgid "File '%s' not found inside Configuration Directory" -msgstr "文件 '%s' 没有在设置目录中找到!" +msgstr "在设置目录中未找到文件 '%S'!" msgid "File not found or empty" msgstr "文件不存在或为空" @@ -115,7 +115,7 @@ msgid "Files and Directories" msgstr "文件和目录" msgid "For help use link at the relevant option" -msgstr "在相应选项下的连接可获取帮助。" +msgstr "点击相应选项的连接可获取帮助。" msgid "Forwarding" msgstr "转发" @@ -123,15 +123,15 @@ msgstr "转发" msgid "" "If enabled, Privoxy hides the 'go there anyway' link. The user obviously " "should not be able to bypass any blocks." -msgstr "如果启用,Privoxy会隐藏'go there anyway'链接。用户显然不应能绕过屏蔽。" +msgstr "如果启用,Privoxy 会隐藏 'go there anyway' 链接,用户就不能绕过屏蔽。" msgid "" "If you intend to operate Privoxy for more users than just yourself, it might " "be a good idea to let them know how to reach you, what you block and why you " "do that, your policies, etc." msgstr "" -"如果除了你还有其他用户通过privoxy连接,让他们知道如何联系你、什么内容被屏蔽" -"了、你为什么要这么做、你所制定的规范等等是一个好主意。" +"如果除了你还有其他用户使用 Privoxy 连接,最好让他们知道如何联系你,你屏蔽什" +"么,你为什么这样做,你的政策等等。" msgid "Invalid email address" msgstr "邮箱地址无效" @@ -140,29 +140,29 @@ msgid "It is NOT recommended for the casual user." msgstr "不推荐新手使用。" msgid "Location of the Privoxy User Manual." -msgstr "Privoxy用户手册位置" +msgstr "Privoxy 用户手册位置" msgid "Log File Viewer" msgstr "日志查看器" msgid "Log all data read from the network" -msgstr "记录所有从网络接收的数据" +msgstr "记录所有接收的网络数据" msgid "Log all data written to the network" -msgstr "记录所有发送给网络的数据" +msgstr "记录所有发送的网络数据" msgid "Log the applying actions" -msgstr "记录被应用的规则" +msgstr "记录配置保存动作" msgid "" "Log the destination for each request Privoxy let through. See also 'Debug " "1024'." -msgstr "记录Privoxy所允许的所有请求。另请参考'Debug 1024'。" +msgstr "记录 Privoxy 允许的所有请求。另请参考 'Debug 1024'。" msgid "" "Log the destination for requests Privoxy didn't let through, and the reason " "why." -msgstr "记录被Privoxy拒绝的请求目标以及拒绝原因。" +msgstr "记录 Privoxy 拒绝的请求目标以及拒绝原因。" msgid "Logging" msgstr "日志" @@ -198,40 +198,40 @@ msgid "Maximum number of client connections that will be served." msgstr "客户端数量上限。" msgid "Maximum size (in KB) of the buffer for content filtering." -msgstr "内容过滤的最大缓冲(单位KB)。" +msgstr "内容过滤的最大缓冲(单位:KB)。" msgid "Miscellaneous" msgstr "杂项" msgid "NOT installed" -msgstr "" +msgstr "未安装" msgid "No trailing '/', please." -msgstr "路径结尾不要加'/' ." +msgstr "路径结尾不要加 '/' 。" msgid "Non-fatal errors - *we highly recommended enabling this*" -msgstr "非致命性错误 - * 建议开启 *" +msgstr "非致命性错误 - * 强烈建议开启 *" msgid "" "Number of seconds after which a socket times out if no data is received." -msgstr "socket连接未收到数据的超时时间。" +msgstr "Socket 连接未收到数据的超时时间。" msgid "" "Number of seconds after which an open connection will no longer be reused." -msgstr "一个开放的连接不再重复使用的超时时间。" +msgstr "开放的连接不再重复使用的超时时间。" msgid "" "Only when using 'external filters', Privoxy has to create temporary files." -msgstr "只有使用外置规则时,privoxy才需要创建临时文件。" +msgstr "只有使用外置规则时,Privoxy 才需要创建临时文件。" msgid "Please install current version !" -msgstr "" +msgstr "请安装当前版本!" msgid "Please press [Read] button" -msgstr "请点击[读取]按钮" +msgstr "请点击 [读取] 按钮" msgid "Please read Privoxy manual for details!" -msgstr "请阅读Privoxy手册以了解详情!" +msgstr "请阅读 Privoxy 手册以了解详情!" msgid "Please update to the current version!" msgstr "请升级到当前版本!" @@ -244,16 +244,16 @@ msgid "" "configuration, help and logging. This section of the configuration file " "tells Privoxy where to find those other files." msgstr "" -"Privoxy可以使用其他一些文件用于附加设置,帮助和日志。这个区域用来告诉Privoxy" -"从哪里找到这些文件。" +"Privoxy 可以使用其他一些文件用于附加设置,帮助和日志。这个区域用来告诉 " +"Privoxy 从哪里找到这些文件。" msgid "" "Privoxy is a non-caching web proxy with advanced filtering capabilities for " "enhancing privacy, modifying web page data and HTTP headers, controlling " "access, and removing ads and other obnoxious Internet junk." msgstr "" -"Privoxy是一个无缓存的网络代理,具有高级过滤功能,能够修改网页数据和HTTP头,控" -"制访问,移除广告等。" +"Privoxy 是一个无缓存的网络代理,具有高级过滤功能,能够修改网页数据和 HTTP 请" +"求头,控制访问,移除广告等。" msgid "Read / Reread log file" msgstr "读取/刷新日志文件" @@ -265,13 +265,13 @@ msgid "Show each connection status" msgstr "显示每个连接的状态" msgid "Show header parsing" -msgstr "Show header parsing" +msgstr "显示请求头 解析" msgid "Software package '%s' is not installed." -msgstr "" +msgstr "软件包 '%s' 未安装" msgid "Software package '%s' is outdated." -msgstr "" +msgstr "软件包 '%s' 已过时" msgid "Start" msgstr "启动" @@ -289,7 +289,7 @@ msgid "Syntax:" msgstr "格式:" msgid "Syntax: Client header names delimited by spaces." -msgstr "格式: Client header names delimited by spaces." +msgstr "格式: 由空格分隔的客户端请求头名称。" msgid "Syntax: target_pattern http_parent[:port]" msgstr "格式: target_pattern http_parent[:port]" @@ -298,7 +298,7 @@ msgid "Syntax: target_pattern socks_proxy[:port] http_parent[:port]" msgstr "格式: target_pattern socks_proxy[:port] http_parent[:port]" msgid "System" -msgstr "" +msgstr "系统" msgid "" "The actions file(s) to use. Multiple actionsfile lines are permitted, and " @@ -307,12 +307,12 @@ msgstr "所使用的规则文件。允许并且推荐使用多个规则文件。 msgid "" "The address and TCP port on which Privoxy will listen for client requests." -msgstr "Privoxy接收客户端请求时监听的地址和TCP端口。" +msgstr "Privoxy 接收客户端请求时监听的地址和 TCP 端口。" msgid "" "The compression level that is passed to the zlib library when compressing " "buffered content." -msgstr "使用zlib压缩缓冲内容时的压缩级别。" +msgstr "使用 zlib 压缩缓冲内容时的压缩级别。" msgid "" "The directory where all logging takes place (i.e. where the logfile is " @@ -334,14 +334,14 @@ msgid "The log file to use. File name, relative to log directory." msgstr "日志文件名称,与日志路径相对。" msgid "The order in which client headers are sorted before forwarding them." -msgstr "转发数据前,client headers的排序。" +msgstr "转发数据前,客户端请求头的排序。" msgid "" "The status code Privoxy returns for pages blocked with +handle-as-empty-" "document." msgstr "" -"当页面因为handle-as-empty-document规则被阻止时返回的状态码(选上为200 OK,不" -"选上为403 Forbidden)" +"当页面因为 handle-as-empty-document 规则被阻止时返回的状态码(选上为 200 OK," +"不选上为 403 Forbidden)" msgid "" "The trust mechanism is an experimental feature for building white-lists and " @@ -361,19 +361,20 @@ msgstr "这个选项仅用于调试,开启后会极大地降低性能。" msgid "" "This option will be removed in future releases as it has been obsoleted by " "the more general header taggers." -msgstr "这个选项在以后的版本中将被移除,因为它被header taggers所取代了。" +msgstr "这个选项在以后的版本中将被移除,因为它被 header taggers 所取代了。" msgid "" "This tab controls the security-relevant aspects of Privoxy's configuration." -msgstr "这个标签用于设置与安全相关的Privoxy选项。" +msgstr "这个标签用于设置与安全相关的 Privoxy 选项。" msgid "" "Through which SOCKS proxy (and optionally to which parent HTTP proxy) " "specific requests should be routed." -msgstr "指定的请求应该通过哪一个SOCKS代理(并且通过哪一个HTTP父代理,可选)" +msgstr "" +"指定的请求应该通过哪一个 SOCKS 代理(并且通过哪一个 HTTP 父代理,可选)" msgid "To which parent HTTP proxy specific requests should be routed." -msgstr "请求应转发至哪一个父级HTTP代理。" +msgstr "请求应转发至哪一个父级 HTTP 代理。" msgid "User customizations" msgstr "用户自定义" @@ -382,10 +383,10 @@ msgid "Value is not a number" msgstr "输入值不是数字" msgid "Value not between 0 and 300" -msgstr "" +msgstr "输入值不在0和300之间" msgid "Value not between 0 and 9" -msgstr "输入值不在0和9之间。" +msgstr "输入值不在0和9之间" msgid "Value not between 1 and 4096" msgstr "输入值不在1和4096之间" @@ -408,7 +409,7 @@ msgstr "被拦截的请求是否应被当作有效的。" msgid "" "Whether or not Privoxy recognizes special HTTP headers to change toggle " "state." -msgstr "Privoxy是否识别特殊的HTTP头以切换状态。" +msgstr "Privoxy 是否识别特殊的 HTTP 请求头以切换状态。" msgid "Whether or not buffered content is compressed before delivery." msgstr "缓冲内容在传递之前是否压缩。" @@ -422,7 +423,7 @@ msgid "Whether or not pipelined requests should be served." msgstr "是否处理管道化的请求。" msgid "Whether or not proxy authentication through Privoxy should work." -msgstr "是否可以通过Privoxy进行代理验证。" +msgstr "是否可以通过 Privoxy 进行代理验证。" msgid "Whether or not the web-based actions file editor may be used." msgstr "是否使用基于网页的规则编辑器。" @@ -431,11 +432,11 @@ msgid "Whether or not the web-based toggle feature may be used." msgstr "是否启用基于网页的切换功能。" msgid "Whether requests to Privoxy's CGI pages can be blocked or redirected." -msgstr "访问Privoxy CGI页面的请求是否可以被拦截或重定向。" +msgstr "访问 Privoxy CGI 页面的请求是否可以被拦截或重定向。" msgid "" "Whether the CGI interface should stay compatible with broken HTTP clients." -msgstr "CGI界面是否应兼容过时的HTTP客户端。" +msgstr "CGI 界面是否应兼容过时的HTTP客户端。" msgid "Whether to run only one server thread." msgstr "是否只运行一个服务线程。" diff --git a/applications/luci-app-shairplay/po/ja/shairplay.po b/applications/luci-app-shairplay/po/ja/shairplay.po new file mode 100644 index 0000000000..07fa7be6ec --- /dev/null +++ b/applications/luci-app-shairplay/po/ja/shairplay.po @@ -0,0 +1,54 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2017-01-03 15:06+0900\n" +"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n" +"Language-Team: \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +msgid "AO Device ID" +msgstr "オーディオ出力 デバイスID" + +msgid "AO Device Name" +msgstr "オーディオ出力 デバイス名" + +msgid "AO Driver" +msgstr "オーディオ出力 デバイスドライバー" + +msgid "Airport Name" +msgstr "Airport名" + +msgid "Default" +msgstr "デフォルト" + +msgid "Enabled" +msgstr "有効" + +msgid "HW Address" +msgstr "ハードウェア アドレス" + +msgid "Password" +msgstr "パスワード" + +msgid "Port" +msgstr "ポート" + +msgid "Respawn" +msgstr "リスポーン" + +msgid "Shairplay" +msgstr "" + +msgid "" +"Shairplay is a simple AirPlay server implementation, here you can configure " +"the settings." +msgstr "" +"Shairplayは、シンプルなAirPlay サーバー実装です。ここでは、設定を行うことがで" +"きます。" diff --git a/applications/luci-app-shairplay/po/templates/shairplay.pot b/applications/luci-app-shairplay/po/templates/shairplay.pot new file mode 100644 index 0000000000..b3da99e0b3 --- /dev/null +++ b/applications/luci-app-shairplay/po/templates/shairplay.pot @@ -0,0 +1,40 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "AO Device ID" +msgstr "" + +msgid "AO Device Name" +msgstr "" + +msgid "AO Driver" +msgstr "" + +msgid "Airport Name" +msgstr "" + +msgid "Default" +msgstr "" + +msgid "Enabled" +msgstr "" + +msgid "HW Address" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Respawn" +msgstr "" + +msgid "Shairplay" +msgstr "" + +msgid "" +"Shairplay is a simple AirPlay server implementation, here you can configure " +"the settings." +msgstr "" diff --git a/applications/luci-app-travelmate/po/ja/travelmate.po b/applications/luci-app-travelmate/po/ja/travelmate.po new file mode 100644 index 0000000000..986d7b32b6 --- /dev/null +++ b/applications/luci-app-travelmate/po/ja/travelmate.po @@ -0,0 +1,72 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"Language: ja\n" + +msgid "" +"Brief advice: Create a wwan interface, configure it to use dhcp and add it " +"to the wan zone in firewall. Create the wifi interfaces to be used ('client' " +"mode, assigned to wwan network, left as disabled). Travelmate will try to " +"connect to the known wifi client interfaces in the defined order." +msgstr "" +"簡単な解説: 予めWWANインターフェースを作成し、DHCPを使用するよう構成してファ" +"イアウォールのWANゾーンに追加します。また、使用される無線インターフェースを作" +"成しておきます(\"クライアント\" モード、WWANに割り当て、無効状態)。" +"Travelmateは、登録されている順序で既知の無線クライアント インターフェースへの" +"接続を試行します。" + +msgid "" +"Configuration of the Travelmate package to enable travel router " +"functionality." +msgstr "トラベル ルータ機能を有効にする、Travelmate パッケージの設定です。" + +msgid "Debug logging" +msgstr "デバッグ ログ" + +msgid "Default 3, range 0-10. Set to 0 to allow unlimited retries" +msgstr "既定値 3、範囲 0 - 10。再試行回数を制限しない場合、0 に設定します。" + +msgid "Default 30, range 5-60" +msgstr "既定値 30、範囲 5 - 60" + +msgid "Default: empty = use all radios." +msgstr "デフォルト:(空)= 全ての無線を使用" + +msgid "Disable this if you want to use iwinfo instead of iw" +msgstr "iw の代わりに iwinfo を使用したい場合、この設定を無効にします。" + +msgid "Enable Travelmate" +msgstr "Travelmateの有効化" + +msgid "Extra options" +msgstr "拡張オプション" + +msgid "Global options" +msgstr "全般オプション" + +msgid "Link to detailed advice" +msgstr "詳細な解説へのリンク" + +msgid "Loop timeout in seconds for wlan monitoring" +msgstr "無線LAN モニターのループ タイムアウト(秒)" + +msgid "Max. number of connection retries to an uplink" +msgstr "確立までの接続試行回数" + +msgid "Travelmate" +msgstr "Travelmate" + +msgid "Use iw for scanning" +msgstr "スキャンに iw を使用する" + +msgid "Use only one radio, e.g. 'radio0'" +msgstr "単一の無線のみ使用する 例: 'radio0'" diff --git a/applications/luci-app-uhttpd/po/ja/uhttpd.po b/applications/luci-app-uhttpd/po/ja/uhttpd.po new file mode 100644 index 0000000000..5729034046 --- /dev/null +++ b/applications/luci-app-uhttpd/po/ja/uhttpd.po @@ -0,0 +1,213 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2017-01-01 18:11+0900\n" +"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n" +"Language-Team: \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +msgid "" +"(/old/path=/new/path) or (just /old/path which becomes /cgi-prefix/old/path)" +msgstr "" +"(/old/path=/new/path) または (just /old/path which becomes /cgi-prefix/old/" +"path)" + +msgid "404 Error" +msgstr "404 エラー" + +msgid "A lightweight single-threaded HTTP(S) server" +msgstr "軽量なシングル スレッド HTTP(S) サーバーです。" + +msgid "Advanced Settings" +msgstr "詳細設定" + +msgid "Aliases" +msgstr "エイリアス" + +msgid "Base directory for files to be served" +msgstr "サーバーがホストするファイルのベースディレクトリです。" + +msgid "Bind to specific interface:port (by specifying interface address" +msgstr "" +"インターフェースのアドレスを使用して、特定のインターフェースとポートに関連付" +"けます。" + +msgid "CGI filetype handler" +msgstr "CGIファイル形式 ハンドラー" + +msgid "CGI is disabled if not present." +msgstr "指定しない場合、CGIは無効になります。" + +msgid "Config file (e.g. for credentials for Basic Auth)" +msgstr "設定ファイル(例: 基本認証用の資格情報)" + +msgid "Connection reuse" +msgstr "接続の再使用" + +msgid "Country" +msgstr "国" + +msgid "Disable JSON-RPC authorization via ubus session API" +msgstr "ubus セッションAPI経由のJSON-RPC認証を無効にする" + +msgid "Do not follow symlinks outside document root" +msgstr "ドキュメント ルート外へのシンボリックリンクを追随しない" + +msgid "Do not generate directory listings." +msgstr "ディレクトリの待ち受けを生成しない" + +msgid "Document root" +msgstr "ドキュメント ルート" + +msgid "E.g specify with index.html and index.php when using PHP" +msgstr "index.html や、PHPを使用しているときは index.php を設定します。" + +msgid "Embedded Lua interpreter is disabled if not present." +msgstr "指定しない場合、組込みLua インタープリタは無効になります。" + +msgid "Enable JSON-RPC Cross-Origin Resource Support" +msgstr "" + +msgid "For settings primarily geared to serving more than the web UI" +msgstr "主に、Web UI以上のものを提供することを対象とした設定です。" + +msgid "Full Web Server Settings" +msgstr "完全なWebサーバー設定" + +msgid "Full real path to handler for Lua scripts" +msgstr "Lua スクリプトへの絶対パス" + +msgid "General Settings" +msgstr "一般設定" + +msgid "HTTP listeners (address:port)" +msgstr "HTTP 待ち受け(アドレス:ポート)" + +msgid "HTTPS Certificate (DER Encoded)" +msgstr "HTTPS 証明書(DER エンコード)" + +msgid "HTTPS Private Key (DER Encoded)" +msgstr "HTTPS 秘密鍵(DER エンコード)" + +msgid "HTTPS listener (address:port)" +msgstr "HTTPS 待ち受け(アドレス:ポート)" + +msgid "Ignore private IPs on public interface" +msgstr "公開側インターフェースでのプライベートIPを無視する" + +msgid "Index page(s)" +msgstr "インデックス ページ" + +msgid "" +"Interpreter to associate with file endings ('suffix=handler', e.g. '.php=/" +"usr/bin/php-cgi')" +msgstr "" +"ファイル拡張子に関連付けるインタープリタです。('suffix=handler'、例: '.php=/" +"usr/bin/php-cgi')" + +msgid "Length of key in bits" +msgstr "鍵のビット数" + +msgid "Location" +msgstr "場所" + +msgid "Maximum number of connections" +msgstr "最大接続数" + +msgid "Maximum number of script requests" +msgstr "スクリプトの最大リクエスト数" + +msgid "Maximum wait time for Lua, CGI, or ubus execution" +msgstr "LuaやCGI、ubus実行の最大待機時間" + +msgid "Maximum wait time for network activity" +msgstr "ネットワークアクティビティの最大待機時間" + +msgid "Override path for ubus socket" +msgstr "ubus ソケットのパスを上書きする" + +msgid "Path prefix for CGI scripts" +msgstr "CGI スクリプトのパスプレフィクス" + +msgid "" +"Prevent access from private (RFC1918) IPs on an interface if it has an " +"public IP address" +msgstr "" +"グローバル IPアドレスを持つインターフェースでは、プライベート IP (RFC1918) か" +"らのアクセスをブロックします。" + +msgid "Realm for Basic Auth" +msgstr "基本認証の領域名" + +msgid "Redirect all HTTP to HTTPS" +msgstr "全てのHTTPをHTTPSにリダイレクトする" + +msgid "Remove configuration for certificate and key" +msgstr "証明書と鍵の設定を削除する" + +msgid "Remove old certificate and key" +msgstr "古い証明書と鍵を削除する" + +msgid "Server Hostname" +msgstr "サーバー ホスト名" + +msgid "" +"Settings which are either rarely needed or which affect serving the WebUI" +msgstr "まれに必要とされる設定、またはWeb UIに影響する設定です。" + +msgid "State" +msgstr "ステータス" + +msgid "TCP Keepalive" +msgstr "TCP キープアライブ" + +msgid "This permanently deletes the cert, key, and configuration to use same." +msgstr "" + +msgid "Valid for # of Days" +msgstr "有効日数" + +msgid "" +"Virtual URL or CGI script to display on status '404 Not Found'. Must begin " +"with '/'" +msgstr "" + +msgid "Virtual path prefix for Lua scripts" +msgstr "Lua スクリプトへの仮想パスプレフィクス" + +msgid "Virtual path prefix for ubus via JSON-RPC integration" +msgstr "" + +msgid "Will not use HTTP authentication if not present" +msgstr "指定しない場合、HTTP 認証は使用されません。" + +msgid "a.k.a CommonName" +msgstr "共通名" + +msgid "uHTTPd" +msgstr "uHTTPd" + +msgid "uHTTPd Self-signed Certificate Parameters" +msgstr "uHTTPd 自己署名証明書 パラメーター" + +msgid "" +"uHTTPd will generate a new self-signed certificate using the configuration " +"shown below." +msgstr "uHTTPd は、以下に表示した設定で新しい自己署名証明書を生成します。" + +msgid "ubus integration is disabled if not present" +msgstr "" + +#~ msgid "" +#~ "Virtual URL or CGI script to display on status '404 Not Found'. Must " +#~ "begin with '/'" +#~ msgstr "" +#~ "'404 Not Found' ステータスを表示する、仮想URLまたはCGIスクリプトです。'/' " +#~ "から始まる必要があります。" diff --git a/applications/luci-app-uhttpd/po/templates/uhttpd.pot b/applications/luci-app-uhttpd/po/templates/uhttpd.pot new file mode 100644 index 0000000000..5503450e0a --- /dev/null +++ b/applications/luci-app-uhttpd/po/templates/uhttpd.pot @@ -0,0 +1,186 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "" +"(/old/path=/new/path) or (just /old/path which becomes /cgi-prefix/old/path)" +msgstr "" + +msgid "404 Error" +msgstr "" + +msgid "A lightweight single-threaded HTTP(S) server" +msgstr "" + +msgid "Advanced Settings" +msgstr "" + +msgid "Aliases" +msgstr "" + +msgid "Base directory for files to be served" +msgstr "" + +msgid "Bind to specific interface:port (by specifying interface address" +msgstr "" + +msgid "CGI filetype handler" +msgstr "" + +msgid "CGI is disabled if not present." +msgstr "" + +msgid "Config file (e.g. for credentials for Basic Auth)" +msgstr "" + +msgid "Connection reuse" +msgstr "" + +msgid "Country" +msgstr "" + +msgid "Disable JSON-RPC authorization via ubus session API" +msgstr "" + +msgid "Do not follow symlinks outside document root" +msgstr "" + +msgid "Do not generate directory listings." +msgstr "" + +msgid "Document root" +msgstr "" + +msgid "E.g specify with index.html and index.php when using PHP" +msgstr "" + +msgid "Embedded Lua interpreter is disabled if not present." +msgstr "" + +msgid "Enable JSON-RPC Cross-Origin Resource Support" +msgstr "" + +msgid "For settings primarily geared to serving more than the web UI" +msgstr "" + +msgid "Full Web Server Settings" +msgstr "" + +msgid "Full real path to handler for Lua scripts" +msgstr "" + +msgid "General Settings" +msgstr "" + +msgid "HTTP listeners (address:port)" +msgstr "" + +msgid "HTTPS Certificate (DER Encoded)" +msgstr "" + +msgid "HTTPS Private Key (DER Encoded)" +msgstr "" + +msgid "HTTPS listener (address:port)" +msgstr "" + +msgid "Ignore private IPs on public interface" +msgstr "" + +msgid "Index page(s)" +msgstr "" + +msgid "" +"Interpreter to associate with file endings ('suffix=handler', e.g. '.php=/" +"usr/bin/php-cgi')" +msgstr "" + +msgid "Length of key in bits" +msgstr "" + +msgid "Location" +msgstr "" + +msgid "Maximum number of connections" +msgstr "" + +msgid "Maximum number of script requests" +msgstr "" + +msgid "Maximum wait time for Lua, CGI, or ubus execution" +msgstr "" + +msgid "Maximum wait time for network activity" +msgstr "" + +msgid "Override path for ubus socket" +msgstr "" + +msgid "Path prefix for CGI scripts" +msgstr "" + +msgid "" +"Prevent access from private (RFC1918) IPs on an interface if it has an " +"public IP address" +msgstr "" + +msgid "Realm for Basic Auth" +msgstr "" + +msgid "Redirect all HTTP to HTTPS" +msgstr "" + +msgid "Remove configuration for certificate and key" +msgstr "" + +msgid "Remove old certificate and key" +msgstr "" + +msgid "Server Hostname" +msgstr "" + +msgid "" +"Settings which are either rarely needed or which affect serving the WebUI" +msgstr "" + +msgid "State" +msgstr "" + +msgid "TCP Keepalive" +msgstr "" + +msgid "This permanently deletes the cert, key, and configuration to use same." +msgstr "" + +msgid "Valid for # of Days" +msgstr "" + +msgid "" +"Virtual URL or CGI script to display on status '404 Not Found'. Must begin " +"with '/'" +msgstr "" + +msgid "Virtual path prefix for Lua scripts" +msgstr "" + +msgid "Virtual path prefix for ubus via JSON-RPC integration" +msgstr "" + +msgid "Will not use HTTP authentication if not present" +msgstr "" + +msgid "a.k.a CommonName" +msgstr "" + +msgid "uHTTPd" +msgstr "" + +msgid "uHTTPd Self-signed Certificate Parameters" +msgstr "" + +msgid "" +"uHTTPd will generate a new self-signed certificate using the configuration " +"shown below." +msgstr "" + +msgid "ubus integration is disabled if not present" +msgstr "" diff --git a/applications/luci-app-upnp/po/ja/upnp.po b/applications/luci-app-upnp/po/ja/upnp.po index 728befa2bc..f0aff7336a 100644 --- a/applications/luci-app-upnp/po/ja/upnp.po +++ b/applications/luci-app-upnp/po/ja/upnp.po @@ -17,8 +17,8 @@ msgid "" "ACLs specify which external ports may be redirected to which internal " "addresses and ports" msgstr "" -"アクセス制御リスト(ACL) は、どの外部ポートからどの内部アドレス及びポートへ" -"リダイレクトするかを設定します。" +"アクセス制御リスト(ACL) は、どの外部ポートからどの内部アドレス及びポートへリ" +"ダイレクトするかを設定します。" msgid "Action" msgstr "動作" @@ -129,8 +129,8 @@ msgid "" "UPnP allows clients in the local network to automatically configure the " "router." msgstr "" -"UPnPを使用することで、ローカルネットワーク内のクライアントが自動的にルータ" -"を構成することができます。" +"UPnPを使用することで、ローカルネットワーク内のクライアントが自動的にルータを" +"構成することができます。" msgid "UPnP lease file" msgstr "UPnP リースファイル" @@ -148,8 +148,8 @@ msgstr "クライアントへの情報提供のみに使用される、KByte/s #~ "UPNP allows clients in the local network to automatically configure the " #~ "router." #~ msgstr "" -#~ "UPnPを使用することで、ローカルネットワーク内のクライアントが自動的にルー" -#~ "タを構成することができます。" +#~ "UPnPを使用することで、ローカルネットワーク内のクライアントが自動的にルータ" +#~ "を構成することができます。" #~ msgid "enable" #~ msgstr "有効" @@ -158,5 +158,5 @@ msgstr "クライアントへの情報提供のみに使用される、KByte/s #~ "UPNP should only be enabled if absolutely necessary as it can result in " #~ "high security risks for your network." #~ msgstr "" -#~ "UPnPはあなたの使用するネットワークに対して、セキュリティリスクが生じる可" -#~ "能性があるため、必要な場合のみ有効にしてください。" +#~ "UPnPはあなたの使用するネットワークに対して、セキュリティリスクが生じる可能" +#~ "性があるため、必要な場合のみ有効にしてください。" diff --git a/applications/luci-app-wifischedule/luasrc/controller/wifischedule/wifi_schedule.lua b/applications/luci-app-wifischedule/luasrc/controller/wifischedule/wifi_schedule.lua index a33c7aab9a..261cf36d0f 100644 --- a/applications/luci-app-wifischedule/luasrc/controller/wifischedule/wifi_schedule.lua +++ b/applications/luci-app-wifischedule/luasrc/controller/wifischedule/wifi_schedule.lua @@ -12,21 +12,31 @@ -- -- Author: Nils Koenig <openwrt@newk.it> -module("luci.controller.wifischedule.wifi_schedule", package.seeall) +module("luci.controller.wifischedule.wifi_schedule", package.seeall) + +local fs = require "nixio.fs" +local sys = require "luci.sys" +local template = require "luci.template" +local i18n = require "luci.i18n" function index() - entry({"admin", "wifi_schedule"}, firstchild(), "Wifi Schedule", 60).dependent=false - entry({"admin", "wifi_schedule", "tab_from_cbi"}, cbi("wifischedule/wifi_schedule"), "Schedule", 1) - entry({"admin", "wifi_schedule", "wifi_schedule"}, call("wifi_schedule_log"), "View Logfile", 2) - entry({"admin", "wifi_schedule", "cronjob"}, call("view_crontab"), "View Cron Jobs", 3) + if not nixio.fs.access("/etc/config/wifi_schedule") then + return + end + entry({"admin", "services", "wifi_schedule"}, firstchild(), _("Wifi Schedule"), 60).dependent=false + entry({"admin", "services", "wifi_schedule", "tab_from_cbi"}, cbi("wifischedule/wifi_schedule"), _("Schedule"), 1) + entry({"admin", "services", "wifi_schedule", "wifi_schedule"}, call("wifi_schedule_log"), _("View Logfile"), 2) + entry({"admin", "services", "wifi_schedule", "cronjob"}, call("view_crontab"), _("View Cron Jobs"), 3) end function wifi_schedule_log() - local logfile = luci.sys.exec("cat /tmp/log/wifi_schedule.log") - luci.template.render("wifischedule/file_viewer", {title="Wifi Schedule Logfile", content=logfile}) + local logfile = fs.readfile("/tmp/log/wifi_schedule.log") or "" + template.render("wifischedule/file_viewer", + {title = i18n.translate("Wifi Schedule Logfile"), content = logfile}) end function view_crontab() - local crontab = luci.sys.exec("cat /etc/crontabs/root") - luci.template.render("wifischedule/file_viewer", {title="Cron Jobs", content=crontab}) + local crontab = fs.readfile("/etc/crontabs/root") or "" + template.render("wifischedule/file_viewer", + {title = i18n.translate("Cron Jobs"), content = crontab}) end diff --git a/applications/luci-app-wifischedule/luasrc/model/cbi/wifischedule/wifi_schedule.lua b/applications/luci-app-wifischedule/luasrc/model/cbi/wifischedule/wifi_schedule.lua index 2cca476b4f..1d301219a8 100644 --- a/applications/luci-app-wifischedule/luasrc/model/cbi/wifischedule/wifi_schedule.lua +++ b/applications/luci-app-wifischedule/luasrc/model/cbi/wifischedule/wifi_schedule.lua @@ -12,15 +12,11 @@ -- -- Author: Nils Koenig <openwrt@newk.it> -function file_exists(name) - local f=io.open(name,"r") - if f~=nil then io.close(f) return true else return false end -end - +local fs = require "nixio.fs" +local sys = require "luci.sys" function time_validator(self, value, desc) if value ~= nil then - h_str, m_str = string.match(value, "^(%d%d?):(%d%d?)$") h = tonumber(h_str) m = tonumber(m_str) @@ -32,21 +28,21 @@ function time_validator(self, value, desc) m <= 59) then return value end - end - return nil, translate("The value '" .. desc .. "' is invalid") + end + return nil, translatef("The value %s is invalid", desc) end -- ------------------------------------------------------------------------------------------------- -- BEGIN Map -m = Map("wifi_schedule", translate("Wifi Schedule"), translate("Defines a schedule when to turn on and off wifi.")) +m = Map("wifi_schedule", translate("Wifi Schedule"), translate("Defines a schedule when to turn on and off wifi.")) function m.on_commit(self) - luci.sys.exec("/usr/bin/wifi_schedule.sh cron") + sys.exec("/usr/bin/wifi_schedule.sh cron") end -- END Map -- BEGIN Global Section -global_section = m:section(TypedSection, "global", "Global Settings") +global_section = m:section(TypedSection, "global", translate("Global Settings")) global_section.optional = false global_section.rmempty = false global_section.anonymous = true @@ -54,13 +50,13 @@ global_section.anonymous = true -- BEGIN Global Enable Checkbox global_enable = global_section:option(Flag, "enabled", translate("Enable Wifi Schedule")) -global_enable.optional=false; -global_enable.rmempty = false; +global_enable.optional = false +global_enable.rmempty = false function global_enable.validate(self, value, global_section) if value == "1" then - if ( file_exists("/sbin/wifi") and - file_exists("/usr/bin/wifi_schedule.sh") )then + if ( fs.access("/sbin/wifi") and + fs.access("/usr/bin/wifi_schedule.sh") )then return value else return nil, translate("Could not find required /usr/bin/wifi_schedule.sh or /sbin/wifi") @@ -71,39 +67,38 @@ function global_enable.validate(self, value, global_section) end -- END Global Enable Checkbox - -- BEGIN Global Logging Checkbox global_logging = global_section:option(Flag, "logging", translate("Enable logging")) -global_logging.optional=false; -global_logging.rmempty = false; +global_logging.optional = false +global_logging.rmempty = false global_logging.default = 0 -- END Global Enable Checkbox -- BEGIN Global Activate WiFi Button enable_wifi = global_section:option(Button, "enable_wifi", translate("Activate wifi")) function enable_wifi.write() - luci.sys.exec("/usr/bin/wifi_schedule.sh start manual") + sys.exec("/usr/bin/wifi_schedule.sh start manual") end -- END Global Activate Wifi Button -- BEGIN Global Disable WiFi Gracefully Button disable_wifi_gracefully = global_section:option(Button, "disable_wifi_gracefully", translate("Disable wifi gracefully")) function disable_wifi_gracefully.write() - luci.sys.exec("/usr/bin/wifi_schedule.sh stop manual") + sys.exec("/usr/bin/wifi_schedule.sh stop manual") end --- END Global Disable Wifi Gracefully Button +-- END Global Disable Wifi Gracefully Button -- BEGIN Disable WiFi Forced Button disable_wifi_forced = global_section:option(Button, "disable_wifi_forced", translate("Disabled wifi forced")) function disable_wifi_forced.write() - luci.sys.exec("/usr/bin/wifi_schedule.sh forcestop manual") + sys.exec("/usr/bin/wifi_schedule.sh forcestop manual") end -- END Global Disable WiFi Forced Button -- BEGIN Global Unload Modules Checkbox global_unload_modules = global_section:option(Flag, "unload_modules", translate("Unload Modules (experimental; saves more power)")) -global_unload_modules.optional = false; -global_unload_modules.rmempty = false; +global_unload_modules.optional = false +global_unload_modules.rmempty = false global_unload_modules.default = 0 -- END Global Unload Modules Checkbox @@ -111,13 +106,13 @@ global_unload_modules.default = 0 -- BEGIN Modules modules = global_section:option(TextValue, "modules", "") modules:depends("unload_modules", global_unload_modules.enabled); -modules.wrap = "off" -modules.rows = 10 +modules.wrap = "off" +modules.rows = 10 function modules.cfgvalue(self, section) - mod=uci.get("wifi_schedule", section, "modules") + mod = uci.get("wifi_schedule", section, "modules") if mod == nil then - mod="" + mod = "" end return mod:gsub(" ", "\r\n") end @@ -131,45 +126,44 @@ function modules.write(self, section, value) end -- END Modules --- BEGIN Determine Modules +-- BEGIN Determine Modules determine_modules = global_section:option(Button, "determine_modules", translate("Determine Modules Automatically")) determine_modules:depends("unload_modules", global_unload_modules.enabled); function determine_modules.write(self, section) - output = luci.sys.exec("/usr/bin/wifi_schedule.sh getmodules") + output = sys.exec("/usr/bin/wifi_schedule.sh getmodules") modules:write(section, output) end -- END Determine Modules - -- BEGIN Section -d = m:section(TypedSection, "entry", "Schedule events") -d.addremove = true +d = m:section(TypedSection, "entry", translate("Schedule events")) +d.addremove = true --d.anonymous = true -- END Section -- BEGIN Enable Checkbox c = d:option(Flag, "enabled", translate("Enable")) -c.optional=false; c.rmempty = false; +c.optional = false +c.rmempty = false -- END Enable Checkbox - -- BEGIN Day(s) of Week dow = d:option(MultiValue, "daysofweek", translate("Day(s) of Week")) dow.optional = false dow.rmempty = false -dow:value("Monday") -dow:value("Tuesday") -dow:value("Wednesday") -dow:value("Thursday") -dow:value("Friday") -dow:value("Saturday") -dow:value("Sunday") +dow:value("Monday", translate("Monday")) +dow:value("Tuesday", translate("Tuesday")) +dow:value("Wednesday", translate("Wednesday")) +dow:value("Thursday", translate("Thursday")) +dow:value("Friday", translate("Friday")) +dow:value("Saturday", translate("Saturday")) +dow:value("Sunday", translate("Sunday")) -- END Day(s) of Weel -- BEGIN Start Wifi Dropdown starttime = d:option(Value, "starttime", translate("Start WiFi")) -starttime.optional=false; -starttime.rmempty = false; +starttime.optional = false +starttime.rmempty = false starttime:value("00:00") starttime:value("01:00") starttime:value("02:00") @@ -198,14 +192,12 @@ starttime:value("23:00") function starttime.validate(self, value, d) return time_validator(self, value, translate("Start Time")) end - -- END Start Wifi Dropdown - -- BEGIN Stop Wifi Dropdown -stoptime = d:option(Value, "stoptime", translate("Stop WiFi")) -stoptime.optional=false; -stoptime.rmempty = false; +stoptime = d:option(Value, "stoptime", translate("Stop WiFi")) +stoptime.optional = false +stoptime.rmempty = false stoptime:value("00:00") stoptime:value("01:00") stoptime:value("02:00") @@ -236,15 +228,14 @@ function stoptime.validate(self, value, d) end -- END Stop Wifi Dropdown - -- BEGIN Force Wifi Stop Checkbox force_wifi = d:option(Flag, "forcewifidown", translate("Force disabling wifi even if stations associated")) force_wifi.default = false -force_wifi.rmempty = false; +force_wifi.rmempty = false function force_wifi.validate(self, value, d) if value == "0" then - if file_exists("/usr/bin/iwinfo") then + if fs.access("/usr/bin/iwinfo") then return value else return nil, translate("Could not find required programm /usr/bin/iwinfo") @@ -255,5 +246,4 @@ function force_wifi.validate(self, value, d) end -- END Force Wifi Checkbox - return m diff --git a/applications/luci-app-wifischedule/po/ja/wifischedule.po b/applications/luci-app-wifischedule/po/ja/wifischedule.po index 8ece42f1c3..2bf2613fb8 100644 --- a/applications/luci-app-wifischedule/po/ja/wifischedule.po +++ b/applications/luci-app-wifischedule/po/ja/wifischedule.po @@ -1,26 +1,30 @@ msgid "" msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: \n" "POT-Creation-Date: \n" "PO-Revision-Date: \n" +"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n" "Language-Team: \n" +"Language: ja\n" "MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.11\n" -"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n" "Plural-Forms: nplurals=1; plural=0;\n" -"Language: ja\n" msgid "Activate wifi" msgstr "WiFiのアクティブ化" msgid "Could not find required /usr/bin/wifi_schedule.sh or /sbin/wifi" -msgstr "必須の /usr/bin/wifi_schedule.sh または /sbin/wifi が見つかりませんでした。" +msgstr "" +"必須の /usr/bin/wifi_schedule.sh または /sbin/wifi が見つかりませんでした。" msgid "Could not find required programm /usr/bin/iwinfo" msgstr "必須のプログラム /usr/bin/iwinfo が見つかりませんでした。" +msgid "Cron Jobs" +msgstr "Cronジョブ" + msgid "Day(s) of Week" msgstr "曜日" @@ -39,17 +43,32 @@ msgstr "WiFiの強制終了" msgid "Enable" msgstr "有効" -msgid "Enable logging" -msgstr "ログの有効化" - msgid "Enable Wifi Schedule" msgstr "WiFi スケジュールの有効化" +msgid "Enable logging" +msgstr "ログの有効化" + msgid "Force disabling wifi even if stations associated" msgstr "ステーションが関連付けられていてもWiFiを強制終了する" -msgid "Unload Modules (experimental; saves more power)" -msgstr "モジュールのアンロード(実験的、より省電力)" +msgid "Friday" +msgstr "金曜日" + +msgid "Global Settings" +msgstr "全体設定" + +msgid "Monday" +msgstr "月曜日" + +msgid "Saturday" +msgstr "土曜日" + +msgid "Schedule" +msgstr "スケジュール" + +msgid "Schedule events" +msgstr "実行スケジュール" msgid "Start Time" msgstr "開始時刻" @@ -63,5 +82,32 @@ msgstr "停止時刻" msgid "Stop WiFi" msgstr "WiFiの停止" +msgid "Sunday" +msgstr "日曜日" + +msgid "The value %s is invalid" +msgstr "" + +msgid "Thursday" +msgstr "木曜日" + +msgid "Tuesday" +msgstr "火曜日" + +msgid "Unload Modules (experimental; saves more power)" +msgstr "モジュールのアンロード(実験的、より省電力)" + +msgid "View Cron Jobs" +msgstr "Cronジョブの確認" + +msgid "View Logfile" +msgstr "ログファイルの確認" + +msgid "Wednesday" +msgstr "水曜日" + msgid "Wifi Schedule" msgstr "WiFi スケジュール" + +msgid "Wifi Schedule Logfile" +msgstr "WiFiスケジュール ログファイル" diff --git a/applications/luci-app-wifischedule/po/templates/wifischedule.pot b/applications/luci-app-wifischedule/po/templates/wifischedule.pot index 7d059e3fe7..639c432e5e 100644 --- a/applications/luci-app-wifischedule/po/templates/wifischedule.pot +++ b/applications/luci-app-wifischedule/po/templates/wifischedule.pot @@ -10,6 +10,9 @@ msgstr "" msgid "Could not find required programm /usr/bin/iwinfo" msgstr "" +msgid "Cron Jobs" +msgstr "" + msgid "Day(s) of Week" msgstr "" @@ -28,16 +31,31 @@ msgstr "" msgid "Enable" msgstr "" -msgid "Enable logging" +msgid "Enable Wifi Schedule" msgstr "" -msgid "Enable Wifi Schedule" +msgid "Enable logging" msgstr "" msgid "Force disabling wifi even if stations associated" msgstr "" -msgid "Unload Modules (experimental; saves more power)" +msgid "Friday" +msgstr "" + +msgid "Global Settings" +msgstr "" + +msgid "Monday" +msgstr "" + +msgid "Saturday" +msgstr "" + +msgid "Schedule" +msgstr "" + +msgid "Schedule events" msgstr "" msgid "Start Time" @@ -52,5 +70,32 @@ msgstr "" msgid "Stop WiFi" msgstr "" +msgid "Sunday" +msgstr "" + +msgid "The value %s is invalid" +msgstr "" + +msgid "Thursday" +msgstr "" + +msgid "Tuesday" +msgstr "" + +msgid "Unload Modules (experimental; saves more power)" +msgstr "" + +msgid "View Cron Jobs" +msgstr "" + +msgid "View Logfile" +msgstr "" + +msgid "Wednesday" +msgstr "" + msgid "Wifi Schedule" msgstr "" + +msgid "Wifi Schedule Logfile" +msgstr "" diff --git a/applications/luci-app-wifischedule/po/zh-cn/wifischedule.po b/applications/luci-app-wifischedule/po/zh-cn/wifischedule.po new file mode 100644 index 0000000000..ab3a8d0bf3 --- /dev/null +++ b/applications/luci-app-wifischedule/po/zh-cn/wifischedule.po @@ -0,0 +1,101 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + +msgid "Activate wifi" +msgstr "激活 WiFi" + +msgid "Could not find required /usr/bin/wifi_schedule.sh or /sbin/wifi" +msgstr "无法找到必需的 /usr/bin/wifi_schedule.sh 或 /sbin/wifi" + +msgid "Could not find required programm /usr/bin/iwinfo" +msgstr "无法找到必需程序:/usr/bin/iwinfo" + +msgid "Cron Jobs" +msgstr "计划任务" + +msgid "Day(s) of Week" +msgstr "星期" + +msgid "Defines a schedule when to turn on and off wifi." +msgstr "定义自动打开和关闭 WiFi 的计划表" + +msgid "Determine Modules Automatically" +msgstr "自动确定模块" + +msgid "Disable wifi gracefully" +msgstr "正常关闭 WiFi" + +msgid "Disabled wifi forced" +msgstr "强制关闭 WiFi" + +msgid "Enable" +msgstr "启用" + +msgid "Enable Wifi Schedule" +msgstr "启用 WiFi 计划" + +msgid "Enable logging" +msgstr "启用日志" + +msgid "Force disabling wifi even if stations associated" +msgstr "即使有设备连接也强制关闭 WiFi" + +msgid "Friday" +msgstr "星期五" + +msgid "Global Settings" +msgstr "全局设置" + +msgid "Monday" +msgstr "星期一" + +msgid "Saturday" +msgstr "星期六" + +msgid "Schedule" +msgstr "计划表" + +msgid "Schedule events" +msgstr "计划事件" + +msgid "Start Time" +msgstr "启动时间" + +msgid "Start WiFi" +msgstr "启动 WiFi" + +msgid "Stop Time" +msgstr "关闭时间" + +msgid "Stop WiFi" +msgstr "关闭 WiFi" + +msgid "Sunday" +msgstr "星期日" + +msgid "The value %s is invalid" +msgstr "%s 的值无效" + +msgid "Thursday" +msgstr "星期四" + +msgid "Tuesday" +msgstr "星期二" + +msgid "Unload Modules (experimental; saves more power)" +msgstr "卸载模块(实验性的,节省更多电量)" + +msgid "View Cron Jobs" +msgstr "查看计划任务" + +msgid "View Logfile" +msgstr "查看日志文件" + +msgid "Wednesday" +msgstr "星期三" + +msgid "Wifi Schedule" +msgstr "WiFi 计划" + +msgid "Wifi Schedule Logfile" +msgstr "WiFi 计划日志文件" |