diff --git a/frontend/ui/reader/readerbookmark.lua b/frontend/ui/reader/readerbookmark.lua index a0c90d12e..4eb43ede2 100644 --- a/frontend/ui/reader/readerbookmark.lua +++ b/frontend/ui/reader/readerbookmark.lua @@ -1,7 +1,7 @@ require "ui/widget/notification" ReaderBookmark = InputContainer:new{ - bm_menu_title = "Bookmarks", + bm_menu_title = _("Bookmarks"), bookmarks = nil, } @@ -10,7 +10,7 @@ function ReaderBookmark:init() self.key_events = { ShowToc = { { "B" }, - doc = "show bookmarks" }, + doc = _("show bookmarks") }, } end self.ui.menu:registerToMainMenu(self) diff --git a/frontend/ui/reader/readerconfig.lua b/frontend/ui/reader/readerconfig.lua index dd6ef23f5..1ec69efff 100644 --- a/frontend/ui/reader/readerconfig.lua +++ b/frontend/ui/reader/readerconfig.lua @@ -50,7 +50,7 @@ ReaderConfig = InputContainer:new{} function ReaderConfig:init() if Device:hasKeyboard() then self.key_events = { - ShowConfigMenu = { { "AA" }, doc = "show config dialog" }, + ShowConfigMenu = { { "AA" }, doc = _("show config dialog") }, } end if Device:isTouchDevice() then diff --git a/frontend/ui/reader/readermenu.lua b/frontend/ui/reader/readermenu.lua index 59bd2dfa1..ff6af6ed9 100644 --- a/frontend/ui/reader/readermenu.lua +++ b/frontend/ui/reader/readermenu.lua @@ -31,7 +31,7 @@ function ReaderMenu:init() if Device:hasKeyboard() then self.key_events = { - ShowMenu = { { _("Menu") }, doc = _("show menu") }, + ShowMenu = { { "Menu" }, doc = _("show menu") }, } end end diff --git a/frontend/ui/reader/readerpanning.lua b/frontend/ui/reader/readerpanning.lua index 740635dc0..650c8bf91 100644 --- a/frontend/ui/reader/readerpanning.lua +++ b/frontend/ui/reader/readerpanning.lua @@ -14,16 +14,16 @@ function ReaderPanning:init() self.key_events = { -- these will all generate the same event, just with different arguments MoveUp = { - { "Up" }, doc = "move visible area up", + { "Up" }, doc = _("move visible area up"), event = "Panning", args = {0, -1} }, MoveDown = { - { "Down" }, doc = "move visible area down", + { "Down" }, doc = _("move visible area down"), event = "Panning", args = {0, 1} }, MoveLeft = { - { "Left" }, doc = "move visible area left", + { "Left" }, doc = _("move visible area left"), event = "Panning", args = {-1, 0} }, MoveRight = { - { "Right" }, doc = "move visible area right", + { "Right" }, doc = _("move visible area right"), event = "Panning", args = {1, 0} }, } end diff --git a/frontend/ui/reader/readerrolling.lua b/frontend/ui/reader/readerrolling.lua index 8c9875d13..9db1f1b6d 100644 --- a/frontend/ui/reader/readerrolling.lua +++ b/frontend/ui/reader/readerrolling.lua @@ -18,44 +18,44 @@ function ReaderRolling:init() self.key_events = { GotoNextView = { { Input.group.PgFwd }, - doc = "go to next view", + doc = _("go to next view"), event = "GotoViewRel", args = 1 }, GotoPrevView = { { Input.group.PgBack }, - doc = "go to previous view", + doc = _("go to previous view"), event = "GotoViewRel", args = -1 }, MoveUp = { { "Up" }, - doc = "move view up", + doc = _("move view up"), event = "Panning", args = {0, -1} }, MoveDown = { { "Down" }, - doc = "move view down", + doc = _("move view down"), event = "Panning", args = {0, 1} }, - GotoFirst = { - {"1"}, doc = "go to start", event = "GotoPercent", args = 0}, - Goto11 = { - {"2"}, doc = "go to 11%", event = "GotoPercent", args = 11}, - Goto22 = { - {"3"}, doc = "go to 22%", event = "GotoPercent", args = 22}, - Goto33 = { - {"4"}, doc = "go to 33%", event = "GotoPercent", args = 33}, - Goto44 = { - {"5"}, doc = "go to 44%", event = "GotoPercent", args = 44}, - Goto55 = { - {"6"}, doc = "go to 55%", event = "GotoPercent", args = 55}, - Goto66 = { - {"7"}, doc = "go to 66%", event = "GotoPercent", args = 66}, - Goto77 = { - {"8"}, doc = "go to 77%", event = "GotoPercent", args = 77}, - Goto88 = { - {"9"}, doc = "go to 88%", event = "GotoPercent", args = 88}, - GotoLast = { - {"0"}, doc = "go to end", event = "GotoPercent", args = 100}, + GotoFirst = { + {"1"}, doc = _("go to start"), event = "GotoPercent", args = 0}, + Goto11 = { + {"2"}, doc = _("go to 11%"), event = "GotoPercent", args = 11}, + Goto22 = { + {"3"}, doc = _("go to 22%"), event = "GotoPercent", args = 22}, + Goto33 = { + {"4"}, doc = _("go to 33%"), event = "GotoPercent", args = 33}, + Goto44 = { + {"5"}, doc = _("go to 44%"), event = "GotoPercent", args = 44}, + Goto55 = { + {"6"}, doc = _("go to 55%"), event = "GotoPercent", args = 55}, + Goto66 = { + {"7"}, doc = _("go to 66%"), event = "GotoPercent", args = 66}, + Goto77 = { + {"8"}, doc = _("go to 77%"), event = "GotoPercent", args = 77}, + Goto88 = { + {"9"}, doc = _("go to 88%"), event = "GotoPercent", args = 88}, + GotoLast = { + {"0"}, doc = _("go to end"), event = "GotoPercent", args = 100}, } end @@ -82,7 +82,7 @@ function ReaderRolling:initGesListener() GestureRange:new{ ges = "tap", range = Geom:new{ - x = 0, + x = 0, y = Screen:getHeight()/4, w = Screen:getWidth()/4, h = 5*Screen:getHeight()/8, diff --git a/frontend/ui/reader/readerrotation.lua b/frontend/ui/reader/readerrotation.lua index fc7e848d3..25881a58d 100644 --- a/frontend/ui/reader/readerrotation.lua +++ b/frontend/ui/reader/readerrotation.lua @@ -7,8 +7,14 @@ function ReaderRotation:init() if Device:hasKeyboard() then self.key_events = { -- these will all generate the same event, just with different arguments - RotateLeft = { {"J"}, doc = "rotate left by 90 degrees", event = "Rotate", args = -90 }, - RotateRight = { {"K"}, doc = "rotate right by 90 degrees", event = "Rotate", args = 90 }, + RotateLeft = { + {"J"}, + doc = _("rotate left by 90 degrees"), + event = "Rotate", args = -90 }, + RotateRight = { + {"K"}, + doc = _("rotate right by 90 degrees"), + event = "Rotate", args = 90 }, } end if Device:isTouchDevice() then diff --git a/frontend/ui/reader/readertypeset.lua b/frontend/ui/reader/readertypeset.lua index 7607e98af..731d2a4ce 100644 --- a/frontend/ui/reader/readertypeset.lua +++ b/frontend/ui/reader/readertypeset.lua @@ -1,5 +1,5 @@ ReaderTypeset = InputContainer:new{ - css_menu_title = "Set render style", + css_menu_title = _("Set render style"), css = nil, internal_css = true, } @@ -40,13 +40,13 @@ end function ReaderTypeset:genStyleSheetMenu() local file_list = { { - text = "clear all external styles", + text = _("clear all external styles"), callback = function() self:setStyleSheet(nil) end }, { - text = "Auto", + text = _("Auto"), callback = function() self:setStyleSheet(self.ui.document.default_css) end diff --git a/frontend/ui/reader/readerview.lua b/frontend/ui/reader/readerview.lua index 4fb73d4ff..31ee8beae 100644 --- a/frontend/ui/reader/readerview.lua +++ b/frontend/ui/reader/readerview.lua @@ -3,7 +3,6 @@ require "ui/reader/readerfooter" require "ui/reader/readerdogear" ReaderView = OverlapGroup:new{ - _name = "ReaderView", document = nil, -- single page state diff --git a/frontend/ui/reader/readerzooming.lua b/frontend/ui/reader/readerzooming.lua index 998ca4108..105e2eced 100644 --- a/frontend/ui/reader/readerzooming.lua +++ b/frontend/ui/reader/readerzooming.lua @@ -12,42 +12,42 @@ function ReaderZooming:init() self.key_events = { ZoomIn = { { "Shift", Input.group.PgFwd }, - doc = "zoom in", + doc = _("zoom in"), event = "Zoom", args = "in" }, ZoomOut = { { "Shift", Input.group.PgBack }, - doc = "zoom out", + doc = _("zoom out"), event = "Zoom", args = "out" }, ZoomToFitPage = { { "A" }, - doc = "zoom to fit page", + doc = _("zoom to fit page"), event = "SetZoomMode", args = "page" }, ZoomToFitContent = { { "Shift", "A" }, - doc = "zoom to fit content", + doc = _("zoom to fit content"), event = "SetZoomMode", args = "content" }, ZoomToFitPageWidth = { { "S" }, - doc = "zoom to fit page width", + doc = _("zoom to fit page width"), event = "SetZoomMode", args = "pagewidth" }, ZoomToFitContentWidth = { { "Shift", "S" }, - doc = "zoom to fit content width", + doc = _("zoom to fit content width"), event = "SetZoomMode", args = "contentwidth" }, ZoomToFitPageHeight = { { "D" }, - doc = "zoom to fit page height", + doc = _("zoom to fit page height"), event = "SetZoomMode", args = "pageheight" }, ZoomToFitContentHeight = { { "Shift", "D" }, - doc = "zoom to fit content height", + doc = _("zoom to fit content height"), event = "SetZoomMode", args = "contentheight" }, } @@ -232,30 +232,30 @@ end function ReaderZooming:addToMainMenu(tab_item_table) if self.ui.document.info.has_pages then table.insert(tab_item_table.typeset, { - text = "Switch zoom mode", + text = _("Switch zoom mode"), sub_item_table = { { - text = "Zoom to fit content width", + text = _("Zoom to fit content width"), callback = self:genSetZoomModeCallBack("contentwidth") }, { - text = "Zoom to fit content height", + text = _("Zoom to fit content height"), callback = self:genSetZoomModeCallBack("contentheight") }, { - text = "Zoom to fit page width", + text = _("Zoom to fit page width"), callback = self:genSetZoomModeCallBack("pagewidth") }, { - text = "Zoom to fit page height", + text = _("Zoom to fit page height"), callback = self:genSetZoomModeCallBack("pageheight") }, { - text = "Zoom to fit content", + text = _("Zoom to fit content"), callback = self:genSetZoomModeCallBack("content") }, { - text = "Zoom to fit page", + text = _("Zoom to fit page"), callback = self:genSetZoomModeCallBack("page") }, } diff --git a/frontend/ui/readerui.lua b/frontend/ui/readerui.lua index 7a26fe6cd..592bd34c8 100644 --- a/frontend/ui/readerui.lua +++ b/frontend/ui/readerui.lua @@ -24,7 +24,8 @@ it works using data gathered from a document interface ReaderUI = InputContainer:new{ key_events = { - Close = { {"Home"}, doc = "close document", event = "Close" }, + Close = { { "Home" }, + doc = _("close document"), event = "Close" }, }, active_widgets = {}, @@ -52,8 +53,8 @@ function ReaderUI:init() end if Device:hasKeyboard() then - self.key_events.Back = { - { "Back" }, doc = "close document", + self.key_events.Back = { + { "Back" }, doc = _("close document"), event = "Close" } end @@ -102,7 +103,7 @@ function ReaderUI:init() if self.document.info.has_pages then -- for page specific controller - + -- if needed, insert a paging container local pager = ReaderPaging:new{ dialog = self.dialog,