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/Makefile13
-rw-r--r--applications/luci-app-travelmate/luasrc/controller/travelmate.lua11
-rw-r--r--applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua53
-rw-r--r--applications/luci-app-travelmate/po/ja/travelmate.po91
-rw-r--r--applications/luci-app-travelmate/po/templates/travelmate.pot58
-rwxr-xr-xapplications/luci-app-travelmate/root/etc/uci-defaults/40_luci-travelmate11
6 files changed, 237 insertions, 0 deletions
diff --git a/applications/luci-app-travelmate/Makefile b/applications/luci-app-travelmate/Makefile
new file mode 100644
index 0000000000..f4b1b0a4e3
--- /dev/null
+++ b/applications/luci-app-travelmate/Makefile
@@ -0,0 +1,13 @@
+#
+# 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_PKGARCH:=all
+
+include ../../luci.mk
+
+# call BuildPackage - OpenWrt buildroot signature
diff --git a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua
new file mode 100644
index 0000000000..27c19c4e52
--- /dev/null
+++ b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua
@@ -0,0 +1,11 @@
+-- Licensed to the public under the Apache License 2.0.
+
+module("luci.controller.travelmate", package.seeall)
+
+function index()
+ if not nixio.fs.access("/etc/config/travelmate") then
+ return
+ end
+
+ entry({"admin", "services", "travelmate"}, cbi("travelmate"), _("Travelmate"), 60)
+end
diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua
new file mode 100644
index 0000000000..fa44d4b523
--- /dev/null
+++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua
@@ -0,0 +1,53 @@
+-- Licensed to the public under the Apache License 2.0.
+
+m = Map("travelmate", translate("Travelmate"),
+ translate("Configuration of the Travelmate package to enable travel router functionality. ") .. [[</p>]] ..
+ translate("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 ('client' mode, " ..
+ "assigned to wwan network, left as disabled). Travelmate will try " ..
+ "to connect to the known wifi client interfaces in the defined order. ") ..
+ [[<a href="https://github.com/openwrt/packages/tree/master/net/travelmate/files/README.md" target="_blank">]]
+ .. translate("Link to detailed advice")
+ .. [[</a>]] )
+
+-- General options
+
+s = m:section(NamedSection, "global", "travelmate", translate("Global options"))
+
+o = s:option(Flag, "trm_enabled", translate("Enable Travelmate"))
+o.rmempty = false
+o.default = 0
+
+o = s:option(Value, "trm_maxwait", translate("Max. timeout in seconds for wlan interface reload"),
+ translate("Default 20, range 10-60"))
+o.rmempty = false
+o.default = 20
+o.datatype = "range(10,60)"
+
+o = s:option(Value, "trm_maxretry", translate("Max. number of connection retries to an uplink"),
+ translate("Default 3, range 1-10"))
+o.rmempty = false
+o.default = 3
+o.datatype = "range(1,10)"
+
+-- Extra options
+
+e = m:section(NamedSection, "global", "travelmate", translate("Extra options"))
+
+a = e:option(Flag, "trm_debug", translate("Debug logging"))
+a.rmempty = true
+a.default = a.disabled
+
+a = e:option(Value, "trm_iface", translate("Restrict reload trigger to certain interface(s)"),
+ translate("Space separated list of wwan interfaces that trigger reload action. To disable reload trigger set it to 'false'. Default: empty"))
+a.rmempty = true
+a.default = ""
+a.datatype = "uciname"
+
+a = e:option(Flag, "trm_iw", translate("Use iw for scanning"),
+ translate("Disable this if you want to use iwinfo instead of iw"))
+a.rmempty = true
+a.default = a.enabled
+
+return m
+
diff --git a/applications/luci-app-travelmate/po/ja/travelmate.po b/applications/luci-app-travelmate/po/ja/travelmate.po
new file mode 100644
index 0000000000..de1aceed95
--- /dev/null
+++ b/applications/luci-app-travelmate/po/ja/travelmate.po
@@ -0,0 +1,91 @@
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: \n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.11\n"
+"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language: ja\n"
+
+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 ('client' "
+"mode, assigned to wwan network, left as disabled). Travelmate will try to "
+"connect to the known wifi client interfaces in the defined order."
+msgstr ""
+"簡単な解説: 予めWWANインターフェースを作成し、DHCPを使用するよう構成してファ"
+"イアウォールのWANゾーンに追加します。また、使用される無線インターフェースを作"
+"成しておきます(\"クライアント\" モード、WWANに割り当て、無効状態)。"
+"Travelmateは、登録されている順序で既知の無線クライアント インターフェースへの"
+"接続を試行します。"
+
+msgid ""
+"Configuration of the Travelmate package to enable travel router "
+"functionality."
+msgstr "トラベル ルータ機能を有効にする、Travelmate パッケージの設定です。"
+
+msgid "Debug logging"
+msgstr "デバッグ ログ"
+
+msgid "Default 20, range 10-60"
+msgstr "既定値 20、範囲 10 - 60"
+
+msgid "Default 3, range 1-10"
+msgstr "既定値 3、範囲 1 - 10"
+
+msgid "Disable this if you want to use iwinfo instead of iw"
+msgstr "iw の代わりに iwinfo を使用したい場合、この設定を無効にします。"
+
+msgid "Enable Travelmate"
+msgstr "Travelmateの有効化"
+
+msgid "Extra options"
+msgstr "拡張オプション"
+
+msgid "Global options"
+msgstr "全般オプション"
+
+msgid "Link to detailed advice"
+msgstr "詳細な解説へのリンク"
+
+msgid "Max. number of connection retries to an uplink"
+msgstr "確立までの接続試行回数"
+
+msgid "Max. timeout in seconds for wlan interface reload"
+msgstr "無線LANインターフェース リロード時の最大待機時間(秒)"
+
+msgid "Restrict reload trigger to certain interface(s)"
+msgstr "リロード トリガを特定のインターフェースに限定する"
+
+msgid ""
+"Space separated list of wwan interfaces that trigger reload action. To "
+"disable reload trigger set it to 'false'. Default: empty"
+msgstr ""
+"リロード動作のトリガとなる、スペースで区切られたWWAN インターフェースのリスト"
+"です。リロードのトリガを無効にするには、'false' を設定します。既定値:(空)"
+
+msgid "Travelmate"
+msgstr "Travelmate"
+
+msgid "Use iw for scanning"
+msgstr "スキャンに iw を使用する"
+
+#~ msgid "Default 3, range 0-10. Set to 0 to allow unlimited retries"
+#~ msgstr "既定値 3、範囲 0 - 10。再試行回数を制限しない場合、0 に設定します。"
+
+#~ msgid "Default 30, range 5-60"
+#~ msgstr "既定値 30、範囲 5 - 60"
+
+#~ msgid "Default: empty = use all radios."
+#~ msgstr "デフォルト:(空)= 全ての無線を使用"
+
+#~ msgid "Loop timeout in seconds for wlan monitoring"
+#~ msgstr "無線LAN モニターのループ タイムアウト(秒)"
+
+#~ msgid "Use only one radio, e.g. 'radio0'"
+#~ msgstr "単一の無線のみ使用する 例: 'radio0'"
diff --git a/applications/luci-app-travelmate/po/templates/travelmate.pot b/applications/luci-app-travelmate/po/templates/travelmate.pot
new file mode 100644
index 0000000000..20628196b6
--- /dev/null
+++ b/applications/luci-app-travelmate/po/templates/travelmate.pot
@@ -0,0 +1,58 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+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 ('client' "
+"mode, assigned to wwan network, left as disabled). Travelmate will try to "
+"connect to the known wifi client interfaces in the defined order."
+msgstr ""
+
+msgid ""
+"Configuration of the Travelmate package to enable travel router "
+"functionality."
+msgstr ""
+
+msgid "Debug logging"
+msgstr ""
+
+msgid "Default 20, range 10-60"
+msgstr ""
+
+msgid "Default 3, range 1-10"
+msgstr ""
+
+msgid "Disable this if you want to use iwinfo instead of iw"
+msgstr ""
+
+msgid "Enable Travelmate"
+msgstr ""
+
+msgid "Extra options"
+msgstr ""
+
+msgid "Global options"
+msgstr ""
+
+msgid "Link to detailed advice"
+msgstr ""
+
+msgid "Max. number of connection retries to an uplink"
+msgstr ""
+
+msgid "Max. timeout in seconds for wlan interface reload"
+msgstr ""
+
+msgid "Restrict reload trigger to certain interface(s)"
+msgstr ""
+
+msgid ""
+"Space separated list of wwan interfaces that trigger reload action. To "
+"disable reload trigger set it to 'false'. Default: empty"
+msgstr ""
+
+msgid "Travelmate"
+msgstr ""
+
+msgid "Use iw for scanning"
+msgstr ""
diff --git a/applications/luci-app-travelmate/root/etc/uci-defaults/40_luci-travelmate b/applications/luci-app-travelmate/root/etc/uci-defaults/40_luci-travelmate
new file mode 100755
index 0000000000..f7676774a1
--- /dev/null
+++ b/applications/luci-app-travelmate/root/etc/uci-defaults/40_luci-travelmate
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+uci -q batch <<-EOF >/dev/null
+ delete ucitrack.@travelmate[-1]
+ add ucitrack travelmate
+ set ucitrack.@travelmate[-1].init=travelmate
+ commit ucitrack
+EOF
+
+rm -f /tmp/luci-indexcache
+exit 0