[plugin] String and formatting (#8980)

Easy the life of translators and fixes a stupid string typo.
This commit is contained in:
zwim
2022-04-10 17:54:32 +02:00
committed by GitHub
parent eaa6e77398
commit b845674bed
2 changed files with 4 additions and 4 deletions

View File

@@ -2,5 +2,5 @@ local _ = require("gettext")
return {
name = "autosuspend",
fullname = _("Auto power save"),
description = _([["Puts the device into standby, suspend or power off after specified periods of inactivity."]]),
description = _([[Puts the device into standby, suspend or power off after specified periods of inactivity.]]),
}

View File

@@ -44,14 +44,14 @@ function SystemStat:appendCounters()
if self.resume_sec then
self:put({_(" Last resume time"), os.date("%c", self.resume_sec)})
end
self:put({_(" Up time"),
self:put({" " .. _("Up time"),
util.secondsToClockDuration("", os.difftime(os.time(), self.start_sec), false, true, true)})
if Device:canSuspend() then
self:put({_(" Time in suspend"),
self:put({" " .. _("Time in suspend"),
util.secondsToClockDuration("", Device.total_suspend_tv:tonumber(), false, true, true)})
end
if Device:canStandby() then
self:put({_(" Time in standby"),
self:put({" " .. _("Time in standby"),
util.secondsToClockDuration("", Device.total_standby_tv:tonumber(), false, true, true)})
end
self:put({_("Counters"), ""})