[fix, i18n] Make two strings translatable (#5256)

Fixes <https://github.com/koreader/koreader/issues/5255>.
pull/5258/head
Frans de Jonge 5 years ago committed by GitHub
parent fd5fe7dfef
commit 45a0f285f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@ local Translator = require("ui/translator")
local UIManager = require("ui/uimanager")
local logger = require("logger")
local _ = require("gettext")
local C_ = _.pgettext
local T = require("ffi/util").template
local Screen = Device.screen
@ -800,7 +801,7 @@ function ReaderHighlight:onHoldRelease()
},
{
{
text = "Copy",
text = C_("Text", "Copy"),
enabled = Device:hasClipboard(),
callback = function()
Device.input.setClipboardText(self.selected_text.text)

@ -1021,7 +1021,10 @@ function ReaderStatistics:getCurrentStat(id_book)
-- adding 0.5 rounds to nearest integer with math.floor
{ _("Percentage completed"), math.floor(total_read_pages / self.data.pages * 100 + 0.5) .. "%" },
{ _("Average time per day"), util.secondsToClock(total_time_book/tonumber(total_days)), false },
{ _("Estimated reading finished"), string.format("%s (%d day(s))", estimate_end_of_read_date, estimate_days_to_read) },
{ _("Estimated reading finished"),
--- @todo Plurals for translations.
-- @translators Estimated reading finished date (%1), estimated remaining days to read (%2). Please see https://github.com/koreader/koreader/issues/5249 to track proper plural translation.
T(_("%1 (%2 day(s))"), estimate_end_of_read_date, estimate_days_to_read) },
}
end

Loading…
Cancel
Save