From 200faabc152f2005bd59eb69269b7a134ce4264c Mon Sep 17 00:00:00 2001 From: asvow Date: Tue, 30 Jan 2024 00:47:05 +0800 Subject: [PATCH] fix bugs & bump version --- Makefile | 2 +- .../luci-static/resources/view/tailscale/base.js | 6 ++---- po/templates/tailscale.pot | 10 +++------- po/zh_Hans/tailscale.po | 12 ++++-------- po/zh_Hant/tailscale.po | 14 +++++--------- root/etc/init.d/tailscale | 10 +++++----- 6 files changed, 20 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 039ba3b..ccfe51d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ LUCI_TITLE:=LuCI for Tailscale LUCI_DEPENDS:=+tailscale +jsonfilter +ucode LUCI_PKGARCH:=all -PKG_VERSION:=1.0.0 +PKG_VERSION:=1.0.1 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/htdocs/luci-static/resources/view/tailscale/base.js b/htdocs/luci-static/resources/view/tailscale/base.js index c985c9e..dad6713 100644 --- a/htdocs/luci-static/resources/view/tailscale/base.js +++ b/htdocs/luci-static/resources/view/tailscale/base.js @@ -151,7 +151,7 @@ return view.extend({ o.default = o.disabled; o.rmempty = false; - o = s.option(form.Value, 'hostname', _('Hostname'), _("Leave blank to use the device's hostname.")); + o = s.option(form.Value, 'hostname', _('Devicename'), _("Leave blank to use the device's hostname.")); o.default = ''; o.rmempty = true; @@ -171,9 +171,7 @@ return view.extend({ s = m.section(form.NamedSection, 'settings', 'config'); s.title = _('Custom Server Settings'); - s.description = _('Use ') + - 'headscale' + - _(' to deploy a private server.'); + s.description = String.format(_('Use %s to deploy a private server.'), 'headscale'); o = s.option(form.Value, 'loginServer', _('Server address')); o.default = ''; diff --git a/po/templates/tailscale.pot b/po/templates/tailscale.pot index 50dc00e..9f95b36 100644 --- a/po/templates/tailscale.pot +++ b/po/templates/tailscale.pot @@ -92,7 +92,7 @@ msgid "Expose physical network routes onto Tailscale." msgstr "" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:154 -msgid "Hostname" +msgid "Devicename" msgstr "" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:154 @@ -132,18 +132,14 @@ msgid "Custom Server Settings" msgstr "" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:174 -msgid "Use " +msgid "Use %s to deploy a private server." msgstr "" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:176 -msgid " to deploy a private server." -msgstr "" - -#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:178 msgid "Server address" msgstr "" -#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:182 +#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:180 msgid "Auth Key" msgstr "" diff --git a/po/zh_Hans/tailscale.po b/po/zh_Hans/tailscale.po index 401df53..1ab9361 100644 --- a/po/zh_Hans/tailscale.po +++ b/po/zh_Hans/tailscale.po @@ -98,7 +98,7 @@ msgid "Expose physical network routes onto Tailscale." msgstr "将物理网络路由暴露到Tailscale上。" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:154 -msgid "Hostname" +msgid "Devicename" msgstr "设备名称" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:154 @@ -138,18 +138,14 @@ msgid "Custom Server Settings" msgstr "自定义服务器" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:174 -msgid "Use " -msgstr "使用" +msgid "Use %s to deploy a private server." +msgstr "使用 %s 部署私有服务器" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:176 -msgid " to deploy a private server." -msgstr "部署私有服务器" - -#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:178 msgid "Server address" msgstr "服务器地址" -#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:182 +#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:180 msgid "Auth Key" msgstr "令牌" diff --git a/po/zh_Hant/tailscale.po b/po/zh_Hant/tailscale.po index dca616d..b2bcc66 100644 --- a/po/zh_Hant/tailscale.po +++ b/po/zh_Hant/tailscale.po @@ -18,7 +18,7 @@ msgstr "未運行" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:64 msgid "Needs Login" -msgstr "未登录" +msgstr "未登錄" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:67 msgid "Logout and Unbind" @@ -98,7 +98,7 @@ msgid "Expose physical network routes onto Tailscale." msgstr "將物理網絡路由暴露到Tailscale上。" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:154 -msgid "Hostname" +msgid "Devicename" msgstr "設備名稱" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:154 @@ -138,18 +138,14 @@ msgid "Custom Server Settings" msgstr "自定義服務器" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:174 -msgid "Use " -msgstr "使用" +msgid "Use %s to deploy a private server." +msgstr "使用 %s 部署私有服務器" #: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:176 -msgid " to deploy a private server." -msgstr "部署私有服務器" - -#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:178 msgid "Server address" msgstr "服務器地址" -#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:182 +#: applications/luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/base.js:180 msgid "Auth Key" msgstr "令牌" diff --git a/root/etc/init.d/tailscale b/root/etc/init.d/tailscale index 907be38..3322e0d 100755 --- a/root/etc/init.d/tailscale +++ b/root/etc/init.d/tailscale @@ -36,11 +36,11 @@ custom_instance() { config_get_bool std_out $cfg 'log_stdout' config_get_bool std_err $cfg 'log_stderr' - [ -n "$acceptRoutes" ] && ARGS="$ARGS --accept-routes true" - [ -n "$hostname" ] && ARGS="$ARGS --hostname $hostname" - [ -n "$advertiseRoutes" ] && ARGS="$ARGS --advertise-routes $advertiseRoutes" - [ -n "$loginServer" ] && ARGS="$ARGS --login-server $loginServer" - [ -n "$authkey" ] && ARGS="$ARGS --authkey $authkey" + [ "$acceptRoutes" = "1" ] && ARGS="$ARGS --accept-routes=true" + [ -n "$hostname" ] && ARGS="$ARGS --hostname=$hostname" + [ -n "$advertiseRoutes" ] && ARGS="$ARGS --advertise-routes=$advertiseRoutes" + [ -n "$loginServer" ] && ARGS="$ARGS --login-server=$loginServer" + [ -n "$authkey" ] && ARGS="$ARGS --authkey=$authkey" procd_open_instance procd_set_param command $PROG $ARGS