mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
Reworked several strings
This is the remaining gruntwork of #1276. I believe that only leaves networkmgr.lua and filemanagersearch.lua, which will require a little more thought.
This commit is contained in:
parent
19b0795474
commit
693fa0837e
@ -147,7 +147,7 @@ function ReaderFont:onSetFontSize(new_size)
|
|||||||
|
|
||||||
self.font_size = new_size
|
self.font_size = new_size
|
||||||
UIManager:show(Notification:new{
|
UIManager:show(Notification:new{
|
||||||
text = _("Set font size to ")..self.font_size,
|
text = T( _("Font size set to %1."), self.font_size),
|
||||||
timeout = 1,
|
timeout = 1,
|
||||||
})
|
})
|
||||||
self.ui.document:setFontSize(Screen:scaleBySize(new_size))
|
self.ui.document:setFontSize(Screen:scaleBySize(new_size))
|
||||||
@ -159,7 +159,7 @@ end
|
|||||||
function ReaderFont:onSetLineSpace(space)
|
function ReaderFont:onSetLineSpace(space)
|
||||||
self.line_space_percent = math.min(200, math.max(80, space))
|
self.line_space_percent = math.min(200, math.max(80, space))
|
||||||
UIManager:show(Notification:new{
|
UIManager:show(Notification:new{
|
||||||
text = _("Set line space to ")..self.line_space_percent.."%",
|
text = T( _("Line spacing set to %1%."), self.line_space_percent),
|
||||||
timeout = 1,
|
timeout = 1,
|
||||||
})
|
})
|
||||||
self.ui.document:setInterlineSpacePercent(self.line_space_percent)
|
self.ui.document:setInterlineSpacePercent(self.line_space_percent)
|
||||||
@ -177,7 +177,7 @@ end
|
|||||||
function ReaderFont:onSetFontGamma(gamma)
|
function ReaderFont:onSetFontGamma(gamma)
|
||||||
self.gamma_index = gamma
|
self.gamma_index = gamma
|
||||||
UIManager:show(Notification:new{
|
UIManager:show(Notification:new{
|
||||||
text = _("Set font gamma to ")..self.gamma_index,
|
text = T( _("Font gamma set to %1."), self.gamma_index),
|
||||||
timeout = 1
|
timeout = 1
|
||||||
})
|
})
|
||||||
self.ui.document:setGammaIndex(self.gamma_index)
|
self.ui.document:setGammaIndex(self.gamma_index)
|
||||||
@ -198,7 +198,7 @@ function ReaderFont:setFont(face)
|
|||||||
if face and self.font_face ~= face then
|
if face and self.font_face ~= face then
|
||||||
self.font_face = face
|
self.font_face = face
|
||||||
UIManager:show(Notification:new{
|
UIManager:show(Notification:new{
|
||||||
text = _("Redrawing with font ")..face,
|
text = T( _("Redrawing with font %1."), face),
|
||||||
timeout = 1,
|
timeout = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ function ReaderFrontLight:onShowIntensity()
|
|||||||
local powerd = Device:getPowerDevice()
|
local powerd = Device:getPowerDevice()
|
||||||
if powerd.flIntensity ~= nil then
|
if powerd.flIntensity ~= nil then
|
||||||
UIManager:show(Notification:new{
|
UIManager:show(Notification:new{
|
||||||
text = _("Frontlight intensity is set to ")..powerd.flIntensity,
|
text = T( _("Frontlight intensity is set to %1."), powerd.flIntensity),
|
||||||
timeout = 1.0,
|
timeout = 1.0,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local InputContainer = require("ui/widget/container/inputcontainer")
|
local InputContainer = require("ui/widget/container/inputcontainer")
|
||||||
local UIManager = require("ui/uimanager")
|
local UIManager = require("ui/uimanager")
|
||||||
local InfoMessage = require("ui/widget/infomessage")
|
local InfoMessage = require("ui/widget/infomessage")
|
||||||
|
local T = require("ffi/util").template
|
||||||
local _ = require("gettext")
|
local _ = require("gettext")
|
||||||
|
|
||||||
local ReaderHyphenation = InputContainer:new{
|
local ReaderHyphenation = InputContainer:new{
|
||||||
@ -17,7 +18,7 @@ function ReaderHyphenation:init()
|
|||||||
callback = function()
|
callback = function()
|
||||||
self.hyph_alg = v
|
self.hyph_alg = v
|
||||||
UIManager:show(InfoMessage:new{
|
UIManager:show(InfoMessage:new{
|
||||||
text = _("Change Hyphenation to ")..v,
|
text = T( _("Changed hyphenation to %1."), v),
|
||||||
})
|
})
|
||||||
self.ui.document:setHyphDictionary(v)
|
self.ui.document:setHyphDictionary(v)
|
||||||
self.ui.toc:onUpdateToc()
|
self.ui.toc:onUpdateToc()
|
||||||
|
@ -4,8 +4,9 @@ local Screen = require("device").screen
|
|||||||
local GestureRange = require("ui/gesturerange")
|
local GestureRange = require("ui/gesturerange")
|
||||||
local UIManager = require("ui/uimanager")
|
local UIManager = require("ui/uimanager")
|
||||||
local InfoMessage = require("ui/widget/infomessage")
|
local InfoMessage = require("ui/widget/infomessage")
|
||||||
local _ = require("gettext")
|
|
||||||
local DEBUG = require("dbg")
|
local DEBUG = require("dbg")
|
||||||
|
local T = require("ffi/util").template
|
||||||
|
local _ = require("gettext")
|
||||||
|
|
||||||
local ReaderScreenshot = InputContainer:new{
|
local ReaderScreenshot = InputContainer:new{
|
||||||
datetime_name = "screenshots/Screenshot_%Y-%b-%d_%H%M%S.png",
|
datetime_name = "screenshots/Screenshot_%Y-%b-%d_%H%M%S.png",
|
||||||
@ -37,7 +38,7 @@ end
|
|||||||
function ReaderScreenshot:onScreenshot(filename)
|
function ReaderScreenshot:onScreenshot(filename)
|
||||||
local screenshot_name = filename or os.date(self.datetime_name)
|
local screenshot_name = filename or os.date(self.datetime_name)
|
||||||
UIManager:show(InfoMessage:new{
|
UIManager:show(InfoMessage:new{
|
||||||
text = _("Writing screen to ")..screenshot_name,
|
text = T( _("Saving screenshot to %1."), screenshot_name),
|
||||||
timeout = 2,
|
timeout = 2,
|
||||||
})
|
})
|
||||||
Screen:shot(screenshot_name)
|
Screen:shot(screenshot_name)
|
||||||
|
@ -5,6 +5,7 @@ local UIManager = require("ui/uimanager")
|
|||||||
local Screen = require("device").screen
|
local Screen = require("device").screen
|
||||||
local Event = require("ui/event")
|
local Event = require("ui/event")
|
||||||
local DEBUG = require("dbg")
|
local DEBUG = require("dbg")
|
||||||
|
local T = require("ffi/util").template
|
||||||
local _ = require("gettext")
|
local _ = require("gettext")
|
||||||
|
|
||||||
local ReaderTypeset = InputContainer:new{
|
local ReaderTypeset = InputContainer:new{
|
||||||
@ -149,7 +150,10 @@ end
|
|||||||
function ReaderTypeset:makeDefaultFloatingPunctuation()
|
function ReaderTypeset:makeDefaultFloatingPunctuation()
|
||||||
local toggler = self.floating_punctuation == 1 and _("On") or _("Off")
|
local toggler = self.floating_punctuation == 1 and _("On") or _("Off")
|
||||||
UIManager:show(ConfirmBox:new{
|
UIManager:show(ConfirmBox:new{
|
||||||
text = _("Set default floating punctuation to ")..toggler.."?",
|
text = T(
|
||||||
|
_("Set default floating punctuation to %1?"),
|
||||||
|
toggler
|
||||||
|
),
|
||||||
ok_callback = function()
|
ok_callback = function()
|
||||||
G_reader_settings:saveSetting("floating_punctuation", self.floating_punctuation)
|
G_reader_settings:saveSetting("floating_punctuation", self.floating_punctuation)
|
||||||
end,
|
end,
|
||||||
|
@ -8,6 +8,7 @@ local Screen = require("device").screen
|
|||||||
local Geom = require("ui/geometry")
|
local Geom = require("ui/geometry")
|
||||||
local Event = require("ui/event")
|
local Event = require("ui/event")
|
||||||
local DEBUG = require("dbg")
|
local DEBUG = require("dbg")
|
||||||
|
local T = require("ffi/util").template
|
||||||
local _ = require("gettext")
|
local _ = require("gettext")
|
||||||
|
|
||||||
local ReaderZooming = InputContainer:new{
|
local ReaderZooming = InputContainer:new{
|
||||||
@ -338,7 +339,10 @@ end
|
|||||||
|
|
||||||
function ReaderZooming:makeDefault(zoom_mode)
|
function ReaderZooming:makeDefault(zoom_mode)
|
||||||
UIManager:show(ConfirmBox:new{
|
UIManager:show(ConfirmBox:new{
|
||||||
text = _("Set default zoom mode to ")..zoom_mode.."?",
|
text = T(
|
||||||
|
_("Set default zoom mode to %1?"),
|
||||||
|
zoom_mode
|
||||||
|
),
|
||||||
ok_callback = function()
|
ok_callback = function()
|
||||||
G_reader_settings:saveSetting("zoom_mode", zoom_mode)
|
G_reader_settings:saveSetting("zoom_mode", zoom_mode)
|
||||||
end,
|
end,
|
||||||
|
@ -130,12 +130,12 @@ function NetworkMgr:getProxyMenuTable()
|
|||||||
end
|
end
|
||||||
if not proxy() then
|
if not proxy() then
|
||||||
UIManager:show(InfoMessage:new{
|
UIManager:show(InfoMessage:new{
|
||||||
text = _("Tips:\nlong press on this menu entry to configure HTTP proxy."),
|
text = _("Tip:\nLong press on this menu entry to configure HTTP proxy."),
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
hold_input = {
|
hold_input = {
|
||||||
title = _("input proxy address"),
|
title = _("Enter proxy address"),
|
||||||
type = "text",
|
type = "text",
|
||||||
hint = proxy() or "",
|
hint = proxy() or "",
|
||||||
callback = function(input)
|
callback = function(input)
|
||||||
|
@ -24,6 +24,7 @@ local Event = require("ui/event")
|
|||||||
local Device = require("device")
|
local Device = require("device")
|
||||||
local Font = require("ui/font")
|
local Font = require("ui/font")
|
||||||
local DEBUG = require("dbg")
|
local DEBUG = require("dbg")
|
||||||
|
local T = require("ffi/util").template
|
||||||
local _ = require("gettext")
|
local _ = require("gettext")
|
||||||
|
|
||||||
local OptionTextItem = InputContainer:new{}
|
local OptionTextItem = InputContainer:new{}
|
||||||
@ -568,7 +569,11 @@ end
|
|||||||
|
|
||||||
function ConfigDialog:onMakeDefault(name, name_text, values, labels, position)
|
function ConfigDialog:onMakeDefault(name, name_text, values, labels, position)
|
||||||
UIManager:show(ConfirmBox:new{
|
UIManager:show(ConfirmBox:new{
|
||||||
text = _("Set default ")..(name_text or "").._(" to ")..labels[position].."?",
|
text = T(
|
||||||
|
_("Set default %1 to %2?"),
|
||||||
|
(name_text or ""),
|
||||||
|
labels[position]
|
||||||
|
),
|
||||||
ok_callback = function()
|
ok_callback = function()
|
||||||
local name = self.config_options.prefix.."_"..name
|
local name = self.config_options.prefix.."_"..name
|
||||||
G_reader_settings:saveSetting(name, values[position])
|
G_reader_settings:saveSetting(name, values[position])
|
||||||
|
@ -268,7 +268,10 @@ function OPDSBrowser:getCatalog(feed_url)
|
|||||||
elseif not ok and catalog then
|
elseif not ok and catalog then
|
||||||
DEBUG("cannot get catalog info from", feed_url, catalog)
|
DEBUG("cannot get catalog info from", feed_url, catalog)
|
||||||
UIManager:show(InfoMessage:new{
|
UIManager:show(InfoMessage:new{
|
||||||
text = _("Cannot get catalog info from ") .. feed_url,
|
text = util.template(
|
||||||
|
_("Cannot get catalog info from %1"),
|
||||||
|
(feed_url or "")
|
||||||
|
),
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user