From 91dbacc6ac832583d7213feab279b2bc213fcf4e 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/i18n/nps.zh-cn.lmo | Bin 296 -> 0 bytes .../luci-app-nps/luasrc/i18n/nps.zh_CN.po | 28 ----------------- .../luci-app-nps/luasrc/model/cbi/nps.lua | 2 -- .../luasrc/view/nps/nps_status.htm | 4 +-- package/lean/luci-app-nps/po/zh-cn/nps.po | 29 ++++++++++++++++++ package/lean/luci-app-nps/root/etc/init.d/nps | 2 +- 7 files changed, 33 insertions(+), 36 deletions(-) delete mode 100644 package/lean/luci-app-nps/luasrc/i18n/nps.zh-cn.lmo delete mode 100644 package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po create mode 100644 package/lean/luci-app-nps/po/zh-cn/nps.po diff --git a/package/lean/luci-app-nps/Makefile b/package/lean/luci-app-nps/Makefile index b677bcdee..6f3ec99fc 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/i18n/nps.zh-cn.lmo b/package/lean/luci-app-nps/luasrc/i18n/nps.zh-cn.lmo deleted file mode 100644 index 940bd4e7dc167aaadd5c74bdafca9a22f93a1043..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmeY(D1O@3`h4%i=PUQWZ0KirvUmUUDJ!1#bwA&;^2weBFZNAlfQfZ2c)Gp~CWfp6 zXu#8TJKyi=c?wjrfAzDijW65#U+i7;w148uhWSr-EdxqD*)!|qqPb6(OnbJi<3+=C zh2(-#g%?{}p6!~zzyQ()Gg%?8AX(wbjy@n=tng%K_si*9p3iD|*)Z$L{)KRRfQCJr z)A?*_$IBU;o~>O3wQ$kuXWh%5b*y5DQ~%Fc{KjcD0|SEv5PLP)1bzNmvBMb1ZUJKd v*7vU!_c-o-2V@HXvC!qelI|-T0tJC=5a7R_zV}Y diff --git a/package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po b/package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po deleted file mode 100644 index 8910c020c..000000000 --- a/package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po +++ /dev/null @@ -1,28 +0,0 @@ -# zh_CN translation for npc. -# Copyright (C) 2015 Yoyodyne, Inc. (msgids) -# This file is distributed under the same license as the gettext package. -# -msgid "" -msgstr "" -"PO-Revision-Date: 2015-09-01 09:53中国标准时间\n" -"Last-Translator: Ardentwheel \n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - - -msgid "Nps Setting" -msgstr "Nps内网穿透" - -msgid "Enable Compression" -msgstr "使用压缩传输" - -msgid "Enable Encryption" -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 "Encrypted the communication between Npc and Nps, will effectively prevent the traffic intercepted." -msgstr "加密传输 npc 与 nps 之间的通信内容,会有效防止流量被拦截" \ No newline at end of file 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 ea7a4e0ec..829e1bea3 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 5952344bb..aef743b9c 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-cn/nps.po b/package/lean/luci-app-nps/po/zh-cn/nps.po new file mode 100644 index 000000000..4fb9ad411 --- /dev/null +++ b/package/lean/luci-app-nps/po/zh-cn/nps.po @@ -0,0 +1,29 @@ +msgid "Nps Setting" +msgstr "Nps 内网穿透" + +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。" + +msgid "Must an IPv4 address" +msgstr "必须是 IPv4 地址" + +msgid "vkey" +msgstr "密钥(vkey)" + +msgid "Enable Compression" +msgstr "使用压缩传输" + +msgid "Enable Encryption" +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 "Encrypted the communication between Npc and Nps, will effectively prevent the traffic intercepted." +msgstr "加密传输 npc 与 nps 之间的通信内容,会有效防止流量被拦截。" + +msgid "Nps is running." +msgstr "Nps 运行中" + +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 525d06935..3ea722b61 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() {