Add Statistic plugin (#1581 Amount of hours spent on a book)
Add template
This commit is contained in:
parent
c45328f14e
commit
c797bb53a4
1 changed files with 2 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ local TimeVal = require("ui/timeval")
|
|||
local dump = require("dump")
|
||||
local lfs = require("libs/libkoreader-lfs")
|
||||
local tableutil = require("tableutil")
|
||||
local T = require("ffi/util").template
|
||||
|
||||
local statistics_dir = "./statistics"
|
||||
|
||||
|
|
@ -260,7 +261,7 @@ function ReaderStatistics:getDatesForBook(book)
|
|||
|
||||
table.insert(result, { text = _(book.title) })
|
||||
for k, v in tableutil.spairs(dates, function(t, a, b) return t[b].date > t[a].date end) do
|
||||
table.insert(result, { text = _(k), mandatory = _("Pages(") .. v.count .. _(") Time: ") .. os.date("!%X", v.read) })
|
||||
table.insert(result, { text = _(k), mandatory = T(_("Pages (%1) Time: %2"), v.count, os.date("!%X", v.read)) })
|
||||
end
|
||||
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue