gluon-luci-admin: remove translation support

We'll have to revisit translations at a later point after configmode and
expertmode have matured. Texts in this package were pretty inconsistent
anyway so there is no point in keeping translations for random text
fragments.
This commit is contained in:
Nils Schneider 2014-02-09 23:17:50 +01:00
parent bb32d5c3a9
commit 6e4596fe87
8 changed files with 51 additions and 51 deletions

View File

@ -30,7 +30,7 @@ function index()
root.index = true root.index = true
end end
local page = entry({"admin"}, alias("admin", "index"), _("Expertmode"), 10) local page = entry({"admin"}, alias("admin", "index"), "Expertmode", 10)
page.sysauth = "root" page.sysauth = "root"
if configmode then if configmode then
-- force root to be logged in when running in configmode -- force root to be logged in when running in configmode
@ -40,10 +40,10 @@ function index()
end end
page.index = true page.index = true
entry({"admin", "index"}, form("admin/index"), _("Overview"), 1).ignoreindex = true entry({"admin", "index"}, form("admin/index"), "Overview", 1).ignoreindex = true
if not configmode then if not configmode then
entry({"admin", "logout"}, call("action_logout"), _("Logout")) entry({"admin", "logout"}, call("action_logout"), "Logout")
end end
end end

View File

@ -16,10 +16,10 @@ $Id$
module("luci.controller.admin.system", package.seeall) module("luci.controller.admin.system", package.seeall)
function index() function index()
entry({"admin", "passwd"}, cbi("admin/passwd"), _("Admin Password"), 10) entry({"admin", "passwd"}, cbi("admin/passwd"), "Admin Password", 10)
entry({"admin", "backup"}, call("action_backup"), _("Backup / Restore"), 80) entry({"admin", "backup"}, call("action_backup"), "Backup / Restore", 80)
entry({"admin", "upgrade"}, call("action_upgrade"), _("Flash Firmware"), 90) entry({"admin", "upgrade"}, call("action_upgrade"), "Flash Firmware", 90)
entry({"admin", "reboot"}, call("action_reboot"), _("Reboot"), 100) entry({"admin", "reboot"}, call("action_reboot"), "Reboot", 100)
end end
function action_backup() function action_backup()

View File

@ -20,16 +20,16 @@ local m, s, pw1, pw2
m = Map("system", "Passwort & SSH Keys") m = Map("system", "Passwort & SSH Keys")
s = m:section(TypedSection, translate("Router Password"), s = m:section(TypedSection, "Router Password",
translate("Changes the administrator password for accessing the device")) "Changes the administrator password for accessing the device")
s.addremove = false s.addremove = false
s.anonymous = true s.anonymous = true
pw1 = s:option(Value, "pw1", translate("Password")) pw1 = s:option(Value, "pw1", "Password")
pw1.password = true pw1.password = true
pw2 = s:option(Value, "pw2", translate("Confirmation")) pw2 = s:option(Value, "pw2", "Confirmation")
pw2.password = true pw2.password = true
function s.cfgsections() function s.cfgsections()
@ -43,19 +43,19 @@ function m.on_commit(map)
if v1 and v2 and #v1 > 0 and #v2 > 0 then if v1 and v2 and #v1 > 0 and #v2 > 0 then
if v1 == v2 then if v1 == v2 then
if luci.sys.user.setpasswd(luci.dispatcher.context.authuser, v1) == 0 then if luci.sys.user.setpasswd(luci.dispatcher.context.authuser, v1) == 0 then
m.message = translate("Password successfully changed!") m.message = "Password successfully changed!"
else else
m.message = translate("Unknown Error, password not changed!") m.message = "Unknown Error, password not changed!"
end end
else else
m.message = translate("Given password confirmation did not match, password not changed!") m.message = "Given password confirmation did not match, password not changed!"
end end
end end
end end
if fs.access("/etc/config/dropbear") then if fs.access("/etc/config/dropbear") then
s = m:section(TypedSection, "_keys", "SSH Keys", s = m:section(TypedSection, "_keys", "SSH Keys",
translate("Here you can paste public SSH-Keys (one per line) for SSH public-key authentication.")) "Here you can paste public SSH-Keys (one per line) for SSH public-key authentication.")
s.addremove = false s.addremove = false
s.anonymous = true s.anonymous = true

View File

@ -13,9 +13,9 @@ $Id$
-%> -%>
<%+header%> <%+header%>
<h2><a id="content" name="content"><%:System%></a></h2> <h2><a id="content" name="content">System</a></h2>
<br /> <br />
<p><% if msg then %><%=msg%><% else %><%:Changes applied.%><% end %></p> <p><% if msg then %><%=msg%><% else %>Changes applied.<% end %></p>
<p><%:Please wait: Device rebooting...%></p> <p>Please wait: Device rebooting...</p>
<script type="text/javascript">setTimeout("location='<%=controller%>'", 60000)</script> <script type="text/javascript">setTimeout("location='<%=controller%>'", 60000)</script>
<%+footer%> <%+footer%>

View File

@ -13,14 +13,14 @@ $Id$
-%> -%>
<%+header%> <%+header%>
<h2><a id="content" name="content"><%:Backup / Restore%></a></h2> <h2><a id="content" name="content">Backup / Restore</a></h2>
<p><%:Here you can backup and restore your configuration and - if possible - reset this device to the default settings.%></p> <p>Here you can backup and restore your configuration and - if possible - reset this device to the default settings.</p>
<br /> <br />
<div> <div>
<ul> <ul>
<li><a href="<%=REQUEST_URI%>?backup=kthxbye"><%:Create backup%></a></li> <li><a href="<%=REQUEST_URI%>?backup=kthxbye">Create backup</a></li>
<% if reset_avail then -%> <% if reset_avail then -%>
<li><a href="<%=REQUEST_URI%>?reset=yarly" onclick="return confirm('<%:Proceed reverting all settings and resetting to firmware defaults?%>')"><%:Reset this device to defaults%></a></li> <li><a href="<%=REQUEST_URI%>?reset=yarly" onclick="return confirm('Proceed reverting all settings and resetting to firmware defaults?')">Reset this device to defaults</a></li>
<% end -%> <% end -%>
</ul> </ul>
</div> </div>
@ -28,12 +28,12 @@ $Id$
<br /> <br />
<form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data"> <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
<div class="left"><%:Backup Archive%>:</div> <div class="left">Backup Archive:</div>
<div> <div>
<input type="file" size="30" name="archive" /> <input type="file" size="30" name="archive" />
</div> </div>
<div> <div>
<input type="submit" class="cbi-button cbi-input-apply" value="<%:Restore backup%>" /> <input type="submit" class="cbi-button cbi-input-apply" value="Restore backup" />
</div> </div>
</form> </form>
<%+footer%> <%+footer%>

View File

@ -1,4 +1,4 @@
<h2><a id="content" name="content"><%:Hello!%></a></h2> <h2><a id="content" name="content">Hallo!</a></h2>
<p>Dies ist der Experten-Modus deines Freifunkknotens.</p> <p>Dies ist der Experten-Modus deines Freifunkknotens.</p>
<p>Hier kannst du weitere Einstellungen vornehmen, Firmware Upates <p>Hier kannst du weitere Einstellungen vornehmen, Firmware Upates
einspielen und auch vieles kaputt machen.</p> einspielen und auch vieles kaputt machen.</p>

View File

@ -13,19 +13,19 @@ $Id$
-%> -%>
<%+header%> <%+header%>
<h2><a id="content" name="content"><%:Reboot%></a></h2> <h2><a id="content" name="content">Reboot</a></h2>
<p><%:Reboots the operating system of your device%></p> <p>Reboots the operating system of your device</p>
<%- <%-
local c = require("luci.model.uci").cursor():changes() local c = require("luci.model.uci").cursor():changes()
if c and next(c) then if c and next(c) then
-%> -%>
<p class="warning"><%:Warning: There are unsaved changes that will be lost while rebooting!%></p> <p class="warning">Warning: There are unsaved changes that will be lost while rebooting!</p>
<%- <%-
end end
if not reboot then if not reboot then
-%> -%>
<p><a href="<%=REQUEST_URI%>?reboot=1"><%:Perform reboot%></a></p> <p><a href="<%=REQUEST_URI%>?reboot=1">Perform reboot</a></p>
<%- else -%> <%- else -%>
<p><%:Please wait: Device rebooting...%></p> <p>Please wait: Device rebooting...</p>
<%- end -%> <%- end -%>
<%+footer%> <%+footer%>

View File

@ -15,58 +15,58 @@ $Id$
<%+header%> <%+header%>
<h2><a id="content" name="content"><%:Flash Firmware%></a></h2> <h2><a id="content" name="content">Flash Firmware</a></h2>
<% if step == 1 then %> <% if step == 1 then %>
<% if supported then %> <% if supported then %>
<form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data"> <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
<p> <p>
<%:Upload an OpenWrt image file to reflash the device.%> Upload an OpenWrt image file to reflash the device.
<% if bad_image then %> <% if bad_image then %>
<br /><br /> <br /><br />
<div class="error"><%:The uploaded image file does not <div class="error">The uploaded image file does not
contain a supported format. Make sure that you choose the generic contain a supported format. Make sure that you choose the generic
image format for your platform. %></div> image format for your platform.</div>
<% end %> <% end %>
</p> </p>
<div> <div>
<%:Firmware image%>:<br /> Firmware image:<br />
<input type="hidden" name="step" value="2" /> <input type="hidden" name="step" value="2" />
<input type="file" size="30" name="image" /> <input type="file" size="30" name="image" />
<br /> <br />
<br /> <br />
<% if keepavail then -%> <% if keepavail then -%>
<input type="checkbox" name="keepcfg" value="1" checked="checked" /> <input type="checkbox" name="keepcfg" value="1" checked="checked" />
<span class="bold"><%:Keep configuration files%></span> <span class="bold">Keep configuration files</span>
<% end -%> <% end -%>
<br /> <br />
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Upload image%>" /> <input class="cbi-button cbi-button-apply" type="submit" value="Upload image" />
</div> </div>
</form> </form>
<% else %> <% else %>
<div class="error"><%_ Sorry. <div class="error">Sorry.
OpenWrt does not support a system upgrade on this platform.<br /> OpenWrt does not support a system upgrade on this platform.<br />
You need to manually flash your device. %></div> You need to manually flash your device.</div>
<% end %> <% end %>
<% elseif step == 2 then %> <% elseif step == 2 then %>
<p> <p>
<%_ The flash image was uploaded. The flash image was uploaded.
Below is the checksum and file size listed, Below is the checksum and file size listed,
compare them with the original file to ensure data integrity.<br /> compare them with the original file to ensure data integrity.<br />
Click "Proceed" below to start the flash procedure. %> Click "Proceed" below to start the flash procedure.
<% if flashsize > 0 and filesize > flashsize then %> <% if flashsize > 0 and filesize > flashsize then %>
<br /><br /> <br /><br />
<div class="error"><%:It appears that you try to <div class="error">It appears that you try to
flash an image that does not fit into the flash memory, please verify flash an image that does not fit into the flash memory, please verify
the image file! %></div> the image file!</div>
<% end %> <% end %>
<br /> <br />
<ul> <ul>
<li><%:Checksum%>: <code><%=checksum%></code></li> <li>Checksum: <code><%=checksum%></code></li>
<li><%:Size%>: <% <li>Size: <%
local w = require "luci.tools.webadmin" local w = require "luci.tools.webadmin"
write(w.byte_format(filesize)) write(w.byte_format(filesize))
@ -83,20 +83,20 @@ $Id$
<form style="display:inline"> <form style="display:inline">
<input type="hidden" name="step" value="3" /> <input type="hidden" name="step" value="3" />
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" /> <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Proceed%>" /> <input class="cbi-button cbi-button-apply" type="submit" value="Proceed" />
</form> </form>
<form style="display:inline"> <form style="display:inline">
<input type="hidden" name="step" value="1" /> <input type="hidden" name="step" value="1" />
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" /> <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input class="cbi-button cbi-button-reset" type="submit" value="<%:Cancel%>" /> <input class="cbi-button cbi-button-reset" type="submit" value="Cancel" />
</form> </form>
</div> </div>
<% elseif step == 3 then %> <% elseif step == 3 then %>
<p><%_ The system is flashing now.<br /> <p>The system is flashing now.<br />
DO NOT POWER OFF THE DEVICE!<br /> DO NOT POWER OFF THE DEVICE!<br />
Wait a few minutes until you try to reconnect. Wait a few minutes until you try to reconnect.
It might be necessary to renew the address of your computer to reach the device It might be necessary to renew the address of your computer to reach the device
again, depending on your settings. %></p> again, depending on your settings.</p>
<iframe src="<%=REQUEST_URI%>?step=4&#38;keepcfg=<%=keepconfig and "1" or "0"%>" style="border:1px solid black; width:100%; height:150px"></iframe> <iframe src="<%=REQUEST_URI%>?step=4&#38;keepcfg=<%=keepconfig and "1" or "0"%>" style="border:1px solid black; width:100%; height:150px"></iframe>
<% end %> <% end %>