From: Hannu Nyman Date: Wed, 10 Jan 2018 21:45:50 +0000 (+0200) Subject: Merge pull request #1524 from dibdot/travelmate X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=8b39d9a76b6efcf618fe3ca527ca3e593deacaf0;hp=2b200cfa792ab159247243dc2d7e961c10cb1a4d Merge pull request #1524 from dibdot/travelmate luci-app-travelmate: sync with travelmate 1.0.2 --- diff --git a/applications/luci-app-adblock/luasrc/controller/adblock.lua b/applications/luci-app-adblock/luasrc/controller/adblock.lua index b74858400..0cfbb5f7f 100644 --- a/applications/luci-app-adblock/luasrc/controller/adblock.lua +++ b/applications/luci-app-adblock/luasrc/controller/adblock.lua @@ -1,4 +1,4 @@ --- Copyright 2017 Dirk Brenken (dev@brenken.org) +-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 module("luci.controller.adblock", package.seeall) @@ -27,9 +27,9 @@ function logread() local logfile if nixio.fs.access("/var/log/messages") then - logfile = util.trim(util.exec("cat /var/log/messages | grep 'adblock'")) + logfile = util.trim(util.exec("cat /var/log/messages | grep -F 'adblock-'")) else - logfile = util.trim(util.exec("logread -e 'adblock'")) + logfile = util.trim(util.exec("logread -e 'adblock-'")) end templ.render("adblock/logread", {title = i18n.translate("Adblock Logfile"), content = logfile}) end diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua index 4bb404c25..476d8ece6 100644 --- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua +++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua @@ -1,4 +1,4 @@ --- Copyright 2017 Dirk Brenken (dev@brenken.org) +-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 local fs = require("nixio.fs") @@ -74,34 +74,45 @@ end o2 = s:option(ListValue, "adb_dns", translate("DNS Backend (DNS Directory)"), translate("List of supported DNS backends with their default list export directory.
") .. translate("To overwrite the default path use the 'DNS Directory' option in the extra section below.")) -o2:value("dnsmasq", "dnsmasq (/tmp/dnsmasq.d)") +o2:value("dnsmasq", "dnsmasq (/tmp)") o2:value("unbound", "unbound (/var/lib/unbound)") o2:value("named", "named (/var/lib/bind)") o2:value("kresd", "kresd (/etc/kresd)") o2:value("dnscrypt-proxy","dnscrypt-proxy (/tmp)") +o2.default = "dnsmasq (/tmp)" o2.rmempty = false -o3 = s:option(ListValue, "adb_trigger", translate("Startup Trigger"), +o3 = s:option(ListValue, "adb_fetchutil", translate("Download Utility"), +translate("List of supported and fully pre-configured download utilities.")) +o3:value("uclient-fetch") +o3:value("wget") +o3:value("curl") +o3:value("aria2c") +o3:value("wget-nossl", "wget-nossl (noSSL)") +o3:value("busybox", "wget-busybox (noSSL)") +o3.default = "uclient-fetch" +o3.rmempty = false + +o4 = s:option(ListValue, "adb_trigger", translate("Startup Trigger"), translate("List of available network interfaces. Usually the startup will be triggered by the 'wan' interface.
") .. translate("Choose 'none' to disable automatic startups, 'timed' to use a classic timeout (default 30 sec.) or select another trigger interface.")) -o3:value("none") -o3:value("timed") +o4:value("none") +o4:value("timed") if dump then local i, v for i, v in ipairs(dump.interface) do if v.interface ~= "loopback" then - o3:value(v.interface) + o4:value(v.interface) end end end -o3.rmempty = false +o4.rmempty = false -- Runtime information -ds = s:option(DummyValue, "", translate("Runtime Information")) -ds.template = "cbi/nullsection" +ds = m:section(NamedSection, "global", "adblock", translate("Runtime Information")) -dv1 = s:option(DummyValue, "", translate("Adblock Status")) +dv1 = ds:option(DummyValue, "", translate("Adblock Status")) dv1.template = "adblock/runtime" if parse == nil then dv1.value = translate("n/a") @@ -112,12 +123,14 @@ else dv1.value = translate("disabled") elseif status == "paused" then dv1.value = translate("paused") + elseif status == "running" then + dv1.value = translate("running") else dv1.value = translate("enabled") end end -dv2 = s:option(DummyValue, "", translate("Adblock Version")) +dv2 = ds:option(DummyValue, "", translate("Adblock Version")) dv2.template = "adblock/runtime" if parse == nil then dv2.value = translate("n/a") @@ -125,8 +138,8 @@ else dv2.value = version end -dv3 = s:option(DummyValue, "", translate("Download Utility (SSL Library)"), - translate("For SSL protected blocklist sources you need a suitable SSL library, e.g. 'libustream-ssl' or the wget 'built-in'.")) +dv3 = ds:option(DummyValue, "", translate("Download Utility (SSL Library)"), + translate("For SSL protected blocklist sources you need a suitable SSL library, e.g. 'libustream-ssl' or 'built-in'.")) dv3.template = "adblock/runtime" if parse == nil then dv3.value = translate("n/a") @@ -134,7 +147,7 @@ else dv3.value = fetch end -dv4 = s:option(DummyValue, "", translate("DNS Backend (DNS Directory)")) +dv4 = ds:option(DummyValue, "", translate("DNS Backend (DNS Directory)")) dv4.template = "adblock/runtime" if parse == nil then dv4.value = translate("n/a") @@ -142,7 +155,7 @@ else dv4.value = backend end -dv5 = s:option(DummyValue, "", translate("Overall Domains")) +dv5 = ds:option(DummyValue, "", translate("Overall Domains")) dv5.template = "adblock/runtime" if parse == nil then dv5.value = translate("n/a") @@ -150,7 +163,7 @@ else dv5.value = domains end -dv6 = s:option(DummyValue, "", translate("Last Run")) +dv6 = ds:option(DummyValue, "", translate("Last Run")) dv6.template = "adblock/runtime" if parse == nil then dv6.value = translate("n/a") @@ -163,8 +176,8 @@ end bl = m:section(TypedSection, "source", translate("Blocklist Sources"), translate("Available blocklist sources. ") .. translate("List URLs and Shallalist category selections are configurable in the 'Advanced' section.
") - .. translate("Caution: To prevent OOM exceptions on low memory devices with less than 64 MB free RAM, please do not select too many lists - 5-6 should be sufficient!")) -bl.template = "cbi/tblsection" + .. translate("Caution: To prevent OOM exceptions on low memory devices with less than 64 MB free RAM, please do not select more than five blocklist sources!")) +bl.template = "adblock/blocklist" name = bl:option(Flag, "enabled", translate("Enabled")) name.rmempty = false @@ -223,20 +236,38 @@ e7 = e:option(Flag, "adb_whitelist_mode", translate("Whitelist Mode"), e7.default = e7.disabled e7.rmempty = true -e8 = e:option(Value, "adb_dnsdir", translate("DNS Directory"), +e8 = e:option(Flag, "adb_dnsflush", translate("Flush DNS Cache"), + translate("Flush DNS Cache after adblock processing.")) +e8.default = e8.disabled +e8.rmempty = true + +e9 = e:option(Flag, "adb_notify", translate("Email Notification"), + translate("Send notification emails in case of a processing error or if domain count is ≤ 0.
") + .. translate("Please note: this needs additional 'mstmp' installation and setup (see readme).")) +e9.default = e9.disabled +e9.rmempty = true + +e10 = e:option(Value, "adb_notifycnt", translate("Email Notification Count"), + translate("Raise the minimum email notification count, to get emails if the overall count is less or equal to the given limit (default 0),
") + .. translate("e.g. to receive an email notification with every adblock update set this value to 150000.")) +e10.default = 0 +e10.datatype = "min(0)" +e10.optional = true + +e11 = e:option(Value, "adb_dnsdir", translate("DNS Directory"), translate("Target directory for the generated blocklist 'adb_list.overall'.")) -e8.datatype = "directory" -e8.optional = true +e11.datatype = "directory" +e11.optional = true -e9 = e:option(Value, "adb_whitelist", translate("Whitelist File"), +e12 = e:option(Value, "adb_whitelist", translate("Whitelist File"), translate("Full path to the whitelist file.")) -e9.datatype = "file" -e9.default = "/etc/adblock/adblock.whitelist" -e9.optional = true +e12.datatype = "file" +e12.default = "/etc/adblock/adblock.whitelist" +e12.optional = true -e10 = e:option(Value, "adb_triggerdelay", translate("Trigger Delay"), +e13 = e:option(Value, "adb_triggerdelay", translate("Trigger Delay"), translate("Additional trigger delay in seconds before adblock processing begins.")) -e10.datatype = "range(1,60)" -e10.optional = true +e13.datatype = "range(1,60)" +e13.optional = true return m diff --git a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm new file mode 100644 index 000000000..aae64075f --- /dev/null +++ b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm @@ -0,0 +1,80 @@ +<%# +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) +This is free software, licensed under the Apache License, Version 2.0 +-%> + +<%- +local rowcnt = 1 +function rowstyle() + rowcnt = rowcnt + 1 + return (rowcnt % 2) + 1 +end + +function width(o) + if o.width then + if type(o.width) == 'number' then + return ' style="width:%dpx"' % o.width + end + return ' style="width:%s"' % o.width + end + return '' +end +-%> + + + +
+ <% if self.title then -%> + <%=self.title%> + <%- end %> +
<%=self.description%>
+
+ <%- local count = 0 -%> + + + <%- if self.sectionhead then -%> + + <%- else -%> + + <%- end -%> + <%- for i, k in pairs(self.children) do -%> + + <%- count = count + 1; end; -%> + + <%- local isempty = true + for i, k in ipairs(self:cfgsections()) do + section = k + isempty = false + scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } + -%> + + + <%- + for k, node in ipairs(self.children) do + if not node.optional then + node:render(section, scope or {}) + end + end + -%> + + <%- end -%> + <%- if isempty then -%> + + + + <%- end -%> +
<%=self.sectionhead%> > + <%-=k.title-%> +
<%=k%>

<%:This section contains no values yet%>
+
+
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/logread.htm b/applications/luci-app-adblock/luasrc/view/adblock/logread.htm index 5e25a549c..082ec806f 100644 --- a/applications/luci-app-adblock/luasrc/view/adblock/logread.htm +++ b/applications/luci-app-adblock/luasrc/view/adblock/logread.htm @@ -1,5 +1,5 @@ <%# -Copyright 2017 Dirk Brenken (dev@brenken.org) +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> @@ -11,4 +11,10 @@ This is free software, licensed under the Apache License, Version 2.0 + + + <%+footer%> diff --git a/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm b/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm index 0221a75ed..e7827b5c3 100644 --- a/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm +++ b/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm @@ -1,10 +1,10 @@ <%# -Copyright 2017 Dirk Brenken (dev@brenken.org) +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> <%+cbi/valueheader%> - + <%+cbi/valuefooter%> diff --git a/applications/luci-app-adblock/po/it/adblock.po b/applications/luci-app-adblock/po/it/adblock.po index af3414c99..6f3b53e4f 100644 --- a/applications/luci-app-adblock/po/it/adblock.po +++ b/applications/luci-app-adblock/po/it/adblock.po @@ -51,7 +51,7 @@ msgstr "Fonti lista di Blocco" msgid "" "Caution: To prevent OOM exceptions on low memory devices with less than 64 " -"MB free RAM, please do not select too many lists - 5-6 should be sufficient!" +"MB free RAM, please do not select more than five blocklist sources!" msgstr "" msgid "" @@ -109,6 +109,12 @@ msgstr "Modifica Configurazione" msgid "Edit Whitelist" msgstr "Modifica Lista Bianca" +msgid "Email Notification" +msgstr "" + +msgid "Email Notification Count" +msgstr "" + msgid "Enable Adblock" msgstr "Attiva Adblock" @@ -130,6 +136,12 @@ msgstr "Abilitato" msgid "Extra Options" msgstr "Opzioni Extra" +msgid "Flush DNS Cache" +msgstr "" + +msgid "Flush DNS Cache after adblock processing." +msgstr "" + msgid "" "For SSL protected blocklist sources you need a suitable SSL library, e.g. " "'libustream-ssl' or the wget 'built-in'." @@ -208,6 +220,11 @@ msgid "Please edit this file directly in a terminal session." msgstr "" "Per favore modifica questo file direttamente in una sessione al terminale." +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" + msgid "Please update your adblock config file to use this package.
" msgstr "" @@ -217,6 +234,11 @@ msgstr "Interrogazione" msgid "Query domains" msgstr "Interrogazione domini" +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" + msgid "Redirect all DNS queries from 'lan' zone to the local resolver." msgstr "" "Reindirizza tutte le richieste DNS dalla zona 'lan' al risolvitore locale." @@ -233,6 +255,11 @@ msgstr "Ric. SSL" msgid "Save" msgstr "Salva" +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" + msgid "Startup Trigger" msgstr "Innesco d'Avvio" @@ -290,6 +317,9 @@ msgstr "" "Questo form mostra l'output del registro, prefiltrato per messaggi relativi " "solo ad adblock." +msgid "This section contains no values yet" +msgstr "" + msgid "" "To overwrite the default path use the 'DNS Directory' option in the extra " "section below." @@ -321,6 +351,11 @@ msgstr "Sì" msgid "disabled" msgstr "disabilitato" +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" + msgid "enabled" msgstr "abilitato" diff --git a/applications/luci-app-adblock/po/ja/adblock.po b/applications/luci-app-adblock/po/ja/adblock.po index becef993f..f43aafb6f 100644 --- a/applications/luci-app-adblock/po/ja/adblock.po +++ b/applications/luci-app-adblock/po/ja/adblock.po @@ -52,11 +52,8 @@ msgstr "ブロックリスト提供元" msgid "" "Caution: To prevent OOM exceptions on low memory devices with less than 64 " -"MB free RAM, please do not select too many lists - 5-6 should be sufficient!" +"MB free RAM, please do not select more than five blocklist sources!" msgstr "" -"警告: RAM の空き容量が 64MB に満たないメモリー容量の小さいデバイスでは、 " -"OutOfMemory (OOM) 例外を防ぐために、多くのリストを選択しないようにしてくださ" -"い。5 - 6個のリストで十分です。" msgid "" "Choose 'none' to disable automatic startups, 'timed' to use a classic " @@ -120,6 +117,12 @@ msgstr "設定の編集" msgid "Edit Whitelist" msgstr "ホワイトリストの編集" +msgid "Email Notification" +msgstr "" + +msgid "Email Notification Count" +msgstr "" + msgid "Enable Adblock" msgstr "Adblock の有効化" @@ -143,6 +146,12 @@ msgstr "有効" msgid "Extra Options" msgstr "拡張オプション" +msgid "Flush DNS Cache" +msgstr "" + +msgid "Flush DNS Cache after adblock processing." +msgstr "" + msgid "" "For SSL protected blocklist sources you need a suitable SSL library, e.g. " "'libustream-ssl' or the wget 'built-in'." @@ -223,6 +232,11 @@ msgstr "" msgid "Please edit this file directly in a terminal session." msgstr "ターミナル セッションで直接このファイルを編集してください。" +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" + msgid "Please update your adblock config file to use this package.
" msgstr "" "このパッケージを使用するには、既存の Adblock 設定ファイルを更新してください。" @@ -234,6 +248,11 @@ msgstr "検索" msgid "Query domains" msgstr "ドメインの検索" +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" + msgid "Redirect all DNS queries from 'lan' zone to the local resolver." msgstr "" "'lan' ゾーンからの全 DNS クエリを、ローカル リゾルバにリダイレクトします。" @@ -250,6 +269,11 @@ msgstr "SSL 必須" msgid "Save" msgstr "保存" +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" + msgid "Startup Trigger" msgstr "スタートアップ トリガ" @@ -309,6 +333,9 @@ msgstr "" "このフォームには、システムログ内の Adblock に関連するメッセージのみが表示され" "ます。" +msgid "This section contains no values yet" +msgstr "" + msgid "" "To overwrite the default path use the 'DNS Directory' option in the extra " "section below." @@ -340,6 +367,11 @@ msgstr "はい" msgid "disabled" msgstr "無効" +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" + msgid "enabled" msgstr "有効" @@ -351,3 +383,12 @@ msgstr "利用不可" msgid "paused" msgstr "一時停止" + +#~ msgid "" +#~ "Caution: To prevent OOM exceptions on low memory devices with less than " +#~ "64 MB free RAM, please do not select too many lists - 5-6 should be " +#~ "sufficient!" +#~ msgstr "" +#~ "警告: RAM の空き容量が 64MB に満たないメモリー容量の小さいデバイスでは、 " +#~ "OutOfMemory (OOM) 例外を防ぐために、多くのリストを選択しないようにしてくだ" +#~ "さい。5 - 6個のリストで十分です。" diff --git a/applications/luci-app-adblock/po/pt-br/adblock.po b/applications/luci-app-adblock/po/pt-br/adblock.po index f51791f48..e08ad6c74 100644 --- a/applications/luci-app-adblock/po/pt-br/adblock.po +++ b/applications/luci-app-adblock/po/pt-br/adblock.po @@ -54,7 +54,7 @@ msgstr "Fontes de listas de bloqueio" msgid "" "Caution: To prevent OOM exceptions on low memory devices with less than 64 " -"MB free RAM, please do not select too many lists - 5-6 should be sufficient!" +"MB free RAM, please do not select more than five blocklist sources!" msgstr "" msgid "" @@ -110,6 +110,12 @@ msgstr "Editar Configuração" msgid "Edit Whitelist" msgstr "Editar Lista Permitida" +msgid "Email Notification" +msgstr "" + +msgid "Email Notification Count" +msgstr "" + msgid "Enable Adblock" msgstr "Habilitar adblock" @@ -130,6 +136,12 @@ msgstr "Habilitado" msgid "Extra Options" msgstr "Opções adicionais" +msgid "Flush DNS Cache" +msgstr "" + +msgid "Flush DNS Cache after adblock processing." +msgstr "" + msgid "" "For SSL protected blocklist sources you need a suitable SSL library, e.g. " "'libustream-ssl' or the wget 'built-in'." @@ -201,6 +213,11 @@ msgstr "" msgid "Please edit this file directly in a terminal session." msgstr "Por favor edite esse arquivo direto em uma sessão de terminal." +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" + msgid "Please update your adblock config file to use this package.
" msgstr "" @@ -210,6 +227,11 @@ msgstr "Consulta" msgid "Query domains" msgstr "Consulta de domínios" +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" + msgid "Redirect all DNS queries from 'lan' zone to the local resolver." msgstr "" @@ -225,6 +247,11 @@ msgstr "req. de SSL" msgid "Save" msgstr "Salvar" +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" + msgid "Startup Trigger" msgstr "" @@ -281,6 +308,9 @@ msgstr "" "Esse formulário mostra a saída do syslog, pré-filtrado para mensagens do " "adblock apenas." +msgid "This section contains no values yet" +msgstr "" + msgid "" "To overwrite the default path use the 'DNS Directory' option in the extra " "section below." @@ -310,6 +340,11 @@ msgstr "Sim" msgid "disabled" msgstr "" +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" + msgid "enabled" msgstr "" diff --git a/applications/luci-app-adblock/po/ru/adblock.po b/applications/luci-app-adblock/po/ru/adblock.po new file mode 100644 index 000000000..8400c6e14 --- /dev/null +++ b/applications/luci-app-adblock/po/ru/adblock.po @@ -0,0 +1,391 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: LuCI: adblock\n" +"POT-Creation-Date: 2017-10-22 13:00+0300\n" +"PO-Revision-Date: 2018-01-06 12:37+0300\n" +"Language-Team: http://cyber-place.ru\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.7.1\n" +"Last-Translator: Vladimir aka sunny \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Language: ru\n" + +msgid "-------" +msgstr "-------" + +msgid "Adblock" +msgstr "Adblock" + +msgid "Adblock Logfile" +msgstr "Ведение системного журала Adblock-ом" + +msgid "Adblock Status" +msgstr "Состояние Adblock-а" + +msgid "Adblock Version" +msgstr "Версия Adblock-а" + +msgid "Additional trigger delay in seconds before adblock processing begins." +msgstr "Дополнительная задержка в секундах до начала работы Adblock-a." + +msgid "Advanced" +msgstr "Дополнительно" + +msgid "Available blocklist sources." +msgstr "Источники списков блокировки. " + +msgid "Backup Directory" +msgstr "Папка для бэкапа" + +msgid "Backup Mode" +msgstr "Режим сохранения бекапа" + +msgid "" +"Block access to all domains except those explicitly listed in the whitelist " +"file." +msgstr "" +"Блокировать доступ ко всем доменам, кроме тех, которые явно перечислены в " +"файле Белого списка." + +msgid "Blocklist Sources" +msgstr "Источники списков блокировки" + +msgid "" +"Caution: To prevent OOM exceptions on low memory devices with less than 64 " +"MB free RAM, please do not select more than five blocklist sources!" +msgstr "" +"ВНИМАНИЕ: Для предотвращения возможного программного сбоя и перезагрузки, на " +"устройствах с объемом оперативной памяти менее 64MB, не выбирайте больше 5 " +"списков." + +msgid "" +"Choose 'none' to disable automatic startups, 'timed' to use a classic " +"timeout (default 30 sec.) or select another trigger interface." +msgstr "" +"Выберите 'none', чтобы отключить автоматический старт, 'timed', чтобы " +"использовать дефолтную задержку (по умолчанию 30 сек.) или выберите другой " +"интерфейс запуска." + +msgid "Collecting data..." +msgstr "Сбор информации..." + +msgid "" +"Configuration of the adblock package to block ad/abuse domains by using DNS." +msgstr "" +"Настройка Adblock. Приложения для блокировки ненадежных или добавления " +"доверенных доменов используя DNS. " + +msgid "" +"Create compressed blocklist backups, they will be used in case of download " +"errors or during startup in backup mode." +msgstr "" +"Создавайте сжатые резервные копии списков блокировки, они будут " +"использоваться в случае ошибок загрузки или при запуске в ручном режиме." + +msgid "DNS Backend (DNS Directory)" +msgstr "DNS бэкенд (папка DNS)" + +msgid "DNS Directory" +msgstr "Папка DNS" + +msgid "Description" +msgstr "Описание" + +msgid "" +"Do not automatically update blocklists during startup, use blocklist backups " +"instead." +msgstr "" +"Не обновляйте списки блокировок автоматически во время запуска, вместо этого " +"используйте резервные копии списков блокировок." + +msgid "Download Utility (SSL Library)" +msgstr "Загрузить утилиту (библиотека SSL)" + +msgid "" +"During opkg package installation use the '--force-maintainer' option to " +"overwrite the pre-existing config file or download a fresh default config " +"from here" +msgstr "" +"Устанавливая пакет с помощью opkg, используйте '--force-maintainer', чтобы " +"перезаписать существующий config файл или загрузить новый дефолтный config " +"файл здесь" + +msgid "Edit Blacklist" +msgstr "Редактировать Черный список" + +msgid "Edit Configuration" +msgstr "Редактировать config файл" + +msgid "Edit Whitelist" +msgstr "Редактировать Белый список" + +msgid "Email Notification" +msgstr "Уведомление на email" + +msgid "Email Notification Count" +msgstr "Кол-во уведомлений на email" + +msgid "Enable Adblock" +msgstr "Включить Adblock" + +msgid "Enable Blocklist Backup" +msgstr "Включить сохранение списка блокировок" + +msgid "" +"Enable memory intense overall sort / duplicate removal on low memory devices " +"(< 64 MB free RAM)" +msgstr "" +"Включите полную сортировку / удаление дубликатов памяти на устройствах с " +"низким объемом памяти (< 64 MB свободной оперативной памяти)." + +msgid "Enable verbose debug logging in case of any processing error." +msgstr "Включите подробное ведение журнала отладки в случае ошибки обработки." + +msgid "Enabled" +msgstr "Включено" + +msgid "Extra Options" +msgstr "Дополнительные настройки" + +msgid "Flush DNS Cache" +msgstr "Очистка кэша DNS" + +msgid "Flush DNS Cache after adblock processing." +msgstr "Очистки DNS-кэша после обработки Adblock-ом." + +msgid "" +"For SSL protected blocklist sources you need a suitable SSL library, e.g. " +"'libustream-ssl' or the wget 'built-in'." +msgstr "" +"Для SSL-защищенных источников списков блокировки, вам нужны подходящие SSL " +"библиотеки, например 'libustream-ssl' или wget 'built-in'." + +msgid "" +"For further information check the online " +"documentation" +msgstr "" +"Для получения дополнительной информации " +"смотрите онлайн документацию." + +msgid "Force Local DNS" +msgstr "Назначить локальный DNS" + +msgid "Force Overall Sort" +msgstr "Назначить полную сортировку" + +msgid "Full path to the whitelist file." +msgstr "Полный путь к файлу Белого списка." + +msgid "Input file not found, please check your configuration." +msgstr "Введенный файл не найден, проверьте ваши настройки." + +msgid "Invalid domain specified!" +msgstr "Задан недопустимый домен!" + +msgid "Last Run" +msgstr "Последнее время запуска" + +msgid "" +"List URLs and Shallalist category selections are configurable in the " +"'Advanced' section.
" +msgstr "" +"Список URL-адресов и настройка списка использования, настраиваются на " +"странице 'Дополнительно'.
" + +msgid "" +"List of available network interfaces. Usually the startup will be triggered " +"by the 'wan' interface.
" +msgstr "" +"Список доступных сетевых интерфейсов. По умолчанию установлен 'wan' " +"интерфейс.
" + +msgid "" +"List of supported DNS backends with their default list export directory.
" +msgstr "" +"Список поддерживаемых серверов DNS с дефолтным списком - перемещается в " +"папку.
" + +msgid "Loading" +msgstr "Загрузка" + +msgid "No" +msgstr "Нет" + +msgid "" +"Options for further tweaking in case the defaults are not suitable for you." +msgstr "" +"Варианты для дальнейшей обработки, если значения по умолчанию вам не " +"подходят." + +msgid "Overall Domains" +msgstr "Итоговые домены" + +msgid "Overview" +msgstr "Главное меню" + +msgid "" +"Please add only one domain per line. Comments introduced with '#' are " +"allowed - ip addresses, wildcards and regex are not." +msgstr "" +"Добавляйте только один домен в строке. Комментарии вводятся используя '#' " +"разрешенные - ip адреса, метасимволы и нерегулярные выражения." + +msgid "Please edit this file directly in a terminal session." +msgstr "Отредактируйте данный файл, строго в терминале." + +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" +"Внимание: для этого требуется дополнительная установка и настройка " +"'mstmp' (см. readme)." + +msgid "Please update your adblock config file to use this package.
" +msgstr "Обновите config файл Adblock, чтобы использовать этот пакет.
" + +msgid "Query" +msgstr "Запрос" + +msgid "Query domains" +msgstr "Запрос доменов" + +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" +"Увеличьте количество уведомлений по email, чтобы получить сообщения, если " +"общее количество меньше или равно заданному пределу (по умолчанию 0),
" + +msgid "Redirect all DNS queries from 'lan' zone to the local resolver." +msgstr "" +"Перенаправлять все DNS запросы с интерфейса 'lan' на обработку Adblock-ом." + +msgid "Resume" +msgstr "Возобновить" + +msgid "Runtime Information" +msgstr "Текущая информация" + +msgid "SSL req." +msgstr "Запрос SSL" + +msgid "Save" +msgstr "Сохранить" + +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" +"Отправлять по электронной почте уведомления в случае ошибки обработки или " +"если домен ≤ 0.
" + +msgid "Startup Trigger" +msgstr "Задержка запуска" + +msgid "Suspend" +msgstr "Приостановить" + +msgid "Suspend / Resume Adblock" +msgstr "Приостановить / Возобновить Adblock" + +msgid "" +"Target directory for adblock backups. Please use only non-volatile disks, e." +"g. an external usb stick." +msgstr "" +"Папка для резервного копирования Adblock. Используйте такие накопители, как " +"usb флешка." + +msgid "Target directory for the generated blocklist 'adb_list.overall'." +msgstr "Целевая папка для создания списка блокировки 'adb_list.overall'." + +msgid "The file size is too large for online editing in LuCI (> 512 KB)." +msgstr "" +"Размер файла слишком большой, для онлайн редактирования в LuCI (> 512 KB)." + +msgid "" +"This form allows you to modify the content of the adblock blacklist (%s)." +"
" +msgstr "" +"Страница позволяет изменять содержимое Черного списка Adblock (%s).
" + +msgid "" +"This form allows you to modify the content of the adblock whitelist (%s)." +"
" +msgstr "" +"Страница позволяет изменять содержимое Белого списка Adblock (%s).
" + +msgid "" +"This form allows you to modify the content of the main adblock configuration " +"file (/etc/config/adblock)." +msgstr "" +"Страница позволяет изменять содержимое главного config файла Adblock-a (/etc/" +"config/adblock)." + +msgid "" +"This form allows you to query active block lists for certain domains, e.g. " +"for whitelisting." +msgstr "" +"Страница позволяет запросить домены для конкретных списков, например для " +"Белого списка." + +msgid "" +"This form shows the syslog output, pre-filtered for adblock related messages " +"only." +msgstr "Страница системного журнала. Только сообщения связанные с Adblock." + +msgid "This section contains no values yet" +msgstr "Страница не содержит значений" + +msgid "" +"To overwrite the default path use the 'DNS Directory' option in the extra " +"section below." +msgstr "" +"Чтобы заменить дефолтную, используется 'Папка DNS' расширенный вариант, " +"раздел ниже." + +msgid "Trigger Delay" +msgstr "Задержка запуска" + +msgid "Verbose Debug Logging" +msgstr "Подробное ведение журнала отладки" + +msgid "View Logfile" +msgstr "Системный журнал" + +msgid "Waiting for command to complete..." +msgstr "Ожидание выполнения команды..." + +msgid "Whitelist File" +msgstr "Файл Белого списка" + +msgid "Whitelist Mode" +msgstr "Режим Белого списка" + +msgid "Yes" +msgstr "Да" + +msgid "disabled" +msgstr "отключено" + +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" +"например, чтобы получать уведомления по электронной почте при каждом " +"обновлении Adblock-а установите значение 150000." + +msgid "enabled" +msgstr "включено" + +msgid "error" +msgstr "ошибка" + +msgid "n/a" +msgstr "нет данных" + +msgid "paused" +msgstr "остановлено" diff --git a/applications/luci-app-adblock/po/sv/adblock.po b/applications/luci-app-adblock/po/sv/adblock.po index 503c5f6ef..927e8af4f 100644 --- a/applications/luci-app-adblock/po/sv/adblock.po +++ b/applications/luci-app-adblock/po/sv/adblock.po @@ -41,7 +41,7 @@ msgstr "Källor för blockeringslistor" msgid "" "Caution: To prevent OOM exceptions on low memory devices with less than 64 " -"MB free RAM, please do not select too many lists - 5-6 should be sufficient!" +"MB free RAM, please do not select more than five blocklist sources!" msgstr "" msgid "" @@ -100,6 +100,12 @@ msgstr "Redigerar konfigurationen" msgid "Edit Whitelist" msgstr "Redigera vitlista" +msgid "Email Notification" +msgstr "" + +msgid "Email Notification Count" +msgstr "" + msgid "Enable Adblock" msgstr "Aktivera adblock" @@ -120,6 +126,12 @@ msgstr "Aktiverad" msgid "Extra Options" msgstr "Extra alternativ" +msgid "Flush DNS Cache" +msgstr "" + +msgid "Flush DNS Cache after adblock processing." +msgstr "" + msgid "" "For SSL protected blocklist sources you need a suitable SSL library, e.g. " "'libustream-ssl' or the wget 'built-in'." @@ -188,6 +200,11 @@ msgstr "" msgid "Please edit this file directly in a terminal session." msgstr "Vänligen redigera den här filen direkt i en terminal-session." +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" + msgid "Please update your adblock config file to use this package.
" msgstr "" @@ -197,6 +214,11 @@ msgstr "Fråga" msgid "Query domains" msgstr "Fråga efter domäner" +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" + msgid "Redirect all DNS queries from 'lan' zone to the local resolver." msgstr "" @@ -212,6 +234,11 @@ msgstr "SSL-rek." msgid "Save" msgstr "Spara" +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" + msgid "Startup Trigger" msgstr "Uppstartslösare" @@ -263,6 +290,9 @@ msgid "" "only." msgstr "" +msgid "This section contains no values yet" +msgstr "" + msgid "" "To overwrite the default path use the 'DNS Directory' option in the extra " "section below." @@ -292,6 +322,11 @@ msgstr "Ja" msgid "disabled" msgstr "inaktiverad" +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" + msgid "enabled" msgstr "aktiverad" diff --git a/applications/luci-app-adblock/po/templates/adblock.pot b/applications/luci-app-adblock/po/templates/adblock.pot index 969833351..8fcff0791 100644 --- a/applications/luci-app-adblock/po/templates/adblock.pot +++ b/applications/luci-app-adblock/po/templates/adblock.pot @@ -41,7 +41,7 @@ msgstr "" msgid "" "Caution: To prevent OOM exceptions on low memory devices with less than 64 " -"MB free RAM, please do not select too many lists - 5-6 should be sufficient!" +"MB free RAM, please do not select more than five blocklist sources!" msgstr "" msgid "" @@ -93,6 +93,12 @@ msgstr "" msgid "Edit Whitelist" msgstr "" +msgid "Email Notification" +msgstr "" + +msgid "Email Notification Count" +msgstr "" + msgid "Enable Adblock" msgstr "" @@ -113,6 +119,12 @@ msgstr "" msgid "Extra Options" msgstr "" +msgid "Flush DNS Cache" +msgstr "" + +msgid "Flush DNS Cache after adblock processing." +msgstr "" + msgid "" "For SSL protected blocklist sources you need a suitable SSL library, e.g. " "'libustream-ssl' or the wget 'built-in'." @@ -180,6 +192,11 @@ msgstr "" msgid "Please edit this file directly in a terminal session." msgstr "" +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" + msgid "Please update your adblock config file to use this package.
" msgstr "" @@ -189,6 +206,11 @@ msgstr "" msgid "Query domains" msgstr "" +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" + msgid "Redirect all DNS queries from 'lan' zone to the local resolver." msgstr "" @@ -204,6 +226,11 @@ msgstr "" msgid "Save" msgstr "" +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" + msgid "Startup Trigger" msgstr "" @@ -249,6 +276,9 @@ msgid "" "only." msgstr "" +msgid "This section contains no values yet" +msgstr "" + msgid "" "To overwrite the default path use the 'DNS Directory' option in the extra " "section below." @@ -278,6 +308,11 @@ msgstr "" msgid "disabled" msgstr "" +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" + msgid "enabled" msgstr "" diff --git a/applications/luci-app-adblock/po/zh-cn/adblock.po b/applications/luci-app-adblock/po/zh-cn/adblock.po index 08032cab0..9e3a0284f 100644 --- a/applications/luci-app-adblock/po/zh-cn/adblock.po +++ b/applications/luci-app-adblock/po/zh-cn/adblock.po @@ -55,7 +55,7 @@ msgstr "拦截列表来源" msgid "" "Caution: To prevent OOM exceptions on low memory devices with less than 64 " -"MB free RAM, please do not select too many lists - 5-6 should be sufficient!" +"MB free RAM, please do not select more than five blocklist sources!" msgstr "" msgid "" @@ -109,6 +109,12 @@ msgstr "编辑设置" msgid "Edit Whitelist" msgstr "编辑白名单" +msgid "Email Notification" +msgstr "" + +msgid "Email Notification Count" +msgstr "" + msgid "Enable Adblock" msgstr "启用 Adblock" @@ -129,6 +135,12 @@ msgstr "已启用" msgid "Extra Options" msgstr "额外选项" +msgid "Flush DNS Cache" +msgstr "" + +msgid "Flush DNS Cache after adblock processing." +msgstr "" + msgid "" "For SSL protected blocklist sources you need a suitable SSL library, e.g. " "'libustream-ssl' or the wget 'built-in'." @@ -200,6 +212,11 @@ msgstr "" msgid "Please edit this file directly in a terminal session." msgstr "请在终端会话中直接编辑此文件。" +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" + msgid "Please update your adblock config file to use this package.
" msgstr "" @@ -209,6 +226,11 @@ msgstr "查询" msgid "Query domains" msgstr "查询域" +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" + msgid "Redirect all DNS queries from 'lan' zone to the local resolver." msgstr "将所有 DNS 查询从“lan”区域重定向到本地解析器。" @@ -224,6 +246,11 @@ msgstr "SSL 要求" msgid "Save" msgstr "保存" +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" + msgid "Startup Trigger" msgstr "启动触发器" @@ -269,6 +296,9 @@ msgid "" "only." msgstr "此表单显示系统日志输出,仅针对 adblock 相关的消息进行了预筛选。" +msgid "This section contains no values yet" +msgstr "" + msgid "" "To overwrite the default path use the 'DNS Directory' option in the extra " "section below." @@ -298,6 +328,11 @@ msgstr "是" msgid "disabled" msgstr "已禁用" +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" + msgid "enabled" msgstr "已启用" diff --git a/applications/luci-app-adblock/po/zh-tw/adblock.po b/applications/luci-app-adblock/po/zh-tw/adblock.po index f838fa043..d468c96f5 100644 --- a/applications/luci-app-adblock/po/zh-tw/adblock.po +++ b/applications/luci-app-adblock/po/zh-tw/adblock.po @@ -55,7 +55,7 @@ msgstr "攔截列表來源" msgid "" "Caution: To prevent OOM exceptions on low memory devices with less than 64 " -"MB free RAM, please do not select too many lists - 5-6 should be sufficient!" +"MB free RAM, please do not select more than five blocklist sources!" msgstr "" msgid "" @@ -109,6 +109,12 @@ msgstr "編輯設定" msgid "Edit Whitelist" msgstr "編輯白名單" +msgid "Email Notification" +msgstr "" + +msgid "Email Notification Count" +msgstr "" + msgid "Enable Adblock" msgstr "啟用 Adblock" @@ -129,6 +135,12 @@ msgstr "已啟用" msgid "Extra Options" msgstr "額外選項" +msgid "Flush DNS Cache" +msgstr "" + +msgid "Flush DNS Cache after adblock processing." +msgstr "" + msgid "" "For SSL protected blocklist sources you need a suitable SSL library, e.g. " "'libustream-ssl' or the wget 'built-in'." @@ -200,6 +212,11 @@ msgstr "" msgid "Please edit this file directly in a terminal session." msgstr "請在終端會話中直接編輯此檔案。" +msgid "" +"Please note: this needs additional 'mstmp' installation and setup (see " +"readme)." +msgstr "" + msgid "Please update your adblock config file to use this package.
" msgstr "" @@ -209,6 +226,11 @@ msgstr "查詢" msgid "Query domains" msgstr "查詢域" +msgid "" +"Raise the minimum email notification count, to get emails if the overall " +"count is less or equal to the given limit (default 0),
" +msgstr "" + msgid "Redirect all DNS queries from 'lan' zone to the local resolver." msgstr "將所有 DNS 查詢從“lan”區域重定向到本地解析器。" @@ -224,6 +246,11 @@ msgstr "SSL 要求" msgid "Save" msgstr "儲存" +msgid "" +"Send notification emails in case of a processing error or if domain count is " +"≤ 0.
" +msgstr "" + msgid "Startup Trigger" msgstr "啟動觸發器" @@ -269,6 +296,9 @@ msgid "" "only." msgstr "此表單顯示系統日誌輸出,僅針對 adblock 相關的訊息進行了預篩選。" +msgid "This section contains no values yet" +msgstr "" + msgid "" "To overwrite the default path use the 'DNS Directory' option in the extra " "section below." @@ -298,6 +328,11 @@ msgstr "是" msgid "disabled" msgstr "已禁用" +msgid "" +"e.g. to receive an email notification with every adblock update set this " +"value to 150000." +msgstr "" + msgid "enabled" msgstr "已啟用" diff --git a/applications/luci-app-advanced-reboot/Makefile b/applications/luci-app-advanced-reboot/Makefile index 3a886eb8d..5722b429e 100644 --- a/applications/luci-app-advanced-reboot/Makefile +++ b/applications/luci-app-advanced-reboot/Makefile @@ -7,13 +7,13 @@ PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Stan Grishin LUCI_TITLE:=Advanced Linksys Reboot Web UI -LUCI_DESCRIPTION:=Provides Web UI (found under System/Advanced Reboot) to reboot supported Linksys routers to\ +LUCI_DESCRIPTION:=Provides Web UI (found under System/Advanced Reboot) to reboot supported Linksys and ZyXEL routers to\ an altnerative partition. Also provides Web UI to shut down (power off) your device. Supported dual-partition\ routers are listed at https://github.com/stangri/openwrt-luci/blob/luci-app-advanced-reboot/applications/luci-app-advanced-reboot/README.md LUCI_DEPENDS:=+luci LUCI_PKGARCH:=all -PKG_RELEASE:=23 +PKG_RELEASE:=25 include ../../luci.mk diff --git a/applications/luci-app-advanced-reboot/README.md b/applications/luci-app-advanced-reboot/README.md index ee87a0002..cfee18810 100644 --- a/applications/luci-app-advanced-reboot/README.md +++ b/applications/luci-app-advanced-reboot/README.md @@ -5,15 +5,16 @@ This package allows you to reboot to an alternative partition on supported (dual ## Supported Devices Currently supported dual-partition devices include: +- Linksys EA3500 +- Linksys E4200v2 +- Linksys EA4500 +- Linksys EA8500 - Linksys WRT1200AC - Linksys WRT1900AC - Linksys WRT1900ACv2 - Linksys WRT1900ACS - Linksys WRT3200ACM -- Linksys E4200v2 -- Linksys EA4500 -- Linksys EA8500 - +- ZyXEL NBG6817 If you're interested in having your device supported, please post in [LEDE Project Forum Support Thread](https://forum.lede-project.org/t/web-ui-to-reboot-to-another-partition-dual-partition-routers/3423). ## Screenshot (luci-app-advanced-reboot) @@ -28,8 +29,8 @@ opkg install luci-app-advanced-reboot ## Notes/Known Issues - When you reboot to a different partition, your current settings (WiFi SSID/password, etc.) will not apply to a different partition. Different partitions might have completely different settings and even firmware. -- If you reboot to a partition which doesn't allow you to switch boot partitions (like stock Linksys firmware), you might not be able to boot back to OpenWrt/LEDE Project unless you reflash it, loosing all the settings. +- If you reboot to a partition which doesn't allow you to switch boot partitions (like stock vendor firmware), you might not be able to boot back to OpenWrt/LEDE Project unless you reflash it, loosing all the settings. - Some devices allow you to trigger reboot to alternative partition by interrupting boot 3 times in a row (by resetting/switching off the device or pulling power). As these methods might be different for different devices, do your own homework. ## Thanks -I'd like to thank everyone who helped create, test and troubleshoot this package. Without contributions from [@hnyman](https://github.com/hnyman) and [@jpstyves](https://github.com/jpstyves) it wouldn't have been possible. +I'd like to thank everyone who helped create, test and troubleshoot this package. Without contributions from [@hnyman](https://github.com/hnyman), [@jpstyves](https://github.com/jpstyves) and [@slh](https://github.com/pkgadd) it wouldn't have been possible. diff --git a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua index 2b55217b8..13d1c73cc 100644 --- a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua +++ b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua @@ -5,15 +5,18 @@ module("luci.controller.advanced_reboot", package.seeall) -- device, board_name, part1, part2, offset, env_var_1, value_1_1, value_1_2, env_var_2, value_2_1, value_2_2 devices = { + {"Linksys EA3500", "linksys-audi", "mtd3", "mtd5", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, + {"Linksys E4200v2/EA4500", "linksys-viper", "mtd3", "mtd5", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, + {"Linksys EA8500", "ea8500", "mtd13", "mtd15", 32, "boot_part", 1, 2}, {"Linksys WRT1200AC", "armada-385-linksys-caiman", "mtd4", "mtd6", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, {"Linksys WRT1900AC", "armada-xp-linksys-mamba", "mtd4", "mtd6", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, {"Linksys WRT1900ACv2", "armada-385-linksys-cobra", "mtd4", "mtd6", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, {"Linksys WRT1900ACS", "armada-385-linksys-shelby", "mtd4", "mtd6", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, {"Linksys WRT3200ACM", "armada-385-linksys-rango", "mtd5", "mtd7", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, - {"Linksys E4200v2/EA4500", "linksys-viper", "mtd3", "mtd5", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, - {"Linksys EA8500", "ea8500", "mtd13", "mtd15", 32, "boot_part", 1, 2} + {"ZyXEL NBG6817","nbg6817","mmcblk0p4","mmcblk0p7",32,nil,255,1} } +errorMessage = "" board_name = luci.util.trim(luci.sys.exec("cat /tmp/sysinfo/board_name")) for i=1, #devices do if board_name and devices[i][2] == board_name then @@ -41,14 +44,29 @@ for i=1, #devices do if string.find(partition_two_label, "LEDE") then partition_two_os = "LEDE" end if string.find(partition_two_label, "OpenWrt") then partition_two_os = "OpenWrt" end if string.find(partition_two_label, "Linksys") then partition_two_os = "Linksys" end + if device_name and device_name == "ZyXEL NBG6817" then + if not partition_one_os then partition_one_os = "ZyXEL" end + if not partition_two_os then partition_two_os = "ZyXEL" end + end if not partition_one_os then partition_one_os = "Unknown" end if not partition_two_os then partition_two_os = "Unknown" end if partition_one_os and partition_one_version then partition_one_os = partition_one_os .. " (Linux " .. partition_one_version .. ")" end if partition_two_os and partition_two_version then partition_two_os = partition_two_os .. " (Linux " .. partition_two_version .. ")" end - if nixio.fs.access("/usr/sbin/fw_printenv") and nixio.fs.access("/usr/sbin/fw_setenv") then - current_partition = tonumber(luci.util.trim(luci.sys.exec("/usr/sbin/fw_printenv -n " .. boot_envvar1))) - other_partition = current_partition == boot_envvar1_partition_one and boot_envvar1_partition_two or boot_envvar1_partition_one + + if device_name and device_name == "ZyXEL NBG6817" then + if not zyxelFlagPartition then zyxelFlagPartition = luci.util.trim(luci.sys.exec("source /lib/functions.sh; find_mtd_part 0:DUAL_FLAG")) end + if not zyxelFlagPartition then + errorMessage = errorMessage .. luci.i18n.translate("Unable to find Dual Boot Flag Partition." .. " ") + luci.util.perror(luci.i18n.translate("Unable to find Dual Boot Flag Partition.")) + else + current_partition = tonumber(luci.sys.exec("dd if=" .. zyxelFlagPartition .. " bs=1 count=1 2>/dev/null | hexdump -n 1 -e '1/1 \"%d\"'")) + end + else + if nixio.fs.access("/usr/sbin/fw_printenv") and nixio.fs.access("/usr/sbin/fw_setenv") then + current_partition = tonumber(luci.util.trim(luci.sys.exec("/usr/sbin/fw_printenv -n " .. boot_envvar1))) + end end + other_partition = current_partition == boot_envvar1_partition_two and boot_envvar1_partition_one or boot_envvar1_partition_two end end @@ -70,8 +88,19 @@ function action_reboot() end function action_altreboot() + local zyxelFlagPartition, zyxelBootFlag, zyxelNewBootFlag, errorCode, curEnvSetting, newEnvSetting + errorMessage = "" + errorCode = 0 if luci.http.formvalue("cancel") then luci.http.redirect(luci.dispatcher.build_url('admin/system/advanced_reboot')) +-- luci.template.render("advanced_reboot/advanced_reboot",{ +-- device_name=device_name, +-- boot_envvar1_partition_one=boot_envvar1_partition_one, +-- partition_one_os=partition_one_os, +-- boot_envvar1_partition_two=boot_envvar1_partition_two, +-- partition_two_os=partition_two_os, +-- current_partition=current_partition, +-- errorMessage = luci.i18n.translate("Alternative reboot cancelled.")}) return end local step = tonumber(luci.http.formvalue("step") or 1) @@ -79,21 +108,72 @@ function action_altreboot() if device_name and nixio.fs.access("/usr/sbin/fw_printenv") and nixio.fs.access("/usr/sbin/fw_setenv") then luci.template.render("advanced_reboot/alternative_reboot",{}) else - luci.template.render("advanced_reboot/advanced_reboot",{}) + luci.template.render("advanced_reboot/advanced_reboot",{errorMessage = luci.i18n.translate("No access to fw_printenv or fw_printenv!")}) end elseif step == 2 then - luci.template.render("admin_system/applyreboot", { - title = luci.i18n.translate("Rebooting..."), - msg = luci.i18n.translate("The system is rebooting to an alternative partition now.
DO NOT POWER OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings."), - addr = luci.ip.new(uci.cursor():get("network", "lan", "ipaddr")) or "192.168.1.1" - }) - if boot_envvar1 then env1 = tonumber(luci.util.trim(luci.sys.exec("/usr/sbin/fw_printenv -n " .. boot_envvar1))) end - if boot_envvar2 then env2 = luci.util.trim(luci.sys.exec("/usr/sbin/fw_printenv -n " .. boot_envvar2)) end - if env1 and env1 == boot_envvar1_partition_one then luci.sys.call("/usr/sbin/fw_setenv " .. boot_envvar1 .. " " .. boot_envvar1_partition_two) end - if env1 and env1 == boot_envvar1_partition_two then luci.sys.call("/usr/sbin/fw_setenv " .. boot_envvar1 .. " " .. boot_envvar1_partition_one) end - if env2 and env2 == boot_envvar2_partition_one then luci.sys.call("/usr/sbin/fw_setenv " .. boot_envvar2 .. " '" .. boot_envvar2_partition_two .. "'") end - if env2 and env2 == boot_envvar2_partition_two then luci.sys.call("/usr/sbin/fw_setenv " .. boot_envvar2 .. " '" .. boot_envvar2_partition_one .. "'") end - luci.sys.reboot() + if boot_envvar1 or boot_envvar2 then -- Linksys devices + if boot_envvar1 then + curEnvSetting = tonumber(luci.util.trim(luci.sys.exec("/usr/sbin/fw_printenv -n " .. boot_envvar1))) + if not curEnvSetting then + errorMessage = errorMessage .. luci.i18n.translate("Unable to obtain firmware environment variable") .. ": " .. boot_envvar1 .. ". " + luci.util.perror(luci.i18n.translate("Unable to obtain firmware environment variable") .. ": " .. boot_envvar1 .. ".") + else + newEnvSetting = curEnvSetting == boot_envvar1_partition_one and boot_envvar1_partition_two or boot_envvar1_partition_one + errorCode = luci.sys.call("/usr/sbin/fw_setenv " .. boot_envvar1 .. " " .. newEnvSetting) + if errorCode ~= 0 then + errorMessage = errorMessage .. luci.i18n.translate("Unable to set firmware environment variable") .. ": " .. boot_envvar1 .. " " .. luci.i18n.translate("to") .. " " .. newEnvSetting .. ". " + luci.util.perror(luci.i18n.translate("Unable to set firmware environment variable") .. ": " .. boot_envvar1 .. " " .. luci.i18n.translate("to") .. " " .. newEnvSetting .. ".") + end + end + end + if boot_envvar2 then + curEnvSetting = luci.util.trim(luci.sys.exec("/usr/sbin/fw_printenv -n " .. boot_envvar2)) + if not curEnvSetting then + errorMessage = errorMessage .. luci.i18n.translate("Unable to obtain firmware environment variable") .. ": " .. boot_envvar2 .. ". " + luci.util.perror(luci.i18n.translate("Unable to obtain firmware environment variable") .. ": " .. boot_envvar2 .. ".") + else + newEnvSetting = curEnvSetting == boot_envvar2_partition_one and boot_envvar2_partition_two or boot_envvar2_partition_one + errorCode = luci.sys.call("/usr/sbin/fw_setenv " .. boot_envvar2 .. " '" .. newEnvSetting .. "'") + if errorCode ~= 0 then + errorMessage = errorMessage .. luci.i18n.translate("Unable to set firmware environment variable") .. ": " .. boot_envvar2 .. " " .. luci.i18n.translate("to") .. " " .. newEnvSetting .. ". " + luci.util.perror(luci.i18n.translate("Unable to set firmware environment variable") .. ": " .. boot_envvar2 .. " " .. luci.i18n.translate("to") .. " " .. newEnvSetting .. ".") + end + end + end + else -- NetGear device + if not zyxelFlagPartition then zyxelFlagPartition = luci.util.trim(luci.sys.exec("source /lib/functions.sh; find_mtd_part 0:DUAL_FLAG")) end + if not zyxelFlagPartition then + errorMessage = errorMessage .. luci.i18n.translate("Unable to find Dual Boot Flag Partition." .. " ") + luci.util.perror(luci.i18n.translate("Unable to find Dual Boot Flag Partition.")) + else + zyxelBootFlag = tonumber(luci.sys.exec("dd if=" .. zyxelFlagPartition .. " bs=1 count=1 2>/dev/null | hexdump -n 1 -e '1/1 \"%d\"'")) + zyxelNewBootFlag = zyxelBootFlag and zyxelBootFlag == 1 and "\\xff" or "\\x01" + if zyxelNewBootFlag then + errorCode = luci.sys.call("printf \"" .. zyxelNewBootFlag .. "\" >" .. zyxelFlagPartition ) + if errorCode ~= 0 then + errorMessage = errorMessage .. luci.i18n.translate("Unable to set Dual Boot Flag Partition entry for partition") .. ": " .. zyxelFlagPartition .. ". " + luci.util.perror(luci.i18n.translate("Unable to set Dual Boot Flag Partition entry for partition") .. ": " .. zyxelFlagPartition .. ".") + end + end + end + end + if errorMessage == "" then + luci.template.render("admin_system/applyreboot", { + title = luci.i18n.translate("Rebooting..."), + msg = luci.i18n.translate("The system is rebooting to an alternative partition now.
DO NOT POWER OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings."), + addr = luci.ip.new(uci.cursor():get("network", "lan", "ipaddr")) or "192.168.1.1" + }) + luci.sys.reboot() + else + luci.template.render("advanced_reboot/advanced_reboot",{ + device_name=device_name, + boot_envvar1_partition_one=boot_envvar1_partition_one, + partition_one_os=partition_one_os, + boot_envvar1_partition_two=boot_envvar1_partition_two, + partition_two_os=partition_two_os, + current_partition=current_partition, + errorMessage = errorMessage}) + end end end diff --git a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm index 206d25054..0629c84b3 100644 --- a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm +++ b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm @@ -14,6 +14,10 @@

<%:Warning: There are unsaved changes that will get lost on reboot!%>

<%- end -%> +<%- if errorMessage and errorMessage ~= "" then -%> +

<%:ERROR: %><%=errorMessage%>

+<%- end -%> + <%- if device_name then -%>
<%=device_name%><%: Partitions%> @@ -26,7 +30,7 @@ - <%=boot_envvar1_partition_one%> + <%=string.format("%X", boot_envvar1_partition_one)%> <%- if boot_envvar1_partition_one == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> @@ -50,7 +54,7 @@ - <%=boot_envvar1_partition_two%> + <%=string.format("%X", boot_envvar1_partition_two)%> <%- if boot_envvar1_partition_two == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> diff --git a/applications/luci-app-advanced-reboot/po/ru/advanced-reboot.po b/applications/luci-app-advanced-reboot/po/ru/advanced-reboot.po new file mode 100644 index 000000000..75d463677 --- /dev/null +++ b/applications/luci-app-advanced-reboot/po/ru/advanced-reboot.po @@ -0,0 +1,163 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: LuCI: advanced-reboot\n" +"POT-Creation-Date: 2017-11-30 15:20+0300\n" +"PO-Revision-Date: 2018-01-05 19:53+0300\n" +"Language-Team: http://cyber-place.ru\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.7.1\n" +"Last-Translator: Vladimir aka sunny \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Language: ru\n" + +msgid "Action" +msgstr "Действие" + +msgid "Advanced Reboot" +msgstr "Дополнительная перезагрузка" + +msgid "Alternative" +msgstr "Альтернатива" + +msgid "Alternative reboot cancelled." +msgstr "Альтернативная перезагрузка отменена." + +msgid "Cancel" +msgstr "Отменить" + +msgid "Confirm" +msgstr "Подтвердить" + +msgid "Current" +msgstr "Текущий" + +msgid "ERROR:" +msgstr "ОШИБКА:" + +msgid "Firmware/OS (Kernel)" +msgstr "Прошивка/ОС (Ядро)" + +msgid "No access to fw_printenv or fw_printenv!" +msgstr "Нет доступа к fw_printenv или fw_printenv!" + +msgid "Partition" +msgstr "Раздел" + +msgid "Partitions" +msgstr "Разделы" + +msgid "Perform power off..." +msgstr "Выполнить отключение..." + +msgid "Power Off Device" +msgstr "Отключить питание устройства" + +msgid "Proceed" +msgstr "Продолжить" + +msgid "Reboot Device to an Alternative Partition" +msgstr "Перезагрузить устройство в альтернативный раздел" + +msgid "Reboot to alternative partition..." +msgstr "Перезагрузить до альтернативного раздела..." + +msgid "Reboot to current partition" +msgstr "Перезагрузка к текущему разделу" + +msgid "Rebooting..." +msgstr "Перезагрузка..." + +msgid "Shutting down..." +msgstr "Отключается..." + +msgid "Status" +msgstr "Состояние" + +msgid "" +"The system is rebooting now.
DO NOT POWER OFF THE DEVICE!
Wait a " +"few minutes before you try to reconnect. It might be necessary to renew the " +"address of your computer to reach the device again, depending on your " +"settings." +msgstr "" +"Система перезагружается сейчас.
НЕ ОТКЛЮЧАЙТЕ ПИТАНИЕ УСТРОЙСТВА!
Подождите несколько минут, прежде чем попытаться установить соединение " +"снова. Возможно, потребуется обновить адрес компьютера для повторного " +"доступа к устройству в зависимости от ваших настроек." + +msgid "" +"The system is rebooting to an alternative partition now.
DO NOT POWER " +"OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It " +"might be necessary to renew the address of your computer to reach the device " +"again, depending on your settings." +msgstr "" +"Система перезагружается на альтернативный раздел сейчас.
НЕ ОТКЛЮЧАЙТЕ " +"ПИТАНИЕ УСТРОЙСТВА!
Подождите несколько минут, прежде чем попытаться " +"установить соединение снова. Возможно, потребуется обновить адрес компьютера " +"для повторного доступа к устройству в зависимости от ваших настроек." + +msgid "" +"The system is shutting down now.
DO NOT POWER OFF THE DEVICE!
It " +"might be necessary to renew the address of your computer to reach the device " +"again, depending on your settings." +msgstr "" +"Система сейчас отключается.
НЕ ОТКЛЮЧАЙТЕ ПИТАНИЕ УСТРОЙСТВА!
" +"Возможно, потребуется обновить адрес компьютера для повторного доступа к " +"устройству в зависимости от настроек." + +msgid "Unable to find Dual Boot Flag Partition." +msgstr "Невозможно найти Dual Boot раздел." + +msgid "Unable to obtain firmware environment variable" +msgstr "Невозможно получить переменную среды прошивки" + +msgid "Unable to set Dual Boot Flag Partition entry for partition" +msgstr "Невозможно использовать Dual Boot раздел." + +msgid "Unable to set firmware environment variable" +msgstr "Невозможно установить переменную среды прошивки" + +msgid "" +"WARNING: An alternative partition might have its own settings and completely " +"different firmware.

As your network configuration and WiFi SSID/" +"password on alternative partition might be different, you might have to " +"adjust your computer settings to be able to access your device once it " +"reboots.

Please also be aware that alternative partition " +"firmware might not provide an easy way to switch active partition and boot " +"back to the currently active partition.

Click \"Proceed\" below " +"to reboot device to an alternative partition." +msgstr "" +"ВНИМАНИЕ: альтернативный раздел может иметь собственные настройки и " +"совершенно другую прошивку.

Поскольку ваши настройки сети и WiFi " +"SSID/пароли на альтернативных разделах могут отличаться, может потребоваться " +"изменить настройки компьютера, чтобы иметь возможность получить доступ к " +"устройству после перезагрузки .

Помните также, что " +"альтернативный раздел с прошивкой может не обеспечить простой способ " +"переключения активного раздела и загрузки обратно в текущий активный раздел." +"

Нажмите \"Продолжить\" ниже, чтобы перезагрузить устройство в " +"альтернативный раздел." + +msgid "" +"WARNING: Power off might result in a reboot on a device which doesn't " +"support power off.

Click \"Proceed\" below to power off your " +"device." +msgstr "" +"ВНИМАНИЕ: Отключение питания может привести к перезагрузке устройства, " +"которое не поддерживает выключение питания.

Нажмите \"Продолжить" +"\" ниже, чтобы выключить устройство." + +msgid "Warning: There are unsaved changes that will get lost on reboot!" +msgstr "" +"Внимание: Есть несохраненные изменения, которые будут потеряны при " +"перезагрузке!" + +msgid "Warning: This system does not have two partitions!" +msgstr "Внимание: Эта система не имеет двух разделов!" + +msgid "Warning: This system does not support powering off!" +msgstr "Внимание: Эта система не поддерживает отключение питания!" + +msgid "to" +msgstr "" diff --git a/applications/luci-app-advanced-reboot/po/sv/advanced-reboot.po b/applications/luci-app-advanced-reboot/po/sv/advanced-reboot.po new file mode 100644 index 000000000..e0e13cfda --- /dev/null +++ b/applications/luci-app-advanced-reboot/po/sv/advanced-reboot.po @@ -0,0 +1,133 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + +msgid "Action" +msgstr "Åtgärd" + +msgid "Advanced Reboot" +msgstr "Avancerad omstart" + +msgid "Alternative" +msgstr "Alternativ" + +msgid "Alternative reboot cancelled." +msgstr "" + +msgid "Cancel" +msgstr "Avbryt" + +msgid "Confirm" +msgstr "Bekräfta" + +msgid "Current" +msgstr "Nuvarande" + +msgid "ERROR:" +msgstr "" + +msgid "Firmware/OS (Kernel)" +msgstr "Inre mjukvara/OS (Kärna)" + +msgid "No access to fw_printenv or fw_printenv!" +msgstr "" + +msgid "Partition" +msgstr "Partition" + +msgid "Partitions" +msgstr "Partitioner" + +msgid "Perform power off..." +msgstr "Utför avstängning..." + +msgid "Power Off Device" +msgstr "Stäng av enhet" + +msgid "Proceed" +msgstr "Fortsätt" + +msgid "Reboot Device to an Alternative Partition" +msgstr "Starta om enheten till en alternativ partition" + +msgid "Reboot to alternative partition..." +msgstr "Starta om till alternativ partition..." + +msgid "Reboot to current partition" +msgstr "Starta om till nuvarande partition" + +msgid "Rebooting..." +msgstr "Startar om..." + +msgid "Shutting down..." +msgstr "Stänger av..." + +msgid "Status" +msgstr "Status" + +msgid "" +"The system is rebooting now.
DO NOT POWER OFF THE DEVICE!
Wait a " +"few minutes before you try to reconnect. It might be necessary to renew the " +"address of your computer to reach the device again, depending on your " +"settings." +msgstr "" + +msgid "" +"The system is rebooting to an alternative partition now.
DO NOT POWER " +"OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It " +"might be necessary to renew the address of your computer to reach the device " +"again, depending on your settings." +msgstr "" + +msgid "" +"The system is shutting down now.
DO NOT POWER OFF THE DEVICE!
It " +"might be necessary to renew the address of your computer to reach the device " +"again, depending on your settings." +msgstr "" +"Systemet stänger ner nu.
STÄNG INTE AV ENHETEN!
Beroende på dina " +"inställningar så kan det vara nödvändigt att förnya din dators adress för " +"att nå enheten igen." + +msgid "Unable to find Dual Boot Flag Partition." +msgstr "" + +msgid "Unable to obtain firmware environment variable" +msgstr "" + +msgid "Unable to set Dual Boot Flag Partition entry for partition" +msgstr "" + +msgid "Unable to set firmware environment variable" +msgstr "" + +msgid "" +"WARNING: An alternative partition might have its own settings and completely " +"different firmware.

As your network configuration and WiFi SSID/" +"password on alternative partition might be different, you might have to " +"adjust your computer settings to be able to access your device once it " +"reboots.

Please also be aware that alternative partition " +"firmware might not provide an easy way to switch active partition and boot " +"back to the currently active partition.

Click \"Proceed\" below " +"to reboot device to an alternative partition." +msgstr "" + +msgid "" +"WARNING: Power off might result in a reboot on a device which doesn't " +"support power off.

Click \"Proceed\" below to power off your " +"device." +msgstr "" +"VARNING: Att stänga av kan resultera i en omstart i en enhet som inte har " +"stöd för avstängning.

Klicka på \"Fortsätt\" nedanför för att " +"stänga av din enhet." + +msgid "Warning: There are unsaved changes that will get lost on reboot!" +msgstr "" +"Varning: Det finns osparade ändringar som kommer att förloras vid omstart!" + +msgid "Warning: This system does not have two partitions!" +msgstr "Varning: Det här systemet har inte två partitioner!" + +msgid "Warning: This system does not support powering off!" +msgstr "Varning: Det här systemet har inte stöd för avstängning!" + +msgid "to" +msgstr "" diff --git a/applications/luci-app-advanced-reboot/po/sv/luci-app-advanced-reboot.po b/applications/luci-app-advanced-reboot/po/sv/luci-app-advanced-reboot.po deleted file mode 100644 index 20d77cbcf..000000000 --- a/applications/luci-app-advanced-reboot/po/sv/luci-app-advanced-reboot.po +++ /dev/null @@ -1,109 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8\n" - -msgid "Action" -msgstr "Åtgärd" - -msgid "Advanced Reboot" -msgstr "Avancerad omstart" - -msgid "Alternative" -msgstr "Alternativ" - -msgid "Cancel" -msgstr "Avbryt" - -msgid "Confirm" -msgstr "Bekräfta" - -msgid "Current" -msgstr "Nuvarande" - -msgid "Firmware/OS (Kernel)" -msgstr "Inre mjukvara/OS (Kärna)" - -msgid "Partition" -msgstr "Partition" - -msgid "Partitions" -msgstr "Partitioner" - -msgid "Perform power off..." -msgstr "Utför avstängning..." - -msgid "Power Off Device" -msgstr "Stäng av enhet" - -msgid "Proceed" -msgstr "Fortsätt" - -msgid "Reboot Device to an Alternative Partition" -msgstr "Starta om enheten till en alternativ partition" - -msgid "Reboot to alternative partition..." -msgstr "Starta om till alternativ partition..." - -msgid "Reboot to current partition" -msgstr "Starta om till nuvarande partition" - -msgid "Rebooting..." -msgstr "Startar om..." - -msgid "Shutting down..." -msgstr "Stänger av..." - -msgid "Status" -msgstr "Status" - -msgid "" -"The system is rebooting now.
DO NOT POWER OFF THE DEVICE!
Wait a " -"few minutes before you try to reconnect. It might be necessary to renew the " -"address of your computer to reach the device again, depending on your " -"settings." -msgstr "" - -msgid "" -"The system is rebooting to an alternative partition now.
DO NOT POWER " -"OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It " -"might be necessary to renew the address of your computer to reach the device " -"again, depending on your settings." -msgstr "" - -msgid "" -"The system is shutting down now.
DO NOT POWER OFF THE DEVICE!
It " -"might be necessary to renew the address of your computer to reach the device " -"again, depending on your settings." -msgstr "" -"Systemet stänger ner nu.
STÄNG INTE AV ENHETEN!
Beroende på dina " -"inställningar så kan det vara nödvändigt att förnya din dators adress för " -"att nå enheten igen." - -msgid "" -"WARNING: An alternative partition might have its own settings and completely " -"different firmware.

As your network configuration and WiFi SSID/" -"password on alternative partition might be different, you might have to " -"adjust your computer settings to be able to access your device once it " -"reboots.

Please also be aware that alternative partition " -"firmware might not provide an easy way to switch active partition and boot " -"back to the currently active partition.

Click \"Proceed\" below " -"to reboot device to an alternative partition." -msgstr "" - -msgid "" -"WARNING: Power off might result in a reboot on a device which doesn't " -"support power off.

Click \"Proceed\" below to power off your " -"device." -msgstr "" -"VARNING: Att stänga av kan resultera i en omstart i en enhet som inte har " -"stöd för avstängning.

Klicka på \"Fortsätt\" nedanför för att " -"stänga av din enhet." - -msgid "Warning: There are unsaved changes that will get lost on reboot!" -msgstr "" -"Varning: Det finns osparade ändringar som kommer att förloras vid omstart!" - -msgid "Warning: This system does not have two partitions!" -msgstr "Varning: Det här systemet har inte två partitioner!" - -msgid "Warning: This system does not support powering off!" -msgstr "Varning: Det här systemet har inte stöd för avstängning!" diff --git a/applications/luci-app-advanced-reboot/po/templates/advanced-reboot.pot b/applications/luci-app-advanced-reboot/po/templates/advanced-reboot.pot new file mode 100644 index 000000000..47a81e1dd --- /dev/null +++ b/applications/luci-app-advanced-reboot/po/templates/advanced-reboot.pot @@ -0,0 +1,126 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "Action" +msgstr "" + +msgid "Advanced Reboot" +msgstr "" + +msgid "Alternative" +msgstr "" + +msgid "Alternative reboot cancelled." +msgstr "" + +msgid "Cancel" +msgstr "" + +msgid "Confirm" +msgstr "" + +msgid "Current" +msgstr "" + +msgid "ERROR:" +msgstr "" + +msgid "Firmware/OS (Kernel)" +msgstr "" + +msgid "No access to fw_printenv or fw_printenv!" +msgstr "" + +msgid "Partition" +msgstr "" + +msgid "Partitions" +msgstr "" + +msgid "Perform power off..." +msgstr "" + +msgid "Power Off Device" +msgstr "" + +msgid "Proceed" +msgstr "" + +msgid "Reboot Device to an Alternative Partition" +msgstr "" + +msgid "Reboot to alternative partition..." +msgstr "" + +msgid "Reboot to current partition" +msgstr "" + +msgid "Rebooting..." +msgstr "" + +msgid "Shutting down..." +msgstr "" + +msgid "Status" +msgstr "" + +msgid "" +"The system is rebooting now.
DO NOT POWER OFF THE DEVICE!
Wait a " +"few minutes before you try to reconnect. It might be necessary to renew the " +"address of your computer to reach the device again, depending on your " +"settings." +msgstr "" + +msgid "" +"The system is rebooting to an alternative partition now.
DO NOT POWER " +"OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It " +"might be necessary to renew the address of your computer to reach the device " +"again, depending on your settings." +msgstr "" + +msgid "" +"The system is shutting down now.
DO NOT POWER OFF THE DEVICE!
It " +"might be necessary to renew the address of your computer to reach the device " +"again, depending on your settings." +msgstr "" + +msgid "Unable to find Dual Boot Flag Partition." +msgstr "" + +msgid "Unable to obtain firmware environment variable" +msgstr "" + +msgid "Unable to set Dual Boot Flag Partition entry for partition" +msgstr "" + +msgid "Unable to set firmware environment variable" +msgstr "" + +msgid "" +"WARNING: An alternative partition might have its own settings and completely " +"different firmware.

As your network configuration and WiFi SSID/" +"password on alternative partition might be different, you might have to " +"adjust your computer settings to be able to access your device once it " +"reboots.

Please also be aware that alternative partition " +"firmware might not provide an easy way to switch active partition and boot " +"back to the currently active partition.

Click \"Proceed\" below " +"to reboot device to an alternative partition." +msgstr "" + +msgid "" +"WARNING: Power off might result in a reboot on a device which doesn't " +"support power off.

Click \"Proceed\" below to power off your " +"device." +msgstr "" + +msgid "Warning: There are unsaved changes that will get lost on reboot!" +msgstr "" + +msgid "Warning: This system does not have two partitions!" +msgstr "" + +msgid "Warning: This system does not support powering off!" +msgstr "" + +msgid "to" +msgstr "" diff --git a/applications/luci-app-advanced-reboot/po/templates/luci-app-advanced-reboot.pot b/applications/luci-app-advanced-reboot/po/templates/luci-app-advanced-reboot.pot deleted file mode 100644 index 9c810892c..000000000 --- a/applications/luci-app-advanced-reboot/po/templates/luci-app-advanced-reboot.pot +++ /dev/null @@ -1,102 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - -msgid "Action" -msgstr "" - -msgid "Advanced Reboot" -msgstr "" - -msgid "Alternative" -msgstr "" - -msgid "Cancel" -msgstr "" - -msgid "Confirm" -msgstr "" - -msgid "Current" -msgstr "" - -msgid "Firmware/OS (Kernel)" -msgstr "" - -msgid "Partition" -msgstr "" - -msgid "Partitions" -msgstr "" - -msgid "Perform power off..." -msgstr "" - -msgid "Power Off Device" -msgstr "" - -msgid "Proceed" -msgstr "" - -msgid "Reboot Device to an Alternative Partition" -msgstr "" - -msgid "Reboot to alternative partition..." -msgstr "" - -msgid "Reboot to current partition" -msgstr "" - -msgid "Rebooting..." -msgstr "" - -msgid "Shutting down..." -msgstr "" - -msgid "Status" -msgstr "" - -msgid "" -"The system is rebooting now.
DO NOT POWER OFF THE DEVICE!
Wait a " -"few minutes before you try to reconnect. It might be necessary to renew the " -"address of your computer to reach the device again, depending on your " -"settings." -msgstr "" - -msgid "" -"The system is rebooting to an alternative partition now.
DO NOT POWER " -"OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It " -"might be necessary to renew the address of your computer to reach the device " -"again, depending on your settings." -msgstr "" - -msgid "" -"The system is shutting down now.
DO NOT POWER OFF THE DEVICE!
It " -"might be necessary to renew the address of your computer to reach the device " -"again, depending on your settings." -msgstr "" - -msgid "" -"WARNING: An alternative partition might have its own settings and completely " -"different firmware.

As your network configuration and WiFi SSID/" -"password on alternative partition might be different, you might have to " -"adjust your computer settings to be able to access your device once it " -"reboots.

Please also be aware that alternative partition " -"firmware might not provide an easy way to switch active partition and boot " -"back to the currently active partition.

Click \"Proceed\" below " -"to reboot device to an alternative partition." -msgstr "" - -msgid "" -"WARNING: Power off might result in a reboot on a device which doesn't " -"support power off.

Click \"Proceed\" below to power off your " -"device." -msgstr "" - -msgid "Warning: There are unsaved changes that will get lost on reboot!" -msgstr "" - -msgid "Warning: This system does not have two partitions!" -msgstr "" - -msgid "Warning: This system does not support powering off!" -msgstr "" diff --git a/applications/luci-app-aria2/po/ru/aria2.po b/applications/luci-app-aria2/po/ru/aria2.po new file mode 100644 index 000000000..48a522d59 --- /dev/null +++ b/applications/luci-app-aria2/po/ru/aria2.po @@ -0,0 +1,222 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: LuCI: aria2\n" +"POT-Creation-Date: 2017-11-30 23:45+0300\n" +"PO-Revision-Date: 2018-01-05 21:29+0300\n" +"Language-Team: http://cyber-place.ru\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.7.1\n" +"Last-Translator: Vladimir aka sunny \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Language: ru\n" + +msgid "\"Falloc\" is not available in all cases." +msgstr "\"Falloc\" возможен не всегда." + +msgid "DHT enabled" +msgstr "DHT включена" + +msgid "LPD enabled" +msgstr "LPD включено" + +msgid "Additional Bt tracker enabled" +msgstr "Дополнительный Bt tracker включен" + +msgid "Aria2" +msgstr "Aria2" + +msgid "Aria2 Settings" +msgstr "Aria2 настройки" + +msgid "Aria2 Status" +msgstr "Aria2 состояние" + +msgid "" +"Aria2 is a multi-protocol & multi-source download utility, here you can " +"configure the settings." +msgstr "" +"Aria2 - это мульти-протокольная и мульти-платформенная утилита загрузки, " +"здесь вы сможете ее настроить." + +msgid "Autosave session interval" +msgstr "Интервал сессии автосохранения" + +msgid "BitTorrent Settings" +msgstr "Настройки BitTorrent-а" + +msgid "BitTorrent listen port" +msgstr "Порт прослушивания BitTorrent-а" + +msgid "Collecting data..." +msgstr "Сбор информации..." + +msgid "Config file directory" +msgstr "Папка расположения сonfig файла" + +msgid "Debug" +msgstr "Отладка" + +msgid "Default download directory" +msgstr "Папка загрузки по умолчанию" + +msgid "Disk cache" +msgstr "Дисковый кэш" + +msgid "Enable log" +msgstr "Включить ведение системного журнала" + +msgid "Enabled" +msgstr "Включено" + +msgid "Error" +msgstr "Ошибка" + +msgid "Extra Settings" +msgstr "Дополнительные настройки" + +msgid "Falloc" +msgstr "Falloc" + +msgid "Files and Locations" +msgstr "Файлы и папки" + +msgid "Follow torrent" +msgstr "Запустить торрент-файл" + +msgid "General Settings" +msgstr "Основные настройки" + +msgid "Generate Randomly" +msgstr "Генерировать случайно" + +msgid "Info" +msgstr "Информация" + +msgid "List of additional Bt tracker" +msgstr "Список дополнительных BT tracker-ов" + +msgid "List of extra settings" +msgstr "Список дополнительных настроек" + +msgid "Log file is in the config file dir." +msgstr "Файл системного журнала находится в папке с config файлом." + +msgid "Log level" +msgstr "Уровень системного журнала" + +msgid "Max concurrent downloads" +msgstr "Максимальное количество одновременных загрузок" + +msgid "Max connection per server" +msgstr "Максимальное подключение на сервер" + +msgid "Max number of peers per torrent" +msgstr "Максимальное число пиров на торрент" + +msgid "Max number of split" +msgstr "Максимальное число разделений" + +msgid "Min split size" +msgstr "Минимальный размер разделений" + +msgid "No Authentication" +msgstr "Без проверки подлинности" + +msgid "Notice" +msgstr "Заметка" + +msgid "Off" +msgstr "Выключено" + +msgid "Open WebUI-Aria2" +msgstr "Открыть WebUI-Aria2" + +msgid "Open YAAW" +msgstr "Открыть YAAW" + +msgid "Overall download limit" +msgstr "Общий лимит загрузки" + +msgid "Overall speed limit enabled" +msgstr "Общий лимит скорости включен" + +msgid "Overall upload limit" +msgstr "Общий лимит скачивания" + +msgid "Per task download limit" +msgstr "Ограничить задачи загрузок" + +msgid "Per task speed limit enabled" +msgstr "Ограничить скорость выполнения каждой задачи" + +msgid "Per task upload limit" +msgstr "Ограничить задачи скачивания" + +msgid "Prealloc" +msgstr "Предварительно" + +msgid "Preallocation" +msgstr "Предварительное размещение" + +msgid "Prefix of peer ID" +msgstr "Префикс ID пира" + +msgid "RPC Token" +msgstr "RPC электронный ключ" + +msgid "RPC authentication method" +msgstr "RPC метод аутентификации" + +msgid "RPC password" +msgstr "RPC пароль" + +msgid "RPC port" +msgstr "RPC порт" + +msgid "RPC username" +msgstr "RPC логин" + +msgid "Run daemon as user" +msgstr "Запуск демона от имени пользователя" + +msgid "Sec" +msgstr "Секунды" + +msgid "Task Settings" +msgstr "Настройки параметров" + +msgid "The Aria2 service is not running." +msgstr "Aria2 сервис не запущен." + +msgid "The Aria2 service is running." +msgstr "Aria2 сервис запущен." + +msgid "Token" +msgstr "Электронный ключ" + +msgid "Trunc" +msgstr "Обрезать" + +msgid "Use WebSocket" +msgstr "Использовать WebSockets" + +msgid "User agent value" +msgstr "Агент пользователя" + +msgid "Username & Password" +msgstr "Имя и пароль" + +msgid "View Json-RPC URL" +msgstr "Показать URL Json-RPC" + +msgid "Warn" +msgstr "Внимание" + +msgid "in bytes, You can append K or M." +msgstr "в байтах. Вы можете добавить суффикс K (кило) или М (мега)." + +msgid "in bytes/sec, You can append K or M." +msgstr "в байтах/секундах. Вы можете добавить суффикс K (кило) или М (мега)." diff --git a/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm b/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm index 847ad5cfb..0a8c65ebd 100644 --- a/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm +++ b/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm @@ -71,15 +71,14 @@ end apply_acls("/usr/share/rpcd/acl.d/attendedsysupgrade.json", luci.dispatcher.context.authsession) - apply_acls("/usr/share/rpcd/acl.d/packagelist.json", luci.dispatcher.context.authsession) %> <%+header%>

<%:Attended Sysupgrade%>

- Easily search and install new releases and package upgrades. Sysupgrade images are created on demand based on locally installed packages. + Easily search and install new releases and package upgrades. Sysupgrade firmware are created on demand based on locally installed packages.
- - + +

@@ -89,7 +88,7 @@

- + <%+footer%> diff --git a/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json b/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json index 97aa81492..754931926 100644 --- a/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json +++ b/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json @@ -4,10 +4,12 @@ "read": { "ubus": { "rpc-sys": [ - "upgrade_start" + "upgrade_start", + "packagelist" ], "system": [ - "board" + "board", + "info" ], "uci": [ "get", "set", "commit" diff --git a/applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js b/applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js new file mode 100644 index 000000000..c2fe81d58 --- /dev/null +++ b/applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js @@ -0,0 +1,402 @@ +function $(s) { + return document.getElementById(s.substring(1)); +} + +function show(s) { + $(s).style.display = 'block'; +} + +function hide(s) { + $(s).style.display = 'none'; +} + +function set_server() { + hide("#error_box"); + data.url = $("#server").value; + ubus_call("uci", "set", { "config": "attendedsysupgrade", "section": "server", values: { "url": data.url } }) + ubus_call("uci", "commit", { "config": "attendedsysupgrade" }) + var server_button = $("#server") + server_button.type = 'button'; + server_button.className = 'cbi-button cbi-button-edit'; + server_button.parentElement.removeChild($("#button_set")); + server_button.onclick = edit_server; +} + +function edit_server() { + $("#server").type = 'text'; + $("#server").onkeydown = function(event) { + if(event.key === 'Enter') { + set_server(); + return false; + } + } + $("#server").className = ''; + $("#server").onclick = null; + + button_set = document.createElement("input"); + button_set.type = "button"; + button_set.value = "Save"; + button_set.name = "button_set"; + button_set.id = "button_set"; + button_set.className = 'cbi-button cbi-button-edit'; + button_set.style = 'background-image: url("/luci-static/resources/cbi/save.gif");' + button_set.onclick = set_server + $("#server").parentElement.appendChild(button_set); +} + +function edit_packages() { + data.edit_packages = true + hide("#edit_button"); + $("#edit_packages").value = data.packages.join("\n"); + show("#edit_packages"); +} + +// requests to the upgrade server +function server_request(request_dict, path, callback) { + request_dict.distro = data.release.distribution; + request_dict.target = data.release.target.split("\/")[0]; + request_dict.subtarget = data.release.target.split("\/")[1]; + var request = new XMLHttpRequest(); + request.open("POST", data.url + "/" + path, true); + request.setRequestHeader("Content-type", "application/json"); + request.send(JSON.stringify(request_dict)); + request.onerror = function(e) { + error_box("upgrade server down") + show("#server_div"); + } + request.addEventListener('load', function(event) { + callback(request) + }); +} + +// initial setup, get system information +function setup() { + ubus_call("rpc-sys", "packagelist", {}, "packages"); + ubus_call("system", "board", {}, "release"); + ubus_call("system", "board", {}, "board_name"); + ubus_call("system", "board", {}, "model"); + ubus_call("system", "info", {}, "memory"); + uci_get({ "config": "attendedsysupgrade", "section": "server", "option": "url" }) + uci_get({ "config": "attendedsysupgrade", "section": "client", "option": "upgrade_packages" }) + uci_get({ "config": "attendedsysupgrade", "section": "client", "option": "advanced_mode" }) + uci_get({ "config": "attendedsysupgrade", "section": "client", "option": "auto_search" }) + setup_ready(); +} + +function setup_ready() { + // checks if a async ubus calls have finished + if(ubus_counter != ubus_closed) { + setTimeout(setup_ready, 300) + } else { + if(data.auto_search == 1) { + upgrade_check(); + } else { + show("#upgrade_button"); + show("#server_div"); + $("#server").value = data.url; + } + } +} + +function uci_get(option) { + // simple wrapper to get a uci value store in data.