Merge pull request #2131 from tano-systems/firewall-fix-russian-translation
authorHannu Nyman <hannu.nyman@iki.fi>
Fri, 7 Sep 2018 13:35:34 +0000 (16:35 +0300)
committerGitHub <noreply@github.com>
Fri, 7 Sep 2018 13:35:34 +0000 (16:35 +0300)
luci-app-firewall: fix and update Russian translation

applications/luci-app-https_dns_proxy/Makefile [new file with mode: 0644]
applications/luci-app-https_dns_proxy/luasrc/controller/https_dns_proxy.lua [new file with mode: 0644]
applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua [new file with mode: 0644]
applications/luci-app-https_dns_proxy/po/templates/https_dns_proxy.pot [new file with mode: 0644]
applications/luci-app-https_dns_proxy/root/etc/uci-defaults/40_luci-https_dns_proxy [new file with mode: 0644]
modules/luci-base/po/ru/base.po

diff --git a/applications/luci-app-https_dns_proxy/Makefile b/applications/luci-app-https_dns_proxy/Makefile
new file mode 100644 (file)
index 0000000..2ae2b80
--- /dev/null
@@ -0,0 +1,17 @@
+# Copyright 2017-2018 Stan Grishin (stangri@melmac.net)
+# This is free software, licensed under the GNU General Public License v3.
+
+include $(TOPDIR)/rules.mk
+
+PKG_LICENSE:=GPL-3.0+
+PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
+
+LUCI_TITLE:=HTTPS DNS Proxy Web UI
+LUCI_DESCRIPTION:=Provides Web UI for HTTPS DNS Proxy
+LUCI_DEPENDS:=+luci-mod-admin-full +https_dns_proxy
+LUCI_PKGARCH:=all
+PKG_RELEASE:=2
+
+include ../../luci.mk
+
+# call BuildPackage - OpenWrt buildroot signature
diff --git a/applications/luci-app-https_dns_proxy/luasrc/controller/https_dns_proxy.lua b/applications/luci-app-https_dns_proxy/luasrc/controller/https_dns_proxy.lua
new file mode 100644 (file)
index 0000000..e1fd8fc
--- /dev/null
@@ -0,0 +1,7 @@
+module("luci.controller.https_dns_proxy", package.seeall)
+function index()
+       if not nixio.fs.access("/etc/config/https_dns_proxy") then
+               return
+       end
+       entry({"admin", "services", "https_dns_proxy"}, cbi("https_dns_proxy"), _("HTTPS DNS Proxy"))
+end
diff --git a/applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua b/applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua
new file mode 100644 (file)
index 0000000..61511a4
--- /dev/null
@@ -0,0 +1,53 @@
+local uci = require("luci.model.uci").cursor()
+
+m = Map("https_dns_proxy", translate("HTTPS DNS Proxy Settings"))
+m.template="cbi/map"
+
+s3 = m:section(TypedSection, "https_dns_proxy", translate("Instances"))
+s3.template = "cbi/tblsection"
+s3.sortable  = false
+s3.anonymous = true
+s3.addremove = true
+
+prov = s3:option(ListValue, "url_prefix", translate("Provider"))
+prov:value("https://cloudflare-dns.com/dns-query?ct=application/dns-json&","Cloudflare")
+prov:value("https://dns.google.com/resolve?","Google")
+prov.write = function(self, section, value)
+  if value and value:match("cloudflare") then
+    uci:set("https_dns_proxy", section, "bootstrap_dns", "1.1.1.1,1.0.0.1")
+    uci:set("https_dns_proxy", section, "url_prefix", "https://cloudflare-dns.com/dns-query?ct=application/dns-json&")
+  else
+    uci:set("https_dns_proxy", section, "bootstrap_dns", "8.8.8.8,8.8.4.4")
+    uci:set("https_dns_proxy", section, "url_prefix", "https://dns.google.com/resolve?")
+  end
+  uci:set("https_dns_proxy", section, "user", "nobody")
+  uci:set("https_dns_proxy", section, "group", "nogroup")
+  uci:save("https_dns_proxy")
+end
+
+la = s3:option(Value, "listen_addr", translate("Listen address"))
+la.value   = "127.0.0.1"
+la.rmempty = true
+
+lp = s3:option(Value, "listen_port", translate("Listen port"))
+lp.datatype    = "port"
+lp.placeholder = "5053"
+lp.rmempty     = true
+
+-- user = s3:option(Value, "user", translate("User name"))
+-- user.placeholder = "nobody"
+-- user.rmempty = true
+
+-- group = s3:option(Value, "group", translate("Group name"))
+-- group.placeholder = "nogroup"
+-- group.rmempty = true
+
+sa = s3:option(Value, "subnet_addr", translate("Subnet address"))
+sa.datatype = "ip4prefix"
+sa.rmempty  = true
+
+ps = s3:option(Value, "proxy_server", translate("Proxy server"))
+-- ps.datatype = "or(ipaddr,hostname)"
+ps.rmempty = true
+
+return m
diff --git a/applications/luci-app-https_dns_proxy/po/templates/https_dns_proxy.pot b/applications/luci-app-https_dns_proxy/po/templates/https_dns_proxy.pot
new file mode 100644 (file)
index 0000000..1b0b66a
--- /dev/null
@@ -0,0 +1,2 @@
+Set up git to auto-update pot-file:
+echo '../i18n-scan.pl luci-app-template/ > luci-app-template/po/templates/template.pot; git add .' >> ../.git/hooks/pre-commit
diff --git a/applications/luci-app-https_dns_proxy/root/etc/uci-defaults/40_luci-https_dns_proxy b/applications/luci-app-https_dns_proxy/root/etc/uci-defaults/40_luci-https_dns_proxy
new file mode 100644 (file)
index 0000000..7800af7
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+uci -q batch <<-EOF >/dev/null
+       delete ucitrack.@https_dns_proxy[-1]
+       add ucitrack https_dns_proxy
+       set ucitrack.@template[-1].init=https_dns_proxy
+       commit ucitrack
+EOF
+
+rm -f /tmp/luci-indexcache
+exit 0
index bc07f76085a459d595bbb09029dc8b629ebbbf87..4fa5940c4b181d9254586501098f06105030c91c 100644 (file)
@@ -3,7 +3,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Project-Id-Version: LuCI: base\n"
 "POT-Creation-Date: 2010-05-09 01:01+0300\n"
-"PO-Revision-Date: 2018-09-01 13:33+0300\n"
+"PO-Revision-Date: 2018-09-05 21:48+0300\n"
 "Language-Team: http://cyber-place.ru\n"
 "MIME-Version: 1.0\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -1738,7 +1738,7 @@ msgid "Initscript"
 msgstr "Скрипт инициализации"
 
 msgid "Initscripts"
-msgstr "Скрипты инциализации"
+msgstr "Скрипты инициализации"
 
 msgid "Install"
 msgstr "Установить"
@@ -3246,7 +3246,7 @@ msgid "Starting configuration apply…"
 msgstr "Применение конфигурации..."
 
 msgid "Starting wireless scan..."
-msgstr "Начато сканирования беспроводных сетей..."
+msgstr "Начато сканирование беспроводных сетей..."
 
 msgid "Startup"
 msgstr "Загрузка"