mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #629 from chrox/master
GUI adaptation for smaller screens
This commit is contained in:
2
Makefile
2
Makefile
@@ -28,7 +28,7 @@ KOREADER_MISC_TOOL=../misc
|
||||
XGETTEXT_BIN=$(KOREADER_MISC_TOOL)/gettext/lua_xgettext.py
|
||||
|
||||
|
||||
all: $(if $(ANDROID),,$(KOR_BASE)/$(OUTPUT_DIR)/luajit) po
|
||||
all: $(if $(ANDROID),,$(KOR_BASE)/$(OUTPUT_DIR)/luajit)
|
||||
$(MAKE) -C $(KOR_BASE)
|
||||
echo $(VERSION) > git-rev
|
||||
mkdir -p $(INSTALL_DIR)/koreader
|
||||
|
||||
14
README.md
14
README.md
@@ -64,7 +64,6 @@ cd koreader
|
||||
make fetchthirdparty
|
||||
```
|
||||
|
||||
|
||||
Building & Running & Testing
|
||||
========
|
||||
|
||||
@@ -143,6 +142,17 @@ This will be handy if you are developing koreader-base and want to test your
|
||||
modifications with kroeader frontend. NOTE: only support relative path for now.
|
||||
|
||||
|
||||
Translation
|
||||
========
|
||||
|
||||
Please refer to [l10n's README][l10n-readme] to grab the latest translations from
|
||||
[the Koreader project on Transifex][koreader-transifex] with this command:
|
||||
```
|
||||
make po
|
||||
```
|
||||
If your language is not listed on the Transifex project, please don't hesitate
|
||||
to send a language request [here][koreader-transifex].
|
||||
|
||||
Use ccache
|
||||
==========
|
||||
|
||||
@@ -171,4 +181,6 @@ http://ccache.samba.org
|
||||
[travis-link]:https://travis-ci.org/koreader/koreader
|
||||
[travis-conf]:https://github.com/koreader/koreader-base/blob/master/.travis.yml
|
||||
[linux-vm]:http://www.howtogeek.com/howto/11287/how-to-run-ubuntu-in-windows-7-with-vmware-player/
|
||||
[l10n-readme]:https://github.com/koreader/koreader/blob/master/l10n/README.md
|
||||
[koreader-transifex]:https://www.transifex.com/projects/p/koreader/
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ function FileManagerMenu:init()
|
||||
|
||||
if Device:hasKeyboard() then
|
||||
self.key_events = {
|
||||
ShowMenu = { { "Menu" }, doc = _("show menu") },
|
||||
ShowMenu = { { "Menu" }, doc = "show menu" },
|
||||
}
|
||||
end
|
||||
end
|
||||
@@ -60,24 +60,28 @@ function FileManagerMenu:setUpdateItemTable()
|
||||
end
|
||||
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Toggle hidden files"),
|
||||
text = _("Show hidden files"),
|
||||
checked_func = function() return self.ui.file_chooser.show_hidden end,
|
||||
callback = function()
|
||||
self.ui:toggleHiddenFiles()
|
||||
end
|
||||
})
|
||||
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Start with last opened file"),
|
||||
checked_func = function() return G_reader_settings:readSetting("open_last") end,
|
||||
enabled_func = function() return G_reader_settings:readSetting("lastfile") ~= nil end,
|
||||
callback = function()
|
||||
local open_last = G_reader_settings:readSetting("open_last") or false
|
||||
G_reader_settings:saveSetting("open_last", not open_last)
|
||||
end
|
||||
})
|
||||
|
||||
if Device:hasFrontlight() then
|
||||
ReaderFrontLight:addToMainMenu(self.tab_item_table)
|
||||
end
|
||||
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Help"),
|
||||
callback = function()
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Please report bugs to https://github.com/koreader/ koreader/issues, Click at the bottom of the page for more options"),
|
||||
})
|
||||
end
|
||||
})
|
||||
table.insert(self.tab_item_table.main, Language:getLangMenuTable())
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Version"),
|
||||
callback = function()
|
||||
@@ -86,7 +90,14 @@ function FileManagerMenu:setUpdateItemTable()
|
||||
})
|
||||
end
|
||||
})
|
||||
table.insert(self.tab_item_table.main, Language:getLangMenuTable())
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Help"),
|
||||
callback = function()
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Please report bugs to \nhttps://github.com/koreader/koreader/issues"),
|
||||
})
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
function FileManagerMenu:onShowMenu()
|
||||
|
||||
@@ -20,7 +20,7 @@ function ReaderBookmark:init()
|
||||
self.key_events = {
|
||||
ShowBookmark = {
|
||||
{ "B" },
|
||||
doc = _("show bookmarks") },
|
||||
doc = "show bookmarks" },
|
||||
}
|
||||
end
|
||||
if Device:isTouchDevice() then
|
||||
|
||||
@@ -15,7 +15,7 @@ local 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
|
||||
|
||||
@@ -25,22 +25,22 @@ function ReaderFont:init()
|
||||
if Device:hasKeyboard() then
|
||||
-- add shortcut for keyboard
|
||||
self.key_events = {
|
||||
ShowFontMenu = { {"F"}, doc = _("show font menu") },
|
||||
ShowFontMenu = { {"F"}, doc = "show font menu" },
|
||||
IncreaseSize = {
|
||||
{ "Shift", Input.group.PgFwd },
|
||||
doc = _("increase font size"),
|
||||
doc = "increase font size",
|
||||
event = "ChangeSize", args = "increase" },
|
||||
DecreaseSize = {
|
||||
{ "Shift", Input.group.PgBack },
|
||||
doc = _("decrease font size"),
|
||||
doc = "decrease font size",
|
||||
event = "ChangeSize", args = "decrease" },
|
||||
IncreaseLineSpace = {
|
||||
{ "Alt", Input.group.PgFwd },
|
||||
doc = _("increase line space"),
|
||||
doc = "increase line space",
|
||||
event = "ChangeLineSpace", args = "increase" },
|
||||
DecreaseLineSpace = {
|
||||
{ "Alt", Input.group.PgBack },
|
||||
doc = _("decrease line space"),
|
||||
doc = "decrease line space",
|
||||
event = "ChangeLineSpace", args = "decrease" },
|
||||
}
|
||||
end
|
||||
|
||||
@@ -21,33 +21,32 @@ local ReaderFooter = InputContainer:new{
|
||||
pageno = nil,
|
||||
pages = nil,
|
||||
progress_percentage = 0.0,
|
||||
progress_text = "0 / 0",
|
||||
progress_text = "0000 / 0000",
|
||||
show_time = false,
|
||||
bar_width = 0.87,
|
||||
text_width = 0.15,
|
||||
text_font_face = "ffont",
|
||||
text_font_size = 14,
|
||||
height = Screen:scaleByDPI(19),
|
||||
padding = Screen:scaleByDPI(10),
|
||||
}
|
||||
|
||||
function ReaderFooter:init()
|
||||
self.progress_bar = ProgressWidget:new{
|
||||
width = math.floor(Screen:getWidth()*(self.bar_width-0.02)),
|
||||
height = 7,
|
||||
percentage = self.progress_percentage,
|
||||
}
|
||||
self.progress_text = TextWidget:new{
|
||||
text = self.progress_text,
|
||||
face = Font:getFace(self.text_font_face, self.text_font_size),
|
||||
}
|
||||
local _, text_height = self.progress_text:getSize()
|
||||
local text_width = self.progress_text:getSize().w
|
||||
self.progress_bar = ProgressWidget:new{
|
||||
width = math.floor(Screen:getWidth() - text_width - self.padding),
|
||||
height = Screen:scaleByDPI(7),
|
||||
percentage = self.progress_percentage,
|
||||
}
|
||||
local horizontal_group = HorizontalGroup:new{}
|
||||
local bar_container = RightContainer:new{
|
||||
dimen = Geom:new{w = Screen:getWidth()*self.bar_width, h = self.height},
|
||||
dimen = Geom:new{ w = Screen:getWidth() - text_width, h = self.height },
|
||||
self.progress_bar,
|
||||
}
|
||||
local text_container = CenterContainer:new{
|
||||
dimen = Geom:new{w = Screen:getWidth()*self.text_width, h = self.height},
|
||||
dimen = Geom:new{ w = text_width, h = self.height },
|
||||
self.progress_text,
|
||||
}
|
||||
table.insert(horizontal_group, bar_container)
|
||||
|
||||
@@ -16,7 +16,7 @@ function ReaderHighlight:init()
|
||||
self.key_events = {
|
||||
ShowToc = {
|
||||
{ "." },
|
||||
doc = _("highlight text") },
|
||||
doc = "highlight text" },
|
||||
}
|
||||
end
|
||||
self.ui.menu:registerToMainMenu(self)
|
||||
|
||||
@@ -45,7 +45,7 @@ function ReaderMenu:init()
|
||||
|
||||
if Device:hasKeyboard() then
|
||||
self.key_events = {
|
||||
ShowMenu = { { "Menu" }, doc = _("show menu") },
|
||||
ShowMenu = { { "Menu" }, doc = "show menu" },
|
||||
}
|
||||
end
|
||||
end
|
||||
@@ -71,14 +71,7 @@ function ReaderMenu:setUpdateItemTable()
|
||||
widget:addToMainMenu(self.tab_item_table)
|
||||
end
|
||||
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Help"),
|
||||
callback = function()
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Please report bugs to \nhttps://github.com/koreader/koreader/issues"),
|
||||
})
|
||||
end
|
||||
})
|
||||
table.insert(self.tab_item_table.main, Language:getLangMenuTable())
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Version"),
|
||||
callback = function()
|
||||
@@ -87,7 +80,14 @@ function ReaderMenu:setUpdateItemTable()
|
||||
})
|
||||
end
|
||||
})
|
||||
table.insert(self.tab_item_table.main, Language:getLangMenuTable())
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Help"),
|
||||
callback = function()
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Please report bugs to \nhttps://github.com/koreader/koreader/issues"),
|
||||
})
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
function ReaderMenu:onShowReaderMenu()
|
||||
|
||||
@@ -19,16 +19,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
|
||||
|
||||
@@ -27,44 +27,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},
|
||||
{"1"}, doc = "go to start", event = "GotoPercent", args = 0},
|
||||
Goto11 = {
|
||||
{"2"}, doc = _("go to 11%"), event = "GotoPercent", args = 11},
|
||||
{"2"}, doc = "go to 11%", event = "GotoPercent", args = 11},
|
||||
Goto22 = {
|
||||
{"3"}, doc = _("go to 22%"), event = "GotoPercent", args = 22},
|
||||
{"3"}, doc = "go to 22%", event = "GotoPercent", args = 22},
|
||||
Goto33 = {
|
||||
{"4"}, doc = _("go to 33%"), event = "GotoPercent", args = 33},
|
||||
{"4"}, doc = "go to 33%", event = "GotoPercent", args = 33},
|
||||
Goto44 = {
|
||||
{"5"}, doc = _("go to 44%"), event = "GotoPercent", args = 44},
|
||||
{"5"}, doc = "go to 44%", event = "GotoPercent", args = 44},
|
||||
Goto55 = {
|
||||
{"6"}, doc = _("go to 55%"), event = "GotoPercent", args = 55},
|
||||
{"6"}, doc = "go to 55%", event = "GotoPercent", args = 55},
|
||||
Goto66 = {
|
||||
{"7"}, doc = _("go to 66%"), event = "GotoPercent", args = 66},
|
||||
{"7"}, doc = "go to 66%", event = "GotoPercent", args = 66},
|
||||
Goto77 = {
|
||||
{"8"}, doc = _("go to 77%"), event = "GotoPercent", args = 77},
|
||||
{"8"}, doc = "go to 77%", event = "GotoPercent", args = 77},
|
||||
Goto88 = {
|
||||
{"9"}, doc = _("go to 88%"), event = "GotoPercent", args = 88},
|
||||
{"9"}, doc = "go to 88%", event = "GotoPercent", args = 88},
|
||||
GotoLast = {
|
||||
{"0"}, doc = _("go to end"), event = "GotoPercent", args = 100},
|
||||
{"0"}, doc = "go to end", event = "GotoPercent", args = 100},
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ function ReaderRotation:init()
|
||||
-- these will all generate the same event, just with different arguments
|
||||
RotateLeft = {
|
||||
{"J"},
|
||||
doc = _("rotate left by 90 degrees"),
|
||||
doc = "rotate left by 90 degrees",
|
||||
event = "Rotate", args = -90 },
|
||||
RotateRight = {
|
||||
{"K"},
|
||||
doc = _("rotate right by 90 degrees"),
|
||||
doc = "rotate right by 90 degrees",
|
||||
event = "Rotate", args = 90 },
|
||||
}
|
||||
end
|
||||
|
||||
@@ -19,7 +19,7 @@ function ReaderToc:init()
|
||||
self.key_events = {
|
||||
ShowToc = {
|
||||
{ "T" },
|
||||
doc = _("show Table of Content menu") },
|
||||
doc = "show Table of Content menu" },
|
||||
}
|
||||
end
|
||||
if Device:isTouchDevice() then
|
||||
|
||||
@@ -22,42 +22,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"
|
||||
},
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ it works using data gathered from a document interface
|
||||
local ReaderUI = InputContainer:new{
|
||||
key_events = {
|
||||
Close = { { "Home" },
|
||||
doc = _("close document"), event = "Close" },
|
||||
doc = "close document", event = "Close" },
|
||||
},
|
||||
active_widgets = {},
|
||||
|
||||
@@ -72,7 +72,7 @@ function ReaderUI:init()
|
||||
|
||||
if Device:hasKeyboard() then
|
||||
self.key_events.Back = {
|
||||
{ "Back" }, doc = _("close document"),
|
||||
{ "Back" }, doc = "close document",
|
||||
event = "Close" }
|
||||
end
|
||||
|
||||
|
||||
@@ -43,13 +43,14 @@ function Language:getLangMenuTable()
|
||||
self:genLanguageSubItem("Português do Brasil", "pt_BR"),
|
||||
self:genLanguageSubItem("Русский язык", "ru"),
|
||||
self:genLanguageSubItem("Español", "es"),
|
||||
self:genLanguageSubItem("Catalá", "ca"),
|
||||
self:genLanguageSubItem("Catalá", "ca"),
|
||||
-- self:genLanguageSubItem("svenska", "sv"),
|
||||
self:genLanguageSubItem("Türkçe", "tr"),
|
||||
self:genLanguageSubItem("Ukranian", "uk"),
|
||||
-- self:genLanguageSubItem("Tiếng Việt", "vi"),
|
||||
-- self:genLanguageSubItem("Viet Nam", "vi_VN"),
|
||||
self:genLanguageSubItem("简体中文", "zh_CN"),
|
||||
self:genLanguageSubItem("한글", "ko_KR"),
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
@@ -77,7 +77,7 @@ function Button:init()
|
||||
ges = "tap",
|
||||
range = self.dimen,
|
||||
},
|
||||
doc = _("Tap Button"),
|
||||
doc = "Tap Button",
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
@@ -19,7 +19,7 @@ function ButtonDialog:init()
|
||||
if Device:hasKeyboard() then
|
||||
self.key_events = {
|
||||
AnyKeyPressed = { { Input.group.Any },
|
||||
seqtext = "any key", doc = _("close dialog") }
|
||||
seqtext = "any key", doc = "close dialog" }
|
||||
}
|
||||
end
|
||||
if Device:isTouchDevice() then
|
||||
|
||||
@@ -35,12 +35,12 @@ function MenuBarItem:init()
|
||||
ges = "tap",
|
||||
range = self.dimen,
|
||||
},
|
||||
doc = _("Select Menu Item"),
|
||||
doc = "Select Menu Item",
|
||||
},
|
||||
}
|
||||
else
|
||||
self.active_key_events = {
|
||||
Select = { {"Press"}, doc = _("chose selected item") },
|
||||
Select = { {"Press"}, doc = "chose selected item" },
|
||||
}
|
||||
end
|
||||
end
|
||||
@@ -77,12 +77,12 @@ function OptionTextItem:init()
|
||||
ges = "tap",
|
||||
range = self.dimen,
|
||||
},
|
||||
doc = _("Select Option Item"),
|
||||
doc = "Select Option Item",
|
||||
},
|
||||
}
|
||||
else
|
||||
self.active_key_events = {
|
||||
Select = { {"Press"}, doc = _("chose selected item") },
|
||||
Select = { {"Press"}, doc = "chose selected item" },
|
||||
}
|
||||
end
|
||||
end
|
||||
@@ -113,7 +113,7 @@ function OptionIconItem:init()
|
||||
ges = "tap",
|
||||
range = self.dimen,
|
||||
},
|
||||
doc = _("Select Option Item"),
|
||||
doc = "Select Option Item",
|
||||
},
|
||||
}
|
||||
end
|
||||
@@ -461,11 +461,11 @@ function ConfigDialog:init()
|
||||
}
|
||||
else
|
||||
-- set up keyboard events
|
||||
self.key_events.Close = { {"Back"}, doc = _("close config menu") }
|
||||
self.key_events.Close = { {"Back"}, doc = "close config menu" }
|
||||
-- we won't catch presses to "Right"
|
||||
self.key_events.FocusRight = nil
|
||||
end
|
||||
self.key_events.Select = { {"Press"}, doc = _("select current menu item") }
|
||||
self.key_events.Select = { {"Press"}, doc = "select current menu item" }
|
||||
end
|
||||
|
||||
function ConfigDialog:updateConfigPanel(index)
|
||||
|
||||
@@ -34,8 +34,8 @@ function ConfirmBox:init()
|
||||
self.width = Screen:getWidth() - 200
|
||||
end
|
||||
-- build bottons
|
||||
self.key_events.Close = { {{"Home","Back"}}, doc = _("cancel") }
|
||||
self.key_events.Select = { {{"Enter","Press"}}, doc = _("chose selected option") }
|
||||
self.key_events.Close = { {{"Home","Back"}}, doc = "cancel" }
|
||||
self.key_events.Select = { {{"Enter","Press"}}, doc = "chose selected option" }
|
||||
|
||||
local ok_button = Button:new{
|
||||
text = self.ok_text,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
local InputContainer = require("ui/widget/container/inputcontainer")
|
||||
local CenterContainer = require("ui/widget/container/centercontainer")
|
||||
local Font = require("ui/font")
|
||||
local Device = require("ui/device")
|
||||
local GestureRange = require("ui/gesturerange")
|
||||
@@ -9,7 +10,6 @@ local TextBoxWidget = require("ui/widget/textboxwidget")
|
||||
local HorizontalSpan = require("ui/widget/horizontalspan")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local Geom = require("ui/geometry")
|
||||
local CenterContainer = require("ui/widget/container/centercontainer")
|
||||
local Input = require("ui/input")
|
||||
local Screen = require("ui/screen")
|
||||
local _ = require("gettext")
|
||||
@@ -29,7 +29,7 @@ function InfoMessage:init()
|
||||
if Device:hasKeyboard() then
|
||||
self.key_events = {
|
||||
AnyKeyPressed = { { Input.group.Any },
|
||||
seqtext = "any key", doc = _("close dialog") }
|
||||
seqtext = "any key", doc = "close dialog" }
|
||||
}
|
||||
end
|
||||
if Device:isTouchDevice() then
|
||||
|
||||
@@ -449,12 +449,12 @@ function Menu:init()
|
||||
end
|
||||
if Device:hasKeyboard() then
|
||||
-- set up keyboard events
|
||||
self.key_events.Close = { {"Back"}, doc = _("close menu") }
|
||||
self.key_events.Close = { {"Back"}, doc = "close menu" }
|
||||
self.key_events.NextPage = {
|
||||
{Input.group.PgFwd}, doc = _("goto next page of the menu")
|
||||
{Input.group.PgFwd}, doc = "goto next page of the menu"
|
||||
}
|
||||
self.key_events.PrevPage = {
|
||||
{Input.group.PgBack}, doc = _("goto previous page of the menu")
|
||||
{Input.group.PgBack}, doc = "goto previous page of the menu"
|
||||
}
|
||||
-- we won't catch presses to "Right", leave that to MenuItem.
|
||||
self.key_events.FocusRight = nil
|
||||
@@ -463,7 +463,7 @@ function Menu:init()
|
||||
self.key_events.SelectByShortCut = { {self.item_shortcuts} }
|
||||
end
|
||||
self.key_events.Select = {
|
||||
{"Press"}, doc = _("select current menu item")
|
||||
{"Press"}, doc = "select current menu item"
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ function ToggleSwitch:init()
|
||||
ges = "tap",
|
||||
range = self.dimen,
|
||||
},
|
||||
doc = _("Toggle switch"),
|
||||
doc = "Toggle switch",
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
@@ -13,9 +13,11 @@ local VerticalGroup = require("ui/widget/verticalgroup")
|
||||
local HorizontalSpan = require("ui/widget/horizontalspan")
|
||||
local VerticalSpan = require("ui/widget/verticalspan")
|
||||
local IconButton = require("ui/widget/iconbutton")
|
||||
local Button = require("ui/widget/button")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local Screen = require("ui/screen")
|
||||
local Geom = require("ui/geometry")
|
||||
local DEBUG = require("dbg")
|
||||
local _ = require("gettext")
|
||||
|
||||
--[[
|
||||
@@ -37,7 +39,7 @@ function TouchMenuItem:init()
|
||||
ges = "tap",
|
||||
range = self.dimen,
|
||||
},
|
||||
doc = _("Select Menu Item"),
|
||||
doc = "Select Menu Item",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -45,13 +47,29 @@ function TouchMenuItem:init()
|
||||
if self.item.enabled_func then
|
||||
item_enabled = self.item.enabled_func()
|
||||
end
|
||||
local item_checked = self.item.checked
|
||||
if self.item.checked_func then
|
||||
item_checked = self.item.checked_func()
|
||||
end
|
||||
local checked_widget = TextWidget:new{
|
||||
text = "√ ",
|
||||
face = self.face,
|
||||
}
|
||||
local unchecked_widget = TextWidget:new{
|
||||
text = "",
|
||||
face = self.face,
|
||||
}
|
||||
self.item_frame = FrameContainer:new{
|
||||
width = self.dimen.w,
|
||||
bordersize = 0,
|
||||
color = 15,
|
||||
HorizontalGroup:new {
|
||||
align = "center",
|
||||
HorizontalSpan:new{ width = 10 },
|
||||
HorizontalSpan:new{ width = Screen:scaleByDPI(5) },
|
||||
CenterContainer:new{
|
||||
dimen = Geom:new{ w = checked_widget:getSize().w },
|
||||
item_checked and checked_widget or unchecked_widget
|
||||
},
|
||||
TextWidget:new{
|
||||
text = self.item.text or self.item.text_func(),
|
||||
bgcolor = 0.0,
|
||||
@@ -84,7 +102,6 @@ end
|
||||
TouchMenuBar widget
|
||||
--]]
|
||||
local TouchMenuBar = InputContainer:new{
|
||||
height = Screen:scaleByDPI(70),
|
||||
width = Screen:getWidth(),
|
||||
icons = {},
|
||||
-- touch menu that holds the bar, used for trigger repaint on icons
|
||||
@@ -93,17 +110,18 @@ local TouchMenuBar = InputContainer:new{
|
||||
}
|
||||
|
||||
function TouchMenuBar:init()
|
||||
self.show_parent = self.show_parent or self
|
||||
|
||||
self.dimen = Geom:new{
|
||||
w = self.width,
|
||||
h = self.height,
|
||||
}
|
||||
|
||||
self.bar_icon_group = HorizontalGroup:new{}
|
||||
|
||||
local icon_sep_width = Screen:scaleByDPI(2)
|
||||
local icons_sep_width = icon_sep_width * (#self.icons + 1)
|
||||
-- we assume all icons are of the same width
|
||||
local ib = IconButton:new{icon_file = self.icons[1]}
|
||||
local content_width = ib:getSize().w * #self.icons + icons_sep_width
|
||||
local spacing_width = (self.width - content_width)/(#self.icons*2)
|
||||
local spacing = HorizontalSpan:new{
|
||||
width = math.min(spacing_width, Screen:scaleByDPI(20))
|
||||
}
|
||||
self.height = ib:getSize().h + Screen:scaleByDPI(10)
|
||||
self.show_parent = self.show_parent or self
|
||||
self.bar_icon_group = HorizontalGroup:new{}
|
||||
-- build up image widget for menu icon bar
|
||||
self.icon_widgets = {}
|
||||
-- hold icon seperators
|
||||
@@ -119,12 +137,6 @@ function TouchMenuBar:init()
|
||||
callback = nil,
|
||||
}
|
||||
|
||||
-- we assume all icons are of the same width
|
||||
local content_width = ib:getSize().w * #self.icons + icons_sep_width
|
||||
local spacing_width = (Screen:getWidth()-content_width)/(#self.icons*2)
|
||||
local spacing = HorizontalSpan:new{
|
||||
width = math.min(spacing_width, Screen:scaleByDPI(20))
|
||||
}
|
||||
table.insert(self.icon_widgets, HorizontalGroup:new{
|
||||
spacing, ib, spacing,
|
||||
})
|
||||
@@ -188,11 +200,12 @@ function TouchMenuBar:init()
|
||||
self.bar_sep
|
||||
},
|
||||
}
|
||||
self.dimen = Geom:new{ w = self.width, h = self.height }
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
TouchMenu widget
|
||||
TouchMenu widget for hierarchical menus
|
||||
--]]
|
||||
local TouchMenu = InputContainer:new{
|
||||
tab_item_table = {},
|
||||
@@ -203,6 +216,7 @@ local TouchMenu = InputContainer:new{
|
||||
bordersize = Screen:scaleByDPI(2),
|
||||
padding = Screen:scaleByDPI(5),
|
||||
footer_height = Screen:scaleByDPI(50),
|
||||
fface = Font:getFace("ffont", 16),
|
||||
width = nil,
|
||||
height = nil,
|
||||
page = 1,
|
||||
@@ -252,14 +266,33 @@ function TouchMenu:init()
|
||||
self.item_group = VerticalGroup:new{
|
||||
align = "left",
|
||||
}
|
||||
|
||||
self.footer_page = TextWidget:new{
|
||||
face = Font:getFace("ffont", 20),
|
||||
-- group for page info
|
||||
self.page_info_left_chev = Button:new{
|
||||
icon = "resources/icons/appbar.chevron.left.png",
|
||||
callback = function() self:onPrevPage() end,
|
||||
bordersize = 0,
|
||||
show_parent = self,
|
||||
}
|
||||
self.page_info_right_chev = Button:new{
|
||||
icon = "resources/icons/appbar.chevron.right.png",
|
||||
callback = function() self:onNextPage() end,
|
||||
bordersize = 0,
|
||||
show_parent = self,
|
||||
}
|
||||
self.page_info_left_chev:hide()
|
||||
self.page_info_right_chev:hide()
|
||||
self.page_info_text = TextWidget:new{
|
||||
text = "",
|
||||
face = self.fface,
|
||||
}
|
||||
self.page_info = HorizontalGroup:new{
|
||||
self.page_info_left_chev,
|
||||
self.page_info_text,
|
||||
self.page_info_right_chev
|
||||
}
|
||||
self.time_info = TextWidget:new{
|
||||
face = Font:getFace("ffont", 20),
|
||||
text = "",
|
||||
face = self.fface,
|
||||
}
|
||||
local footer_width = self.width - self.padding*2 - self.bordersize*2
|
||||
self.footer = HorizontalGroup:new{
|
||||
@@ -276,7 +309,7 @@ function TouchMenu:init()
|
||||
},
|
||||
CenterContainer:new{
|
||||
dimen = Geom:new{ w = footer_width*0.33, h = self.footer_height},
|
||||
self.footer_page,
|
||||
self.page_info,
|
||||
},
|
||||
RightContainer:new{
|
||||
dimen = Geom:new{ w = footer_width*0.33, h = self.footer_height},
|
||||
@@ -367,7 +400,11 @@ function TouchMenu:updateItems()
|
||||
|
||||
table.insert(self.item_group, VerticalSpan:new{width = Screen:scaleByDPI(2)})
|
||||
table.insert(self.item_group, self.footer)
|
||||
self.footer_page.text = _("Page ")..self.page.."/"..self.page_num
|
||||
self.page_info_text.text = _("Page ")..self.page.."/"..self.page_num
|
||||
self.page_info_left_chev:showHide(self.page_num > 1)
|
||||
self.page_info_right_chev:showHide(self.page_num > 1)
|
||||
self.page_info_left_chev:enableDisable(self.page > 1)
|
||||
self.page_info_right_chev:enableDisable(self.page < self.page_num)
|
||||
self.time_info.text = os.date("%H:%M")
|
||||
-- FIXME: this is a dirty hack to clear previous menus
|
||||
-- refert to issue #664
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/koreader/koreader-base/issues\n"
|
||||
"POT-Creation-Date: 2014-06-04 13:52+0000\n"
|
||||
"POT-Creation-Date: 2014-06-05 11:16+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -17,21 +17,6 @@ msgid ""
|
||||
" others."
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:122
|
||||
msgid ""
|
||||
"-d start in debug mode"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:124
|
||||
msgid ""
|
||||
"-h show this usage help"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:123
|
||||
msgid ""
|
||||
"-p [rows] enable Lua code profiling"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:48
|
||||
msgid ""
|
||||
"0 deg"
|
||||
@@ -211,7 +196,7 @@ msgid ""
|
||||
"File does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:114
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:125
|
||||
msgid ""
|
||||
"File manager menu"
|
||||
msgstr ""
|
||||
@@ -266,8 +251,8 @@ msgid ""
|
||||
"Go to Page or Location"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:74
|
||||
#: frontend/apps/reader/modules/readermenu.lua:75
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:94
|
||||
#: frontend/apps/reader/modules/readermenu.lua:84
|
||||
msgid ""
|
||||
"Help"
|
||||
msgstr ""
|
||||
@@ -288,16 +273,6 @@ msgid ""
|
||||
"Hyphenation"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:129
|
||||
msgid ""
|
||||
"If you don't pass any path, the last viewed document will be opened"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:126
|
||||
msgid ""
|
||||
"If you give the name of a directory instead of a file path, a file"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:177
|
||||
msgid ""
|
||||
"Increase gamma to "
|
||||
@@ -395,12 +370,17 @@ msgid ""
|
||||
"OK"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:74
|
||||
msgid ""
|
||||
"Opening file"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readergoto.lua:43
|
||||
msgid ""
|
||||
"Page"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/touchmenu.lua:370
|
||||
#: frontend/ui/widget/touchmenu.lua:382
|
||||
msgid ""
|
||||
"Page "
|
||||
msgstr ""
|
||||
@@ -420,17 +400,13 @@ msgid ""
|
||||
"Paste"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readermenu.lua:78
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:97
|
||||
#: frontend/apps/reader/modules/readermenu.lua:87
|
||||
msgid ""
|
||||
"Please report bugs to \n"
|
||||
"https://github.com/koreader/koreader/issues"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:77
|
||||
msgid ""
|
||||
"Please report bugs to https://github.com/koreader/ koreader/issues, Click at the bottom of the page for more options"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/language.lua:13
|
||||
msgid ""
|
||||
"Please restart reader for new language setting to take effect."
|
||||
@@ -446,11 +422,6 @@ msgid ""
|
||||
"RTL"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:120
|
||||
msgid ""
|
||||
"Read all the books on your E-Ink reader"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:204
|
||||
msgid ""
|
||||
"Redrawing with font "
|
||||
@@ -481,23 +452,6 @@ msgid ""
|
||||
"Scroll Mode"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:132
|
||||
msgid ""
|
||||
"See http://github.com/koreader/kindlepdfviewer for more info."
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/configdialog.lua:38
|
||||
#: frontend/ui/widget/touchmenu.lua:40
|
||||
msgid ""
|
||||
"Select Menu Item"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/configdialog.lua:80
|
||||
#: frontend/ui/widget/configdialog.lua:116
|
||||
msgid ""
|
||||
"Select Option Item"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:135
|
||||
msgid ""
|
||||
"Set font size to "
|
||||
@@ -518,11 +472,21 @@ msgid ""
|
||||
"Share"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:63
|
||||
msgid ""
|
||||
"Show hidden files"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/uimanager.lua:298
|
||||
msgid ""
|
||||
"Standby"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:71
|
||||
msgid ""
|
||||
"Start with last opened file"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:292
|
||||
msgid ""
|
||||
"Switch zoom mode"
|
||||
@@ -548,11 +512,6 @@ msgid ""
|
||||
"Table of contents"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/button.lua:80
|
||||
msgid ""
|
||||
"Tap Button"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:12
|
||||
msgid ""
|
||||
"Text Align"
|
||||
@@ -568,26 +527,11 @@ msgid ""
|
||||
"This may take several seconds..."
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:131
|
||||
msgid ""
|
||||
"This software is licensed under the GPLv3."
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfrontlight.lua:99
|
||||
msgid ""
|
||||
"Toggle"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:63
|
||||
msgid ""
|
||||
"Toggle hidden files"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/toggleswitch.lua:75
|
||||
msgid ""
|
||||
"Toggle switch"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerhighlight.lua:312
|
||||
msgid ""
|
||||
"Translate"
|
||||
@@ -608,8 +552,8 @@ msgid ""
|
||||
"Underscore"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:82
|
||||
#: frontend/apps/reader/modules/readermenu.lua:83
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:86
|
||||
#: frontend/apps/reader/modules/readermenu.lua:76
|
||||
msgid ""
|
||||
"Version"
|
||||
msgstr ""
|
||||
@@ -691,54 +635,11 @@ msgid ""
|
||||
"bold"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/confirmbox.lua:37
|
||||
msgid ""
|
||||
"cancel"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:127
|
||||
msgid ""
|
||||
"chooser will show up and let you select a file"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/configdialog.lua:43
|
||||
#: frontend/ui/widget/configdialog.lua:85
|
||||
msgid ""
|
||||
"chose selected item"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/confirmbox.lua:38
|
||||
msgid ""
|
||||
"chose selected option"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readertypeset.lua:49
|
||||
msgid ""
|
||||
"clear all external styles"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/configdialog.lua:464
|
||||
msgid ""
|
||||
"close config menu"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/buttondialog.lua:22
|
||||
#: frontend/ui/widget/infomessage.lua:32
|
||||
msgid ""
|
||||
"close dialog"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/readerui.lua:46
|
||||
#: frontend/apps/reader/readerui.lua:75
|
||||
msgid ""
|
||||
"close document"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/menu.lua:452
|
||||
msgid ""
|
||||
"close menu"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:44
|
||||
msgid ""
|
||||
"darker"
|
||||
@@ -754,16 +655,6 @@ msgid ""
|
||||
"decrease"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:35
|
||||
msgid ""
|
||||
"decrease font size"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:43
|
||||
msgid ""
|
||||
"decrease line space"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:43
|
||||
msgid ""
|
||||
"default"
|
||||
@@ -774,101 +665,16 @@ msgid ""
|
||||
"full"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:51
|
||||
msgid ""
|
||||
"go to 11%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:53
|
||||
msgid ""
|
||||
"go to 22%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:55
|
||||
msgid ""
|
||||
"go to 33%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:57
|
||||
msgid ""
|
||||
"go to 44%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:59
|
||||
msgid ""
|
||||
"go to 55%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:61
|
||||
msgid ""
|
||||
"go to 66%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:63
|
||||
msgid ""
|
||||
"go to 77%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:65
|
||||
msgid ""
|
||||
"go to 88%"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:67
|
||||
msgid ""
|
||||
"go to end"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:30
|
||||
msgid ""
|
||||
"go to next view"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:35
|
||||
msgid ""
|
||||
"go to previous view"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:49
|
||||
msgid ""
|
||||
"go to start"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/menu.lua:454
|
||||
msgid ""
|
||||
"goto next page of the menu"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/menu.lua:457
|
||||
msgid ""
|
||||
"goto previous page of the menu"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:47
|
||||
msgid ""
|
||||
"high"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerhighlight.lua:19
|
||||
msgid ""
|
||||
"highlight text"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:40
|
||||
msgid ""
|
||||
"increase"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:31
|
||||
msgid ""
|
||||
"increase font size"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:39
|
||||
msgid ""
|
||||
"increase line space"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:52
|
||||
msgid ""
|
||||
"landscape"
|
||||
@@ -909,36 +715,6 @@ msgid ""
|
||||
"mini"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:45
|
||||
msgid ""
|
||||
"move view down"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrolling.lua:40
|
||||
msgid ""
|
||||
"move view up"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerpanning.lua:25
|
||||
msgid ""
|
||||
"move visible area down"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerpanning.lua:28
|
||||
msgid ""
|
||||
"move visible area left"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerpanning.lua:31
|
||||
msgid ""
|
||||
"move visible area right"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerpanning.lua:22
|
||||
msgid ""
|
||||
"move visible area up"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/menu.lua:541
|
||||
msgid ""
|
||||
"no choices available"
|
||||
@@ -959,11 +735,6 @@ msgid ""
|
||||
"on"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:74
|
||||
msgid ""
|
||||
"opening file"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:56
|
||||
msgid ""
|
||||
"page"
|
||||
@@ -984,106 +755,19 @@ msgid ""
|
||||
"regular"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrotation.lua:20
|
||||
msgid ""
|
||||
"rotate left by 90 degrees"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerrotation.lua:24
|
||||
msgid ""
|
||||
"rotate right by 90 degrees"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:55
|
||||
msgid ""
|
||||
"scroll"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/widget/configdialog.lua:468
|
||||
#: frontend/ui/widget/menu.lua:466
|
||||
msgid ""
|
||||
"select current menu item"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:35
|
||||
msgid ""
|
||||
"semi-auto"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readertoc.lua:22
|
||||
msgid ""
|
||||
"show Table of Content menu"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerbookmark.lua:23
|
||||
msgid ""
|
||||
"show bookmarks"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerconfig.lua:18
|
||||
msgid ""
|
||||
"show config dialog"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerfont.lua:28
|
||||
msgid ""
|
||||
"show font menu"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/filemanager/filemanagermenu.lua:36
|
||||
#: frontend/apps/reader/modules/readermenu.lua:48
|
||||
msgid ""
|
||||
"show menu"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/ui/data/strings.lua:36
|
||||
msgid ""
|
||||
"small"
|
||||
msgstr ""
|
||||
|
||||
#: reader.lua:119
|
||||
msgid ""
|
||||
"usage: ./reader.lua [OPTION] ... path"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:25
|
||||
msgid ""
|
||||
"zoom in"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:30
|
||||
msgid ""
|
||||
"zoom out"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:40
|
||||
msgid ""
|
||||
"zoom to fit content"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:60
|
||||
msgid ""
|
||||
"zoom to fit content height"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:50
|
||||
msgid ""
|
||||
"zoom to fit content width"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:35
|
||||
msgid ""
|
||||
"zoom to fit page"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:55
|
||||
msgid ""
|
||||
"zoom to fit page height"
|
||||
msgstr ""
|
||||
|
||||
#: frontend/apps/reader/modules/readerzooming.lua:45
|
||||
msgid ""
|
||||
"zoom to fit page width"
|
||||
msgstr ""
|
||||
|
||||
|
||||
|
||||
32
reader.lua
32
reader.lua
@@ -71,7 +71,7 @@ function showReaderUI(file, pass)
|
||||
return
|
||||
end
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("opening file") .. file,
|
||||
text = _("Opening file") .. file,
|
||||
timeout = 1,
|
||||
})
|
||||
UIManager:scheduleIn(0.1, function() doShowReaderUI(file, pass) end)
|
||||
@@ -116,20 +116,20 @@ local longopts = {
|
||||
}
|
||||
|
||||
function showusage()
|
||||
print(_("usage: ./reader.lua [OPTION] ... path"))
|
||||
print(_("Read all the books on your E-Ink reader"))
|
||||
print("usage: ./reader.lua [OPTION] ... path")
|
||||
print("Read all the books on your E-Ink reader")
|
||||
print("")
|
||||
print(_("-d start in debug mode"))
|
||||
print(_("-p [rows] enable Lua code profiling"))
|
||||
print(_("-h show this usage help"))
|
||||
print("-d start in debug mode")
|
||||
print("-p enable Lua code profiling")
|
||||
print("-h show this usage help")
|
||||
print("")
|
||||
print(_("If you give the name of a directory instead of a file path, a file"))
|
||||
print(_("chooser will show up and let you select a file"))
|
||||
print("If you give the name of a directory instead of a file path, a file")
|
||||
print("chooser will show up and let you select a file")
|
||||
print("")
|
||||
print(_("If you don't pass any path, the last viewed document will be opened"))
|
||||
print("If you don't pass any path, the last viewed document will be opened")
|
||||
print("")
|
||||
print(_("This software is licensed under the GPLv3."))
|
||||
print(_("See http://github.com/koreader/kindlepdfviewer for more info."))
|
||||
print("This software is licensed under the AGPLv3.")
|
||||
print("See http://github.com/koreader/koreader for more info.")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -171,6 +171,8 @@ if fontmap ~= nil then
|
||||
end
|
||||
-- last file
|
||||
local last_file = G_reader_settings:readSetting("lastfile")
|
||||
-- load last opened file
|
||||
local open_last = G_reader_settings:readSetting("open_last")
|
||||
|
||||
|
||||
--@TODO we can read version here, refer to commit in master tree: (houqp)
|
||||
@@ -187,10 +189,14 @@ do
|
||||
end
|
||||
|
||||
if ARGV[argidx] and ARGV[argidx] ~= "" then
|
||||
if lfs.attributes(ARGV[argidx], "mode") == "directory" then
|
||||
if lfs.attributes(ARGV[argidx], "mode") == "file" then
|
||||
showReaderUI(ARGV[argidx])
|
||||
elseif open_last and last_file then
|
||||
showReaderUI(last_file)
|
||||
UIManager:run()
|
||||
showHomePage(ARGV[argidx])
|
||||
else
|
||||
showReaderUI(ARGV[argidx])
|
||||
showHomePage(ARGV[argidx])
|
||||
end
|
||||
UIManager:run()
|
||||
elseif last_file then
|
||||
|
||||
Reference in New Issue
Block a user