mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[i18n] Add context to "Update" (#8519)
In response to the comment by @ilyats on Weblate: > Text appears in code twice, as menu item and as dialog button label. Ideally, translations should be different.
This commit is contained in:
@@ -14,6 +14,7 @@ local Version = require("version")
|
||||
local lfs = require("libs/libkoreader-lfs")
|
||||
local logger = require("logger")
|
||||
local _ = require("gettext")
|
||||
local C_ = _.pgettext
|
||||
local T = require("ffi/util").template
|
||||
|
||||
local ota_dir = DataStorage:getDataDir() .. "/ota/"
|
||||
@@ -230,7 +231,7 @@ function OTAManager:fetchAndProcessUpdate()
|
||||
local update_message = T(_("Do you want to update?\nInstalled version: %1\nAvailable version: %2"),
|
||||
BD.ltr(local_version),
|
||||
BD.ltr(ota_version))
|
||||
local update_ok_text = _("Update")
|
||||
local update_ok_text = C_("Application update | Button", "Update")
|
||||
if ota_version < local_version then
|
||||
-- Android cannot downgrade APKs. The user needs to uninstall current app first.
|
||||
-- Instead of doing the auto-update when ready we just download the APK using the browser.
|
||||
@@ -452,7 +453,7 @@ end
|
||||
|
||||
function OTAManager:getOTAMenuTable()
|
||||
return {
|
||||
text = _("Update"),
|
||||
text = C_("Application update | Menu", "Update"),
|
||||
hold_callback = function()
|
||||
local connect_callback = function()
|
||||
OTAManager:fetchAndProcessUpdate()
|
||||
|
||||
Reference in New Issue
Block a user