all: change most translate statements to new format, some need manual cleanup
[project/luci.git] / applications / luci-hd_idle / luasrc / model / cbi / hd_idle.lua
1 --[[
2
3 LuCI hd-idle
4 (c) 2008 Yanira <forum-2008@email.de>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 ]]--
15
16 require("nixio.fs")
17
18 m = Map("hd-idle", translate("hd-idle"), translate("hd-idle is a utility program for spinning-down external disks after a period of idle time."))
19
20 s = m:section(TypedSection, "hd-idle", translate("Settings"))
21 s.anonymous = true
22
23 s:option(Flag, "enabled", translate("enable"))
24
25 disk = s:option(Value, "disk", translate("Disk"))
26 disk.rmempty = true
27 for dev in nixio.fs.glob("/dev/[sh]d[a-z]") do
28         disk:value(nixio.fs.basename(dev))
29 end
30
31 s:option(Value, "idle_time_interval", translate("Idle-Time")).default = 10
32 s.rmempty = true
33 unit = s:option(ListValue, "idle_time_unit", translate("Idle-Time unit"))
34 unit.default = "minutes"
35 unit:value("minutes", "min")
36 unit:value("hours", "h")
37 unit.rmempty = true
38
39 s:option(Flag, "enable_debug", translate("Enable debug"))
40
41 return m