From 3d1bc78da9adc0a368ef4d5b27af8f73fecc477b Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Sat, 2 May 2020 15:46:47 +0000 Subject: [PATCH] luci-app-vpn-policy-routing: bugfix: remove escaped double-quotes from translateable resources Signed-off-by: Stan Grishin --- .../luci-app-vpn-policy-routing/Makefile | 2 +- .../luasrc/controller/vpn-policy-routing.lua | 5 ++++- .../luasrc/model/cbi/vpn-policy-routing.lua | 12 +++++------ .../vpn-policy-routing/status-gateways.htm | 4 ++-- .../po/templates/vpn-policy-routing.pot | 21 ++++++++----------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/applications/luci-app-vpn-policy-routing/Makefile b/applications/luci-app-vpn-policy-routing/Makefile index 2e4bdb5af..7b1b2f692 100644 --- a/applications/luci-app-vpn-policy-routing/Makefile +++ b/applications/luci-app-vpn-policy-routing/Makefile @@ -10,7 +10,7 @@ LUCI_TITLE:=VPN Policy-Based Routing Service Web UI LUCI_DESCRIPTION:=Provides Web UI for vpn-policy-routing service. LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +vpn-policy-routing LUCI_PKGARCH:=all -PKG_RELEASE:=71 +PKG_RELEASE:=72 include ../../luci.mk diff --git a/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua b/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua index f4af659aa..d8393439c 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua +++ b/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua @@ -1,7 +1,10 @@ module("luci.controller.vpn-policy-routing", package.seeall) function index() if nixio.fs.access("/etc/config/vpn-policy-routing") then - entry({"admin", "vpn"}, firstchild(), _("VPN"), 60).dependent=false + local e = entry({"admin", "vpn"}, firstchild(), _("VPN"), 60) + e.dependent = false + e.acl_depends = { "luci-app-vpn-policy-routing" } + entry({"admin", "vpn", "vpn-policy-routing"}, cbi("vpn-policy-routing"), _("VPN Policy Routing")) entry({"admin", "vpn", "vpn-policy-routing", "action"}, call("vpn_policy_routing_action"), nil).leaf = true end diff --git a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua index 3846a0dcb..1004f8275 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua +++ b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua @@ -156,13 +156,13 @@ verb:value("2", translate("Verbose output")) verb.default = 2 se = config:taboption("basic", ListValue, "strict_enforcement", translate("Strict enforcement"), - translatef("See the README for details.", readmeURL .. "#strict-enforcement")) + translatef("See the %sREADME%s for details.", "", "")) se:value("0", translate("Do not enforce policies when their gateway is down")) se:value("1", translate("Strictly enforce policies when their gateway is down")) se.default = 1 dest_ipset = config:taboption("basic", ListValue, "dest_ipset", translate("The ipset option for remote policies"), - translatef("Please check the README before changing this option.", readmeURL .. "#service-configuration-settings")) + translatef("Please check the %sREADME%s before changing this option.", "", "")) dest_ipset:value("", translate("Disabled")) dest_ipset:value("ipset", translate("Use ipset command")) dest_ipset:value("dnsmasq.ipset", translate("Use DNSMASQ ipset")) @@ -170,7 +170,7 @@ dest_ipset.default = "" dest_ipset.rmempty = true src_ipset = config:taboption("basic", ListValue, "src_ipset", translate("The ipset option for local policies"), - translatef("Please check the README before changing this option.", readmeURL .. "#service-configuration-settings")) + translatef("Please check the %sREADME%s before changing this option.", "", "")) src_ipset:value("0", translate("Disabled")) src_ipset:value("1", translate("Use ipset command")) @@ -180,7 +180,7 @@ ipv6:value("1", translate("Enabled")) -- Advanced Options config:tab("advanced", translate("Advanced Configuration"), - translatef("%sWARNING:%s Please make sure to check the README before changing anything in this section! Change any of the settings below with extreme caution!%s" , "
    ", "", readmeURL .. "#service-configuration-settings", "

")) + translatef("%sWARNING:%s Please make sure to check the %sREADME%s before changing anything in this section! Change any of the settings below with extreme caution!%s" , "
    ", "", "", "", "

")) supportedIface = config:taboption("advanced", DynamicList, "supported_interface", translate("Supported Interfaces"), translate("Allows to specify the list of interface names (in lower case) to be explicitly supported by the service. Can be useful if your OpenVPN tunnels have dev option other than tun* or tap*.")) supportedIface.optional = false @@ -344,7 +344,7 @@ uci:foreach("network", "interface", function(s) end) dscp = m:section(NamedSection, "config", "vpn-policy-routing", translate("DSCP Tagging"), - translatef("Set DSCP tags (in range between 1 and 63) for specific interfaces. See the README for details.", readmeURL .. "#dscp-tag-based-policies")) + translatef("Set DSCP tags (in range between 1 and 63) for specific interfaces. See the %sREADME%s for details.", "", "")) uci:foreach("network", "interface", function(s) local name=s['.name'] if is_supported_interface(s) then @@ -356,7 +356,7 @@ end) -- Includes inc = m:section(TypedSection, "include", translate("Custom User File Includes"), - translatef("Run the following user files after setting up but before restarting DNSMASQ. See the README for details.", readmeURL .. "#custom-user-files")) + translatef("Run the following user files after setting up but before restarting DNSMASQ. See the %sREADME%s for details.", "", "")) inc.template = "cbi/tblsection" inc.sortable = true inc.anonymous = true diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm index 062d4bbdf..710587ad8 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm +++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm @@ -11,8 +11,8 @@ This is free software, licensed under the Apache License, Version 2.0
-<%- local readmeURL = "https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md#a-word-about-default-routing" -%> -<%=translatef("Checkmark represents the default gateway. See the README for details.", readmeURL)%> +<%- local readmeURL = "https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md" -%> +<%=translatef("Checkmark represents the default gateway. See the %sREADME%s for details.", "", "")%>
<%+cbi/valuefooter%> \ No newline at end of file diff --git a/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot b/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot index 9cb2f75a6..499597844 100644 --- a/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot +++ b/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot @@ -15,9 +15,9 @@ msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:183 msgid "" -"%sWARNING:%s Please make sure to check the README before changing anything in this section! Change any of the " -"settings below with extreme caution!%s" +"%sWARNING:%s Please make sure to check the %sREADME%s before changing " +"anything in this section! Change any of the settings below with extreme " +"caution!%s" msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:200 @@ -70,8 +70,7 @@ msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm:15 msgid "" -"Checkmark represents the default gateway. See the README for details." +"Checkmark represents the default gateway. See the %sREADME%s for details." msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:275 @@ -216,9 +215,7 @@ msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:165 #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:173 -msgid "" -"Please check the README before changing " -"this option." +msgid "Please check the %sREADME%s before changing this option." msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:258 @@ -244,7 +241,7 @@ msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:359 msgid "" "Run the following user files after setting up but before restarting DNSMASQ. " -"See the README for details." +"See the %sREADME%s for details." msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:42 @@ -252,7 +249,7 @@ msgid "Running" msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:159 -msgid "See the README for details." +msgid "See the %sREADME%s for details." msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:195 @@ -287,7 +284,7 @@ msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:347 msgid "" "Set DSCP tags (in range between 1 and 63) for specific interfaces. See the " -"README for details." +"%sREADME%s for details." msgstr "" #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:247 @@ -407,7 +404,7 @@ msgstr "" msgid "VPN" msgstr "" -#: applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua:5 +#: applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua:8 msgid "VPN Policy Routing" msgstr "" -- 2.25.1