From 4ed76dfbdf343c9696d29eff2bbaba31d5116de3 Mon Sep 17 00:00:00 2001 From: Xiaok Date: Tue, 3 Mar 2020 21:30:24 +0800 Subject: [PATCH] luci-app-nps: Optimize translations for zh-cn (#3507) * luci-app-nps: Adjust translations for zh-cn * luci-app-nps: Improve log file path * luci-app-nps: Bump release version to v4 --- package/lean/luci-app-nps/Makefile | 4 +- .../luci-app-nps/luasrc/model/cbi/nps.lua | 2 - .../luasrc/view/nps/nps_status.htm | 4 +- package/lean/luci-app-nps/po/zh_Hans/nps.po | 104 +++--------------- package/lean/luci-app-nps/root/etc/init.d/nps | 2 +- 5 files changed, 20 insertions(+), 96 deletions(-) diff --git a/package/lean/luci-app-nps/Makefile b/package/lean/luci-app-nps/Makefile index b677bcdeed..6f3ec99fc8 100644 --- a/package/lean/luci-app-nps/Makefile +++ b/package/lean/luci-app-nps/Makefile @@ -10,10 +10,8 @@ LUCI_TITLE:=LuCI for Nps LUCI_DEPENDS:=+wget +npc LUCI_PKGARCH:=all PKG_VERSION:=1.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature - - diff --git a/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua b/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua index ea7a4e0ec2..829e1bea3e 100755 --- a/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua +++ b/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua @@ -43,5 +43,3 @@ log_level:value(7,"Debug") log_level.default="3" return m - - diff --git a/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm b/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm index 5952344bb7..aef743b9cf 100755 --- a/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm +++ b/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm @@ -4,10 +4,10 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[nps]], [[status]])%>', null, var tb = document.getElementById('nps_status'); if (data && tb) { if (data.running) { - var links = 'nps <%:RUNNING%>'; + var links = "Nps <%:RUNNING%>"; tb.innerHTML = links; } else { - tb.innerHTML = 'nps <%:NOT RUNNING%>'; + tb.innerHTML = "Nps <%:NOT RUNNING%>"; } } } diff --git a/package/lean/luci-app-nps/po/zh_Hans/nps.po b/package/lean/luci-app-nps/po/zh_Hans/nps.po index 84fbbf7e9a..4fb9ad411e 100644 --- a/package/lean/luci-app-nps/po/zh_Hans/nps.po +++ b/package/lean/luci-app-nps/po/zh_Hans/nps.po @@ -1,101 +1,29 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: \n" -"Last-Translator: ElonH \n" -"Language-Team: none\n" -"Language: zh-Hans\n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"X-Generator: Poedit 2.0.6\n" -"X-Poedit-Bookmarks: -1,14,-1,-1,-1,-1,-1,-1,-1,-1\n" +msgid "Nps Setting" +msgstr "Nps 内网穿透" -#: luasrc/model/cbi/nps.lua:11 -msgid "Basic Setting" -msgstr "基本设置" +msgid "Nps is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet." +msgstr "Nps 是一种快速反向代理,可帮助您将 NAT 或防火墙后面的本地服务器公开到 Internet。" -#: luasrc/view/nps/nps_status.htm:20 -msgid "Collecting data..." -msgstr "获取数据中..." +msgid "Must an IPv4 address" +msgstr "必须是 IPv4 地址" -#: luasrc/model/cbi/nps.lua:12 -msgid "Enable" -msgstr "启用" +msgid "vkey" +msgstr "密钥(vkey)" -#: luasrc/model/cbi/nps.lua:31 msgid "Enable Compression" msgstr "使用压缩传输" -#: luasrc/model/cbi/nps.lua:34 msgid "Enable Encryption" msgstr "使用加密传输" -#: luasrc/model/cbi/nps.lua:34 -msgid "" -"Encrypted the communication between Npc and Nps, will effectively prevent " -"the traffic intercepted." +msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources." +msgstr "压缩传输内容,加快流量转发速度,会额外消耗 CPU 资源。" + +msgid "Encrypted the communication between Npc and Nps, will effectively prevent the traffic intercepted." msgstr "加密传输 npc 与 nps 之间的通信内容,会有效防止流量被拦截。" -#: luasrc/model/cbi/nps.lua:26 -msgid "KCP Protocol" -msgstr "KCP 协议" +msgid "Nps is running." +msgstr "Nps 运行中" -#: luasrc/model/cbi/nps.lua:37 -msgid "Log Level" -msgstr "日志等级" - -#: luasrc/model/cbi/nps.lua:14 -msgid "Must an IPv4 address" -msgstr "必须是一个 IPv4 地址" - -#: luasrc/view/nps/nps_status.htm:10 -msgid "NOT RUNNING" -msgstr "未运行" - -#: luasrc/controller/nps.lua:7 luasrc/model/cbi/nps.lua:2 -msgid "Nps Setting" -msgstr "Nps内网穿透" - -#: luasrc/model/cbi/nps.lua:3 -msgid "" -"Nps is a fast reverse proxy to help you expose a local server behind a NAT " -"or firewall to the internet." -msgstr "" -"Nps是一种快速反向代理,可帮助您将NAT或防火墙后面的本地服务器公开到Internet。" - -#: luasrc/model/cbi/nps.lua:18 -msgid "Port" -msgstr "端口" - -#: luasrc/model/cbi/nps.lua:23 -msgid "Protocol Type" -msgstr "协议类型" - -#: luasrc/view/nps/nps_status.htm:7 -msgid "RUNNING" -msgstr "运行中" - -#: luasrc/model/cbi/nps.lua:14 -msgid "Server" -msgstr "服务器" - -#: luasrc/model/cbi/nps.lua:25 -msgid "TCP Protocol" -msgstr "TCP 协议" - -#: luasrc/model/cbi/nps.lua:31 -msgid "" -"The contents will be compressed to speed up the traffic forwarding speed, " -"but this will consume some additional cpu resources." -msgstr "内容将被压缩以加快流量转发速度,但这将消耗额外的cpu资源。" - -#: luasrc/model/cbi/nps.lua:27 -msgid "vkey" -msgstr "" - -#~ msgid "" -#~ "The contents will be compressed to speed up the traffic forwarding speed, " -#~ "but this will consume some additional cpu resources" -#~ msgstr "压缩传输内容,加快流量转发速度,会额外消耗 cpu 资源" +msgid "Nps is not running." +msgstr "Nps 未运行" \ No newline at end of file diff --git a/package/lean/luci-app-nps/root/etc/init.d/nps b/package/lean/luci-app-nps/root/etc/init.d/nps index 525d06935f..3ea722b618 100755 --- a/package/lean/luci-app-nps/root/etc/init.d/nps +++ b/package/lean/luci-app-nps/root/etc/init.d/nps @@ -4,7 +4,7 @@ START=50 USE_PROCD=1 -LOGFILE="/var/etc/nps.log" +LOGFILE="/tmp/nps.log" tmpconf="/tmp/etc/nps.conf" nps_header() {