summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2017-07-25 08:36:52 +0300
committerGitHub <noreply@github.com>2017-07-25 08:36:52 +0300
commitf450c0403d4aa2d1e5cbcb262315121b130990e9 (patch)
treec56b8be016dd11e7f11e653cffd35c4091884340
parent314dd1aa11d1fbe3501928e89823e2521eb651d3 (diff)
parentec305ecc82a80e254beaeac9fbd82949d56109b3 (diff)
Merge pull request #1252 from musashino205/mwan3-fix-status
luci-app-mwan3: Add translate strings in update_status()
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm22
-rw-r--r--applications/luci-app-mwan3/po/ja/mwan3.po9
-rw-r--r--applications/luci-app-mwan3/po/templates/mwan3.pot9
-rw-r--r--applications/luci-app-mwan3/po/zh-cn/mwan3.po9
4 files changed, 38 insertions, 11 deletions
diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm
index e4a14adade..4483485946 100644
--- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm
+++ b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm
@@ -24,7 +24,7 @@
<script type="text/javascript">//<![CDATA[
var stxhr = new XHR();
- function update_status(tool, task)
+ function update_status(tool, task, task_name)
{
var iface = document.getElementById('mwaniface').value;
var output = document.getElementById('diag_output');
@@ -33,7 +33,7 @@
{
output.innerHTML =
'<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="padding: 20px; vertical-align: middle;" /> ' +
- String.format("<%:Waiting for MWAN to %s...%>", task)
+ String.format("<%:Waiting for MWAN to %s...%>", task_name)
;
}
else
@@ -70,20 +70,20 @@
<% for z in interfaceNames:gmatch("[^ ]+") do -%><option value="<%=z%>"><%=z%></option><%- end %>
</select>
<div id="buttoncss">
- <input type="button" value="<%:Ping default gateway%>" class="cbi-button cbi-button-apply" onclick="update_status('ping', 'gateway')" />
- <input type="button" value="<%:Ping tracking IP%>" class="cbi-button cbi-button-apply" onclick="update_status('ping', 'track_ip')" />
- <input type="button" value="<%:Check IP rules%>" class="cbi-button cbi-button-apply" onclick="update_status('rulechk', null)" />
- <input type="button" value="<%:Check routing table%>" class="cbi-button cbi-button-apply" onclick="update_status('routechk', null)" />
- <input type="button" value="<%:Hotplug ifup%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifup')" />
- <input type="button" value="<%:Hotplug ifdown%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifdown')" />
+ <input type="button" value="<%:Ping default gateway%>" class="cbi-button cbi-button-apply" onclick="update_status('ping', 'gateway', null)" />
+ <input type="button" value="<%:Ping tracking IP%>" class="cbi-button cbi-button-apply" onclick="update_status('ping', 'track_ip', null)" />
+ <input type="button" value="<%:Check IP rules%>" class="cbi-button cbi-button-apply" onclick="update_status('rulechk', null, null)" />
+ <input type="button" value="<%:Check routing table%>" class="cbi-button cbi-button-apply" onclick="update_status('routechk', null, null)" />
+ <input type="button" value="<%:Hotplug ifup%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifup', null)" />
+ <input type="button" value="<%:Hotplug ifdown%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifdown', null)" />
</div>
</fieldset>
<fieldset id="diag_select" class="cbi-section">
<legend><%:MWAN Service Control%></legend>
<div id="buttoncss">
- <input type="button" value="<%:Restart MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'restart')" />
- <input type="button" value="<%:Stop MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'stop')" />
- <input type="button" value="<%:Start MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'start')" />
+ <input type="button" value="<%:Restart MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'restart', '<%:restart%>')" />
+ <input type="button" value="<%:Stop MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'stop', '<%:stop%>')" />
+ <input type="button" value="<%:Start MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'start', '<%:start%>')" />
</div>
</fieldset>
<fieldset class="cbi-section" style="display:none">
diff --git a/applications/luci-app-mwan3/po/ja/mwan3.po b/applications/luci-app-mwan3/po/ja/mwan3.po
index 0d6ea152d0..925912e3ce 100644
--- a/applications/luci-app-mwan3/po/ja/mwan3.po
+++ b/applications/luci-app-mwan3/po/ja/mwan3.po
@@ -613,6 +613,15 @@ msgstr "ifup"
msgid "never"
msgstr "never"
+msgid "restart"
+msgstr ""
+
+msgid "start"
+msgstr ""
+
+msgid "stop"
+msgstr ""
+
msgid "unreachable (reject)"
msgstr "unreachable (reject)"
diff --git a/applications/luci-app-mwan3/po/templates/mwan3.pot b/applications/luci-app-mwan3/po/templates/mwan3.pot
index d9bddf5e08..3d25e844ac 100644
--- a/applications/luci-app-mwan3/po/templates/mwan3.pot
+++ b/applications/luci-app-mwan3/po/templates/mwan3.pot
@@ -514,5 +514,14 @@ msgstr ""
msgid "never"
msgstr ""
+msgid "restart"
+msgstr ""
+
+msgid "start"
+msgstr ""
+
+msgid "stop"
+msgstr ""
+
msgid "unreachable (reject)"
msgstr ""
diff --git a/applications/luci-app-mwan3/po/zh-cn/mwan3.po b/applications/luci-app-mwan3/po/zh-cn/mwan3.po
index d239312f9b..1e0f34f088 100644
--- a/applications/luci-app-mwan3/po/zh-cn/mwan3.po
+++ b/applications/luci-app-mwan3/po/zh-cn/mwan3.po
@@ -550,5 +550,14 @@ msgstr "ifup"
msgid "never"
msgstr "从不"
+msgid "restart"
+msgstr ""
+
+msgid "start"
+msgstr ""
+
+msgid "stop"
+msgstr ""
+
msgid "unreachable (reject)"
msgstr "不可达(拒绝)"