Skip to content

Commit

Permalink
up 支持LEDE和OPENWRT官方版本。
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpdboy authored Mar 15, 2024
1 parent 6346cf1 commit d1ffe61
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 3 deletions.
5 changes: 3 additions & 2 deletions luci-app-poweroffdevice/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#
# provides Web UI to shut down (power off) your device.
# routers are listed at https://github.com/sirpdboy/luci-app-poweroffdevice
# Copyright (C) 2022-2023 sirpdboy <herboy2008@gmail.com>
# This is free software, licensed under the GNU General Public License v3.

include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-poweroffdevice
NAME:=poweroffdevice
PKG_NAME:=luci-app-$(NAME)
LUCI_TITLE:=LuCI support for poweroffdevice Router
LUCI_DESCRIPTION:=provides Web UI to shut down (power off) your device.

Expand Down
4 changes: 3 additions & 1 deletion luci-app-poweroffdevice/luasrc/controller/poweroffdevice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ module("luci.controller.poweroffdevice", package.seeall)


function index()
entry({"admin","system","poweroffdevice"},template("poweroffdevice/poweroffdevice"), _("PowerOff"), 92)
local e = entry({"admin","system","poweroffdevice"},template("poweroffdevice/poweroffdevice"), _("PowerOff"), 92)
e.dependent=false
e.acl_depends = { "luci-app-poweroffdevice" }
entry({"admin","system","poweroffdevice","call"},post("action_poweroff"))
end

Expand Down
31 changes: 31 additions & 0 deletions luci-app-poweroffdevice/po/zh-cn/poweroffdevice.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# provides Web UI to shut down (power off) your device.
# routers are listed at https://github.com/sirpdboy/luci-app-poweroffdevice
# This is free software, licensed under the GNU General Public License v3.

msgid "PowerOff"
msgstr "关机"

msgid "Power Off Device"
msgstr "设备关机"

msgid "Perform Power Off"
msgstr "执行关机"

msgid "Turn off the power to the device you are using"
msgstr "关闭您正在使用的设备的电源"

msgid "WARNING: Power off might result in a reboot on a device which not support power off."
msgstr "警告:对于不支持关机的设备,关机可能会导致重新启动."

msgid "Device unreachable"
msgstr "操作设备无效"

msgid "Shutting Down..."
msgstr "正在关机..."

msgid "Device shutdown complete!"
msgstr "设备关机完毕!"



31 changes: 31 additions & 0 deletions luci-app-poweroffdevice/po/zh_Hans/poweroffdevice.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# provides Web UI to shut down (power off) your device.
# routers are listed at https://github.com/sirpdboy/luci-app-poweroffdevice
# This is free software, licensed under the GNU General Public License v3.

msgid "PowerOff"
msgstr "关机"

msgid "Power Off Device"
msgstr "设备关机"

msgid "Perform Power Off"
msgstr "执行关机"

msgid "Turn off the power to the device you are using"
msgstr "关闭您正在使用的设备的电源"

msgid "WARNING: Power off might result in a reboot on a device which not support power off."
msgstr "警告:对于不支持关机的设备,关机可能会导致重新启动."

msgid "Device unreachable"
msgstr "操作设备无效"

msgid "Shutting Down..."
msgstr "正在关机..."

msgid "Device shutdown complete!"
msgstr "设备关机完毕!"



Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"luci-app-poweroffdevice": {
"description": "Grant UCI access for luci-app-poweroffdevice",
"read": {
"uci": [ "poweroffdevice" ]
},
"write": {
"uci": [ "poweroffdevice" ]
}
}
}

0 comments on commit d1ffe61

Please sign in to comment.