From 19a607b5484299623cc57563f7a4baa3f49faff5 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 6 Dec 2021 13:07:06 +0100 Subject: [PATCH] [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. --- frontend/ui/otamanager.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/ui/otamanager.lua b/frontend/ui/otamanager.lua index 8a5c1d4e6..36f83c02c 100644 --- a/frontend/ui/otamanager.lua +++ b/frontend/ui/otamanager.lua @@ -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()