summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-travelmate
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-travelmate')
-rw-r--r--applications/luci-app-travelmate/Makefile4
-rw-r--r--applications/luci-app-travelmate/luasrc/controller/travelmate.lua4
-rw-r--r--applications/luci-app-travelmate/luasrc/view/travelmate/ap_qr.htm62
-rw-r--r--applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm1
-rw-r--r--applications/luci-app-travelmate/po/ja/travelmate.po67
-rw-r--r--applications/luci-app-travelmate/po/pt-br/travelmate.po49
-rw-r--r--applications/luci-app-travelmate/po/ru/travelmate.po87
-rw-r--r--applications/luci-app-travelmate/po/templates/travelmate.pot49
8 files changed, 230 insertions, 93 deletions
diff --git a/applications/luci-app-travelmate/Makefile b/applications/luci-app-travelmate/Makefile
index 6170f9d4c3..2bd25bc171 100644
--- a/applications/luci-app-travelmate/Makefile
+++ b/applications/luci-app-travelmate/Makefile
@@ -1,11 +1,11 @@
-# Copyright 2017 Dirk Brenken (dev@brenken.org)
+# Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the Apache License, Version 2.0
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Travelmate
-LUCI_DEPENDS:=+travelmate +luci-lib-jsonc
+LUCI_DEPENDS:=+travelmate +luci-lib-jsonc +qrencode
LUCI_PKGARCH:=all
include ../../luci.mk
diff --git a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua
index 0f7583497f..14b8d77ff6 100644
--- a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua
+++ b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua
@@ -3,7 +3,6 @@
module("luci.controller.travelmate", package.seeall)
-local fs = require("nixio.fs")
local util = require("luci.util")
local i18n = require("luci.i18n")
local templ = require("luci.template")
@@ -15,7 +14,8 @@ function index()
entry({"admin", "services", "travelmate"}, firstchild(), _("Travelmate"), 40).dependent = false
entry({"admin", "services", "travelmate", "tab_from_cbi"}, cbi("travelmate/overview_tab", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true
entry({"admin", "services", "travelmate", "stations"}, template("travelmate/stations"), _("Wireless Stations"), 20).leaf = true
- entry({"admin", "services", "travelmate", "logfile"}, call("logread"), _("View Logfile"), 30).leaf = true
+ entry({"admin", "services", "travelmate", "apqr"}, template("travelmate/ap_qr"), _("AP QR-Codes"), 30).leaf = true
+ entry({"admin", "services", "travelmate", "logfile"}, call("logread"), _("View Logfile"), 40).leaf = true
entry({"admin", "services", "travelmate", "advanced"}, firstchild(), _("Advanced"), 100)
entry({"admin", "services", "travelmate", "advanced", "configuration"}, cbi("travelmate/configuration_tab"), _("Edit Travelmate Configuration"), 110).leaf = true
entry({"admin", "services", "travelmate", "advanced", "cfg_wireless"}, cbi("travelmate/cfg_wireless_tab"), _("Edit Wireless Configuration"), 120).leaf = true
diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/ap_qr.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/ap_qr.htm
new file mode 100644
index 0000000000..13342a3e66
--- /dev/null
+++ b/applications/luci-app-travelmate/luasrc/view/travelmate/ap_qr.htm
@@ -0,0 +1,62 @@
+<%#
+Copyright 2018 Dirk Brenken (dev@brenken.org)
+This is free software, licensed under the Apache License, Version 2.0
+-%>
+
+<%+header%>
+
+<div class="cbi-map">
+ <div class="cbi-map-descr">
+ <%=translate("Here you'll find the QR codes from all of your configured Access Points. It allows you to connect your Android or iOS devices to your router's WiFi using the QR code shown below.")%>
+ </div>
+<%-
+ local write = io.write
+ local uci = require("luci.model.uci").cursor()
+
+ uci:foreach("wireless", "wifi-iface", function(s)
+ local device = s.device or ""
+ local mode = s.mode or ""
+ local ssid = s.ssid or ""
+ local enc = s.encryption or ""
+ local key = s.key or ""
+ local hidden = s.hidden or "false"
+ local disabled = s.disabled or ""
+ local wep_slots = {s.key1 or "", s.key2 or "", s.key3 or "", s.key4 or ""}
+
+ if device and mode == "ap" and disabled ~= "1" then
+ if string.match(enc, '^psk') then
+ enc = "WPA"
+ elseif string.match(enc, '^wep') then
+ enc = "WEP"
+ if tonumber(key) then
+ key = wep_slots[tonumber(key)]
+ end
+ elseif enc == "none" then
+ enc = "nopass"
+ key = "nokey"
+ else
+ enc = ""
+ end
+ if hidden == "1" then
+ hidden = "true"
+ end
+ if ssid and enc and key then
+ local e_ssid = string.gsub(ssid,"[\"\\';:, ]",[[\\\%1]])
+ local e_key = string.gsub(key,"[\"\\';:, ]",[[\\\%1]])
+ local qrcode = ""
+ if nixio.fs.access("/usr/bin/qrencode") then
+ qrcode = luci.sys.exec("/usr/bin/qrencode --inline --8bit --type=SVG --output=- 'WIFI:S:\"'" .. e_ssid .. "'\";T:'" .. enc .. "';P:\"'" .. e_key .. "'\";H:'" .. hidden .. "';'")
+ end
+-%>
+ <fieldset class="cbi-section">
+ <legend>AP on <%=device%> with SSID "<%=ssid%>"</legend>
+ <h3 name="content"><%=qrcode%></h3>
+ </fieldset>
+<%-
+ end
+ end
+ end)
+%>
+</div>
+
+<%+footer%>
diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm
index a267339950..1dacb6e24b 100644
--- a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm
+++ b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm
@@ -12,7 +12,6 @@ This is free software, licensed under the Apache License, Version 2.0
<%+header%>
<div class="cbi-map">
-<h2 name="content"><%:Wireless Stations%></h2>
<div class="cbi-map-descr">
<%=translatef("Provides an overview of all configured uplinks for the travelmate interface (%s). You can edit, delete or re-order existing uplinks or scan for a new one. The currently used uplink is emphasized in blue.", trmiface)%>
</div>
diff --git a/applications/luci-app-travelmate/po/ja/travelmate.po b/applications/luci-app-travelmate/po/ja/travelmate.po
index 56e3badabb..30f34ef309 100644
--- a/applications/luci-app-travelmate/po/ja/travelmate.po
+++ b/applications/luci-app-travelmate/po/ja/travelmate.po
@@ -7,11 +7,14 @@ msgstr ""
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.0.5\n"
+"X-Generator: Poedit 2.0.6\n"
"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language: ja\n"
+msgid "AP QR-Codes"
+msgstr "AP QR-コード"
+
msgid "Actions"
msgstr "操作"
@@ -43,6 +46,16 @@ msgstr "BSSID"
msgid "Back to overview"
msgstr "概要へ戻る"
+msgid "Captive Portal Detection"
+msgstr "キャプティブポータル検知"
+
+msgid ""
+"Check the internet availability, log captive portal redirections and keep "
+"the uplink connection 'alive'."
+msgstr ""
+"インターネットの利用可否を確認し、キャプティブポータル リダイレクトを記録して"
+"アップリンク接続を 'alive' として保持します。"
+
msgid "Cipher"
msgstr "暗号化方式"
@@ -135,13 +148,18 @@ msgid "Force a manual uplink rescan / reconnect in 'trigger' mode."
msgstr ""
"'trigger' モード時に、手動でアップリンクの再スキャンと再接続を行います。"
-msgid "How long should travelmate wait for a successful wlan interface reload."
+msgid ""
+"Here you'll find the QR codes from all of your configured Access Points. It "
+"allows you to connect your Android or iOS devices to your router's WiFi "
+"using the QR code shown below."
msgstr ""
-"無線LAN インターフェースのリロードが成功するまでの、Travelmate の待機時間で"
-"す。"
+"ここには、構成済みの全アクセスポイントの QR コードを表示しています。以下の "
+"QR コードを使用して、 Android または iOS デバイスをルータの WiFi に接続するこ"
+"とができます。"
-msgid "How many times should travelmate try to connect to an Uplink."
-msgstr "Travelmate がアップリンクへの接続を試行する回数です。"
+msgid ""
+"How long should travelmate wait for a successful wlan uplink connection."
+msgstr "Travelmate が無線アップリンクへの接続成功を待つ時間です。"
msgid "Identity"
msgstr "ID"
@@ -171,6 +189,13 @@ msgstr "最終実行日時"
msgid "Manual Rescan"
msgstr "手動再スキャン"
+msgid ""
+"Minimum signal quality threshold as percent for conditional uplink (dis-) "
+"connections."
+msgstr ""
+"条件付きアップリンク接続(または切断)のための、シグナル品質閾値の下限(%)で"
+"す。"
+
msgid "Move down"
msgstr "下へ"
@@ -233,6 +258,9 @@ msgstr "再スキャン"
msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'."
msgstr "Travelmate が指定された無線に接続するよう制御します。(例: 'radio0')"
+msgid "Retry limit to connect to an uplink."
+msgstr "アップリンクへの接続を試行する回数です。"
+
msgid "Runtime Information"
msgstr "実行情報"
@@ -248,6 +276,9 @@ msgstr "保存"
msgid "Scan"
msgstr "スキャン:"
+msgid "Signal Quality Threshold"
+msgstr "シグナル品質閾値"
+
msgid "Signal strength"
msgstr "信号強度"
@@ -298,24 +329,20 @@ msgstr ""
msgid "Timeout in seconds between retries in 'automatic' mode."
msgstr "'automatic' モード時に接続を確認または再試行する間隔(秒)です。"
-msgid "To disable this feature set it to '0' which means unlimited retries."
-msgstr ""
-"この機能を無効にして接続の再試行を無制限にする場合、 '0' を設定します。"
-
msgid "Travelmate"
msgstr "Travelmate"
msgid "Travelmate Logfile"
msgstr "Travelmate ログファイル"
-msgid "Travelmate Status"
-msgstr "Travelmate ステータス"
+msgid "Travelmate Status (Quality)"
+msgstr "Travelmate ステータス(品質)"
msgid "Travelmate Version"
msgstr "Travelmate バージョン"
-msgid "Trigger delay"
-msgstr "トリガー遅延"
+msgid "Trigger Delay"
+msgstr "トリガ遅延"
msgid "Unknown"
msgstr "不明"
@@ -365,20 +392,8 @@ msgstr ""
"ファイアウォールの wan ゾーンに追加します。このステップは、一度だけ実行される"
"必要があります。"
-msgid "connected"
-msgstr "接続済"
-
-msgid "error"
-msgstr "エラー"
-
msgid "hidden"
msgstr "(不明)"
msgid "n/a"
msgstr "利用不可"
-
-msgid "not connected"
-msgstr "未接続"
-
-msgid "running"
-msgstr "実行中"
diff --git a/applications/luci-app-travelmate/po/pt-br/travelmate.po b/applications/luci-app-travelmate/po/pt-br/travelmate.po
index cf17b024ec..7cb6ac0613 100644
--- a/applications/luci-app-travelmate/po/pt-br/travelmate.po
+++ b/applications/luci-app-travelmate/po/pt-br/travelmate.po
@@ -12,6 +12,9 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: pt_BR\n"
+msgid "AP QR-Codes"
+msgstr ""
+
msgid "Actions"
msgstr ""
@@ -43,6 +46,14 @@ msgstr ""
msgid "Back to overview"
msgstr ""
+msgid "Captive Portal Detection"
+msgstr ""
+
+msgid ""
+"Check the internet availability, log captive portal redirections and keep "
+"the uplink connection 'alive'."
+msgstr ""
+
msgid "Cipher"
msgstr ""
@@ -129,10 +140,14 @@ msgstr ""
msgid "Force a manual uplink rescan / reconnect in 'trigger' mode."
msgstr ""
-msgid "How long should travelmate wait for a successful wlan interface reload."
+msgid ""
+"Here you'll find the QR codes from all of your configured Access Points. It "
+"allows you to connect your Android or iOS devices to your router's WiFi "
+"using the QR code shown below."
msgstr ""
-msgid "How many times should travelmate try to connect to an Uplink."
+msgid ""
+"How long should travelmate wait for a successful wlan uplink connection."
msgstr ""
msgid "Identity"
@@ -161,6 +176,11 @@ msgstr ""
msgid "Manual Rescan"
msgstr ""
+msgid ""
+"Minimum signal quality threshold as percent for conditional uplink (dis-) "
+"connections."
+msgstr ""
+
msgid "Move down"
msgstr ""
@@ -219,6 +239,9 @@ msgstr ""
msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'."
msgstr ""
+msgid "Retry limit to connect to an uplink."
+msgstr ""
+
msgid "Runtime Information"
msgstr ""
@@ -234,6 +257,9 @@ msgstr ""
msgid "Scan"
msgstr ""
+msgid "Signal Quality Threshold"
+msgstr ""
+
msgid "Signal strength"
msgstr ""
@@ -274,22 +300,19 @@ msgstr ""
msgid "Timeout in seconds between retries in 'automatic' mode."
msgstr ""
-msgid "To disable this feature set it to '0' which means unlimited retries."
-msgstr ""
-
msgid "Travelmate"
msgstr "Travelmate"
msgid "Travelmate Logfile"
msgstr ""
-msgid "Travelmate Status"
+msgid "Travelmate Status (Quality)"
msgstr ""
msgid "Travelmate Version"
msgstr ""
-msgid "Trigger delay"
+msgid "Trigger Delay"
msgstr ""
msgid "Unknown"
@@ -338,24 +361,12 @@ msgid ""
"add it to the wan zone of the firewall. This step has only to be done once."
msgstr ""
-msgid "connected"
-msgstr ""
-
-msgid "error"
-msgstr ""
-
msgid "hidden"
msgstr ""
msgid "n/a"
msgstr ""
-msgid "not connected"
-msgstr ""
-
-msgid "running"
-msgstr ""
-
#~ msgid ""
#~ "Brief advice: Create a wwan interface, configure it to use dhcp and add "
#~ "it to the wan zone in firewall. Create the wifi interfaces to be used "
diff --git a/applications/luci-app-travelmate/po/ru/travelmate.po b/applications/luci-app-travelmate/po/ru/travelmate.po
index fe0e476471..0b04e27838 100644
--- a/applications/luci-app-travelmate/po/ru/travelmate.po
+++ b/applications/luci-app-travelmate/po/ru/travelmate.po
@@ -15,6 +15,9 @@ msgstr ""
"Project-Info: Это технический перевод, не дословный. Главное-удобный русский "
"интерфейс, все проверялось в графическом режиме, совместим с другими apps\n"
+msgid "AP QR-Codes"
+msgstr ""
+
msgid "Actions"
msgstr "Действия"
@@ -46,6 +49,14 @@ msgstr "BSSID"
msgid "Back to overview"
msgstr "Назад в меню"
+msgid "Captive Portal Detection"
+msgstr ""
+
+msgid ""
+"Check the internet availability, log captive portal redirections and keep "
+"the uplink connection 'alive'."
+msgstr ""
+
msgid "Cipher"
msgstr "Алгоритм шифрования"
@@ -138,13 +149,15 @@ msgstr ""
"Принудительно выполнить повторное сканирование/повторное подключение внешних "
"сетей в режиме 'ручной'."
-msgid "How long should travelmate wait for a successful wlan interface reload."
+msgid ""
+"Here you'll find the QR codes from all of your configured Access Points. It "
+"allows you to connect your Android or iOS devices to your router's WiFi "
+"using the QR code shown below."
msgstr ""
-"Временная задержка необходима TravelMate для полной перезагрузки wlan "
-"интерфейса."
-msgid "How many times should travelmate try to connect to an Uplink."
-msgstr "Сколько раз TravelMate должен пытаться подключиться к сети. "
+msgid ""
+"How long should travelmate wait for a successful wlan uplink connection."
+msgstr ""
msgid "Identity"
msgstr "Идентификация EAP"
@@ -174,6 +187,11 @@ msgstr "Дата последнего запуска"
msgid "Manual Rescan"
msgstr "Поиск сети вручную"
+msgid ""
+"Minimum signal quality threshold as percent for conditional uplink (dis-) "
+"connections."
+msgstr ""
+
msgid "Move down"
msgstr "Переместить вниз"
@@ -238,6 +256,9 @@ msgstr "Пересканировать"
msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'."
msgstr "Выделить TravelMate-у конкретное Wi-Fi устройство, например 'radio0'."
+msgid "Retry limit to connect to an uplink."
+msgstr ""
+
msgid "Runtime Information"
msgstr "Информация о состоянии"
@@ -253,6 +274,9 @@ msgstr "Сохранить"
msgid "Scan"
msgstr "Поиск"
+msgid "Signal Quality Threshold"
+msgstr ""
+
msgid "Signal strength"
msgstr "Мощность сигнала"
@@ -305,25 +329,20 @@ msgstr ""
"Время ожидания в секундах между повторными попытками соединения в режиме "
"'автоматически'."
-msgid "To disable this feature set it to '0' which means unlimited retries."
-msgstr ""
-"<br />Чтобы отключить эту функцию, установите значение '0', что означает "
-"неограниченное количество попыток."
-
msgid "Travelmate"
msgstr "TravelMate"
msgid "Travelmate Logfile"
msgstr "Системный журнал TravelMate"
-msgid "Travelmate Status"
-msgstr "Состояние Travelmate"
+msgid "Travelmate Status (Quality)"
+msgstr ""
msgid "Travelmate Version"
msgstr "Версия TravelMate"
-msgid "Trigger delay"
-msgstr "Задержка запуска"
+msgid "Trigger Delay"
+msgstr ""
msgid "Unknown"
msgstr "Неизвестно"
@@ -371,20 +390,40 @@ msgid ""
"add it to the wan zone of the firewall. This step has only to be done once."
msgstr "добавить в wan зону межсетевого экрана. Можно сделать только один раз."
-msgid "connected"
-msgstr "подключен"
-
-msgid "error"
-msgstr "ошибка"
-
msgid "hidden"
msgstr "скрытый"
msgid "n/a"
msgstr "нет данных"
-msgid "not connected"
-msgstr "не подключено"
+#~ msgid ""
+#~ "How long should travelmate wait for a successful wlan interface reload."
+#~ msgstr ""
+#~ "Временная задержка необходима TravelMate для полной перезагрузки wlan "
+#~ "интерфейса."
+
+#~ msgid "How many times should travelmate try to connect to an Uplink."
+#~ msgstr "Сколько раз TravelMate должен пытаться подключиться к сети. "
+
+#~ msgid "To disable this feature set it to '0' which means unlimited retries."
+#~ msgstr ""
+#~ "<br />Чтобы отключить эту функцию, установите значение '0', что означает "
+#~ "неограниченное количество попыток."
+
+#~ msgid "Travelmate Status"
+#~ msgstr "Состояние Travelmate"
+
+#~ msgid "Trigger delay"
+#~ msgstr "Задержка запуска"
+
+#~ msgid "connected"
+#~ msgstr "подключен"
+
+#~ msgid "error"
+#~ msgstr "ошибка"
+
+#~ msgid "not connected"
+#~ msgstr "не подключено"
-msgid "running"
-msgstr "работает"
+#~ msgid "running"
+#~ msgstr "работает"
diff --git a/applications/luci-app-travelmate/po/templates/travelmate.pot b/applications/luci-app-travelmate/po/templates/travelmate.pot
index aeefa491db..e27c61a9d0 100644
--- a/applications/luci-app-travelmate/po/templates/travelmate.pot
+++ b/applications/luci-app-travelmate/po/templates/travelmate.pot
@@ -1,6 +1,9 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
+msgid "AP QR-Codes"
+msgstr ""
+
msgid "Actions"
msgstr ""
@@ -32,6 +35,14 @@ msgstr ""
msgid "Back to overview"
msgstr ""
+msgid "Captive Portal Detection"
+msgstr ""
+
+msgid ""
+"Check the internet availability, log captive portal redirections and keep "
+"the uplink connection 'alive'."
+msgstr ""
+
msgid "Cipher"
msgstr ""
@@ -118,10 +129,14 @@ msgstr ""
msgid "Force a manual uplink rescan / reconnect in 'trigger' mode."
msgstr ""
-msgid "How long should travelmate wait for a successful wlan interface reload."
+msgid ""
+"Here you'll find the QR codes from all of your configured Access Points. It "
+"allows you to connect your Android or iOS devices to your router's WiFi "
+"using the QR code shown below."
msgstr ""
-msgid "How many times should travelmate try to connect to an Uplink."
+msgid ""
+"How long should travelmate wait for a successful wlan uplink connection."
msgstr ""
msgid "Identity"
@@ -150,6 +165,11 @@ msgstr ""
msgid "Manual Rescan"
msgstr ""
+msgid ""
+"Minimum signal quality threshold as percent for conditional uplink (dis-) "
+"connections."
+msgstr ""
+
msgid "Move down"
msgstr ""
@@ -208,6 +228,9 @@ msgstr ""
msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'."
msgstr ""
+msgid "Retry limit to connect to an uplink."
+msgstr ""
+
msgid "Runtime Information"
msgstr ""
@@ -223,6 +246,9 @@ msgstr ""
msgid "Scan"
msgstr ""
+msgid "Signal Quality Threshold"
+msgstr ""
+
msgid "Signal strength"
msgstr ""
@@ -263,22 +289,19 @@ msgstr ""
msgid "Timeout in seconds between retries in 'automatic' mode."
msgstr ""
-msgid "To disable this feature set it to '0' which means unlimited retries."
-msgstr ""
-
msgid "Travelmate"
msgstr ""
msgid "Travelmate Logfile"
msgstr ""
-msgid "Travelmate Status"
+msgid "Travelmate Status (Quality)"
msgstr ""
msgid "Travelmate Version"
msgstr ""
-msgid "Trigger delay"
+msgid "Trigger Delay"
msgstr ""
msgid "Unknown"
@@ -327,20 +350,8 @@ msgid ""
"add it to the wan zone of the firewall. This step has only to be done once."
msgstr ""
-msgid "connected"
-msgstr ""
-
-msgid "error"
-msgstr ""
-
msgid "hidden"
msgstr ""
msgid "n/a"
msgstr ""
-
-msgid "not connected"
-msgstr ""
-
-msgid "running"
-msgstr ""