diff options
Diffstat (limited to 'applications')
46 files changed, 1557 insertions, 1087 deletions
diff --git a/applications/luci-app-aria2/luasrc/controller/aria2.lua b/applications/luci-app-aria2/luasrc/controller/aria2.lua index 17289305d7..56172ec1dd 100644 --- a/applications/luci-app-aria2/luasrc/controller/aria2.lua +++ b/applications/luci-app-aria2/luasrc/controller/aria2.lua @@ -34,7 +34,8 @@ function status() local status = { running = (sys.call("pidof aria2c > /dev/null") == 0), yaaw = ipkg.installed("yaaw"), - webui = ipkg.installed("webui-aria2") + webui = ipkg.installed("webui-aria2"), + ariang = (ipkg.installed("ariang") or ipkg.installed("ariang-nginx")) } http.prepare_content("application/json") diff --git a/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm b/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm index 66db6ce550..34b7b3c641 100644 --- a/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm +++ b/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm @@ -11,6 +11,9 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin/services/aria2/status")%>', nul if (data.webui) { links += '<input class="cbi-button mar-10" type="button" value="<%:Open WebUI-Aria2%>" onclick="openWebUI(\'webui-aria2\');" />'; } + if (data.ariang) { + links += '<input class="cbi-button mar-10" type="button" value="<%:Open AriaNg%>" onclick="openWebUI(\'ariang\');" />'; + } tb.innerHTML = links; } else { tb.innerHTML = '<em><%:The Aria2 service is not running.%></em>'; diff --git a/applications/luci-app-aria2/po/pt-br/aria2.po b/applications/luci-app-aria2/po/pt-br/aria2.po index f66fef3cc6..a4b0ed5ac6 100644 --- a/applications/luci-app-aria2/po/pt-br/aria2.po +++ b/applications/luci-app-aria2/po/pt-br/aria2.po @@ -41,7 +41,7 @@ msgstr "Aria2" msgid "Aria2 Settings" msgstr "Configurações do Aria2" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:74 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:77 msgid "Aria2 Status" msgstr "Estado do Aria2" @@ -65,7 +65,7 @@ msgstr "Configurações do BitTorrent" msgid "BitTorrent listen port" msgstr "Porta de escuta do BitTorrent" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:76 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:79 msgid "Collecting data..." msgstr "Coletando dados..." @@ -174,6 +174,10 @@ msgstr "Aviso" msgid "Off" msgstr "Desligado" +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:15 +msgid "Open AriaNg" +msgstr "" + #: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:12 msgid "Open WebUI-Aria2" msgstr "Abrir WebUI-Aria2" @@ -260,7 +264,7 @@ msgstr "Segurança" msgid "Task Settings" msgstr "Configurações das tarefas" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:16 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:19 msgid "The Aria2 service is not running." msgstr "O serviço Aria2 está parado." diff --git a/applications/luci-app-aria2/po/ru/aria2.po b/applications/luci-app-aria2/po/ru/aria2.po index 70e7e37296..39f33be733 100644 --- a/applications/luci-app-aria2/po/ru/aria2.po +++ b/applications/luci-app-aria2/po/ru/aria2.po @@ -40,7 +40,7 @@ msgstr "Aria2" msgid "Aria2 Settings" msgstr "Настройка Aria2" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:74 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:77 msgid "Aria2 Status" msgstr "Состояние Aria2" @@ -64,7 +64,7 @@ msgstr "Настройки BitTorrent-а" msgid "BitTorrent listen port" msgstr "Порты BitTorrent-а" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:76 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:79 msgid "Collecting data..." msgstr "Сбор данных..." @@ -172,6 +172,10 @@ msgstr "Заметка" msgid "Off" msgstr "Выключено" +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:15 +msgid "Open AriaNg" +msgstr "" + #: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:12 msgid "Open WebUI-Aria2" msgstr "Открыть WebUI-Aria2" @@ -248,7 +252,7 @@ msgstr "Секунды" msgid "Task Settings" msgstr "Настройки задач" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:16 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:19 msgid "The Aria2 service is not running." msgstr "Aria2 сервис не запущен." diff --git a/applications/luci-app-aria2/po/sv/aria2.po b/applications/luci-app-aria2/po/sv/aria2.po index 9612be892e..01e881f20c 100644 --- a/applications/luci-app-aria2/po/sv/aria2.po +++ b/applications/luci-app-aria2/po/sv/aria2.po @@ -26,7 +26,7 @@ msgstr "Aria2" msgid "Aria2 Settings" msgstr "Inställningar för Aria2" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:74 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:77 msgid "Aria2 Status" msgstr "Status för Aria2" @@ -48,7 +48,7 @@ msgstr "Inställningar för BitTorrent" msgid "BitTorrent listen port" msgstr "Lyssningsport för BitTorrent" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:76 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:79 msgid "Collecting data..." msgstr "Samlar in data..." @@ -156,6 +156,10 @@ msgstr "Avisering" msgid "Off" msgstr "Av" +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:15 +msgid "Open AriaNg" +msgstr "" + #: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:12 msgid "Open WebUI-Aria2" msgstr "Öppna WebUI-Aria2" @@ -232,7 +236,7 @@ msgstr "Sek" msgid "Task Settings" msgstr "Inställningar för uppgifter" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:16 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:19 msgid "The Aria2 service is not running." msgstr "Aria2-tjänsten körs inte." diff --git a/applications/luci-app-aria2/po/templates/aria2.pot b/applications/luci-app-aria2/po/templates/aria2.pot index b55dd25202..705fd3460b 100644 --- a/applications/luci-app-aria2/po/templates/aria2.pot +++ b/applications/luci-app-aria2/po/templates/aria2.pot @@ -26,7 +26,7 @@ msgstr "" msgid "Aria2 Settings" msgstr "" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:74 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:77 msgid "Aria2 Status" msgstr "" @@ -48,7 +48,7 @@ msgstr "" msgid "BitTorrent listen port" msgstr "" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:76 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:79 msgid "Collecting data..." msgstr "" @@ -156,6 +156,10 @@ msgstr "" msgid "Off" msgstr "" +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:15 +msgid "Open AriaNg" +msgstr "" + #: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:12 msgid "Open WebUI-Aria2" msgstr "" @@ -232,7 +236,7 @@ msgstr "" msgid "Task Settings" msgstr "" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:16 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:19 msgid "The Aria2 service is not running." msgstr "" diff --git a/applications/luci-app-aria2/po/zh-cn/aria2.po b/applications/luci-app-aria2/po/zh-cn/aria2.po index 1725aff111..30629e7cfc 100644 --- a/applications/luci-app-aria2/po/zh-cn/aria2.po +++ b/applications/luci-app-aria2/po/zh-cn/aria2.po @@ -36,7 +36,7 @@ msgstr "Aria2" msgid "Aria2 Settings" msgstr "Aria2 配置" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:74 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:77 msgid "Aria2 Status" msgstr "Aria2 状态" @@ -58,7 +58,7 @@ msgstr "BitTorrent 设置" msgid "BitTorrent listen port" msgstr "BitTorrent 监听端口" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:76 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:79 msgid "Collecting data..." msgstr "正在收集数据..." @@ -166,6 +166,10 @@ msgstr "注意" msgid "Off" msgstr "关闭" +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:15 +msgid "Open AriaNg" +msgstr "打开 AriaNg" + #: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:12 msgid "Open WebUI-Aria2" msgstr "打开 WebUI-Aria2" @@ -242,7 +246,7 @@ msgstr "秒" msgid "Task Settings" msgstr "任务设置" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:16 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:19 msgid "The Aria2 service is not running." msgstr "Aria2 未运行" diff --git a/applications/luci-app-aria2/po/zh-tw/aria2.po b/applications/luci-app-aria2/po/zh-tw/aria2.po index 8e98f698fa..691c26eeb5 100644 --- a/applications/luci-app-aria2/po/zh-tw/aria2.po +++ b/applications/luci-app-aria2/po/zh-tw/aria2.po @@ -36,7 +36,7 @@ msgstr "Aria2" msgid "Aria2 Settings" msgstr "Aria2 配置" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:74 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:77 msgid "Aria2 Status" msgstr "Aria2 狀態" @@ -58,7 +58,7 @@ msgstr "BitTorrent 設定" msgid "BitTorrent listen port" msgstr "BitTorrent 監聽埠" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:76 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:79 msgid "Collecting data..." msgstr "正在收集資料..." @@ -166,6 +166,10 @@ msgstr "注意" msgid "Off" msgstr "關閉" +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:15 +msgid "Open AriaNg" +msgstr "開啟 AriaNg" + #: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:12 msgid "Open WebUI-Aria2" msgstr "開啟 WebUI-Aria2" @@ -242,7 +246,7 @@ msgstr "秒" msgid "Task Settings" msgstr "任務設定" -#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:16 +#: applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm:19 msgid "The Aria2 service is not running." msgstr "Aria2 未執行" diff --git a/applications/luci-app-openvpn/luasrc/controller/openvpn.lua b/applications/luci-app-openvpn/luasrc/controller/openvpn.lua index 61592d0fac..c9a932d870 100644 --- a/applications/luci-app-openvpn/luasrc/controller/openvpn.lua +++ b/applications/luci-app-openvpn/luasrc/controller/openvpn.lua @@ -18,7 +18,7 @@ function ovpn_upload() local util = require("luci.util") local uci = require("luci.model.uci").cursor() local upload = http.formvalue("ovpn_file") - local name = string.gsub(util.shellquote(http.formvalue("instance_name2")), "'", "") + local name = http.formvalue("instance_name2") local file = "/etc/openvpn/" ..name.. ".ovpn" if name and upload then diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua index 6dc43bec24..25d1481f8a 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua @@ -1,9 +1,7 @@ -- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. -require("luci.ip") -require("luci.model.uci") - +local fs = require("nixio.fs") local knownParams = { -- @@ -160,6 +158,10 @@ local knownParams = { "script_security", { 0, 1, 2, 3 }, translate("Policy level over usage of external programs and scripts") }, + { ListValue, + "compress", + { "lzo", "lz4" }, + translate("Enable a compression algorithm") }, } }, { "Networking", { @@ -236,6 +238,10 @@ local knownParams = { "route_nopull", 0, translate("Don't pull routes automatically") }, + { Flag, + "allow_recursive_routing", + 0, + translate("Don't drop incoming tun packets with same destination as host") }, { ListValue, "mtu_disc", { "yes", "maybe", "no" }, @@ -464,7 +470,7 @@ local knownParams = { 0, translate("Accept options pushed from server"), { client="1" } }, - { Value, + { FileUpload, "auth_user_pass", "/etc/openvpn/userpass.txt", translate("Authenticate using username/password"), @@ -540,6 +546,10 @@ local knownParams = { { "", "local", "def1", "local def1" }, translate("Automatically redirect default route"), { client="1" } }, + { Value, + "verify_client_cert", + { "none", "optional", "require" }, + translate("Specify whether the client is required to supply a valid certificate") }, } }, { "Cryptography", { @@ -555,7 +565,51 @@ local knownParams = { -- parse { Value, "cipher", - "BF-CBC", + { + "AES-128-CBC", + "AES-128-CFB", + "AES-128-CFB1", + "AES-128-CFB8", + "AES-128-GCM", + "AES-128-OFB", + "AES-192-CBC", + "AES-192-CFB", + "AES-192-CFB1", + "AES-192-CFB8", + "AES-192-GCM", + "AES-192-OFB", + "AES-256-CBC", + "AES-256-CFB", + "AES-256-CFB1", + "AES-256-CFB8", + "AES-256-GCM", + "AES-256-OFB", + "BF-CBC", + "BF-CFB", + "BF-OFB", + "CAST5-CBC", + "CAST5-CFB", + "CAST5-OFB", + "DES-CBC", + "DES-CFB", + "DES-CFB1", + "DES-CFB8", + "DES-EDE-CBC", + "DES-EDE-CFB", + "DES-EDE-OFB", + "DES-EDE3-CBC", + "DES-EDE3-CFB", + "DES-EDE3-CFB1", + "DES-EDE3-CFB8", + "DES-EDE3-OFB", + "DES-OFB", + "DESX-CBC", + "RC2-40-CBC", + "RC2-64-CBC", + "RC2-CBC", + "RC2-CFB", + "RC2-OFB" + }, translate("Encryption cipher for packets") }, -- parse { Value, @@ -689,10 +743,18 @@ local knownParams = { "tls_version_max", "1.2", translate("The highest supported TLS version") }, - { Value, + { ListValue, "key_direction", - "1", + { 0, 1 }, translate("The key direction for 'tls-auth' and 'secret' options") }, + { Flag, + "ncp_disable", + 0, + translate("This completely disables cipher negotiation") }, + { Value, + "ncp_ciphers", + "AES-256-GCM:AES-128-GCM", + translate("Restrict the allowed ciphers to be negotiated") }, } } } @@ -701,8 +763,10 @@ local cts = { } local params = { } local m = Map("openvpn") -local p = m:section( SimpleSection ) +m.redirect = luci.dispatcher.build_url("admin", "services", "openvpn") +m.apply_on_parse = true +local p = m:section( SimpleSection ) p.template = "openvpn/pageswitch" p.mode = "advanced" p.instance = arg[1] @@ -732,8 +796,44 @@ for _, option in ipairs(params) do option[2], option[4] ) + o.optional = true + if option[1] == DummyValue then o.value = option[3] + elseif option[1] == FileUpload then + + function o.cfgvalue(self, section) + local cfg_val = AbstractValue.cfgvalue(self, section) + + if cfg_val then + return cfg_val + end + end + + function o.formvalue(self, section) + local sel_val = AbstractValue.formvalue(self, section) + local txt_val = luci.http.formvalue("cbid."..self.map.config.."."..section.."."..self.option..".textbox") + + if sel_val and sel_val ~= "" then + return sel_val + end + + if txt_val and txt_val ~= "" then + return txt_val + end + end + + function o.remove(self, section) + local cfg_val = AbstractValue.cfgvalue(self, section) + local txt_val = luci.http.formvalue("cbid."..self.map.config.."."..section.."."..self.option..".textbox") + + if cfg_val and fs.access(cfg_val) and txt_val == "" then + fs.unlink(cfg_val) + end + return AbstractValue.remove(self, section) + end + elseif option[1] == Flag then + o.default = nil else if option[1] == DynamicList then function o.cfgvalue(...) @@ -742,8 +842,6 @@ for _, option in ipairs(params) do end end - o.optional = true - if type(option[3]) == "table" then if o.optional then o:value("", "-- remove --") end for _, v in ipairs(option[3]) do diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua index 6b6323e078..3e9137baeb 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua @@ -1,45 +1,100 @@ -- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. -require("luci.ip") -require("luci.model.uci") +local fs = require("nixio.fs") local basicParams = { - -- + -- -- Widget, Name, Default(s), Description -- - - { ListValue, "verb", { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, translate("Set output verbosity") }, - { Value, "nice",0, translate("Change process priority") }, - { Value,"port",1194, translate("TCP/UDP port # for both local and remote") }, - { ListValue,"dev_type",{ "tun", "tap" }, translate("Type of used device") }, - - { Value,"ifconfig","10.200.200.3 10.200.200.1", translate("Set tun/tap adapter parameters") }, - { Value,"server","10.200.200.0 255.255.255.0", translate("Configure server mode") }, - { Value,"server_bridge","192.168.1.1 255.255.255.0 192.168.1.128 192.168.1.254", translate("Configure server bridge") }, - { Flag,"nobind",0, translate("Do not bind to local address and port") }, - - { Value,"keepalive","10 60", translate("Helper directive to simplify the expression of --ping and --ping-restart in server mode configurations") }, - - { ListValue,"proto",{ "udp", "tcp-client", "tcp-server" }, translate("Use protocol") }, - - { Flag,"client",0, translate("Configure client mode") }, - { Flag,"client_to_client",0, translate("Allow client-to-client traffic") }, - { DynamicList,"remote","vpnserver.example.org", translate("Remote host name or ip address") }, - - { FileUpload,"secret","/etc/openvpn/secret.key", translate("Enable Static Key encryption mode (non-TLS)") }, - { Value,"key_direction","1", translate("The key direction for 'tls-auth' and 'secret' options") }, - { FileUpload,"pkcs12","/etc/easy-rsa/keys/some-client.pk12", translate("PKCS#12 file containing keys") }, - { FileUpload,"ca","/etc/easy-rsa/keys/ca.crt", translate("Certificate authority") }, - { FileUpload,"dh","/etc/easy-rsa/keys/dh1024.pem", translate("Diffie Hellman parameters") }, - { FileUpload,"cert","/etc/easy-rsa/keys/some-client.crt", translate("Local certificate") }, - { FileUpload,"key","/etc/easy-rsa/keys/some-client.key", translate("Local private key") }, + { ListValue, + "verb", + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, + translate("Set output verbosity") }, + { Value, + "nice", + 0, + translate("Change process priority") }, + { Value, + "port", + 1194, + translate("TCP/UDP port # for both local and remote") }, + { ListValue, + "dev_type", + { "tun", "tap" }, + translate("Type of used device") }, + { Value, + "ifconfig", + "10.200.200.3 10.200.200.1", + translate("Set tun/tap adapter parameters") }, + { Value, + "server", + "10.200.200.0 255.255.255.0", + translate("Configure server mode") }, + { Value, + "server_bridge", + "192.168.1.1 255.255.255.0 192.168.1.128 192.168.1.254", + translate("Configure server bridge") }, + { Flag, + "nobind", + 0, + translate("Do not bind to local address and port") }, + { Value, + "keepalive", + "10 60", + translate("Helper directive to simplify the expression of --ping and --ping-restart in server mode configurations") }, + { ListValue, + "proto", + { "udp", "tcp-client", "tcp-server" }, + translate("Use protocol") }, + { Flag, + "client", + 0, + translate("Configure client mode") }, + { Flag, + "client_to_client", + 0, + translate("Allow client-to-client traffic") }, + { DynamicList, + "remote", + "vpnserver.example.org", + translate("Remote host name or ip address") }, + { FileUpload, + "secret", + "/etc/openvpn/secret.key", + translate("Enable Static Key encryption mode (non-TLS)") }, + { ListValue, + "key_direction", + { 0, 1 }, + translate("The key direction for 'tls-auth' and 'secret' options") }, + { FileUpload, + "pkcs12", + "/etc/easy-rsa/keys/some-client.pk12", + translate("PKCS#12 file containing keys") }, + { FileUpload, + "ca", + "/etc/easy-rsa/keys/ca.crt", + translate("Certificate authority") }, + { FileUpload, + "dh", + "/etc/easy-rsa/keys/dh1024.pem", + translate("Diffie Hellman parameters") }, + { FileUpload, + "cert", + "/etc/easy-rsa/keys/some-client.crt", + translate("Local certificate") }, + { FileUpload, + "key", + "/etc/easy-rsa/keys/some-client.key", + translate("Local private key") }, } local m = Map("openvpn") -local p = m:section( SimpleSection ) +m.redirect = luci.dispatcher.build_url("admin", "services", "openvpn") +m.apply_on_parse = true +local p = m:section( SimpleSection ) p.template = "openvpn/pageswitch" p.mode = "basic" p.instance = arg[1] @@ -52,11 +107,45 @@ for _, option in ipairs(basicParams) do option[1], option[2], option[2], option[4] ) - + o.optional = true if option[1] == DummyValue then o.value = option[3] + elseif option[1] == FileUpload then + + function o.cfgvalue(self, section) + local cfg_val = AbstractValue.cfgvalue(self, section) + + if cfg_val then + return cfg_val + end + end + + function o.formvalue(self, section) + local sel_val = AbstractValue.formvalue(self, section) + local txt_val = luci.http.formvalue("cbid."..self.map.config.."."..section.."."..self.option..".textbox") + + if sel_val and sel_val ~= "" then + return sel_val + end + + if txt_val and txt_val ~= "" then + return txt_val + end + end + + function o.remove(self, section) + local cfg_val = AbstractValue.cfgvalue(self, section) + local txt_val = luci.http.formvalue("cbid."..self.map.config.."."..section.."."..self.option..".textbox") + + if cfg_val and fs.access(cfg_val) and txt_val == "" then + fs.unlink(cfg_val) + end + return AbstractValue.remove(self, section) + end + elseif option[1] == Flag then + o.default = nil else if option[1] == DynamicList then function o.cfgvalue(...) diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua index 6878275d78..9d50601b1f 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua @@ -1,10 +1,11 @@ -- Licensed to the public under the Apache License 2.0. -local ip = require("luci.ip") -local fs = require("nixio.fs") -local util = require("luci.util") -local uci = require("luci.model.uci").cursor() -local cfg_file = uci:get("openvpn", arg[1], "config") +local ip = require("luci.ip") +local fs = require("nixio.fs") +local util = require("luci.util") +local uci = require("luci.model.uci").cursor() +local cfg_file = uci:get("openvpn", arg[1], "config") +local auth_file = cfg_file:match("(.+)%..+").. ".auth" local m = Map("openvpn") @@ -36,25 +37,45 @@ f:append(Template("openvpn/ovpn_css")) f.submit = translate("Save") f.reset = false -s = f:section(SimpleSection, nil, translatef("This form allows you to modify the content of the OVPN config file (%s). ", cfg_file)) -file = s:option(TextValue, "data") +s = f:section(SimpleSection, nil, translatef("Section to modify the OVPN config file (%s)", cfg_file)) +file = s:option(TextValue, "data1") file.datatype = "string" file.rows = 20 -file.rmempty = true function file.cfgvalue() return fs.readfile(cfg_file) or "" end -function file.write(self, section, data) - return fs.writefile(cfg_file, "\n" .. util.trim(data:gsub("\r\n", "\n")) .. "\n") +function file.write(self, section, data1) + return fs.writefile(cfg_file, "\n" .. util.trim(data1:gsub("\r\n", "\n")) .. "\n") end function file.remove(self, section, value) return fs.writefile(cfg_file, "") end -function s.handle(self, state, data) +function s.handle(self, state, data1) + return true +end + +s = f:section(SimpleSection, nil, translatef("Section to add an optional 'auth-user-pass' file with your credentials (%s)", auth_file)) +file = s:option(TextValue, "data2") +file.datatype = "string" +file.rows = 5 + +function file.cfgvalue() + return fs.readfile(auth_file) or "" +end + +function file.write(self, section, data2) + return fs.writefile(auth_file, util.trim(data2:gsub("\r\n", "\n")) .. "\n") +end + +function file.remove(self, section, value) + return fs.writefile(auth_file, "") +end + +function s.handle(self, state, data2) return true end diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua index 8f4859c0e5..41266d860e 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua @@ -14,8 +14,8 @@ s.template_addremove = "openvpn/cbi-select-input-add" s.addremove = true s.add_select_options = { } -file_cfg = s:option(DummyValue, "config") -function file_cfg.cfgvalue(self, section) +local cfg = s:option(DummyValue, "config") +function cfg.cfgvalue(self, section) local file_cfg = self.map:get(section, "config") if file_cfg then s.extedit = luci.dispatcher.build_url("admin", "services", "openvpn", "file", "%s") @@ -69,19 +69,38 @@ function s.create(self, name) local options = uci:get_all("openvpn_recipes", recipe) for k, v in pairs(options) do if k ~= "_role" and k ~= "_description" then + if type(v) == "boolean" then + v = v and "1" or "0" + end uci:set("openvpn", name, k, v) end end uci:save("openvpn") - luci.http.redirect( self.extedit:format(name) ) + uci:commit("openvpn") + if extedit then + luci.http.redirect( self.extedit:format(name) ) + end end elseif #name > 0 then self.invalid_cts = true end - return 0 end +function s.remove(self, name) + local cfg_file = "/etc/openvpn/" ..name.. ".ovpn" + local auth_file = "/etc/openvpn/" ..name.. ".auth" + if fs.access(cfg_file) then + fs.unlink(cfg_file) + end + if fs.access(auth_file) then + fs.unlink(auth_file) + end + uci:delete("openvpn", name) + uci:save("openvpn") + uci:commit("openvpn") +end + s:option( Flag, "enabled", translate("Enabled") ) local active = s:option( DummyValue, "_active", translate("Started") ) @@ -122,12 +141,30 @@ end local port = s:option( DummyValue, "port", translate("Port") ) function port.cfgvalue(self, section) local val = AbstractValue.cfgvalue(self, section) + if not val then + local file_cfg = self.map:get(section, "config") + if file_cfg and fs.access(file_cfg) then + val = sys.exec("awk '{if(match(tolower($1),/^port$/)&&match($2,/[0-9]+/)){cnt++;printf $2;exit}}END{if(cnt==0)printf \"-\"}' " ..file_cfg) + if val == "-" then + val = sys.exec("awk '{if(match(tolower($1),/^remote$/)&&match($3,/[0-9]+/)){cnt++;printf $3;exit}}END{if(cnt==0)printf \"-\"}' " ..file_cfg) + end + end + end return val or "-" end local proto = s:option( DummyValue, "proto", translate("Protocol") ) function proto.cfgvalue(self, section) local val = AbstractValue.cfgvalue(self, section) + if not val then + local file_cfg = self.map:get(section, "config") + if file_cfg and fs.access(file_cfg) then + val = sys.exec("awk '{if(match(tolower($1),/^proto$/)&&match(tolower($2),/^udp[46]*$|^tcp[46]*-server$|^tcp[46]*-client$/)){cnt++;printf tolower($2);exit}}END{if(cnt==0)printf \"-\"}' " ..file_cfg) + if val == "-" then + val = sys.exec("awk '{if(match(tolower($1),/^remote$/)&&match(tolower($4),/^udp[46]*$|^tcp[46]*-server$|^tcp[46]*-client$/)){cnt++;printf $4;exit}}END{if(cnt==0)printf \"-\"}' " ..file_cfg) + end + end + end return val or "-" end diff --git a/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm b/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm index 09da2eb22d..e75bfda900 100644 --- a/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm +++ b/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm @@ -3,7 +3,7 @@ //<![CDATA[ function vpn_add() { - var vpn_name = div_add.querySelector("#instance_name1").value.replace(/[^\x00-\x7F]|[\s!@#$%^&*()+=\[\]{};':"\\|,<>\/?]/g,''); + var vpn_name = div_add.querySelector("#instance_name1").value.replace(/[^\x00-\x7F]|[\s!@#$%^&*()\-+=\[\]{};':"\\|,<>\/?]/g,''); var vpn_template = div_add.querySelector("#instance_template").value; var form = document.getElementsByName('cbi')[0]; @@ -31,7 +31,7 @@ function vpn_upload() { - var vpn_name = div_upload.querySelector("#instance_name2").value.replace(/[^\x00-\x7F]|[\s!@#$%^&*()+=\[\]{};':"\\|,<>\/?]/g,''); + var vpn_name = div_upload.querySelector("#instance_name2").value.replace(/[^\x00-\x7F]|[\s!@#$%^&*()\-+=\[\]{};':"\\|,<>\/?]/g,''); var vpn_file = document.getElementById("ovpn_file").value; var form = document.getElementsByName('cbi')[0]; @@ -77,10 +77,10 @@ <div class="table cbi-section-table"> <h4><%:Template based configuration%></h4> <div class="tr cbi-section-table-row" id="div_add"> - <div class="td"> + <div class="td left"> <input type="text" maxlength="20" placeholder="Instance name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.text" id="instance_name1" /> </div> - <div class="td"> + <div class="td left"> <select id="instance_template" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.select"> <option value="" selected="selected" disabled="disabled"><%:Select template ...%></option> <%- for k, v in luci.util.kspairs(self.add_select_options) do %> @@ -88,19 +88,19 @@ <% end -%> </select> </div> - <div class="td"> + <div class="td left"> <input class="cbi-button cbi-button-add" type="submit" onclick="vpn_add(); return false;" value="<%:Add%>" title="<%:Add template based configuration%>" /><br /> </div> </div> <h4><%:OVPN configuration file upload%></h4> <div class="tr cbi-section-table-row" id="div_upload"> - <div class="td"> + <div class="td left"> <input type="text" maxlength="20" placeholder="Instance name" name="instance_name2" id="instance_name2" /> </div> - <div class="td"> + <div class="td left"> <input type="file" name="ovpn_file" id="ovpn_file" accept="application/x-openvpn-profile,.ovpn" /> </div> - <div class="td"> + <div class="td left"> <input class="cbi-button cbi-button-add" type="submit" onclick="vpn_upload(); return false;" value="<%:Upload%>" title="<%:Upload ovpn file%>" /> </div> </div> diff --git a/applications/luci-app-openvpn/luasrc/view/openvpn/ovpn_css.htm b/applications/luci-app-openvpn/luasrc/view/openvpn/ovpn_css.htm index c7062b8d7a..55c0a543fc 100644 --- a/applications/luci-app-openvpn/luasrc/view/openvpn/ovpn_css.htm +++ b/applications/luci-app-openvpn/luasrc/view/openvpn/ovpn_css.htm @@ -10,12 +10,6 @@ border: 0px; text-align: left; } - .td - { - text-align: left; - border-top: 0px; - margin: 5px; - } .vpn-output { box-shadow: none; diff --git a/applications/luci-app-openvpn/luasrc/view/openvpn/pageswitch.htm b/applications/luci-app-openvpn/luasrc/view/openvpn/pageswitch.htm index 17beef0d39..c1fe05215a 100644 --- a/applications/luci-app-openvpn/luasrc/view/openvpn/pageswitch.htm +++ b/applications/luci-app-openvpn/luasrc/view/openvpn/pageswitch.htm @@ -11,17 +11,11 @@ <a href="<%=url('admin/services/openvpn')%>"><%:Overview%></a> » <%=luci.i18n.translatef("Instance \"%s\"", self.instance)%> </h3> - <% if self.mode == "file" then %> - <a href="<%=url('admin/services/openvpn/basic', self.instance)%>"><%:Switch to basic configuration%> »</a><p/> - <a href="<%=url('admin/services/openvpn/advanced', self.instance, "Service")%>"><%:Switch to advanced configuration%> »</a> - <hr /> - <% elseif self.mode == "basic" then %> + <% if self.mode == "basic" then %> <a href="<%=url('admin/services/openvpn/advanced', self.instance, "Service")%>"><%:Switch to advanced configuration%> »</a><p/> - <a href="<%=url('admin/services/openvpn/file', self.instance)%>"><%:Switch to file based configuration%> »</a> <hr /> <% elseif self.mode == "advanced" then %> <a href="<%=url('admin/services/openvpn/basic', self.instance)%>"><%:Switch to basic configuration%> »</a><p/> - <a href="<%=url('admin/services/openvpn/file', self.instance)%>"><%:Switch to file based configuration%> »</a> <hr /> <%:Configuration category%>: <% for i, c in ipairs(self.categories) do %> diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js new file mode 100644 index 0000000000..274a982929 --- /dev/null +++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js @@ -0,0 +1,812 @@ +var packages = { + available: { providers: {}, pkgs: {} }, + installed: { providers: {}, pkgs: {} } +}; + +var currentDisplayMode = 'available', currentDisplayRows = []; + +function parseList(s, dest) +{ + var re = /([^\n]*)\n/g, + pkg = null, key = null, val = null, m; + + while ((m = re.exec(s)) !== null) { + if (m[1].match(/^\s(.*)$/)) { + if (pkg !== null && key !== null && val !== null) + val += '\n' + RegExp.$1.trim(); + + continue; + } + + if (key !== null && val !== null) { + switch (key) { + case 'package': + pkg = { name: val }; + break; + + case 'depends': + case 'provides': + var list = val.split(/\s*,\s*/); + if (list.length !== 1 || list[0].length > 0) + pkg[key] = list; + break; + + case 'installed-time': + pkg.installtime = new Date(+val * 1000); + break; + + case 'installed-size': + pkg.installsize = +val; + break; + + case 'status': + var stat = val.split(/\s+/), + mode = stat[1], + installed = stat[2]; + + switch (mode) { + case 'user': + case 'hold': + pkg[mode] = true; + break; + } + + switch (installed) { + case 'installed': + pkg.installed = true; + break; + } + break; + + case 'essential': + if (val === 'yes') + pkg.essential = true; + break; + + case 'size': + pkg.size = +val; + break; + + case 'architecture': + case 'auto-installed': + case 'filename': + case 'sha256sum': + case 'section': + break; + + default: + pkg[key] = val; + break; + } + + key = val = null; + } + + if (m[1].trim().match(/^([\w-]+)\s*:(.+)$/)) { + key = RegExp.$1.toLowerCase(); + val = RegExp.$2.trim(); + } + else { + dest.pkgs[pkg.name] = pkg; + + var provides = dest.providers[pkg.name] ? [] : [ pkg.name ]; + + if (pkg.provides) + provides.push.apply(provides, pkg.provides); + + provides.forEach(function(p) { + dest.providers[p] = dest.providers[p] || []; + dest.providers[p].push(pkg); + }); + } + } +} + +function display(pattern) +{ + var src = packages[currentDisplayMode === 'updates' ? 'installed' : currentDisplayMode], + table = document.querySelector('#packages'), + pager = document.querySelector('#pager'); + + currentDisplayRows.length = 0; + + if (typeof(pattern) === 'string' && pattern.length > 0) + pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'ig'); + + for (var name in src.pkgs) { + var pkg = src.pkgs[name], + desc = pkg.description || '', + altsize = null; + + if (!pkg.size && packages.available.pkgs[name]) + altsize = packages.available.pkgs[name].size; + + if (!desc && packages.available.pkgs[name]) + desc = packages.available.pkgs[name].description || ''; + + desc = desc.split(/\n/); + desc = desc[0].trim() + (desc.length > 1 ? '…' : ''); + + if ((pattern instanceof RegExp) && + !name.match(pattern) && !desc.match(pattern)) + continue; + + var btn, ver; + + if (currentDisplayMode === 'updates') { + var avail = packages.available.pkgs[name]; + if (!avail || avail.version === pkg.version) + continue; + + ver = '%s » %s'.format( + truncateVersion(pkg.version || '-'), + truncateVersion(avail.version || '-')); + + btn = E('div', { + 'class': 'btn cbi-button-positive', + 'data-package': name, + 'click': handleInstall + }, _('Upgrade…')); + } + else if (currentDisplayMode === 'installed') { + ver = truncateVersion(pkg.version || '-'); + btn = E('div', { + 'class': 'btn cbi-button-negative', + 'data-package': name, + 'click': handleRemove + }, _('Remove')); + } + else { + ver = truncateVersion(pkg.version || '-'); + + if (!packages.installed.pkgs[name]) + btn = E('div', { + 'class': 'btn cbi-button-action', + 'data-package': name, + 'click': handleInstall + }, _('Install…')); + else if (packages.installed.pkgs[name].version != pkg.version) + btn = E('div', { + 'class': 'btn cbi-button-positive', + 'data-package': name, + 'click': handleInstall + }, _('Upgrade…')); + else + btn = E('div', { + 'class': 'btn cbi-button-neutral', + 'disabled': 'disabled' + }, _('Installed')); + } + + name = '%h'.format(name); + desc = '%h'.format(desc || '-'); + + if (pattern) { + name = name.replace(pattern, '<ins>$&</ins>'); + desc = desc.replace(pattern, '<ins>$&</ins>'); + } + + currentDisplayRows.push([ + name, + ver, + pkg.size ? '%.1024mB'.format(pkg.size) + : (altsize ? '~%.1024mB'.format(altsize) : '-'), + desc, + btn + ]); + } + + currentDisplayRows.sort(function(a, b) { + if (a[0] < b[0]) + return -1; + else if (a[0] > b[0]) + return 1; + else + return 0; + }); + + pager.parentNode.style.display = ''; + pager.setAttribute('data-offset', 100); + handlePage({ target: pager.querySelector('.prev') }); +} + +function handlePage(ev) +{ + var filter = document.querySelector('input[name="filter"]'), + pager = ev.target.parentNode, + offset = +pager.getAttribute('data-offset'), + next = ev.target.classList.contains('next'); + + if ((next && (offset + 100) >= currentDisplayRows.length) || + (!next && (offset < 100))) + return; + + offset += next ? 100 : -100; + pager.setAttribute('data-offset', offset); + pager.querySelector('.text').firstChild.data = currentDisplayRows.length + ? _('Displaying %d-%d of %d').format(1 + offset, Math.min(offset + 100, currentDisplayRows.length), currentDisplayRows.length) + : _('No packages'); + + if (offset < 100) + pager.querySelector('.prev').setAttribute('disabled', 'disabled'); + else + pager.querySelector('.prev').removeAttribute('disabled'); + + if ((offset + 100) >= currentDisplayRows.length) + pager.querySelector('.next').setAttribute('disabled', 'disabled'); + else + pager.querySelector('.next').removeAttribute('disabled'); + + var placeholder = _('No information available'); + + if (filter.value) + placeholder = [ + E('span', {}, _('No packages matching "<strong>%h</strong>".').format(filter.value)), ' (', + E('a', { href: '#', onclick: 'handleReset(event)' }, _('Reset')), ')' + ]; + + cbi_update_table('#packages', currentDisplayRows.slice(offset, offset + 100), + placeholder); +} + +function handleMode(ev) +{ + var tab = findParent(ev.target, 'li'); + if (tab.getAttribute('data-mode') === currentDisplayMode) + return; + + tab.parentNode.querySelectorAll('li').forEach(function(li) { + li.classList.remove('cbi-tab'); + li.classList.add('cbi-tab-disabled'); + }); + + tab.classList.remove('cbi-tab-disabled'); + tab.classList.add('cbi-tab'); + + currentDisplayMode = tab.getAttribute('data-mode'); + + display(document.querySelector('input[name="filter"]').value); + + ev.target.blur(); + ev.preventDefault(); +} + +function orderOf(c) +{ + if (c === '~') + return -1; + else if (c === '' || c >= '0' && c <= '9') + return 0; + else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) + return c.charCodeAt(0); + else + return c.charCodeAt(0) + 256; +} + +function compareVersion(val, ref) +{ + var vi = 0, ri = 0, + isdigit = { 0:1, 1:1, 2:1, 3:1, 4:1, 5:1, 6:1, 7:1, 8:1, 9:1 }; + + val = val || ''; + ref = ref || ''; + + while (vi < val.length || ri < ref.length) { + var first_diff = 0; + + while ((vi < val.length && !isdigit[val.charAt(vi)]) || + (ri < ref.length && !isdigit[ref.charAt(ri)])) { + var vc = orderOf(val.charAt(vi)), rc = orderOf(ref.charAt(ri)); + if (vc !== rc) + return vc - rc; + + vi++; ri++; + } + + while (val.charAt(vi) === '0') + vi++; + + while (ref.charAt(ri) === '0') + ri++; + + while (isdigit[val.charAt(vi)] && isdigit[ref.charAt(ri)]) { + first_diff = first_diff || (val.charCodeAt(vi) - ref.charCodeAt(ri)); + vi++; ri++; + } + + if (isdigit[val.charAt(vi)]) + return 1; + else if (isdigit[ref.charAt(ri)]) + return -1; + else if (first_diff) + return first_diff; + } + + return 0; +} + +function versionSatisfied(ver, ref, vop) +{ + var r = compareVersion(ver, ref); + + switch (vop) { + case '<': + case '<=': + return r <= 0; + + case '>': + case '>=': + return r >= 0; + + case '<<': + return r < 0; + + case '>>': + return r > 0; + + case '=': + return r == 0; + } + + return false; +} + +function pkgStatus(pkg, vop, ver, info) +{ + info.errors = info.errors || []; + info.install = info.install || []; + + if (pkg.installed) { + if (vop && !versionSatisfied(pkg.version, ver, vop)) { + var repl = null; + + (packages.available.providers[pkg.name] || []).forEach(function(p) { + if (!repl && versionSatisfied(p.version, ver, vop)) + repl = p; + }); + + if (repl) { + info.install.push(repl); + return E('span', { + 'class': 'label', + 'data-tooltip': _('Requires update to %h %h') + .format(repl.name, repl.version) + }, _('Needs upgrade')); + } + + info.errors.push(_('The installed version of package <em>%h</em> is not compatible, require %s while %s is installed.').format(pkg.name, truncateVersion(ver, vop), truncateVersion(pkg.version))); + + return E('span', { + 'class': 'label warning', + 'data-tooltip': _('Require version %h %h,\ninstalled %h') + .format(vop, ver, pkg.version) + }, _('Version incompatible')); + } + + return E('span', { 'class': 'label notice' }, _('Installed')); + } + else if (!pkg.missing) { + if (!vop || versionSatisfied(pkg.version, ver, vop)) { + info.install.push(pkg); + return E('span', { 'class': 'label' }, _('Not installed')); + } + + info.errors.push(_('The repository version of package <em>%h</em> is not compatible, require %s but only %s is available.') + .format(pkg.name, truncateVersion(ver, vop), truncateVersion(pkg.version))); + + return E('span', { + 'class': 'label warning', + 'data-tooltip': _('Require version %h %h,\ninstalled %h') + .format(vop, ver, pkg.version) + }, _('Version incompatible')); + } + else { + info.errors.push(_('Required dependency package <em>%h</em> is not available in any repository.').format(pkg.name)); + + return E('span', { 'class': 'label warning' }, _('Not available')); + } +} + +function renderDependencyItem(dep, info) +{ + var li = E('li'), + vop = dep.version ? dep.version[0] : null, + ver = dep.version ? dep.version[1] : null, + depends = []; + + for (var i = 0; dep.pkgs && i < dep.pkgs.length; i++) { + var pkg = packages.installed.pkgs[dep.pkgs[i]] || + packages.available.pkgs[dep.pkgs[i]] || + { name: dep.name }; + + if (i > 0) + li.appendChild(document.createTextNode(' | ')); + + var text = pkg.name; + + if (pkg.installsize) + text += ' (%.1024mB)'.format(pkg.installsize); + else if (pkg.size) + text += ' (~%.1024mB)'.format(pkg.size); + + li.appendChild(E('span', { 'data-tooltip': pkg.description }, + [ text, ' ', pkgStatus(pkg, vop, ver, info) ])); + + (pkg.depends || []).forEach(function(d) { + if (depends.indexOf(d) === -1) + depends.push(d); + }); + } + + if (!li.firstChild) + li.appendChild(E('span', {}, + [ dep.name, ' ', + pkgStatus({ name: dep.name, missing: true }, vop, ver, info) ])); + + var subdeps = renderDependencies(depends, info); + if (subdeps) + li.appendChild(subdeps); + + return li; +} + +function renderDependencies(depends, info) +{ + var deps = depends || [], + items = []; + + info.seen = info.seen || []; + + for (var i = 0; i < deps.length; i++) { + if (deps[i] === 'libc') + continue; + + if (deps[i].match(/^(.+)\s+\((<=|<|>|>=|=|<<|>>)(.+)\)$/)) { + dep = RegExp.$1.trim(); + vop = RegExp.$2.trim(); + ver = RegExp.$3.trim(); + } + else { + dep = deps[i].trim(); + vop = ver = null; + } + + if (info.seen[dep]) + continue; + + var pkgs = []; + + (packages.installed.providers[dep] || []).forEach(function(p) { + if (pkgs.indexOf(p.name) === -1) pkgs.push(p.name); + }); + + (packages.available.providers[dep] || []).forEach(function(p) { + if (pkgs.indexOf(p.name) === -1) pkgs.push(p.name); + }); + + info.seen[dep] = { + name: dep, + pkgs: pkgs, + version: [vop, ver] + }; + + items.push(renderDependencyItem(info.seen[dep], info)); + } + + if (items.length) + return E('ul', { 'class': 'deps' }, items); + + return null; +} + +function truncateVersion(v, op) +{ + v = v.replace(/\b(([a-f0-9]{8})[a-f0-9]{24,32})\b/, + '<span data-tooltip="$1">$2…</span>'); + + if (!op || op === '=') + return v; + + return '%h %h'.format(op, v); +} + +function handleReset(ev) +{ + var filter = document.querySelector('input[name="filter"]'); + + filter.value = ''; + display(); +} + +function handleInstall(ev) +{ + var name = ev.target.getAttribute('data-package'), + pkg = packages.available.pkgs[name], + depcache = {}, + size; + + if (pkg.installsize) + size = _('~%.1024mB installed').format(pkg.installsize); + else if (pkg.size) + size = _('~%.1024mB compressed').format(pkg.size); + else + size = _('unknown'); + + var deps = renderDependencies(pkg.depends, depcache), + tree = null, errs = null, inst = null, desc = null; + + if (depcache.errors && depcache.errors.length) { + errs = E('ul', { 'class': 'errors' }); + depcache.errors.forEach(function(err) { + errs.appendChild(E('li', {}, err)); + }); + } + + var totalsize = pkg.installsize || pkg.size || 0, + totalpkgs = 1; + + if (depcache.install && depcache.install.length) + depcache.install.forEach(function(ipkg) { + totalsize += ipkg.installsize || ipkg.size || 0; + totalpkgs++; + }); + + inst = E('p', {}, + _('Require approx. %.1024mB size for %d package(s) to install.') + .format(totalsize, totalpkgs)); + + if (deps) { + tree = E('li', '<strong>%s:</strong>'.format(_('Dependencies'))); + tree.appendChild(deps); + } + + if (pkg.description) { + desc = E('div', {}, [ + E('h5', {}, _('Description')), + E('p', {}, pkg.description) + ]); + } + + L.showModal(_('Details for package <em>%h</em>').format(pkg.name), [ + E('ul', {}, [ + E('li', '<strong>%s:</strong> %h'.format(_('Version'), pkg.version)), + E('li', '<strong>%s:</strong> %h'.format(_('Size'), size)), + tree || '', + ]), + desc || '', + errs || inst || '', + E('div', { 'class': 'right' }, [ + E('div', { + 'class': 'btn', + 'click': L.hideModal + }, _('Cancel')), + ' ', + E('div', { + 'data-command': 'install', + 'data-package': name, + 'class': 'btn cbi-button-action', + 'click': handleOpkg + }, _('Install')) + ]) + ]); +} + +function handleManualInstall(ev) +{ + var name_or_url = document.querySelector('input[name="install"]').value, + install = E('div', { + 'class': 'btn cbi-button-action', + 'data-command': 'install', + 'data-package': name_or_url, + 'click': function(ev) { + document.querySelector('input[name="install"]').value = ''; + handleOpkg(ev); + } + }, _('Install')), warning; + + if (!name_or_url.length) { + return; + } + else if (name_or_url.indexOf('/') !== -1) { + warning = E('p', {}, _('Installing packages from untrusted sources is a potential security risk! Really attempt to install <em>%h</em>?').format(name_or_url)); + } + else if (!packages.available.providers[name_or_url]) { + warning = E('p', {}, _('The package <em>%h</em> is not available in any configured repository.').format(name_or_url)); + install = ''; + } + else { + warning = E('p', {}, _('Really attempt to install <em>%h</em>?').format(name_or_url)); + } + + L.showModal(_('Manually install package'), [ + warning, + E('div', { 'class': 'right' }, [ + E('div', { + 'click': L.hideModal, + 'class': 'btn cbi-button-neutral' + }, _('Cancel')), + ' ', install + ]) + ]); +} + +function handleConfig(ev) +{ + L.showModal(_('OPKG Configuration'), [ + E('p', { 'class': 'spinning' }, _('Loading configuration data…')) + ]); + + L.get('admin/system/opkg/config', null, function(xhr, conf) { + var body = [ + E('p', {}, _('Below is a listing of the various configuration files used by <em>opkg</em>. Use <em>opkg.conf</em> for global settings and <em>customfeeds.conf</em> for custom repository entries. The configuration in the other files may be changed but is usually not preserved by <em>sysupgrade</em>.')) + ]; + + Object.keys(conf).sort().forEach(function(file) { + body.push(E('h5', {}, '%h'.format(file))); + body.push(E('textarea', { + 'name': file, + 'rows': Math.max(Math.min(conf[file].match(/\n/g).length, 10), 3) + }, '%h'.format(conf[file]))); + }); + + body.push(E('div', { 'class': 'right' }, [ + E('div', { + 'class': 'btn cbi-button-neutral', + 'click': L.hideModal + }, _('Cancel')), + ' ', + E('div', { + 'class': 'btn cbi-button-positive', + 'click': function(ev) { + var data = {}; + findParent(ev.target, '.modal').querySelectorAll('textarea[name]') + .forEach(function(textarea) { + data[textarea.getAttribute('name')] = textarea.value + }); + + L.showModal(_('OPKG Configuration'), [ + E('p', { 'class': 'spinning' }, _('Saving configuration data…')) + ]); + + L.post('admin/system/opkg/config', { data: JSON.stringify(data) }, L.hideModal); + } + }, _('Save')), + ])); + + L.showModal(_('OPKG Configuration'), body); + }); +} + +function handleRemove(ev) +{ + var name = ev.target.getAttribute('data-package'), + pkg = packages.installed.pkgs[name], + avail = packages.available.pkgs[name] || {}, + size, desc; + + if (avail.installsize) + size = _('~%.1024mB installed').format(avail.installsize); + else if (avail.size) + size = _('~%.1024mB compressed').format(avail.size); + else + size = _('unknown'); + + if (avail.description) { + desc = E('div', {}, [ + E('h5', {}, _('Description')), + E('p', {}, avail.description) + ]); + } + + L.showModal(_('Remove package <em>%h</em>').format(pkg.name), [ + E('ul', {}, [ + E('li', '<strong>%s:</strong> %h'.format(_('Version'), pkg.version)), + E('li', '<strong>%s:</strong> %h'.format(_('Size'), size)) + ]), + desc || '', + E('div', { 'style': 'display:flex; justify-content:space-between; flex-wrap:wrap' }, [ + E('label', {}, [ + E('input', { type: 'checkbox', checked: 'checked', name: 'autoremove' }), + _('Automatically remove unused dependencies') + ]), + E('div', { 'style': 'flex-grow:1', 'class': 'right' }, [ + E('div', { + 'class': 'btn', + 'click': L.hideModal + }, _('Cancel')), + ' ', + E('div', { + 'data-command': 'remove', + 'data-package': name, + 'class': 'btn cbi-button-negative', + 'click': handleOpkg + }, _('Remove')) + ]) + ]) + ]); +} + +function handleOpkg(ev) +{ + var cmd = ev.target.getAttribute('data-command'), + pkg = ev.target.getAttribute('data-package'), + rem = document.querySelector('input[name="autoremove"]'), + url = 'admin/system/opkg/exec/' + encodeURIComponent(cmd); + + var dlg = L.showModal(_('Executing package manager'), [ + E('p', { 'class': 'spinning' }, + _('Waiting for the <em>opkg %h</em> command to complete…').format(cmd)) + ]); + + L.post(url, { package: pkg, autoremove: rem ? rem.checked : false }, function(xhr, res) { + dlg.removeChild(dlg.lastChild); + + if (res.stdout) + dlg.appendChild(E('pre', [ res.stdout ])); + + if (res.stderr) { + dlg.appendChild(E('h5', _('Errors'))); + dlg.appendChild(E('pre', { 'class': 'errors' }, [ res.stderr ])); + } + + if (res.code !== 0) + dlg.appendChild(E('p', _('The <em>opkg %h</em> command failed with code <code>%d</code>.').format(cmd, (res.code & 0xff) || -1))); + + dlg.appendChild(E('div', { 'class': 'right' }, + E('div', { + 'class': 'btn', + 'click': function() { + L.hideModal(); + updateLists(); + } + }, _('Dismiss')))); + }); +} + +function updateLists() +{ + cbi_update_table('#packages', [], + E('div', { 'class': 'spinning' }, _('Loading package information…'))); + + packages.available = { providers: {}, pkgs: {} }; + packages.installed = { providers: {}, pkgs: {} }; + + L.get('admin/system/opkg/statvfs', null, function(xhr, stat) { + var pg = document.querySelector('.cbi-progressbar'), + total = stat.blocks || 0, + free = stat.bfree || 0; + + pg.firstElementChild.style.width = Math.floor(total ? ((100 / total) * free) : 100) + '%'; + pg.setAttribute('title', '%s (%.1024mB)'.format(pg.firstElementChild.style.width, free * (stat.frsize || 0))); + + L.get('admin/system/opkg/list/available', null, function(xhr) { + parseList(xhr.responseText, packages.available); + L.get('admin/system/opkg/list/installed', null, function(xhr) { + parseList(xhr.responseText, packages.installed); + display(document.querySelector('input[name="filter"]').value); + }); + }); + }); +} + +window.requestAnimationFrame(function() { + var filter = document.querySelector('input[name="filter"]'), + keyTimeout = null; + + filter.value = filter.getAttribute('value'); + filter.addEventListener('keyup', + function(ev) { + if (keyTimeout !== null) + window.clearTimeout(keyTimeout); + + keyTimeout = window.setTimeout(function() { + display(ev.target.value); + }, 250); + }); + + document.querySelector('#pager > .prev').addEventListener('click', handlePage); + document.querySelector('#pager > .next').addEventListener('click', handlePage); + document.querySelector('.cbi-tabmenu.mode').addEventListener('click', handleMode); + + updateLists(); +}); diff --git a/applications/luci-app-opkg/luasrc/view/opkg.htm b/applications/luci-app-opkg/luasrc/view/opkg.htm index e610ebad34..0d2a4e2920 100644 --- a/applications/luci-app-opkg/luasrc/view/opkg.htm +++ b/applications/luci-app-opkg/luasrc/view/opkg.htm @@ -81,826 +81,6 @@ } </style> -<script type="text/javascript">//<![CDATA[ - var packages = { - available: { providers: {}, pkgs: {} }, - installed: { providers: {}, pkgs: {} } - }; - - var currentDisplayMode = 'available', currentDisplayRows = []; - - function parseList(s, dest) - { - var re = /([^\n]*)\n/g, - pkg = null, key = null, val = null, m; - - while ((m = re.exec(s)) !== null) { - if (m[1].match(/^\s(.*)$/)) { - if (pkg !== null && key !== null && val !== null) - val += '\n' + RegExp.$1.trim(); - - continue; - } - - if (key !== null && val !== null) { - switch (key) { - case 'package': - pkg = { name: val }; - break; - - case 'depends': - case 'provides': - var list = val.split(/\s*,\s*/); - if (list.length !== 1 || list[0].length > 0) - pkg[key] = list; - break; - - case 'installed-time': - pkg.installtime = new Date(+val * 1000); - break; - - case 'installed-size': - pkg.installsize = +val; - break; - - case 'status': - var stat = val.split(/\s+/), - mode = stat[1], - installed = stat[2]; - - switch (mode) { - case 'user': - case 'hold': - pkg[mode] = true; - break; - } - - switch (installed) { - case 'installed': - pkg.installed = true; - break; - } - break; - - case 'essential': - if (val === 'yes') - pkg.essential = true; - break; - - case 'size': - pkg.size = +val; - break; - - case 'architecture': - case 'auto-installed': - case 'filename': - case 'sha256sum': - case 'section': - break; - - default: - pkg[key] = val; - break; - } - - key = val = null; - } - - if (m[1].trim().match(/^([\w-]+)\s*:(.+)$/)) { - key = RegExp.$1.toLowerCase(); - val = RegExp.$2.trim(); - } - else { - dest.pkgs[pkg.name] = pkg; - - var provides = dest.providers[pkg.name] ? [] : [ pkg.name ]; - - if (pkg.provides) - provides.push.apply(provides, pkg.provides); - - provides.forEach(function(p) { - dest.providers[p] = dest.providers[p] || []; - dest.providers[p].push(pkg); - }); - } - } - } - - function display(pattern) - { - var src = packages[currentDisplayMode === 'updates' ? 'installed' : currentDisplayMode], - table = document.querySelector('#packages'), - pager = document.querySelector('#pager'); - - currentDisplayRows.length = 0; - - if (typeof(pattern) === 'string' && pattern.length > 0) - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'ig'); - - for (var name in src.pkgs) { - var pkg = src.pkgs[name], - desc = pkg.description || '', - altsize = null; - - if (!pkg.size && packages.available.pkgs[name]) - altsize = packages.available.pkgs[name].size; - - if (!desc && packages.available.pkgs[name]) - desc = packages.available.pkgs[name].description || ''; - - desc = desc.split(/\n/); - desc = desc[0].trim() + (desc.length > 1 ? '…' : ''); - - if ((pattern instanceof RegExp) && - !name.match(pattern) && !desc.match(pattern)) - continue; - - var btn, ver; - - if (currentDisplayMode === 'updates') { - var avail = packages.available.pkgs[name]; - if (!avail || avail.version === pkg.version) - continue; - - ver = '%s » %s'.format( - truncateVersion(pkg.version || '-'), - truncateVersion(avail.version || '-')); - - btn = E('button', { - 'class': 'btn cbi-button-positive', - 'data-package': name, - 'click': handleInstall - }, _('Upgrade…')); - } - else if (currentDisplayMode === 'installed') { - ver = truncateVersion(pkg.version || '-'); - btn = E('button', { - 'class': 'btn cbi-button-negative', - 'data-package': name, - 'click': handleRemove - }, _('Remove')); - } - else { - ver = truncateVersion(pkg.version || '-'); - - if (!packages.installed.pkgs[name]) - btn = E('button', { - 'class': 'btn cbi-button-action', - 'data-package': name, - 'click': handleInstall - }, _('Install…')); - else if (packages.installed.pkgs[name].version != pkg.version) - btn = E('button', { - 'class': 'btn cbi-button-positive', - 'data-package': name, - 'click': handleInstall - }, _('Upgrade…')); - else - btn = E('button', { - 'class': 'btn cbi-button-neutral', - 'disabled': 'disabled' - }, _('Installed')); - } - - name = '%h'.format(name); - desc = '%h'.format(desc || '-'); - - if (pattern) { - name = name.replace(pattern, '<ins>$&</ins>'); - desc = desc.replace(pattern, '<ins>$&</ins>'); - } - - currentDisplayRows.push([ - name, - ver, - pkg.size ? '%.1024mB'.format(pkg.size) - : (altsize ? '~%.1024mB'.format(altsize) : '-'), - desc, - btn - ]); - } - - currentDisplayRows.sort(function(a, b) { - if (a[0] < b[0]) - return -1; - else if (a[0] > b[0]) - return 1; - else - return 0; - }); - - pager.parentNode.style.display = ''; - pager.setAttribute('data-offset', 100); - handlePage({ target: pager.querySelector('.prev') }); - } - - function handlePage(ev) - { - var filter = document.querySelector('input[name="filter"]'), - pager = ev.target.parentNode, - offset = +pager.getAttribute('data-offset'), - next = ev.target.classList.contains('next'); - - if ((next && (offset + 100) >= currentDisplayRows.length) || - (!next && (offset < 100))) - return; - - offset += next ? 100 : -100; - pager.setAttribute('data-offset', offset); - pager.querySelector('.text').firstChild.data = currentDisplayRows.length - ? _('Displaying %d-%d of %d').format(1 + offset, Math.min(offset + 100, currentDisplayRows.length), currentDisplayRows.length) - : _('No packages'); - - if (offset < 100) - pager.querySelector('.prev').setAttribute('disabled', 'disabled'); - else - pager.querySelector('.prev').removeAttribute('disabled'); - - if ((offset + 100) >= currentDisplayRows.length) - pager.querySelector('.next').setAttribute('disabled', 'disabled'); - else - pager.querySelector('.next').removeAttribute('disabled'); - - var placeholder = _('No information available'); - - if (filter.value) - placeholder = [ - E('span', {}, _('No packages matching "<strong>%h</strong>".').format(filter.value)), ' (', - E('a', { href: '#', onclick: 'handleReset(event)' }, _('Reset')), ')' - ]; - - cbi_update_table('#packages', currentDisplayRows.slice(offset, offset + 100), - placeholder); - } - - function handleMode(ev) - { - var tab = findParent(ev.target, 'li'); - if (tab.getAttribute('data-mode') === currentDisplayMode) - return; - - tab.parentNode.querySelectorAll('li').forEach(function(li) { - li.classList.remove('cbi-tab'); - li.classList.add('cbi-tab-disabled'); - }); - - tab.classList.remove('cbi-tab-disabled'); - tab.classList.add('cbi-tab'); - - currentDisplayMode = tab.getAttribute('data-mode'); - - display(document.querySelector('input[name="filter"]').value); - - ev.target.blur(); - ev.preventDefault(); - } - - function orderOf(c) - { - if (c === '~') - return -1; - else if (c === '' || c >= '0' && c <= '9') - return 0; - else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) - return c.charCodeAt(0); - else - return c.charCodeAt(0) + 256; - } - - function compareVersion(val, ref) - { - var vi = 0, ri = 0, - isdigit = { 0:1, 1:1, 2:1, 3:1, 4:1, 5:1, 6:1, 7:1, 8:1, 9:1 }; - - val = val || ''; - ref = ref || ''; - - while (vi < val.length || ri < ref.length) { - var first_diff = 0; - - while ((vi < val.length && !isdigit[val.charAt(vi)]) || - (ri < ref.length && !isdigit[ref.charAt(ri)])) { - var vc = orderOf(val.charAt(vi)), rc = orderOf(ref.charAt(ri)); - if (vc !== rc) - return vc - rc; - - vi++; ri++; - } - - while (val.charAt(vi) === '0') - vi++; - - while (ref.charAt(ri) === '0') - ri++; - - while (isdigit[val.charAt(vi)] && isdigit[ref.charAt(ri)]) { - first_diff = first_diff || (val.charCodeAt(vi) - ref.charCodeAt(ri)); - vi++; ri++; - } - - if (isdigit[val.charAt(vi)]) - return 1; - else if (isdigit[ref.charAt(ri)]) - return -1; - else if (first_diff) - return first_diff; - } - - return 0; - } - - function versionSatisfied(ver, ref, vop) - { - var r = compareVersion(ver, ref); - - switch (vop) { - case '<': - case '<=': - return r <= 0; - - case '>': - case '>=': - return r >= 0; - - case '<<': - return r < 0; - - case '>>': - return r > 0; - - case '=': - return r == 0; - } - - return false; - } - - function pkgStatus(pkg, vop, ver, info) - { - info.errors = info.errors || []; - info.install = info.install || []; - - if (pkg.installed) { - if (vop && !versionSatisfied(pkg.version, ver, vop)) { - var repl = null; - - (packages.available.providers[pkg.name] || []).forEach(function(p) { - if (!repl && versionSatisfied(p.version, ver, vop)) - repl = p; - }); - - if (repl) { - info.install.push(repl); - return E('span', { - 'class': 'label', - 'data-tooltip': _('Requires update to %h %h') - .format(repl.name, repl.version) - }, _('Needs upgrade')); - } - - info.errors.push(_('The installed version of package <em>%h</em> is not compatible, require %s while %s is installed.').format(pkg.name, truncateVersion(ver, vop), truncateVersion(pkg.version))); - - return E('span', { - 'class': 'label warning', - 'data-tooltip': _('Require version %h %h,\ninstalled %h') - .format(vop, ver, pkg.version) - }, _('Version incompatible')); - } - - return E('span', { 'class': 'label notice' }, _('Installed')); - } - else if (!pkg.missing) { - if (!vop || versionSatisfied(pkg.version, ver, vop)) { - info.install.push(pkg); - return E('span', { 'class': 'label' }, _('Not installed')); - } - - info.errors.push(_('The repository version of package <em>%h</em> is not compatible, require %s but only %s is available.') - .format(pkg.name, truncateVersion(ver, vop), truncateVersion(pkg.version))); - - return E('span', { - 'class': 'label warning', - 'data-tooltip': _('Require version %h %h,\ninstalled %h') - .format(vop, ver, pkg.version) - }, _('Version incompatible')); - } - else { - info.errors.push(_('Required dependency package <em>%h</em> is not available in any repository.').format(pkg.name)); - - return E('span', { 'class': 'label warning' }, _('Not available')); - } - } - - function renderDependencyItem(dep, info) - { - var li = E('li'), - vop = dep.version ? dep.version[0] : null, - ver = dep.version ? dep.version[1] : null, - depends = []; - - for (var i = 0; dep.pkgs && i < dep.pkgs.length; i++) { - var pkg = packages.installed.pkgs[dep.pkgs[i]] || - packages.available.pkgs[dep.pkgs[i]] || - { name: dep.name }; - - if (i > 0) - li.appendChild(document.createTextNode(' | ')); - - var text = pkg.name; - - if (pkg.installsize) - text += ' (%.1024mB)'.format(pkg.installsize); - else if (pkg.size) - text += ' (~%.1024mB)'.format(pkg.size); - - li.appendChild(E('span', { 'data-tooltip': pkg.description }, - [ text, ' ', pkgStatus(pkg, vop, ver, info) ])); - - (pkg.depends || []).forEach(function(d) { - if (depends.indexOf(d) === -1) - depends.push(d); - }); - } - - if (!li.firstChild) - li.appendChild(E('span', {}, - [ dep.name, ' ', - pkgStatus({ name: dep.name, missing: true }, vop, ver, info) ])); - - var subdeps = renderDependencies(depends, info); - if (subdeps) - li.appendChild(subdeps); - - return li; - } - - function renderDependencies(depends, info) - { - var deps = depends || [], - items = []; - - info.seen = info.seen || []; - - for (var i = 0; i < deps.length; i++) { - if (deps[i] === 'libc') - continue; - - if (deps[i].match(/^(.+)\s+\((<=|<|>|>=|=|<<|>>)(.+)\)$/)) { - dep = RegExp.$1.trim(); - vop = RegExp.$2.trim(); - ver = RegExp.$3.trim(); - } - else { - dep = deps[i].trim(); - vop = ver = null; - } - - if (info.seen[dep]) - continue; - - var pkgs = []; - - (packages.installed.providers[dep] || []).forEach(function(p) { - if (pkgs.indexOf(p.name) === -1) pkgs.push(p.name); - }); - - (packages.available.providers[dep] || []).forEach(function(p) { - if (pkgs.indexOf(p.name) === -1) pkgs.push(p.name); - }); - - info.seen[dep] = { - name: dep, - pkgs: pkgs, - version: [vop, ver] - }; - - items.push(renderDependencyItem(info.seen[dep], info)); - } - - if (items.length) - return E('ul', { 'class': 'deps' }, items); - - return null; - } - - function truncateVersion(v, op) - { - v = v.replace(/\b(([a-f0-9]{8})[a-f0-9]{24,32})\b/, - '<span data-tooltip="$1">$2…</span>'); - - if (!op || op === '=') - return v; - - return '%h %h'.format(op, v); - } - - function handleReset(ev) - { - var filter = document.querySelector('input[name="filter"]'); - - filter.value = ''; - display(); - } - - function handleInstall(ev) - { - var name = ev.target.getAttribute('data-package'), - pkg = packages.available.pkgs[name], - depcache = {}, - size; - - if (pkg.installsize) - size = _('~%.1024mB installed').format(pkg.installsize); - else if (pkg.size) - size = _('~%.1024mB compressed').format(pkg.size); - else - size = _('unknown'); - - var deps = renderDependencies(pkg.depends, depcache), - tree = null, errs = null, inst = null, desc = null; - - if (depcache.errors && depcache.errors.length) { - errs = E('ul', { 'class': 'errors' }); - depcache.errors.forEach(function(err) { - errs.appendChild(E('li', {}, err)); - }); - } - - var totalsize = pkg.installsize || pkg.size || 0, - totalpkgs = 1; - - if (depcache.install && depcache.install.length) - depcache.install.forEach(function(ipkg) { - totalsize += ipkg.installsize || ipkg.size || 0; - totalpkgs++; - }); - - inst = E('p', {}, - _('Require approx. %.1024mB size for %d package(s) to install.') - .format(totalsize, totalpkgs)); - - if (deps) { - tree = E('li', '<strong>%s:</strong>'.format(_('Dependencies'))); - tree.appendChild(deps); - } - - if (pkg.description) { - desc = E('div', {}, [ - E('h5', {}, _('Description')), - E('p', {}, pkg.description) - ]); - } - - showModal(_('Details for package <em>%h</em>').format(pkg.name), [ - E('ul', {}, [ - E('li', '<strong>%s:</strong> %h'.format(_('Version'), pkg.version)), - E('li', '<strong>%s:</strong> %h'.format(_('Size'), size)), - tree || '', - ]), - desc || '', - errs || inst || '', - E('div', { 'class': 'right' }, [ - E('button', { - 'class': 'btn', - 'click': hideModal - }, _('Cancel')), - ' ', - E('button', { - 'data-command': 'install', - 'data-package': name, - 'class': 'btn cbi-button-action', - 'click': handleOpkg - }, _('Install')) - ]) - ]); - } - - function handleManualInstall(ev) - { - var name_or_url = document.querySelector('input[name="install"]').value, - install = E('button', { - 'class': 'btn cbi-button-action', - 'data-command': 'install', - 'data-package': name_or_url, - 'click': function(ev) { - document.querySelector('input[name="install"]').value = ''; - handleOpkg(ev); - } - }, _('Install')), warning; - - if (!name_or_url.length) { - return; - } - else if (name_or_url.indexOf('/') !== -1) { - warning = E('p', {}, _('Installing packages from untrusted sources is a potential security risk! Really attempt to install <em>%h</em>?').format(name_or_url)); - } - else if (!packages.available.providers[name_or_url]) { - warning = E('p', {}, _('The package <em>%h</em> is not available in any configured repository.').format(name_or_url)); - install = ''; - } - else { - warning = E('p', {}, _('Really attempt to install <em>%h</em>?').format(name_or_url)); - } - - showModal(_('Manually install package'), [ - warning, - E('div', { 'class': 'right' }, [ - E('button', { - 'click': hideModal, - 'class': 'btn cbi-button-neutral' - }, _('Cancel')), - ' ', install - ]) - ]); - } - - function handleConfig(ev) - { - showModal(_('OPKG Configuration'), [ - E('p', { 'class': 'spinning' }, _('Loading configuration data…')) - ]); - - XHR.get('<%=url("admin/system/opkg/config")%>', null, function(xhr, conf) { - var body = [ - E('p', {}, _('Below is a listing of the various configuration files used by <em>opkg</em>. Use <em>opkg.conf</em> for global settings and <em>customfeeds.conf</em> for custom repository entries. The configuration in the other files may be changed but is usually not preserved by <em>sysupgrade</em>.')) - ]; - - Object.keys(conf).sort().forEach(function(file) { - body.push(E('h5', {}, '%h'.format(file))); - body.push(E('textarea', { - 'name': file, - 'rows': Math.max(Math.min(conf[file].match(/\n/g).length, 10), 3) - }, '%h'.format(conf[file]))); - }); - - body.push(E('div', { 'class': 'right' }, [ - E('button', { - 'class': 'btn cbi-button-neutral', - 'click': hideModal - }, _('Cancel')), - ' ', - E('button', { - 'class': 'btn cbi-button-positive', - 'click': function(ev) { - var data = {}; - findParent(ev.target, '.modal').querySelectorAll('textarea[name]') - .forEach(function(textarea) { - data[textarea.getAttribute('name')] = textarea.value - }); - - showModal(_('OPKG Configuration'), [ - E('p', { 'class': 'spinning' }, _('Saving configuration data…')) - ]); - - (new XHR()).post('<%=url("admin/system/opkg/config")%>', - { token: '<%=token%>', data: JSON.stringify(data) }, hideModal); - } - }, _('Save')), - ])); - - showModal(_('OPKG Configuration'), body); - }); - } - - function handleRemove(ev) - { - var name = ev.target.getAttribute('data-package'), - pkg = packages.installed.pkgs[name], - avail = packages.available.pkgs[name] || {}, - size, desc; - - if (avail.installsize) - size = _('~%.1024mB installed').format(avail.installsize); - else if (avail.size) - size = _('~%.1024mB compressed').format(avail.size); - else - size = _('unknown'); - - if (avail.description) { - desc = E('div', {}, [ - E('h5', {}, _('Description')), - E('p', {}, avail.description) - ]); - } - - showModal(_('Remove package <em>%h</em>').format(pkg.name), [ - E('ul', {}, [ - E('li', '<strong>%s:</strong> %h'.format(_('Version'), pkg.version)), - E('li', '<strong>%s:</strong> %h'.format(_('Size'), size)) - ]), - desc || '', - E('div', { 'style': 'display:flex; justify-content:space-between; flex-wrap:wrap' }, [ - E('label', {}, [ - E('input', { type: 'checkbox', checked: 'checked', name: 'autoremove' }), - _('Automatically remove unused dependencies') - ]), - E('div', { 'style': 'flex-grow:1', 'class': 'right' }, [ - E('button', { - 'class': 'btn', - 'click': hideModal - }, _('Cancel')), - ' ', - E('button', { - 'data-command': 'remove', - 'data-package': name, - 'class': 'btn cbi-button-negative', - 'click': handleOpkg - }, _('Remove')) - ]) - ]) - ]); - } - - function handleOpkg(ev) - { - var cmd = ev.target.getAttribute('data-command'), - pkg = ev.target.getAttribute('data-package'), - rem = document.querySelector('input[name="autoremove"]'), - url = '<%=url("admin/system/opkg/exec")%>/' + encodeURIComponent(cmd); - - var dlg = showModal(_('Executing package manager'), [ - E('p', { 'class': 'spinning' }, - _('Waiting for the <em>opkg %h</em> command to complete…').format(cmd)) - ]); - - (new XHR()).post(url, { - token: '<%=token%>', - package: pkg, - autoremove: rem ? rem.checked : false - }, function(xhr, res) { - dlg.removeChild(dlg.lastChild); - - if (res.stdout) - dlg.appendChild(E('pre', [ res.stdout ])); - - if (res.stderr) { - dlg.appendChild(E('h5', _('Errors'))); - dlg.appendChild(E('pre', { 'class': 'errors' }, [ res.stderr ])); - } - - if (res.code !== 0) - dlg.appendChild(E('p', _('The <em>opkg %h</em> command failed with code <code>%d</code>.').format(cmd, (res.code & 0xff) || -1))); - - dlg.appendChild(E('div', { 'class': 'right' }, - E('button', { - 'class': 'btn', - 'click': function() { - hideModal(); - updateLists(); - } - }, _('Dismiss')))); - }); - } - - function updateLists() - { - cbi_update_table('#packages', [], - E('div', { 'class': 'spinning' }, _('Loading package information…'))); - - packages.available = { providers: {}, pkgs: {} }; - packages.installed = { providers: {}, pkgs: {} }; - - XHR.get('<%=url("admin/system/opkg/statvfs")%>', null, function(xhr, stat) { - var pg = document.querySelector('.cbi-progressbar'), - total = stat.blocks || 0, - free = stat.bfree || 0; - - pg.firstElementChild.style.width = Math.floor(total ? ((100 / total) * free) : 100) + '%'; - pg.setAttribute('title', '%s (%.1024mB)'.format(pg.firstElementChild.style.width, free * (stat.frsize || 0))); - - XHR.get('<%=url("admin/system/opkg/list/available")%>', null, function(xhr) { - parseList(xhr.responseText, packages.available); - XHR.get('<%=url("admin/system/opkg/list/installed")%>', null, function(xhr) { - parseList(xhr.responseText, packages.installed); - display(document.querySelector('input[name="filter"]').value); - }); - }); - }); - } - - window.requestAnimationFrame(function() { - var filter = document.querySelector('input[name="filter"]'), - keyTimeout = null; - - filter.value = ''; - filter.addEventListener('keyup', - function(ev) { - if (keyTimeout !== null) - window.clearTimeout(keyTimeout); - - keyTimeout = window.setTimeout(function() { - display(ev.target.value); - }, 250); - }); - - document.querySelector('#pager > .prev').addEventListener('click', handlePage); - document.querySelector('#pager > .next').addEventListener('click', handlePage); - document.querySelector('.cbi-tabmenu.mode').addEventListener('click', handleMode); - - updateLists(); - }); -//]]></script> - <h2><%:Software%></h2> <div class="controls"> @@ -913,7 +93,7 @@ <div> <label><%:Filter%>:</label> - <input type="text" name="filter" placeholder="<%:Type to filter…%>" /><!-- + <input type="text" name="filter" placeholder="<%:Type to filter…%>"<%=attr("value", luci.http.formvalue("query") or "")%> /><!-- --><button class="btn cbi-button" onclick="handleReset(event)"><%:Clear%></button> </div> @@ -955,4 +135,6 @@ </div> </div> +<script type="text/javascript" src="<%=resource%>/view/opkg.js"></script> + <%+footer%> diff --git a/applications/luci-app-opkg/po/ca/opkg.po b/applications/luci-app-opkg/po/ca/opkg.po index 63bb5b5435..7343a5abf3 100644 --- a/applications/luci-app-opkg/po/ca/opkg.po +++ b/applications/luci-app-opkg/po/ca/opkg.po @@ -133,6 +133,10 @@ msgstr "Descarrega i instal·la el paquet" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "No hi ha informació disponible" @@ -176,6 +180,10 @@ msgstr "Nom del paquet" msgid "Package name or URL…" msgstr "Nom del paquet" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/cs/opkg.po b/applications/luci-app-opkg/po/cs/opkg.po index 296f0f9bce..bbcec8a880 100644 --- a/applications/luci-app-opkg/po/cs/opkg.po +++ b/applications/luci-app-opkg/po/cs/opkg.po @@ -131,6 +131,10 @@ msgstr "Stáhnout a nainstalovat balíček" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Údaje nejsou k dispozici" @@ -174,6 +178,10 @@ msgstr "Název balíčku" msgid "Package name or URL…" msgstr "Název balíčku" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/de/opkg.po b/applications/luci-app-opkg/po/de/opkg.po index debab0dea3..0fe17a5564 100644 --- a/applications/luci-app-opkg/po/de/opkg.po +++ b/applications/luci-app-opkg/po/de/opkg.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-05-26 17:57+0200\n" -"PO-Revision-Date: 2018-11-14 09:45+0100\n" +"PO-Revision-Date: 2018-11-20 11:44+0100\n" "Last-Translator: Jo-Philipp Wich <jo@mein.io>\n" "Language-Team: \n" "Language: de\n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.8.11\n" +"X-Generator: Poedit 2.0.5\n" #: applications/luci-app-opkg/luasrc/view/opkg.htm:927 msgid "Actions" @@ -48,7 +48,7 @@ msgstr "Abbrechen" #: applications/luci-app-opkg/luasrc/view/opkg.htm:917 msgid "Clear" -msgstr "Löschen" +msgstr "Zurücksetzen" #: applications/luci-app-opkg/luasrc/view/opkg.htm:930 msgid "Configure opkg…" @@ -136,6 +136,10 @@ msgstr "Paket manuell installieren" msgid "Needs upgrade" msgstr "Aktualisierung benötigt" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "Nächste Seite" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Keine Informationen verfügbar" @@ -174,6 +178,10 @@ msgstr "Paketname" msgid "Package name or URL…" msgstr "Paketname oder URL…" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "Vorige Seite" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "Soll wirklich versucht werden, <em>%h</em> zu installieren?" diff --git a/applications/luci-app-opkg/po/el/opkg.po b/applications/luci-app-opkg/po/el/opkg.po index 0a98848f4e..83eb0939b0 100644 --- a/applications/luci-app-opkg/po/el/opkg.po +++ b/applications/luci-app-opkg/po/el/opkg.po @@ -133,6 +133,10 @@ msgstr "Κατέβασμα και εγκατάσταση πακέτου" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Δεν υπάρχουν πληροφορίες διαθέσιμες" @@ -176,6 +180,10 @@ msgstr "Όνομα πακέτου" msgid "Package name or URL…" msgstr "Όνομα πακέτου" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/en/opkg.po b/applications/luci-app-opkg/po/en/opkg.po index 7234bb6ac0..90e4a98489 100644 --- a/applications/luci-app-opkg/po/en/opkg.po +++ b/applications/luci-app-opkg/po/en/opkg.po @@ -133,6 +133,10 @@ msgstr "Download and install package" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "" @@ -176,6 +180,10 @@ msgstr "Package name" msgid "Package name or URL…" msgstr "Package name" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/es/opkg.po b/applications/luci-app-opkg/po/es/opkg.po index d48d030f05..5fd9f73def 100644 --- a/applications/luci-app-opkg/po/es/opkg.po +++ b/applications/luci-app-opkg/po/es/opkg.po @@ -133,6 +133,10 @@ msgstr "Descargar e instalar paquete" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "No hay información disponible" @@ -176,6 +180,10 @@ msgstr "Nombre del paquete" msgid "Package name or URL…" msgstr "Nombre del paquete" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/fr/opkg.po b/applications/luci-app-opkg/po/fr/opkg.po index 7a902593e4..c175fc0544 100644 --- a/applications/luci-app-opkg/po/fr/opkg.po +++ b/applications/luci-app-opkg/po/fr/opkg.po @@ -133,6 +133,10 @@ msgstr "Télécharge et installe le paquet" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Information indisponible" @@ -176,6 +180,10 @@ msgstr "Nom du paquet" msgid "Package name or URL…" msgstr "Nom du paquet" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/he/opkg.po b/applications/luci-app-opkg/po/he/opkg.po index 4f2d1fc41c..2fc3912060 100644 --- a/applications/luci-app-opkg/po/he/opkg.po +++ b/applications/luci-app-opkg/po/he/opkg.po @@ -129,6 +129,10 @@ msgstr "הורד והתקן חבילות" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "" @@ -172,6 +176,10 @@ msgstr "שם החבילה" msgid "Package name or URL…" msgstr "שם החבילה" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/hu/opkg.po b/applications/luci-app-opkg/po/hu/opkg.po index f49547e66a..da4ed6fc0d 100644 --- a/applications/luci-app-opkg/po/hu/opkg.po +++ b/applications/luci-app-opkg/po/hu/opkg.po @@ -131,6 +131,10 @@ msgstr "Csomag letöltése és telepítése" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Nincs elérhető információ" @@ -174,6 +178,10 @@ msgstr "Csomagnév" msgid "Package name or URL…" msgstr "Csomagnév" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/it/opkg.po b/applications/luci-app-opkg/po/it/opkg.po index 14595e4193..68f19b814b 100644 --- a/applications/luci-app-opkg/po/it/opkg.po +++ b/applications/luci-app-opkg/po/it/opkg.po @@ -133,6 +133,10 @@ msgstr "Scarica e installa pacchetto" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Nessuna informazione disponibile" @@ -176,6 +180,10 @@ msgstr "Nome pacchetto" msgid "Package name or URL…" msgstr "Nome pacchetto" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/ja/opkg.po b/applications/luci-app-opkg/po/ja/opkg.po index 242a10c24b..456d82e828 100644 --- a/applications/luci-app-opkg/po/ja/opkg.po +++ b/applications/luci-app-opkg/po/ja/opkg.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-06-10 03:40+0200\n" -"PO-Revision-Date: 2018-11-16 19:58+0900\n" +"PO-Revision-Date: 2018-11-21 12:29+0900\n" "Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n" "Language-Team: \n" "Language: ja\n" @@ -133,6 +133,10 @@ msgstr "パッケージの手動インストール" msgid "Needs upgrade" msgstr "要アップグレード" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "次のページ" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "情報がありません" @@ -171,6 +175,10 @@ msgstr "パッケージ名" msgid "Package name or URL…" msgstr "パッケージ名または URL…" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "前のページ" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "<em>%h</em> のインストールを試行してもよろしいですか?" @@ -186,7 +194,7 @@ msgstr "<em>%h</em> パッケージを削除" #: applications/luci-app-opkg/luasrc/view/opkg.htm:639 msgid "Require approx. %.1024mB size for %d package(s) to install." -msgstr "上記 %d パッケージのインストールには、約 %.1024mB の領域が必要です。" +msgstr "インストールには約 %.1024mB の領域が必要です(上記 %d パッケージ)。" #: applications/luci-app-opkg/luasrc/view/opkg.htm:465 #: applications/luci-app-opkg/luasrc/view/opkg.htm:483 diff --git a/applications/luci-app-opkg/po/ko/opkg.po b/applications/luci-app-opkg/po/ko/opkg.po index 7725d095bb..afcfb75bd6 100644 --- a/applications/luci-app-opkg/po/ko/opkg.po +++ b/applications/luci-app-opkg/po/ko/opkg.po @@ -132,6 +132,10 @@ msgstr "패키지 다운로드 후 설치" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "이용 가능한 정보가 없습니다" @@ -175,6 +179,10 @@ msgstr "패키지 이름" msgid "Package name or URL…" msgstr "패키지 이름" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/ms/opkg.po b/applications/luci-app-opkg/po/ms/opkg.po index 11a943d0e5..2fb31741f4 100644 --- a/applications/luci-app-opkg/po/ms/opkg.po +++ b/applications/luci-app-opkg/po/ms/opkg.po @@ -133,6 +133,10 @@ msgstr "Turun dan memasang pakej" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "" @@ -176,6 +180,10 @@ msgstr "Nama pakej" msgid "Package name or URL…" msgstr "Nama pakej" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/no/opkg.po b/applications/luci-app-opkg/po/no/opkg.po index 7858a62293..8fcb10e905 100644 --- a/applications/luci-app-opkg/po/no/opkg.po +++ b/applications/luci-app-opkg/po/no/opkg.po @@ -128,6 +128,10 @@ msgstr "Last ned og installer pakken" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Ingen informasjon tilgjengelig" @@ -171,6 +175,10 @@ msgstr "Pakkenavn" msgid "Package name or URL…" msgstr "Pakkenavn" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/pl/opkg.po b/applications/luci-app-opkg/po/pl/opkg.po index 4042ad5305..5d9afbadf3 100644 --- a/applications/luci-app-opkg/po/pl/opkg.po +++ b/applications/luci-app-opkg/po/pl/opkg.po @@ -135,6 +135,10 @@ msgstr "Pobierz i zainstaluj pakiet" msgid "Needs upgrade" msgstr "Wymuś uaktualnienie" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Brak dostępnych informacji" @@ -178,6 +182,10 @@ msgstr "Nazwa pakietu" msgid "Package name or URL…" msgstr "Nazwa pakietu" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/pt-br/opkg.po b/applications/luci-app-opkg/po/pt-br/opkg.po index d76d216f74..5ad0381dcc 100644 --- a/applications/luci-app-opkg/po/pt-br/opkg.po +++ b/applications/luci-app-opkg/po/pt-br/opkg.po @@ -134,6 +134,10 @@ msgstr "Baixe e instale o pacote" msgid "Needs upgrade" msgstr "Forçar a atualização" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Nenhuma informação disponível" @@ -177,6 +181,10 @@ msgstr "Nome do Pacote" msgid "Package name or URL…" msgstr "Nome do Pacote" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/pt/opkg.po b/applications/luci-app-opkg/po/pt/opkg.po index ae09da8361..a71298ba67 100644 --- a/applications/luci-app-opkg/po/pt/opkg.po +++ b/applications/luci-app-opkg/po/pt/opkg.po @@ -133,6 +133,10 @@ msgstr "Descarregar e instalar pacote" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Sem informação disponível" @@ -176,6 +180,10 @@ msgstr "Nome do pacote" msgid "Package name or URL…" msgstr "Nome do pacote" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/ro/opkg.po b/applications/luci-app-opkg/po/ro/opkg.po index 132145b150..93ad79ed3f 100644 --- a/applications/luci-app-opkg/po/ro/opkg.po +++ b/applications/luci-app-opkg/po/ro/opkg.po @@ -132,6 +132,10 @@ msgstr "Descarca si instaleaza pachetul" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Nici o informatie disponibila" @@ -175,6 +179,10 @@ msgstr "Numele pachetului" msgid "Package name or URL…" msgstr "Numele pachetului" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/ru/opkg.po b/applications/luci-app-opkg/po/ru/opkg.po index b41d039ded..b721983a88 100644 --- a/applications/luci-app-opkg/po/ru/opkg.po +++ b/applications/luci-app-opkg/po/ru/opkg.po @@ -136,6 +136,10 @@ msgstr "Загрузить и установить пакет" msgid "Needs upgrade" msgstr "Принудительная прошивка" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Нет доступной информации" @@ -179,6 +183,10 @@ msgstr "Имя пакета" msgid "Package name or URL…" msgstr "Имя пакета" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/sk/opkg.po b/applications/luci-app-opkg/po/sk/opkg.po index 326d9ab2a5..910ae6d88a 100644 --- a/applications/luci-app-opkg/po/sk/opkg.po +++ b/applications/luci-app-opkg/po/sk/opkg.po @@ -123,6 +123,10 @@ msgstr "" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "" @@ -161,6 +165,10 @@ msgstr "" msgid "Package name or URL…" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/sv/opkg.po b/applications/luci-app-opkg/po/sv/opkg.po index 652f4f6db6..8e29a7b0fd 100644 --- a/applications/luci-app-opkg/po/sv/opkg.po +++ b/applications/luci-app-opkg/po/sv/opkg.po @@ -131,6 +131,10 @@ msgstr "Ladda ner och installera paket" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Ingen information tillgänglig" @@ -174,6 +178,10 @@ msgstr "Paketnamn" msgid "Package name or URL…" msgstr "Paketnamn" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/templates/opkg.pot b/applications/luci-app-opkg/po/templates/opkg.pot index 2f1218af89..9e7aaffdfc 100644 --- a/applications/luci-app-opkg/po/templates/opkg.pot +++ b/applications/luci-app-opkg/po/templates/opkg.pot @@ -115,6 +115,10 @@ msgstr "" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "" @@ -153,6 +157,10 @@ msgstr "" msgid "Package name or URL…" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/tr/opkg.po b/applications/luci-app-opkg/po/tr/opkg.po index 2a3826f9b3..fe5e381fe0 100644 --- a/applications/luci-app-opkg/po/tr/opkg.po +++ b/applications/luci-app-opkg/po/tr/opkg.po @@ -127,6 +127,10 @@ msgstr "" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "" @@ -168,6 +172,10 @@ msgstr "" msgid "Package name or URL…" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/uk/opkg.po b/applications/luci-app-opkg/po/uk/opkg.po index f1ba3f4da5..c1b262c0c8 100644 --- a/applications/luci-app-opkg/po/uk/opkg.po +++ b/applications/luci-app-opkg/po/uk/opkg.po @@ -1,15 +1,13 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"PO-Revision-Date: 2018-10-14 18:10+0300\n" +"PO-Revision-Date: 2018-11-22 13:55+0200\n" "Last-Translator: Yurii <yuripet@gmail.com>\n" "Language-Team: none\n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\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" #: applications/luci-app-opkg/luasrc/view/opkg.htm:927 msgid "Actions" @@ -17,7 +15,7 @@ msgstr "Дії" #: applications/luci-app-opkg/luasrc/view/opkg.htm:795 msgid "Automatically remove unused dependencies" -msgstr "" +msgstr "Автоматичне видалення невикористовуваних залежностей" #: applications/luci-app-opkg/luasrc/view/opkg.htm:935 msgid "Available" @@ -30,6 +28,11 @@ msgid "" "custom repository entries. The configuration in the other files may be " "changed but is usually not preserved by <em>sysupgrade</em>." msgstr "" +"Нижче наведено список різних файлів конфігурації, котрі використовуються " +"<em>opkg</em>. Використовуйте <em>opkg.conf</em> для глобальних налаштувань " +"і <em>customfeeds.conf</em> для записів власного репозиторію. Конфігурацію в " +"інших файлах може бути змінено, але вона зазвичай не зберігається при " +"<em>оновленні системи</em>." #: applications/luci-app-opkg/luasrc/view/opkg.htm:666 #: applications/luci-app-opkg/luasrc/view/opkg.htm:711 @@ -40,16 +43,15 @@ msgstr "Скасувати" #: applications/luci-app-opkg/luasrc/view/opkg.htm:917 msgid "Clear" -msgstr "" +msgstr "Очистити" #: applications/luci-app-opkg/luasrc/view/opkg.htm:930 -#, fuzzy msgid "Configure opkg…" -msgstr "Конфігурація" +msgstr "Налаштування opkg…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:643 msgid "Dependencies" -msgstr "" +msgstr "Залежності" #: applications/luci-app-opkg/luasrc/view/opkg.htm:649 #: applications/luci-app-opkg/luasrc/view/opkg.htm:781 @@ -59,28 +61,27 @@ msgstr "Опис" #: applications/luci-app-opkg/luasrc/view/opkg.htm:654 msgid "Details for package <em>%h</em>" -msgstr "" +msgstr "Подробиці про пакет <em>%h</em>" #: applications/luci-app-opkg/luasrc/view/opkg.htm:851 msgid "Dismiss" -msgstr "Відхилити" +msgstr "Закрити" #: applications/luci-app-opkg/luasrc/view/opkg.htm:311 msgid "Displaying %d-%d of %d" -msgstr "" +msgstr "Відображається %d-%d із %d" #: applications/luci-app-opkg/luasrc/view/opkg.htm:921 msgid "Download and install package" msgstr "Завантажити та інсталювати пакети" #: applications/luci-app-opkg/luasrc/view/opkg.htm:837 -#, fuzzy msgid "Errors" -msgstr "Помилка" +msgstr "Помилки" #: applications/luci-app-opkg/luasrc/view/opkg.htm:821 msgid "Executing package manager" -msgstr "" +msgstr "Виконання менеджера пакетів" #: applications/luci-app-opkg/luasrc/view/opkg.htm:915 msgid "Filter" @@ -98,62 +99,60 @@ msgstr "Інсталювати" #: applications/luci-app-opkg/luasrc/view/opkg.htm:262 #: applications/luci-app-opkg/luasrc/view/opkg.htm:470 #: applications/luci-app-opkg/luasrc/view/opkg.htm:936 -#, fuzzy msgid "Installed" -msgstr "Інсталювати" +msgstr "Інстальовано" #: applications/luci-app-opkg/luasrc/view/opkg.htm:695 msgid "" "Installing packages from untrusted sources is a potential security risk! " "Really attempt to install <em>%h</em>?" msgstr "" +"Інсталяція пакетів з ненадійних джерел є потенційною загрозою безпеці! " +"Дійсно спробувати інсталювати <em>%h</em>?" #: applications/luci-app-opkg/luasrc/view/opkg.htm:251 -#, fuzzy msgid "Install…" -msgstr "Інсталювати" +msgstr "Інсталювати…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:720 -#, fuzzy msgid "Loading configuration data…" -msgstr "Розпочато застосування конфігурації…" +msgstr "Завантаження даних конфігурації…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:858 msgid "Loading package information…" -msgstr "" +msgstr "Завантаження інформації про пакети…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:705 -#, fuzzy msgid "Manually install package" -msgstr "Завантажити та інсталювати пакети" +msgstr "Інсталяція пакета вручну" #: applications/luci-app-opkg/luasrc/view/opkg.htm:458 -#, fuzzy msgid "Needs upgrade" -msgstr "Примусове оновлення" +msgstr "Потребує оновлення" + +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "Наступна сторінка" #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "Інформація відсутня" #: applications/luci-app-opkg/luasrc/view/opkg.htm:312 -#, fuzzy msgid "No packages" -msgstr "Знайти пакет" +msgstr "Немає пакетів" #: applications/luci-app-opkg/luasrc/view/opkg.htm:328 msgid "No packages matching \"<strong>%h</strong>\"." -msgstr "" +msgstr "Немає пакетів, що відповідають \"<strong>%h</strong>\"." #: applications/luci-app-opkg/luasrc/view/opkg.htm:490 -#, fuzzy msgid "Not available" -msgstr "Усього доступно" +msgstr "Недоступно" #: applications/luci-app-opkg/luasrc/view/opkg.htm:475 -#, fuzzy msgid "Not installed" -msgstr "Не підключено" +msgstr "Не інстальовано" #: applications/luci-app-opkg/luasrc/view/opkg.htm:923 msgid "OK" @@ -162,7 +161,6 @@ msgstr "OK" #: applications/luci-app-opkg/luasrc/view/opkg.htm:719 #: applications/luci-app-opkg/luasrc/view/opkg.htm:751 #: applications/luci-app-opkg/luasrc/view/opkg.htm:761 -#, fuzzy msgid "OPKG Configuration" msgstr "Конфігурація OPKG" @@ -171,13 +169,16 @@ msgid "Package name" msgstr "Назва пакета" #: applications/luci-app-opkg/luasrc/view/opkg.htm:922 -#, fuzzy msgid "Package name or URL…" -msgstr "Назва пакета" +msgstr "Назва пакета чи URL-адреса…" + +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "Попередня сторінка" #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" -msgstr "" +msgstr "Дійсно спробувати інсталювати <em>%h</em>?" #: applications/luci-app-opkg/luasrc/view/opkg.htm:241 #: applications/luci-app-opkg/luasrc/view/opkg.htm:808 @@ -186,11 +187,11 @@ msgstr "Видалити" #: applications/luci-app-opkg/luasrc/view/opkg.htm:786 msgid "Remove package <em>%h</em>" -msgstr "" +msgstr "Видалити пакет <em>%h</em>" #: applications/luci-app-opkg/luasrc/view/opkg.htm:639 msgid "Require approx. %.1024mB size for %d package(s) to install." -msgstr "" +msgstr "Потрібно приблизно %.1024mB для інсталяції %d пакетів." #: applications/luci-app-opkg/luasrc/view/opkg.htm:465 #: applications/luci-app-opkg/luasrc/view/opkg.htm:483 @@ -198,15 +199,19 @@ msgid "" "Require version %h %h,\n" "installed %h" msgstr "" +"Потрібна версія %h %h,\n" +"інстальовано %h" #: applications/luci-app-opkg/luasrc/view/opkg.htm:488 msgid "" "Required dependency package <em>%h</em> is not available in any repository." msgstr "" +"Необхідний за залежністю пакет <em>%h</em> не доступний ні в одному " +"репозиторії." #: applications/luci-app-opkg/luasrc/view/opkg.htm:456 msgid "Requires update to %h %h" -msgstr "" +msgstr "Потрібно оновити до %h %h" #: applications/luci-app-opkg/luasrc/view/opkg.htm:329 msgid "Reset" @@ -217,9 +222,8 @@ msgid "Save" msgstr "Зберегти" #: applications/luci-app-opkg/luasrc/view/opkg.htm:752 -#, fuzzy msgid "Saving configuration data…" -msgstr "Розпочато застосування конфігурації…" +msgstr "Збереження даних конфігурації…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:657 #: applications/luci-app-opkg/luasrc/view/opkg.htm:789 @@ -237,42 +241,45 @@ msgstr "Програмне забезпечення" #: applications/luci-app-opkg/luasrc/view/opkg.htm:842 msgid "The <em>opkg %h</em> command failed with code <code>%d</code>." -msgstr "" +msgstr "Помилка виконання команди <em>opkg %h</em> з кодом <code>%d</code>." #: applications/luci-app-opkg/luasrc/view/opkg.htm:461 msgid "" "The installed version of package <em>%h</em> is not compatible, require %s " "while %s is installed." msgstr "" +"Інстальована версія пакета <em>%h</em> несумісна, потрібно %s, а " +"інстальовано %s." #: applications/luci-app-opkg/luasrc/view/opkg.htm:698 msgid "The package <em>%h</em> is not available in any configured repository." msgstr "" +"Пакет <em>%h</em> не доступний ні в одному сконфігурованому репозиторії." #: applications/luci-app-opkg/luasrc/view/opkg.htm:478 msgid "" "The repository version of package <em>%h</em> is not compatible, require %s " "but only %s is available." msgstr "" +"Версія пакету <em>%h</em> у репозиторії несумісна, потрібно %s, але доступна " +"лише %s." #: applications/luci-app-opkg/luasrc/view/opkg.htm:916 msgid "Type to filter…" -msgstr "" +msgstr "Введіть текст для фільтра…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:928 -#, fuzzy msgid "Update lists…" -msgstr "Оновити списки" +msgstr "Оновити списки…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:937 -#, fuzzy msgid "Updates" -msgstr "Оновити списки" +msgstr "Оновлення" #: applications/luci-app-opkg/luasrc/view/opkg.htm:233 #: applications/luci-app-opkg/luasrc/view/opkg.htm:257 msgid "Upgrade…" -msgstr "" +msgstr "Оновлення…" #: applications/luci-app-opkg/luasrc/view/opkg.htm:656 #: applications/luci-app-opkg/luasrc/view/opkg.htm:788 @@ -283,12 +290,11 @@ msgstr "Версія" #: applications/luci-app-opkg/luasrc/view/opkg.htm:467 #: applications/luci-app-opkg/luasrc/view/opkg.htm:485 msgid "Version incompatible" -msgstr "" +msgstr "Несумісна версія" #: applications/luci-app-opkg/luasrc/view/opkg.htm:823 -#, fuzzy msgid "Waiting for the <em>opkg %h</em> command to complete…" -msgstr "Очікуємо завершення виконання команди..." +msgstr "Очікуємо завершення виконання команди <em>opkg %h</em> …" #: applications/luci-app-opkg/luasrc/view/opkg.htm:617 #: applications/luci-app-opkg/luasrc/view/opkg.htm:777 @@ -299,9 +305,9 @@ msgstr "невідомий" #: applications/luci-app-opkg/luasrc/view/opkg.htm:615 #: applications/luci-app-opkg/luasrc/view/opkg.htm:775 msgid "~%.1024mB compressed" -msgstr "" +msgstr "~%.1024mB стиснуто" #: applications/luci-app-opkg/luasrc/view/opkg.htm:613 #: applications/luci-app-opkg/luasrc/view/opkg.htm:773 msgid "~%.1024mB installed" -msgstr "" +msgstr "~%.1024mB інстальовано" diff --git a/applications/luci-app-opkg/po/vi/opkg.po b/applications/luci-app-opkg/po/vi/opkg.po index 5f434273a1..c67f56fb7b 100644 --- a/applications/luci-app-opkg/po/vi/opkg.po +++ b/applications/luci-app-opkg/po/vi/opkg.po @@ -132,6 +132,10 @@ msgstr "Tải và cài đặt gói" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "" @@ -175,6 +179,10 @@ msgstr "Tên gói" msgid "Package name or URL…" msgstr "Tên gói" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/zh-cn/opkg.po b/applications/luci-app-opkg/po/zh-cn/opkg.po index cb4b5d43aa..bb30fa00be 100644 --- a/applications/luci-app-opkg/po/zh-cn/opkg.po +++ b/applications/luci-app-opkg/po/zh-cn/opkg.po @@ -132,6 +132,10 @@ msgstr "下载并安装软件包" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "无可用信息" @@ -175,6 +179,10 @@ msgstr "软件包名称" msgid "Package name or URL…" msgstr "软件包名称" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-opkg/po/zh-tw/opkg.po b/applications/luci-app-opkg/po/zh-tw/opkg.po index 0bef4e0683..c2ea0348f4 100644 --- a/applications/luci-app-opkg/po/zh-tw/opkg.po +++ b/applications/luci-app-opkg/po/zh-tw/opkg.po @@ -131,6 +131,10 @@ msgstr "下載並安裝軟體包" msgid "Needs upgrade" msgstr "" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:944 +msgid "Next page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:324 msgid "No information available" msgstr "尚無可運用資訊" @@ -174,6 +178,10 @@ msgstr "軟體包名稱" msgid "Package name or URL…" msgstr "軟體包名稱" +#: applications/luci-app-opkg/luasrc/view/opkg.htm:942 +msgid "Previous page" +msgstr "" + #: applications/luci-app-opkg/luasrc/view/opkg.htm:702 msgid "Really attempt to install <em>%h</em>?" msgstr "" diff --git a/applications/luci-app-statistics/po/ru/statistics.po b/applications/luci-app-statistics/po/ru/statistics.po index 9454203ed7..bf0c9aad56 100644 --- a/applications/luci-app-statistics/po/ru/statistics.po +++ b/applications/luci-app-statistics/po/ru/statistics.po @@ -3,12 +3,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: LuCI: statistics\n" "POT-Creation-Date: 2017-10-17 22:00+0300\n" -"PO-Revision-Date: 2018-01-24 14:59+0300\n" +"PO-Revision-Date: 2018-11-21 22:44+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 <picfun@ya.ru>\n" +"X-Generator: Poedit 2.2\n" +"Last-Translator: Anton Kikin <a.kikin@tano-systems.com>\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" @@ -21,7 +21,7 @@ msgstr "APC ИБП" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/apcups.lua:5 msgid "APCUPS Plugin Configuration" -msgstr "Настройка плагина APCUPS" +msgstr "Настройка плагина «APCUPS»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:71 msgid "Action (target)" @@ -58,7 +58,7 @@ msgstr "Основная статистика" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/contextswitch.lua:4 msgid "CPU Context Switches Plugin Configuration" -msgstr "Настройка плагина контекстных переключателей CPU" +msgstr "Настройка плагина переключений контекста CPU" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:30 msgid "CPU Frequency" @@ -70,7 +70,7 @@ msgstr "Настройка плагина частоты CPU" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpu.lua:5 msgid "CPU Plugin Configuration" -msgstr "Настройка плагина 'CPU'" +msgstr "Настройка плагина «CPU»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:31 msgid "CSV Output" @@ -78,7 +78,7 @@ msgstr "CSV вывод" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/csv.lua:5 msgid "CSV Plugin Configuration" -msgstr "Настройка плагина CSV" +msgstr "Настройка плагина «CSV»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:91 msgid "Cache collected data for" @@ -106,7 +106,7 @@ msgstr "Сбор информации о топологии (CollectTopology)" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/collectd.lua:8 msgid "Collectd Settings" -msgstr "Настройки Collectd" +msgstr "Настройки сollectd" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/collectd.lua:9 msgid "" @@ -114,24 +114,24 @@ msgid "" "different plugins. On this page you can change general settings for the " "collectd daemon." msgstr "" -"Collectd - это сервис для сбора данных с разных плагинов. На этой странице " -"вы можете изменить настройки Сollectd." +"Collectd — это сервис для сбора данных из разных источников при помощи " +"плагинов. На этой странице вы можете изменить настройки collectd." #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:27 msgid "Conntrack" -msgstr "Отслеживание подключения (Conntrack)" +msgstr "Отслеживание подключений (Conntrack)" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/conntrack.lua:13 msgid "Conntrack Plugin Configuration" -msgstr "Настройка плагина Conntrack" +msgstr "Настройка плагина «Conntrack»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:28 msgid "Context Switches" -msgstr "Переключатели контекста" +msgstr "Переключения контекста" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/df.lua:5 msgid "DF Plugin Configuration" -msgstr "Настройка плагина DF" +msgstr "Настройка плагина «DF»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:35 msgid "DNS" @@ -139,7 +139,7 @@ msgstr "DNS" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/dns.lua:8 msgid "DNS Plugin Configuration" -msgstr "Настройка плагина DNS" +msgstr "Настройка плагина «DNS»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/collectd.lua:44 msgid "Data collection interval" @@ -147,7 +147,7 @@ msgstr "Интервал сбора данных" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/collectd.lua:40 msgid "Datasets definition file" -msgstr "Файл с определением<br />набора данных" +msgstr "Файл с определением набора данных" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:97 msgid "Destination ip range" @@ -163,7 +163,7 @@ msgstr "Папка с config файлом" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/disk.lua:5 msgid "Disk Plugin Configuration" -msgstr "Настройка плагина Disk" +msgstr "Настройка плагина «Disk»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:33 msgid "Disk Space Usage" @@ -183,7 +183,7 @@ msgstr "Показать за промежуток »" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/email.lua:5 msgid "E-Mail Plugin Configuration" -msgstr "Настройка плагина E-Mail" +msgstr "Настройка плагина «E-Mail»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:36 msgid "Email" @@ -191,11 +191,11 @@ msgstr "E-mail" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/thermal.lua:19 msgid "Empty value = monitor all" -msgstr "Если пусто = monitor all" +msgstr "Если пусто = отслеживать все" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/curl.lua:17 msgid "Enable" -msgstr "" +msgstr "Включить" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/apcups.lua:14 #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/conntrack.lua:18 @@ -235,11 +235,11 @@ msgstr "Включить этот плагин" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:37 msgid "Entropy" -msgstr "Entropy" +msgstr "Энтропия" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/entropy.lua:5 msgid "Entropy Plugin Configuration" -msgstr "Настройка плагина Entropy" +msgstr "Настройка плагина «Энтропия»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:38 msgid "Exec" @@ -247,7 +247,7 @@ msgstr "Exec" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua:5 msgid "Exec Plugin Configuration" -msgstr "Настройка плагина Exec" +msgstr "Настройка плагина «Exec»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua:68 msgid "Filter class monitoring" @@ -275,7 +275,7 @@ msgstr "Основные плагины" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/openvpn.lua:20 msgid "Generate a separate graph for each logged user" -msgstr "Создать отдельный график для каждого пользователя" +msgstr "Создать отдельный график для каждого авторизованного пользователя" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:101 msgid "Graphs" @@ -291,9 +291,8 @@ msgid "" "Here you can define external commands which will be started by collectd in " "order to read certain values. The values will be read from stdout." msgstr "" -"На странице вы можете определить внешние команды, которые будут выполнены " -"для чтения определенных значений. Значения будут считаны со стандартного " -"вывода." +"Здесь вы можете определить внешние команды, которые будут выполнены для " +"чтения определенных значений. Значения будут считаны со стандартного вывода." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua:51 msgid "" @@ -301,8 +300,8 @@ msgid "" "certain threshold values have been reached. The values leading to invocation " "will be fed to the the called programs stdin." msgstr "" -"На странице вы можете определить внешние команды, которые будут выполнены, " -"когда значения достигнут определенного порога. Значения будут переданы на " +"Здесь вы можете определить внешние команды, которые будут выполнены, когда " +"значения достигнут определенного порога. Значения будут переданы на " "стандартный ввод вызванным программам." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:36 @@ -310,8 +309,8 @@ msgid "" "Here you can define various criteria by which the monitored iptables rules " "are selected." msgstr "" -"На странице вы можете указать различные критерии, по которым будут выбраны " -"правила для сбора статистики." +"Здесь вы можете указать различные критерии, по которым будут выбраны правила " +"для сбора статистики." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/sensors.lua:88 msgid "Hold Ctrl to select multiple items or to deselect entries." @@ -333,7 +332,7 @@ msgstr "IP-адрес или имя хоста, с которых получат #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/irq.lua:5 msgid "IRQ Plugin Configuration" -msgstr "Настройка плагина IRQ" +msgstr "Настройка плагина «IRQ»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/dns.lua:32 msgid "Ignore source addresses" @@ -345,7 +344,7 @@ msgstr "Входящий интерфейс" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/interface.lua:8 msgid "Interface Plugin Configuration" -msgstr "Настройка плагина 'Интерфейсы'" +msgstr "Настройка плагина «Интерфейсы»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:39 msgid "Interfaces" @@ -361,7 +360,7 @@ msgstr "Интервал для ping-запросов" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:19 msgid "Iptables Plugin Configuration" -msgstr "Настройка плагина Iptables" +msgstr "Настройка плагина «Iptables»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iwinfo.lua:16 msgid "Leave unselected to automatically determine interfaces to monitor." @@ -383,15 +382,15 @@ msgstr "Прослушивать интерфейсы" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/load.lua:5 msgid "Load Plugin Configuration" -msgstr "Настройка плагина 'Загрузка системы'" +msgstr "Настройка плагина «Загрузка системы»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:60 msgid "" "Max values for a period can be used instead of averages when not using 'only " "average RRAs'" msgstr "" -"Максимальные значения для периода, могут использоваться вместо средних " -"значений, когда не используется 'only average RRAs'" +"Максимальные значения для периода могут использоваться вместо средних " +"значений, когда не используется опция «Создавать только средние RRA»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/email.lua:41 msgid "Maximum allowed connections" @@ -403,7 +402,7 @@ msgstr "Оперативная память (RAM)" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua:13 msgid "Memory Plugin Configuration" -msgstr "Настройка плагина 'Оперативная память (RAM)'" +msgstr "Настройка плагина «Оперативная память (RAM)»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/df.lua:37 #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/disk.lua:25 @@ -414,7 +413,7 @@ msgstr "Настройка плагина 'Оперативная память ( #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/sensors.lua:120 #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/thermal.lua:24 msgid "Monitor all except specified" -msgstr "Собирать статистику<br />со всех кроме указанных" +msgstr "Собирать статистику со всех кроме указанных" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua:19 msgid "Monitor all local listen ports" @@ -476,7 +475,7 @@ msgstr "Мониторить удаленные порты" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/curl.lua:20 msgid "Name" -msgstr "" +msgstr "Имя" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:46 msgid "Name of the rule" @@ -488,7 +487,7 @@ msgstr "Netlink" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua:10 msgid "Netlink Plugin Configuration" -msgstr "Настройка плагина 'Netlink'" +msgstr "Настройка плагина «Netlink»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:46 msgid "Network" @@ -496,7 +495,7 @@ msgstr "Сеть" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/network.lua:5 msgid "Network Plugin Configuration" -msgstr "Настройка плагина 'Сеть'" +msgstr "Настройка плагина «Сеть»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:24 msgid "Network plugins" @@ -511,12 +510,12 @@ msgid "" "Note: as pages are rendered by user 'nobody', the *.rrd files, the storage " "directory and all its parent directories need to be world readable." msgstr "" -"Внимание: все операции осуществляются под пользователем 'nobody', " -"соответственно все файлы *.rrd и папки будут доступны любому пользователю." +"Внимание: все операции осуществляются под пользователем «nobody», " +"соответственно все файлы *.rrd и папки будут доступны любому пользователю." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/collectd.lua:49 msgid "Number of threads for data collection" -msgstr "Количество потоков<br />сбора данных" +msgstr "Количество потоков сбора данных" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:48 msgid "OLSRd" @@ -524,11 +523,11 @@ msgstr "OLSRd" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/olsrd.lua:5 msgid "OLSRd Plugin Configuration" -msgstr "Настройка плагина OLSRd" +msgstr "Настройка плагина «OLSRd»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:53 msgid "Only create average RRAs" -msgstr "Создавать только<br />средние RRA" +msgstr "Создавать только средние RRA" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:49 msgid "OpenVPN" @@ -536,11 +535,11 @@ msgstr "OpenVPN" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/openvpn.lua:10 msgid "OpenVPN Plugin Configuration" -msgstr "Настройка плагина OpenVPN" +msgstr "Настройка плагина «OpenVPN»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/openvpn.lua:44 msgid "OpenVPN status files" -msgstr "Состояние файлов OpenVPN" +msgstr "Файлы состояния службы OpenVPN" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:116 msgid "Options" @@ -560,7 +559,7 @@ msgstr "Пинг-запрос" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua:5 msgid "Ping Plugin Configuration" -msgstr "Настройка плагина Ping" +msgstr "Настройка плагина «Пинг-запрос»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/olsrd.lua:18 msgid "Port" @@ -568,7 +567,7 @@ msgstr "Порт" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/apcups.lua:23 msgid "Port for apcupsd communication" -msgstr "Порт для связи apcupsd" +msgstr "Порт для связи со службой apcupsd" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:51 msgid "Processes" @@ -576,7 +575,7 @@ msgstr "Процессы" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/processes.lua:5 msgid "Processes Plugin Configuration" -msgstr "Настройка плагина Processes" +msgstr "Настройка плагина «Процессы»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/processes.lua:20 msgid "Processes to monitor separated by space" @@ -592,15 +591,18 @@ msgstr "Мониторинг Qdisc" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:82 msgid "RRD XFiles Factor" -msgstr "RRD XFiles Factor" +msgstr "" +"Часть интервала консолидации, которая может состоять из неопределенных " +"значений (*UNKNOWN*), если консолидированное значение может быть определено " +"(известно)" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:44 msgid "RRD heart beat interval" -msgstr "RRD heartbeat interval" +msgstr "Максимальное количество секунд между двумя обновлениями (HeartBeat)" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:35 msgid "RRD step interval" -msgstr "RRD step interval" +msgstr "Базовый интервал между данными в RRD (StepSize)" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:52 msgid "RRDTool" @@ -608,11 +610,11 @@ msgstr "RRDTool" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:5 msgid "RRDTool Plugin Configuration" -msgstr "Настройка плагина 'RRDTool'" +msgstr "Настройка плагина «RRDTool»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:74 msgid "Rows per RRA" -msgstr "Rows per RRA" +msgstr "Количество «поколений» данных в архиве RRA" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua:32 #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua:61 @@ -639,7 +641,7 @@ msgstr "Сенсоры" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/sensors.lua:66 msgid "Sensors Plugin Configuration" -msgstr "Настройка плагина сенсоров" +msgstr "Настройка плагина «Сенсоры»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/network.lua:54 msgid "Server host" @@ -659,7 +661,7 @@ msgstr "Мониторинг классов Shaping" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:59 msgid "Show max values instead of averages" -msgstr "Показывают максимальные значения, а не средние" +msgstr "Показывать максимальные значения, а не средние" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/email.lua:22 msgid "Socket file" @@ -695,7 +697,7 @@ msgstr "Splash Leases" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/splash_leases.lua:5 msgid "Splash Leases Plugin Configuration" -msgstr "Настройка плагина Splash Leases" +msgstr "Настройка плагина «Splash Leases»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:73 #: applications/luci-app-statistics/luasrc/view/admin_statistics/index.htm:9 @@ -717,7 +719,7 @@ msgstr "Хранить данные в виде коэффициентов вм #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:67 msgid "Stored timespans" -msgstr "Сохранённые<br />промежутки времени" +msgstr "Сохраняемые промежутки времени" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:43 msgid "System Load" @@ -729,7 +731,7 @@ msgstr "TCPConns" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua:5 msgid "TCPConns Plugin Configuration" -msgstr "Настройка плагина TCPConns" +msgstr "Настройка плагина «TCPConns»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/network.lua:64 msgid "TTL for network packets" @@ -745,44 +747,44 @@ msgstr "Таблица" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/apcups.lua:6 msgid "The APCUPS plugin collects statistics about the APC UPS." -msgstr "Плагин 'APCUPS' собирает статистику об ИБП APC." +msgstr "Плагин «APCUPS» собирает статистику об ИБП APC." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/nut.lua:5 msgid "The NUT plugin reads information about Uninterruptible Power Supplies." msgstr "" -"Плагин 'NUT' считывает информацию об источниках бесперебойного питания." +"Плагин «NUT» считывает информацию об источниках бесперебойного питания." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/olsrd.lua:6 msgid "" "The OLSRd plugin reads information about meshed networks from the txtinfo " "plugin of OLSRd." msgstr "" -"Плагин 'OLSRd' считывает информацию о узловых сетях с плагина txtinfo OLSRd." +"Плагин «OLSRd» считывает информацию о узловых сетях с плагина txtinfo OLSRd." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/openvpn.lua:11 msgid "" "The OpenVPN plugin gathers information about the current vpn connection " "status." msgstr "" -"Плагин 'OpenVPN' собирает информацию о текущем состоянии VPN подключения." +"Плагин «OpenVPN» собирает информацию о текущем состоянии VPN подключения." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/conntrack.lua:14 msgid "" "The conntrack plugin collects statistics about the number of tracked " "connections." msgstr "" -"Плагин 'Conntrack' собирает статистику о количестве отслеживаемых соединений." +"Плагин «Conntrack» собирает статистику о количестве отслеживаемых соединений." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpu.lua:6 msgid "The cpu plugin collects basic statistics about the processor usage." -msgstr "Плагин 'CPU' собирает статистику об использовании процессора." +msgstr "Плагин «CPU» собирает статистику об использовании процессора." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/csv.lua:6 msgid "" "The csv plugin stores collected data in csv file format for further " "processing by external programs." msgstr "" -"Плагин 'CSV' позволяет сохранить статистику в формате CSV для последующей " +"Плагин «CSV» позволяет сохранить статистику в формате CSV для последующей " "обработки." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/df.lua:6 @@ -790,7 +792,7 @@ msgid "" "The df plugin collects statistics about the disk space usage on different " "devices, mount points or filesystem types." msgstr "" -"Плагин 'DF' собирает статистику о доступном пространстве на различных " +"Плагин «DF» собирает статистику о доступном пространстве на различных " "устройствах, точках монтирования или файловых системах." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/disk.lua:6 @@ -798,14 +800,14 @@ msgid "" "The disk plugin collects detailed usage statistics for selected partitions " "or whole disks." msgstr "" -"Плагин 'Disk' собирает подробную статистику по выбранным разделам или дискам." +"Плагин «Disk» собирает подробную статистику по выбранным разделам или дискам." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/dns.lua:9 msgid "" "The dns plugin collects detailed statistics about dns related traffic on " "selected interfaces." msgstr "" -"Плагин 'DNS' собирает подробную статистику о DNS трафике на выбранных " +"Плагин «DNS» собирает подробную статистику о DNS трафике на выбранных " "интерфейсах." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/email.lua:6 @@ -815,35 +817,35 @@ msgid "" "to be used in conjunction with Mail::SpamAssasin::Plugin::Collectd but can " "be used in other ways as well." msgstr "" -"Плагин 'E-mail' создает Unix-сокет, который может быть использован для " -"передачи статистики email работающему сервису collectd. В основном, этот " +"Плагин «E-mail» создает Unix-сокет, который может быть использован для " +"передачи статистики по e-mail работающему сервису collectd. В основном, этот " "плагин предназначен для использования вместе с Mail::SpamAssasin::Plugin::" "Collectd." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/entropy.lua:6 msgid "The entropy plugin collects statistics about the available entropy." -msgstr "Плагин 'Entropy' собирает статистику о доступной энтропии." +msgstr "Плагин «Энтропия» собирает статистику о доступной энтропии." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua:6 msgid "" "The exec plugin starts external commands to read values from or to notify " "external processes when certain threshold values have been reached." msgstr "" -"Плагин 'Exec' выполняет внешнюю команду в случае, когда определенные " +"Плагин «Exec» выполняет внешнюю команду в случае, когда определенные " "значения достигают заданного порога." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/interface.lua:9 msgid "" "The interface plugin collects traffic statistics on selected interfaces." msgstr "" -"Плагин 'Интерфейсы' собирает статистику на выбранных сетевых интерфейсах." +"Плагин «Интерфейсы» собирает статистику на выбранных сетевых интерфейсах." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:20 msgid "" "The iptables plugin will monitor selected firewall rules and collect " "information about processed bytes and packets per rule." msgstr "" -"Плагин 'Iptables' собирает статистику с определенных правил межсетевого " +"Плагин «Iptables» собирает статистику с определенных правил межсетевого " "экрана." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/irq.lua:6 @@ -851,7 +853,7 @@ msgid "" "The irq plugin will monitor the rate of issues per second for each selected " "interrupt. If no interrupt is selected then all interrupts are monitored." msgstr "" -"Плагин 'IRQ' собирает статистику по выбранным прерываниям. Если ни одно " +"Плагин «IRQ» собирает статистику по выбранным прерываниям. Если ни одно " "прерывание не выбрано, сбор статистики будет проводиться по всем прерываниям." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iwinfo.lua:8 @@ -859,16 +861,16 @@ msgid "" "The iwinfo plugin collects statistics about wireless signal strength, noise " "and quality." msgstr "" -"Плагин 'Wi-Fi' собирает статистику о беспроводном сигнале, шуме и качестве." +"Плагин «Wi-Fi» собирает статистику о качестве и шуме беспроводного сигнала." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/load.lua:6 msgid "The load plugin collects statistics about the general system load." -msgstr "Плагин 'Загрузка системы' собирает статистику о загрузке системы." +msgstr "Плагин «Загрузка системы» собирает статистику о загрузке системы." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua:14 msgid "The memory plugin collects statistics about the memory usage." msgstr "" -"Плагин 'Оперативная память (RAM)' собирает статистику об использовании " +"Плагин «Оперативная память (RAM)» собирает статистику об использовании " "памяти." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua:11 @@ -876,7 +878,7 @@ msgid "" "The netlink plugin collects extended information like qdisc-, class- and " "filter-statistics for selected interfaces." msgstr "" -"Плагин 'Netlink' собирает расширенную статистику с выбранных интерфейсов." +"Плагин «Netlink» собирает расширенную статистику с выбранных интерфейсах." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/network.lua:6 msgid "" @@ -885,17 +887,17 @@ msgid "" "client mode locally collected data is transferred to a collectd server " "instance, in server mode the local instance receives data from other hosts." msgstr "" -"Плагин 'Сеть' предоставляет возможность сетевого обмена данными между " -"разными сервисами collectd.<br />Collectd может работать в режиме сервера " -"или клиента.<br />В режиме клиента, локальная статистика передается collectd-" -"серверу, в режиме сервера collectd собирает статистику с удаленных хостов." +"Плагин «Сеть» предоставляет возможность сетевого обмена данными между " +"разными сервисами collectd. Collectd может работать в режиме сервера или " +"клиента. В режиме клиента, локальная статистика передается collectd-серверу, " +"в режиме сервера collectd собирает статистику с удаленных хостов." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua:6 msgid "" "The ping plugin will send icmp echo replies to selected hosts and measure " "the roundtrip time for each host." msgstr "" -"Плагин 'Ping' посылает ICMP-запросы выбранным хостам и измеряет время " +"Плагин «Пинг-запрос» посылает ICMP-запросы выбранным хостам и измеряет время " "отклика." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/processes.lua:6 @@ -903,8 +905,8 @@ msgid "" "The processes plugin collects information like cpu time, page faults and " "memory usage of selected processes." msgstr "" -"Плагин 'Processes' собирает информацию, такую как время CPU, ошибки страницы " -"и использование памяти выбранных процессов." +"Плагин «Процессы» собирает информацию, такую как время CPU, ошибки страниц и " +"использование памяти выбранных процессов." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:6 msgid "" @@ -913,25 +915,24 @@ msgid "" "values will result in a very high memory consumption in the temporary " "directory. This can render the device unusable!</strong>" msgstr "" -"Плагин 'Rrdtool' сохраняет статистику в формате rrd для последующего " +"Плагин «RRDTool» сохраняет статистику в формате RRD для последующего " "построения диаграмм.<br /><br /><strong>Внимание: установка неверных " -"параметров может привезти к высокому потреблению памяти при считывании " -"данных из temp.<br />Что в свою очередь, может привести к зависанию " -"устройства!</strong>" +"параметров может привезти к высокому потреблению памяти устройства. Это " +"может привести к зависанию устройства!</strong>" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/sensors.lua:67 msgid "" "The sensors plugin uses the Linux Sensors framework to gather environmental " "statistics." msgstr "" -"Плагин 'Sensors' использует сенсоры Linux, чтобы собрать статистику " +"Плагин «Сенсоры» использует сенсоры Linux, чтобы собрать статистику " "состояния устройства." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/splash_leases.lua:6 msgid "" "The splash leases plugin uses libuci to collect statistics about splash " "leases." -msgstr "Плагин 'Splash' использует libuci для сбора статистики работы splash." +msgstr "Плагин «Splash» использует libuci для сбора статистики работы splash." #: applications/luci-app-statistics/luasrc/view/admin_statistics/index.htm:11 msgid "" @@ -939,16 +940,16 @@ msgid "" "to gather data and <a href=\"http://oss.oetiker.ch/rrdtool/\">RRDtool</a> to " "render diagram images." msgstr "" -"Страница 'Статистика' использует <a href=\"https://collectd.org/\">Collectd</" +"Приложение статистики использует <a href=\"https://collectd.org/\">collectd</" "a> для сбора данных и <a href=\"http://oss.oetiker.ch/rrdtool/\">RRDtool</a> " -"и представления их в виде графиков." +"для представления их в виде графиков." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua:6 msgid "" "The tcpconns plugin collects information about open tcp connections on " "selected ports." msgstr "" -"Плагин 'TCPConns' собирает информацию об открытых TCP соединениях на " +"Плагин «TCPConns» собирает информацию об открытых TCP соединениях на " "выбранных портах." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/thermal.lua:5 @@ -957,7 +958,7 @@ msgid "" "read from /sys/class/thermal/*/temp ( '*' denotes the thermal device to be " "read, e.g. thermal_zone1 )" msgstr "" -"Плагин 'Thermal', будет контролировать температурные сенсоры. Данные будут " +"Плагин «Thermal» собирает информацию с температурных сенсоров. Данные будут " "считываются из /sys/class/thermal/*/temp ( '*' обозначает сенсор " "устройства , как-то thermal_zone1 )" @@ -966,12 +967,12 @@ msgid "" "The unixsock plugin creates a unix socket which can be used to read " "collected data from a running collectd instance." msgstr "" -"Плагин 'UnixSock' создает Unix-сокет, который может быть использован для " +"Плагин «UnixSock» создает Unix-сокет, который может быть использован для " "получения статистики от работающего сервиса collectd." #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/uptime.lua:14 msgid "The uptime plugin collects statistics about the uptime of the system." -msgstr "Плагин 'Uptime' собирает статистику о времени работы системы." +msgstr "Плагин «Uptime» собирает статистику о времени работы системы." #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:56 msgid "Thermal" @@ -979,7 +980,7 @@ msgstr "Thermal" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/thermal.lua:4 msgid "Thermal Plugin Configuration" -msgstr "Настройка плагина Thermal" +msgstr "Настройка плагина «Thermal»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/contextswitch.lua:5 msgid "This plugin collects statistics about the processor context switches." @@ -1005,7 +1006,7 @@ msgstr "" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/collectd.lua:54 msgid "Try to lookup fully qualified hostname" -msgstr "Пытаться определять<br />имя хоста" +msgstr "Пытаться определять полное имя хоста" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:47 #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/nut.lua:12 @@ -1014,7 +1015,7 @@ msgstr "ИБП" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/nut.lua:4 msgid "UPS Plugin Configuration" -msgstr "Настройка плагина UPS" +msgstr "Настройка плагина «UPS»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/nut.lua:12 msgid "UPS name in NUT ups@host format" @@ -1030,7 +1031,7 @@ msgstr "UnixSock" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua:5 msgid "Unixsock Plugin Configuration" -msgstr "Настройка плагина UnixSock" +msgstr "Настройка плагина «UnixSock»" #: applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua:58 msgid "Uptime" @@ -1038,11 +1039,11 @@ msgstr "Время работы" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/uptime.lua:13 msgid "Uptime Plugin Configuration" -msgstr "Настройка плагина Uptime" +msgstr "Настройка плагина «Uptime»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/openvpn.lua:38 msgid "Use improved naming schema" -msgstr "Используйте улучшенную схему наименования" +msgstr "Использовать улучшенную схему наименования" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/collectd.lua:36 msgid "Used PID file" @@ -1063,7 +1064,7 @@ msgstr "Wi-Fi" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iwinfo.lua:7 msgid "Wireless iwinfo Plugin Configuration" -msgstr "Настройка плагина 'Wi-Fi'" +msgstr "Настройка плагина «Wi-Fi»" #: applications/luci-app-statistics/luasrc/view/admin_statistics/index.htm:15 msgid "" @@ -1078,7 +1079,7 @@ msgstr "" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/curl.lua:5 msgid "cUrl Plugin Configuration" -msgstr "" +msgstr "Настройка плагина «cUrl»" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua:110 msgid "e.g. br-ff" @@ -1098,7 +1099,7 @@ msgstr "не более 16 символов" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:53 msgid "reduces rrd size" -msgstr "уменьшает размер rrd" +msgstr "позволяет уменьшить размер RRD" #: applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua:67 msgid "seconds; multiple separated by space" |