From 101a063fba31d9d6132e15977b223de5cd59d3d1 Mon Sep 17 00:00:00 2001 From: HW Date: Tue, 10 Sep 2013 15:24:35 +0200 Subject: [PATCH 01/18] update koreader-base --- koreader-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koreader-base b/koreader-base index a08c4e691..7266a9276 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit a08c4e6911ddcb9db78f6fc618e79c6f50659e6e +Subproject commit 7266a9276b7cb62b44b31291ce54c58cf96005a1 From 7fb169660a8d85d0c4a666cd2d8a69f8dafc5715 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 14 Sep 2013 12:55:13 +0800 Subject: [PATCH 02/18] update koreader-base --- koreader-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koreader-base b/koreader-base index 7266a9276..1940f8bd8 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 7266a9276b7cb62b44b31291ce54c58cf96005a1 +Subproject commit 1940f8bd8b7c3c7c855d4fc7e1e86ea3f148c015 From f2cf10a015864b807d854c22eab420088e0f01e8 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 14 Sep 2013 12:56:10 +0800 Subject: [PATCH 03/18] refactoring koptcontext creation function --- frontend/document/koptinterface.lua | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/frontend/document/koptinterface.lua b/frontend/document/koptinterface.lua index 50422d185..1fa2f01a1 100644 --- a/frontend/document/koptinterface.lua +++ b/frontend/document/koptinterface.lua @@ -46,6 +46,12 @@ function KoptInterface:createContext(doc, pageno, bbox) -- So there is no need to check background context when creating new context. local kc = KOPTContext.new() local screen_size = Screen:getSize() + local lang = doc.configurable.doc_language + if lang == "chi_sim" or lang == "chi_tra" or + lang == "jpn" or lang == "kor" then + kc:setCJKChar() + end + kc:setLanguage(lang) kc:setTrim(doc.configurable.trim_page) kc:setWrap(doc.configurable.text_wrap) kc:setIndent(doc.configurable.detect_indent) @@ -62,8 +68,7 @@ function KoptInterface:createContext(doc, pageno, bbox) kc:setDefectSize(doc.configurable.defect_size) kc:setLineSpacing(doc.configurable.line_spacing) kc:setWordSpacing(doc.configurable.word_spacing) - kc:setLanguage(doc.configurable.doc_language) - kc:setBBox(bbox.x0, bbox.y0, bbox.x1, bbox.y1) + if bbox then kc:setBBox(bbox.x0, bbox.y0, bbox.x1, bbox.y1) end if Dbg.is_on then kc:setDebug() end return kc end @@ -133,12 +138,6 @@ function KoptInterface:getReflewTextBoxes(doc, pageno) if cached then local kc = self:waitForContext(cached.kctx) --kc:setDebug() - local lang = doc.configurable.doc_language - if lang == "chi_sim" or lang == "chi_tra" or - lang == "jpn" or lang == "kor" then - kc:setCJKChar() - end - kc:setLanguage(lang) local fullwidth, fullheight = kc:getPageDim() local boxes = kc:getWordBoxes(0, 0, fullwidth, fullheight) Cache:insert(hash, CacheItem:new{ rfpgboxes = boxes }) @@ -154,14 +153,8 @@ function KoptInterface:getTextBoxes(doc, pageno) local cached = Cache:check(hash) if not cached then local kc_hash = "kctx|"..doc.file.."|"..pageno - local kc = KOPTContext.new() + local kc = self:createContext(doc, pageno) kc:setDebug() - local lang = doc.configurable.doc_language - if lang == "chi_sim" or lang == "chi_tra" or - lang == "jpn" or lang == "kor" then - kc:setCJKChar() - end - kc:setLanguage(lang) local page = doc._document:openPage(pageno) page:getPagePix(kc) local fullwidth, fullheight = kc:getPageDim() From 979d4c5d4811a85eb759c8c6e0edb8d2e2a60b52 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 14 Sep 2013 15:27:11 +0800 Subject: [PATCH 04/18] add DHINTCOUNT in defaults.lua It controls how many number of pages will be hinted in background after one page has been drawn. Default DHINTCOUNT is 2. --- defaults.lua | 6 +++++- frontend/ui/reader/readerhinting.lua | 17 ++++++++++++++++- frontend/ui/reader/readerzooming.lua | 13 ------------- frontend/ui/readerui.lua | 1 + koreader-base | 2 +- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/defaults.lua b/defaults.lua index 1eefe2292..c78a6492b 100644 --- a/defaults.lua +++ b/defaults.lua @@ -1,7 +1,11 @@ -- number of page turns between full screen refresh --- default to full refresh on every page turn +-- default to do a full refresh on every 6 page turns DRCOUNTMAX = 6 +-- number of pages for hinting +-- default to pre-rendering 2 pages +DHINTCOUNT = 2 + -- full screen mode, 1 for true, 0 for false DFULL_SCREEN = 1 diff --git a/frontend/ui/reader/readerhinting.lua b/frontend/ui/reader/readerhinting.lua index 1fad17ba1..cc16c0c6e 100644 --- a/frontend/ui/reader/readerhinting.lua +++ b/frontend/ui/reader/readerhinting.lua @@ -3,6 +3,21 @@ ReaderHinting = EventListener:new{ hinting_states = {} } +function ReaderHinting:onHintPage() + if not self.view.hinting then return true end + for i=1, DHINTCOUNT do + if self.zoom.current_page + i <= self.ui.document.info.number_of_pages then + self.ui.document:hintPage( + self.view.state.page + i, + self.zoom:getZoom(self.view.state.page + i), + self.view.state.rotation, + self.view.state.gamma, + self.view.render_mode) + end + end + return true +end + function ReaderHinting:onSetHinting(hinting) self.view.hinting = hinting end @@ -16,4 +31,4 @@ end function ReaderHinting:onRestoreHinting() self.view.hinting = table.remove(self.hinting_states) return true -end \ No newline at end of file +end diff --git a/frontend/ui/reader/readerzooming.lua b/frontend/ui/reader/readerzooming.lua index d9618f1c8..073818e39 100644 --- a/frontend/ui/reader/readerzooming.lua +++ b/frontend/ui/reader/readerzooming.lua @@ -161,19 +161,6 @@ function ReaderZooming:onReZoom() return true end -function ReaderZooming:onHintPage() - if not self.view.hinting then return true end - if self.current_page < self.ui.document.info.number_of_pages then - self.ui.document:hintPage( - self.view.state.page + 1, - self:getZoom(self.view.state.page + 1), - self.view.state.rotation, - self.view.state.gamma, - self.view.render_mode) - end - return true -end - function ReaderZooming:getZoom(pageno) -- check if we're in bbox mode and work on bbox if that's the case local zoom = nil diff --git a/frontend/ui/readerui.lua b/frontend/ui/readerui.lua index 171283245..699470024 100644 --- a/frontend/ui/readerui.lua +++ b/frontend/ui/readerui.lua @@ -173,6 +173,7 @@ function ReaderUI:init() -- hinting controller local hinter = ReaderHinting:new{ dialog = self.dialog, + zoom = zoomer, view = self[1], ui = self, document = self.document, diff --git a/koreader-base b/koreader-base index 1940f8bd8..88c26d984 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 1940f8bd8b7c3c7c855d4fc7e1e86ea3f148c015 +Subproject commit 88c26d984c3232cdd6d03b19a0da5f6c49351810 From f207c285ff3f1b823ed7494f3de932efc8dee5a3 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 14 Sep 2013 15:38:40 +0800 Subject: [PATCH 05/18] set default render quality in reflowing to 1.0 which should be a good tradeoff between speed and quality. --- defaults.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults.lua b/defaults.lua index c78a6492b..f49ada314 100644 --- a/defaults.lua +++ b/defaults.lua @@ -38,7 +38,7 @@ DKOPTREADER_CONFIG_DETECT_INDENT = 1 -- 1 = enable, 0 = disable DKOPTREADER_CONFIG_DEFECT_SIZE = 1.0 -- range from 0.0 to 3.0 DKOPTREADER_CONFIG_PAGE_MARGIN = 0.10 -- range from 0.0 to 1.0 DKOPTREADER_CONFIG_LINE_SPACING = 1.2 -- range from 0.5 to 2.0 -DKOPTREADER_CONFIG_RENDER_QUALITY = 0.8 -- range from 0.5 to 1.0 +DKOPTREADER_CONFIG_RENDER_QUALITY = 1.0 -- range from 0.5 to 2.0 DKOPTREADER_CONFIG_AUTO_STRAIGHTEN = 0 -- range from 0 to 10 DKOPTREADER_CONFIG_JUSTIFICATION = -1 -- -1 = auto, 0 = left, 1 = center, 2 = right, 3 = full DKOPTREADER_CONFIG_MAX_COLUMNS = 2 -- range from 1 to 4 From f12869d5874685bfd89fd45763aa0f7af25284d1 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 14 Sep 2013 18:40:00 +0800 Subject: [PATCH 06/18] split text string with even finer granularity --- frontend/ui/widget/text.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/ui/widget/text.lua b/frontend/ui/widget/text.lua index c063cc1ac..fe6f50adb 100644 --- a/frontend/ui/widget/text.lua +++ b/frontend/ui/widget/text.lua @@ -153,11 +153,13 @@ function TextBoxWidget:_getVerticalList(alg) -- build horizontal list local h_list = {} for words in self.text:gmatch("[\32-\127\192-\255]+[\128-\191]*") do - for w in words:gsplit("%s+", true) do - local word_box = {} - word_box.word = w - word_box.width = sizeUtf8Text(0, Screen:getWidth(), self.face, w, true).x - table.insert(h_list, word_box) + for word in words:gsplit("%s+", true) do + for w in word:gsplit("%p+", true) do + local word_box = {} + word_box.word = w + word_box.width = sizeUtf8Text(0, Screen:getWidth(), self.face, w, true).x + table.insert(h_list, word_box) + end end end From 0b7554b1d8d40f581602500da9f85908cbc5e681 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 14 Sep 2013 19:35:32 +0800 Subject: [PATCH 07/18] add DSHOWOVERLAP in defaults.lua Turn off "show overlap" by default since scroll mode can replace it in most cases where "show overlap" is used. And the dimmed area often make new users confused. It's better to leave this feature to more advanced users. --- defaults.lua | 4 ++++ frontend/ui/reader/readerpaging.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/defaults.lua b/defaults.lua index f49ada314..396bf842e 100644 --- a/defaults.lua +++ b/defaults.lua @@ -30,6 +30,10 @@ DOUTER_PAGE_COLOR = 0 -- supported view mode includes: "scroll" and "page" DCREREADER_VIEW_MODE = "page" +-- show dimmed area to indicate page overlap in "page" view mode, +-- default to false +DSHOWOVERLAP = false + -- koptreader config defaults DKOPTREADER_CONFIG_FONT_SIZE = 1.0 -- range from 0.1 to 3.0 DKOPTREADER_CONFIG_TEXT_WRAP = 0 -- 1 = on, 0 = off diff --git a/frontend/ui/reader/readerpaging.lua b/frontend/ui/reader/readerpaging.lua index 0ce9c14ee..0df23431c 100644 --- a/frontend/ui/reader/readerpaging.lua +++ b/frontend/ui/reader/readerpaging.lua @@ -5,7 +5,7 @@ ReaderPaging = InputContainer:new{ number_of_pages = 0, visible_area = nil, page_area = nil, - show_overlap_enable = true, + show_overlap_enable = DSHOWOVERLAP, overlap = scaleByDPI(20), flip_steps = {0,1,2,5,10,20,50,100} } From 9f0154f7bf64a2f0698d8a8fb885cdebeddb2a41 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 14 Sep 2013 19:46:45 +0800 Subject: [PATCH 08/18] fix wrong indentation --- frontend/ui/widget/text.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/ui/widget/text.lua b/frontend/ui/widget/text.lua index fe6f50adb..f29a6273b 100644 --- a/frontend/ui/widget/text.lua +++ b/frontend/ui/widget/text.lua @@ -154,12 +154,12 @@ function TextBoxWidget:_getVerticalList(alg) local h_list = {} for words in self.text:gmatch("[\32-\127\192-\255]+[\128-\191]*") do for word in words:gsplit("%s+", true) do - for w in word:gsplit("%p+", true) do - local word_box = {} - word_box.word = w - word_box.width = sizeUtf8Text(0, Screen:getWidth(), self.face, w, true).x - table.insert(h_list, word_box) - end + for w in word:gsplit("%p+", true) do + local word_box = {} + word_box.word = w + word_box.width = sizeUtf8Text(0, Screen:getWidth(), self.face, w, true).x + table.insert(h_list, word_box) + end end end From edbab22f4f07dfb7c4ac67857ebf8866f18aa2d7 Mon Sep 17 00:00:00 2001 From: chrox Date: Mon, 16 Sep 2013 16:14:00 +0800 Subject: [PATCH 09/18] update koreader-base --- koreader-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koreader-base b/koreader-base index 88c26d984..f8327898c 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 88c26d984c3232cdd6d03b19a0da5f6c49351810 +Subproject commit f8327898c23dbf8e2a08dd80a10a0b51edeb0411 From 9fd9bb17a9e7faf24fd8878f12ce7955ef8b7963 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 21 Sep 2013 21:31:22 +0800 Subject: [PATCH 10/18] update mupdf and k2pdfopt to the latest version --- Makefile | 1 + koreader-base | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc974d96d..007992dea 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ MO_DIR=$(INSTALL_DIR)/koreader/i18n all: $(KOR_BASE)/$(OUTPUT_DIR)/luajit mo + $(MAKE) -C $(KOR_BASE) echo $(VERSION) > git-rev mkdir -p $(INSTALL_DIR)/koreader cp -rfL $(KOR_BASE)/$(OUTPUT_DIR)/* $(INSTALL_DIR)/koreader/ diff --git a/koreader-base b/koreader-base index f8327898c..85513bf5c 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit f8327898c23dbf8e2a08dd80a10a0b51edeb0411 +Subproject commit 85513bf5c00100861a82f6a204a485d791598a1d From b012aa26ba27249c7d6e59ce14db51a0741e8a67 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 21 Sep 2013 21:37:55 +0800 Subject: [PATCH 11/18] update koreader-base --- koreader-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koreader-base b/koreader-base index 85513bf5c..23df0017e 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 85513bf5c00100861a82f6a204a485d791598a1d +Subproject commit 23df0017e4984abaa97e679ad5569ca43422c6a1 From fd6708adbdc235e645ca096b29033d8790a98d20 Mon Sep 17 00:00:00 2001 From: chrox Date: Sun, 22 Sep 2013 12:28:43 +0800 Subject: [PATCH 12/18] update koreader-base --- koreader-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koreader-base b/koreader-base index 23df0017e..ba444ce10 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 23df0017e4984abaa97e679ad5569ca43422c6a1 +Subproject commit ba444ce10696d47552af98c8529c4b5f1a0bc74b From 6dd9fd97b7eb7d07c98ad34990cceb34d2f18f1c Mon Sep 17 00:00:00 2001 From: chrox Date: Sun, 22 Sep 2013 16:13:13 +0800 Subject: [PATCH 13/18] update koreader-base --- koreader-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koreader-base b/koreader-base index ba444ce10..c5ac9c236 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit ba444ce10696d47552af98c8529c4b5f1a0bc74b +Subproject commit c5ac9c236b0f2a66ba34cbf506fd5e9376658bb1 From 89dcd4b2e8b7a7af30f53adffb75ebe8e18c6938 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Thu, 26 Sep 2013 01:05:43 -0400 Subject: [PATCH 14/18] update translation --- l10n/hu/koreader.po | 661 +++++++++++++++++++++++++++++++++++++++++ l10n/vi/koreader.po | 660 ++++++++++++++++++++++++++++++++++++++++ l10n/vi_VN/koreader.po | 660 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1981 insertions(+) create mode 100644 l10n/hu/koreader.po create mode 100644 l10n/vi/koreader.po create mode 100644 l10n/vi_VN/koreader.po diff --git a/l10n/hu/koreader.po b/l10n/hu/koreader.po new file mode 100644 index 000000000..e0242ed46 --- /dev/null +++ b/l10n/hu/koreader.po @@ -0,0 +1,661 @@ +# KOReader PATH/TO/FILE.PO +# Copyright (C) 2005-2013 KOReader Development Team +# +# Translators: +# Kobudera_HUN , 2013 +msgid "" +msgstr "" +"Project-Id-Version: KOReader\n" +"Report-Msgid-Bugs-To: https://github.com/koreader/koreader-base/issues\n" +"POT-Creation-Date: 2013-06-16 04:18+0000\n" +"PO-Revision-Date: 2013-08-05 16:46+0000\n" +"Last-Translator: Kobudera_HUN \n" +"Language-Team: Hungarian (http://www.transifex.com/projects/p/koreader/language/hu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: reader.lua:198 +msgid "-d start in debug mode" +msgstr "" + +#: reader.lua:199 +msgid "-h show this usage help" +msgstr "" + +#: frontend/ui/data/strings.lua:40 +msgid "0 deg" +msgstr "" + +#: frontend/ui/data/strings.lua:42 +msgid "10 deg" +msgstr "" + +#: frontend/ui/data/strings.lua:41 +msgid "5 deg" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:186 +msgid "Add Note" +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:49 +msgid "Auto" +msgstr "" + +#: frontend/ui/data/strings.lua:17 +msgid "Auto Straighten" +msgstr "" + +#: frontend/ui/inputevent.lua:347 +msgid "Auto-detected Kindle 2" +msgstr "" + +#: frontend/ui/inputevent.lua:343 +msgid "Auto-detected Kindle 3" +msgstr "" + +#: frontend/ui/inputevent.lua:339 +msgid "Auto-detected Kindle 4" +msgstr "" + +#: frontend/ui/inputevent.lua:345 +msgid "Auto-detected Kindle DXG" +msgstr "" + +#: frontend/ui/inputevent.lua:295 +msgid "Auto-detected Kindle PaperWhite" +msgstr "" + +#: frontend/ui/inputevent.lua:315 +msgid "Auto-detected Kindle Touch" +msgstr "" + +#: frontend/ui/reader/readerbookmark.lua:4 +msgid "Bookmarks" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:12 +msgid "Cancel" +msgstr "" + +#: frontend/ui/reader/readerhyphenation.lua:21 +msgid "Change Hyphenation to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:5 +msgid "Change font" +msgstr "" + +#: frontend/ui/data/strings.lua:8 +msgid "Columns" +msgstr "" + +#: frontend/ui/data/strings.lua:11 +msgid "Contrast" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:124 +msgid "Decrease font size to " +msgstr "" + +#: frontend/ui/reader/readerfrontlight.lua:42 +msgid "Decrease front light intensity to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:192 +msgid "Decrease gamma to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:163 +msgid "Decrease line space to " +msgstr "" + +#: frontend/ui/data/strings.lua:15 +msgid "Defect Size" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:97 +msgid "Delete" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:94 +msgid "Document menu" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:101 +msgid "Edit" +msgstr "" + +#: frontend/ui/data/strings.lua:22 +msgid "Embedded style" +msgstr "" + +#: reader.lua:88 +msgid "Exit" +msgstr "" + +#: reader.lua:150 +msgid "FileManager" +msgstr "" + +#: frontend/ui/data/strings.lua:10 +msgid "Fine Tuning" +msgstr "" + +#: frontend/ui/data/strings.lua:19 +msgid "Font weight" +msgstr "" + +#: frontend/ui/data/strings.lua:4 +msgid "Full Screen" +msgstr "" + +#: frontend/ui/data/strings.lua:20 +msgid "Gamma" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:61 +msgid "Help" +msgstr "Segitség" + +#: frontend/ui/reader/readerhighlight.lua:182 +msgid "Highlight" +msgstr "" + +#: reader.lua:106 +msgid "Home menu" +msgstr "" + +#: frontend/ui/reader/readerhyphenation.lua:3 +msgid "Hyphenation" +msgstr "" + +#: reader.lua:204 +msgid "If you don't pass any path, the last viewed document will be opened" +msgstr "" + +#: reader.lua:201 +msgid "If you give the name of a directory instead of a file path, a file" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:126 +msgid "Increase font size to " +msgstr "" + +#: frontend/ui/reader/readerfrontlight.lua:38 +msgid "Increase front light intensity to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:189 +msgid "Increase gamma to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:167 +msgid "Increase line space to " +msgstr "" + +#: frontend/ui/data/strings.lua:18 +msgid "Indentation" +msgstr "" + +#: reader.lua:83 +msgid "Last documents" +msgstr "" + +#: frontend/ui/data/strings.lua:7 +msgid "Line Spacing" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:198 +msgid "More" +msgstr "" + +#: reader.lua:127 +msgid "No reader engine for this file" +msgstr "" + +#: frontend/ui/inputevent.lua:349 +msgid "Not supported device model!" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:11 +msgid "OK" +msgstr "" + +#: frontend/ui/widget/touchmenu.lua:338 +msgid "Page " +msgstr "" + +#: frontend/ui/data/strings.lua:3 +msgid "Page Crop" +msgstr "" + +#: frontend/ui/data/strings.lua:6 +msgid "Page Margin" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:64 +msgid "" +"Please report bugs to https://github.com/koreader/ koreader/issues, Click at" +" the bottom of the page for more options" +msgstr "" + +#: reader.lua:196 +msgid "Read all the books on your E-Ink reader" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:215 +msgid "Redrawing with font " +msgstr "" + +#: frontend/ui/data/koptoptions.lua:146 frontend/ui/data/strings.lua:12 +msgid "Reflow" +msgstr "" + +#: frontend/ui/data/strings.lua:16 +msgid "Render Quality" +msgstr "" + +#: frontend/ui/data/strings.lua:2 +msgid "Screen Mode" +msgstr "" + +#: frontend/ui/data/strings.lua:5 +msgid "Scroll Mode" +msgstr "" + +#: reader.lua:207 +msgid "See http://github.com/koreader/kindlepdfviewer for more info." +msgstr "" + +#: frontend/ui/widget/config.lua:15 frontend/ui/widget/touchmenu.lua:26 +msgid "Select Menu Item" +msgstr "" + +#: frontend/ui/widget/config.lua:54 frontend/ui/widget/config.lua:108 +msgid "Select Option Item" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:148 +msgid "Set font size to " +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:2 +msgid "Set render style" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:193 +msgid "Share" +msgstr "" + +#: reader.lua:18 +msgid "Show Home Menu" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:241 +msgid "Switch zoom mode" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:85 +msgid "Table of Contents" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:3 +msgid "Table of contents" +msgstr "" + +#: frontend/ui/widget/button.lua:58 +msgid "Tap Button" +msgstr "" + +#: frontend/ui/data/strings.lua:9 +msgid "Text Align" +msgstr "" + +#: reader.lua:206 +msgid "This software is licensed under the GPLv3." +msgstr "" + +#: frontend/ui/widget/toggleswitch.lua:58 +msgid "Toggle switch" +msgstr "" + +#: frontend/ui/data/strings.lua:13 +msgid "Vertical Text" +msgstr "" + +#: frontend/ui/data/strings.lua:21 +msgid "View mode" +msgstr "" + +#: frontend/ui/data/strings.lua:14 +msgid "Word Gap" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:260 +msgid "Zoom to fit content" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:248 +msgid "Zoom to fit content height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:244 +msgid "Zoom to fit content width" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:264 +msgid "Zoom to fit page" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:256 +msgid "Zoom to fit page height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:252 +msgid "Zoom to fit page width" +msgstr "" + +#: frontend/ui/data/strings.lua:26 +msgid "auto" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:23 +msgid "cancel" +msgstr "" + +#: reader.lua:202 +msgid "chooser will show up and let you select a file" +msgstr "" + +#: frontend/ui/widget/config.lua:20 frontend/ui/widget/config.lua:59 +msgid "chose selected item" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:24 +msgid "chose selected option" +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:43 +msgid "clear all external styles" +msgstr "" + +#: frontend/ui/widget/config.lua:425 +msgid "close config menu" +msgstr "" + +#: frontend/ui/widget/buttontable.lua:18 frontend/ui/widget/dict.lua:20 +#: frontend/ui/widget/infomessage.lua:18 +msgid "close dialog" +msgstr "" + +#: frontend/ui/readerui.lua:33 frontend/ui/readerui.lua:62 +msgid "close document" +msgstr "" + +#: frontend/ui/widget/menu.lua:349 +msgid "close menu" +msgstr "" + +#: frontend/ui/data/strings.lua:36 +msgid "darker" +msgstr "" + +#: frontend/ui/data/strings.lua:37 +msgid "darkest" +msgstr "" + +#: frontend/ui/data/strings.lua:31 +msgid "decrease" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:22 +msgid "decrease font size" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:30 +msgid "decrease line space" +msgstr "" + +#: frontend/ui/data/strings.lua:35 +msgid "default" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:41 +msgid "go to 11%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:43 +msgid "go to 22%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:45 +msgid "go to 33%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:47 +msgid "go to 44%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:49 +msgid "go to 55%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:51 +msgid "go to 66%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:53 +msgid "go to 77%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:55 +msgid "go to 88%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:57 +msgid "go to end" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:20 +msgid "go to next view" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:25 +msgid "go to previous view" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:39 +msgid "go to start" +msgstr "" + +#: frontend/ui/widget/menu.lua:351 +msgid "goto next page of the menu" +msgstr "" + +#: frontend/ui/widget/menu.lua:354 +msgid "goto previous page of the menu" +msgstr "" + +#: frontend/ui/data/strings.lua:39 +msgid "high" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:10 +msgid "highlight text" +msgstr "" + +#: frontend/ui/data/strings.lua:32 +msgid "increase" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:18 +msgid "increase font size" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:26 +msgid "increase line space" +msgstr "" + +#: frontend/ui/data/strings.lua:44 +msgid "landscape" +msgstr "" + +#: frontend/ui/data/strings.lua:30 +msgid "large" +msgstr "" + +#: frontend/ui/data/strings.lua:34 +msgid "lighter" +msgstr "" + +#: frontend/ui/data/strings.lua:33 +msgid "lightest" +msgstr "" + +#: frontend/ui/data/strings.lua:38 +msgid "low" +msgstr "" + +#: frontend/ui/data/strings.lua:27 +msgid "manual" +msgstr "" + +#: frontend/ui/data/strings.lua:29 +msgid "medium" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:35 +msgid "move view down" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:30 +msgid "move view up" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:20 +msgid "move visible area down" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:23 +msgid "move visible area left" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:26 +msgid "move visible area right" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:17 +msgid "move visible area up" +msgstr "" + +#: frontend/ui/widget/menu.lua:433 +msgid "no choices available" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:9 +msgid "no text" +msgstr "" + +#: frontend/ui/data/strings.lua:25 +msgid "off" +msgstr "" + +#: frontend/ui/data/strings.lua:24 +msgid "on" +msgstr "" + +#: frontend/ui/data/strings.lua:47 +msgid "page" +msgstr "" + +#: frontend/ui/widget/menu.lua:431 +msgid "page " +msgstr "" + +#: frontend/ui/data/strings.lua:43 +msgid "portrait" +msgstr "" + +#: frontend/ui/reader/readerrotation.lua:12 +msgid "rotate left by 90 degrees" +msgstr "" + +#: frontend/ui/reader/readerrotation.lua:16 +msgid "rotate right by 90 degrees" +msgstr "" + +#: frontend/ui/data/strings.lua:46 +msgid "scroll" +msgstr "" + +#: frontend/ui/widget/config.lua:429 frontend/ui/widget/menu.lua:363 +msgid "select current menu item" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:11 +msgid "show Table of Content menu" +msgstr "" + +#: frontend/ui/reader/readerbookmark.lua:13 +msgid "show bookmarks" +msgstr "" + +#: frontend/ui/reader/readerconfig.lua:53 +msgid "show config dialog" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:15 +msgid "show font menu" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:34 +msgid "show menu" +msgstr "" + +#: frontend/ui/data/strings.lua:28 +msgid "small" +msgstr "" + +#: frontend/ui/data/strings.lua:45 +msgid "toggle bold" +msgstr "" + +#: reader.lua:195 +msgid "usage: ./reader.lua [OPTION] ... path" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:15 +msgid "zoom in" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:20 +msgid "zoom out" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:30 +msgid "zoom to fit content" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:50 +msgid "zoom to fit content height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:40 +msgid "zoom to fit content width" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:25 +msgid "zoom to fit page" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:45 +msgid "zoom to fit page height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:35 +msgid "zoom to fit page width" +msgstr "" diff --git a/l10n/vi/koreader.po b/l10n/vi/koreader.po new file mode 100644 index 000000000..5d2490a82 --- /dev/null +++ b/l10n/vi/koreader.po @@ -0,0 +1,660 @@ +# KOReader PATH/TO/FILE.PO +# Copyright (C) 2005-2013 KOReader Development Team +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: KOReader\n" +"Report-Msgid-Bugs-To: https://github.com/koreader/koreader-base/issues\n" +"POT-Creation-Date: 2013-06-16 04:18+0000\n" +"PO-Revision-Date: 2013-07-26 10:26+0000\n" +"Last-Translator: chrox \n" +"Language-Team: Vietnamese (http://www.transifex.com/projects/p/koreader/language/vi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: vi\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: reader.lua:198 +msgid "-d start in debug mode" +msgstr "" + +#: reader.lua:199 +msgid "-h show this usage help" +msgstr "" + +#: frontend/ui/data/strings.lua:40 +msgid "0 deg" +msgstr "" + +#: frontend/ui/data/strings.lua:42 +msgid "10 deg" +msgstr "" + +#: frontend/ui/data/strings.lua:41 +msgid "5 deg" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:186 +msgid "Add Note" +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:49 +msgid "Auto" +msgstr "" + +#: frontend/ui/data/strings.lua:17 +msgid "Auto Straighten" +msgstr "" + +#: frontend/ui/inputevent.lua:347 +msgid "Auto-detected Kindle 2" +msgstr "" + +#: frontend/ui/inputevent.lua:343 +msgid "Auto-detected Kindle 3" +msgstr "" + +#: frontend/ui/inputevent.lua:339 +msgid "Auto-detected Kindle 4" +msgstr "" + +#: frontend/ui/inputevent.lua:345 +msgid "Auto-detected Kindle DXG" +msgstr "" + +#: frontend/ui/inputevent.lua:295 +msgid "Auto-detected Kindle PaperWhite" +msgstr "" + +#: frontend/ui/inputevent.lua:315 +msgid "Auto-detected Kindle Touch" +msgstr "" + +#: frontend/ui/reader/readerbookmark.lua:4 +msgid "Bookmarks" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:12 +msgid "Cancel" +msgstr "" + +#: frontend/ui/reader/readerhyphenation.lua:21 +msgid "Change Hyphenation to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:5 +msgid "Change font" +msgstr "" + +#: frontend/ui/data/strings.lua:8 +msgid "Columns" +msgstr "" + +#: frontend/ui/data/strings.lua:11 +msgid "Contrast" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:124 +msgid "Decrease font size to " +msgstr "" + +#: frontend/ui/reader/readerfrontlight.lua:42 +msgid "Decrease front light intensity to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:192 +msgid "Decrease gamma to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:163 +msgid "Decrease line space to " +msgstr "" + +#: frontend/ui/data/strings.lua:15 +msgid "Defect Size" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:97 +msgid "Delete" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:94 +msgid "Document menu" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:101 +msgid "Edit" +msgstr "" + +#: frontend/ui/data/strings.lua:22 +msgid "Embedded style" +msgstr "" + +#: reader.lua:88 +msgid "Exit" +msgstr "" + +#: reader.lua:150 +msgid "FileManager" +msgstr "" + +#: frontend/ui/data/strings.lua:10 +msgid "Fine Tuning" +msgstr "" + +#: frontend/ui/data/strings.lua:19 +msgid "Font weight" +msgstr "" + +#: frontend/ui/data/strings.lua:4 +msgid "Full Screen" +msgstr "" + +#: frontend/ui/data/strings.lua:20 +msgid "Gamma" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:61 +msgid "Help" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:182 +msgid "Highlight" +msgstr "" + +#: reader.lua:106 +msgid "Home menu" +msgstr "" + +#: frontend/ui/reader/readerhyphenation.lua:3 +msgid "Hyphenation" +msgstr "" + +#: reader.lua:204 +msgid "If you don't pass any path, the last viewed document will be opened" +msgstr "" + +#: reader.lua:201 +msgid "If you give the name of a directory instead of a file path, a file" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:126 +msgid "Increase font size to " +msgstr "" + +#: frontend/ui/reader/readerfrontlight.lua:38 +msgid "Increase front light intensity to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:189 +msgid "Increase gamma to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:167 +msgid "Increase line space to " +msgstr "" + +#: frontend/ui/data/strings.lua:18 +msgid "Indentation" +msgstr "" + +#: reader.lua:83 +msgid "Last documents" +msgstr "" + +#: frontend/ui/data/strings.lua:7 +msgid "Line Spacing" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:198 +msgid "More" +msgstr "" + +#: reader.lua:127 +msgid "No reader engine for this file" +msgstr "" + +#: frontend/ui/inputevent.lua:349 +msgid "Not supported device model!" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:11 +msgid "OK" +msgstr "" + +#: frontend/ui/widget/touchmenu.lua:338 +msgid "Page " +msgstr "" + +#: frontend/ui/data/strings.lua:3 +msgid "Page Crop" +msgstr "" + +#: frontend/ui/data/strings.lua:6 +msgid "Page Margin" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:64 +msgid "" +"Please report bugs to https://github.com/koreader/ koreader/issues, Click at" +" the bottom of the page for more options" +msgstr "" + +#: reader.lua:196 +msgid "Read all the books on your E-Ink reader" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:215 +msgid "Redrawing with font " +msgstr "" + +#: frontend/ui/data/koptoptions.lua:146 frontend/ui/data/strings.lua:12 +msgid "Reflow" +msgstr "" + +#: frontend/ui/data/strings.lua:16 +msgid "Render Quality" +msgstr "" + +#: frontend/ui/data/strings.lua:2 +msgid "Screen Mode" +msgstr "" + +#: frontend/ui/data/strings.lua:5 +msgid "Scroll Mode" +msgstr "" + +#: reader.lua:207 +msgid "See http://github.com/koreader/kindlepdfviewer for more info." +msgstr "" + +#: frontend/ui/widget/config.lua:15 frontend/ui/widget/touchmenu.lua:26 +msgid "Select Menu Item" +msgstr "" + +#: frontend/ui/widget/config.lua:54 frontend/ui/widget/config.lua:108 +msgid "Select Option Item" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:148 +msgid "Set font size to " +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:2 +msgid "Set render style" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:193 +msgid "Share" +msgstr "" + +#: reader.lua:18 +msgid "Show Home Menu" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:241 +msgid "Switch zoom mode" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:85 +msgid "Table of Contents" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:3 +msgid "Table of contents" +msgstr "" + +#: frontend/ui/widget/button.lua:58 +msgid "Tap Button" +msgstr "" + +#: frontend/ui/data/strings.lua:9 +msgid "Text Align" +msgstr "" + +#: reader.lua:206 +msgid "This software is licensed under the GPLv3." +msgstr "" + +#: frontend/ui/widget/toggleswitch.lua:58 +msgid "Toggle switch" +msgstr "" + +#: frontend/ui/data/strings.lua:13 +msgid "Vertical Text" +msgstr "" + +#: frontend/ui/data/strings.lua:21 +msgid "View mode" +msgstr "" + +#: frontend/ui/data/strings.lua:14 +msgid "Word Gap" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:260 +msgid "Zoom to fit content" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:248 +msgid "Zoom to fit content height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:244 +msgid "Zoom to fit content width" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:264 +msgid "Zoom to fit page" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:256 +msgid "Zoom to fit page height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:252 +msgid "Zoom to fit page width" +msgstr "" + +#: frontend/ui/data/strings.lua:26 +msgid "auto" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:23 +msgid "cancel" +msgstr "" + +#: reader.lua:202 +msgid "chooser will show up and let you select a file" +msgstr "" + +#: frontend/ui/widget/config.lua:20 frontend/ui/widget/config.lua:59 +msgid "chose selected item" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:24 +msgid "chose selected option" +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:43 +msgid "clear all external styles" +msgstr "" + +#: frontend/ui/widget/config.lua:425 +msgid "close config menu" +msgstr "" + +#: frontend/ui/widget/buttontable.lua:18 frontend/ui/widget/dict.lua:20 +#: frontend/ui/widget/infomessage.lua:18 +msgid "close dialog" +msgstr "" + +#: frontend/ui/readerui.lua:33 frontend/ui/readerui.lua:62 +msgid "close document" +msgstr "" + +#: frontend/ui/widget/menu.lua:349 +msgid "close menu" +msgstr "" + +#: frontend/ui/data/strings.lua:36 +msgid "darker" +msgstr "" + +#: frontend/ui/data/strings.lua:37 +msgid "darkest" +msgstr "" + +#: frontend/ui/data/strings.lua:31 +msgid "decrease" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:22 +msgid "decrease font size" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:30 +msgid "decrease line space" +msgstr "" + +#: frontend/ui/data/strings.lua:35 +msgid "default" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:41 +msgid "go to 11%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:43 +msgid "go to 22%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:45 +msgid "go to 33%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:47 +msgid "go to 44%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:49 +msgid "go to 55%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:51 +msgid "go to 66%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:53 +msgid "go to 77%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:55 +msgid "go to 88%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:57 +msgid "go to end" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:20 +msgid "go to next view" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:25 +msgid "go to previous view" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:39 +msgid "go to start" +msgstr "" + +#: frontend/ui/widget/menu.lua:351 +msgid "goto next page of the menu" +msgstr "" + +#: frontend/ui/widget/menu.lua:354 +msgid "goto previous page of the menu" +msgstr "" + +#: frontend/ui/data/strings.lua:39 +msgid "high" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:10 +msgid "highlight text" +msgstr "" + +#: frontend/ui/data/strings.lua:32 +msgid "increase" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:18 +msgid "increase font size" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:26 +msgid "increase line space" +msgstr "" + +#: frontend/ui/data/strings.lua:44 +msgid "landscape" +msgstr "" + +#: frontend/ui/data/strings.lua:30 +msgid "large" +msgstr "" + +#: frontend/ui/data/strings.lua:34 +msgid "lighter" +msgstr "" + +#: frontend/ui/data/strings.lua:33 +msgid "lightest" +msgstr "" + +#: frontend/ui/data/strings.lua:38 +msgid "low" +msgstr "" + +#: frontend/ui/data/strings.lua:27 +msgid "manual" +msgstr "" + +#: frontend/ui/data/strings.lua:29 +msgid "medium" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:35 +msgid "move view down" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:30 +msgid "move view up" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:20 +msgid "move visible area down" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:23 +msgid "move visible area left" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:26 +msgid "move visible area right" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:17 +msgid "move visible area up" +msgstr "" + +#: frontend/ui/widget/menu.lua:433 +msgid "no choices available" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:9 +msgid "no text" +msgstr "" + +#: frontend/ui/data/strings.lua:25 +msgid "off" +msgstr "" + +#: frontend/ui/data/strings.lua:24 +msgid "on" +msgstr "" + +#: frontend/ui/data/strings.lua:47 +msgid "page" +msgstr "" + +#: frontend/ui/widget/menu.lua:431 +msgid "page " +msgstr "" + +#: frontend/ui/data/strings.lua:43 +msgid "portrait" +msgstr "" + +#: frontend/ui/reader/readerrotation.lua:12 +msgid "rotate left by 90 degrees" +msgstr "" + +#: frontend/ui/reader/readerrotation.lua:16 +msgid "rotate right by 90 degrees" +msgstr "" + +#: frontend/ui/data/strings.lua:46 +msgid "scroll" +msgstr "" + +#: frontend/ui/widget/config.lua:429 frontend/ui/widget/menu.lua:363 +msgid "select current menu item" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:11 +msgid "show Table of Content menu" +msgstr "" + +#: frontend/ui/reader/readerbookmark.lua:13 +msgid "show bookmarks" +msgstr "" + +#: frontend/ui/reader/readerconfig.lua:53 +msgid "show config dialog" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:15 +msgid "show font menu" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:34 +msgid "show menu" +msgstr "" + +#: frontend/ui/data/strings.lua:28 +msgid "small" +msgstr "" + +#: frontend/ui/data/strings.lua:45 +msgid "toggle bold" +msgstr "" + +#: reader.lua:195 +msgid "usage: ./reader.lua [OPTION] ... path" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:15 +msgid "zoom in" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:20 +msgid "zoom out" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:30 +msgid "zoom to fit content" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:50 +msgid "zoom to fit content height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:40 +msgid "zoom to fit content width" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:25 +msgid "zoom to fit page" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:45 +msgid "zoom to fit page height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:35 +msgid "zoom to fit page width" +msgstr "" diff --git a/l10n/vi_VN/koreader.po b/l10n/vi_VN/koreader.po new file mode 100644 index 000000000..43b6e1800 --- /dev/null +++ b/l10n/vi_VN/koreader.po @@ -0,0 +1,660 @@ +# KOReader PATH/TO/FILE.PO +# Copyright (C) 2005-2013 KOReader Development Team +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: KOReader\n" +"Report-Msgid-Bugs-To: https://github.com/koreader/koreader-base/issues\n" +"POT-Creation-Date: 2013-06-16 04:18+0000\n" +"PO-Revision-Date: 2013-07-26 10:26+0000\n" +"Last-Translator: chrox \n" +"Language-Team: Vietnamese (Viet Nam) (http://www.transifex.com/projects/p/koreader/language/vi_VN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: vi_VN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: reader.lua:198 +msgid "-d start in debug mode" +msgstr "" + +#: reader.lua:199 +msgid "-h show this usage help" +msgstr "" + +#: frontend/ui/data/strings.lua:40 +msgid "0 deg" +msgstr "" + +#: frontend/ui/data/strings.lua:42 +msgid "10 deg" +msgstr "" + +#: frontend/ui/data/strings.lua:41 +msgid "5 deg" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:186 +msgid "Add Note" +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:49 +msgid "Auto" +msgstr "" + +#: frontend/ui/data/strings.lua:17 +msgid "Auto Straighten" +msgstr "" + +#: frontend/ui/inputevent.lua:347 +msgid "Auto-detected Kindle 2" +msgstr "" + +#: frontend/ui/inputevent.lua:343 +msgid "Auto-detected Kindle 3" +msgstr "" + +#: frontend/ui/inputevent.lua:339 +msgid "Auto-detected Kindle 4" +msgstr "" + +#: frontend/ui/inputevent.lua:345 +msgid "Auto-detected Kindle DXG" +msgstr "" + +#: frontend/ui/inputevent.lua:295 +msgid "Auto-detected Kindle PaperWhite" +msgstr "" + +#: frontend/ui/inputevent.lua:315 +msgid "Auto-detected Kindle Touch" +msgstr "" + +#: frontend/ui/reader/readerbookmark.lua:4 +msgid "Bookmarks" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:12 +msgid "Cancel" +msgstr "" + +#: frontend/ui/reader/readerhyphenation.lua:21 +msgid "Change Hyphenation to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:5 +msgid "Change font" +msgstr "" + +#: frontend/ui/data/strings.lua:8 +msgid "Columns" +msgstr "" + +#: frontend/ui/data/strings.lua:11 +msgid "Contrast" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:124 +msgid "Decrease font size to " +msgstr "" + +#: frontend/ui/reader/readerfrontlight.lua:42 +msgid "Decrease front light intensity to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:192 +msgid "Decrease gamma to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:163 +msgid "Decrease line space to " +msgstr "" + +#: frontend/ui/data/strings.lua:15 +msgid "Defect Size" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:97 +msgid "Delete" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:94 +msgid "Document menu" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:101 +msgid "Edit" +msgstr "" + +#: frontend/ui/data/strings.lua:22 +msgid "Embedded style" +msgstr "" + +#: reader.lua:88 +msgid "Exit" +msgstr "" + +#: reader.lua:150 +msgid "FileManager" +msgstr "" + +#: frontend/ui/data/strings.lua:10 +msgid "Fine Tuning" +msgstr "" + +#: frontend/ui/data/strings.lua:19 +msgid "Font weight" +msgstr "" + +#: frontend/ui/data/strings.lua:4 +msgid "Full Screen" +msgstr "" + +#: frontend/ui/data/strings.lua:20 +msgid "Gamma" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:61 +msgid "Help" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:182 +msgid "Highlight" +msgstr "" + +#: reader.lua:106 +msgid "Home menu" +msgstr "" + +#: frontend/ui/reader/readerhyphenation.lua:3 +msgid "Hyphenation" +msgstr "" + +#: reader.lua:204 +msgid "If you don't pass any path, the last viewed document will be opened" +msgstr "" + +#: reader.lua:201 +msgid "If you give the name of a directory instead of a file path, a file" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:126 +msgid "Increase font size to " +msgstr "" + +#: frontend/ui/reader/readerfrontlight.lua:38 +msgid "Increase front light intensity to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:189 +msgid "Increase gamma to " +msgstr "" + +#: frontend/ui/reader/readerfont.lua:167 +msgid "Increase line space to " +msgstr "" + +#: frontend/ui/data/strings.lua:18 +msgid "Indentation" +msgstr "" + +#: reader.lua:83 +msgid "Last documents" +msgstr "" + +#: frontend/ui/data/strings.lua:7 +msgid "Line Spacing" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:198 +msgid "More" +msgstr "" + +#: reader.lua:127 +msgid "No reader engine for this file" +msgstr "" + +#: frontend/ui/inputevent.lua:349 +msgid "Not supported device model!" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:11 +msgid "OK" +msgstr "" + +#: frontend/ui/widget/touchmenu.lua:338 +msgid "Page " +msgstr "" + +#: frontend/ui/data/strings.lua:3 +msgid "Page Crop" +msgstr "" + +#: frontend/ui/data/strings.lua:6 +msgid "Page Margin" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:64 +msgid "" +"Please report bugs to https://github.com/koreader/ koreader/issues, Click at" +" the bottom of the page for more options" +msgstr "" + +#: reader.lua:196 +msgid "Read all the books on your E-Ink reader" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:215 +msgid "Redrawing with font " +msgstr "" + +#: frontend/ui/data/koptoptions.lua:146 frontend/ui/data/strings.lua:12 +msgid "Reflow" +msgstr "" + +#: frontend/ui/data/strings.lua:16 +msgid "Render Quality" +msgstr "" + +#: frontend/ui/data/strings.lua:2 +msgid "Screen Mode" +msgstr "" + +#: frontend/ui/data/strings.lua:5 +msgid "Scroll Mode" +msgstr "" + +#: reader.lua:207 +msgid "See http://github.com/koreader/kindlepdfviewer for more info." +msgstr "" + +#: frontend/ui/widget/config.lua:15 frontend/ui/widget/touchmenu.lua:26 +msgid "Select Menu Item" +msgstr "" + +#: frontend/ui/widget/config.lua:54 frontend/ui/widget/config.lua:108 +msgid "Select Option Item" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:148 +msgid "Set font size to " +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:2 +msgid "Set render style" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:193 +msgid "Share" +msgstr "" + +#: reader.lua:18 +msgid "Show Home Menu" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:241 +msgid "Switch zoom mode" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:85 +msgid "Table of Contents" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:3 +msgid "Table of contents" +msgstr "" + +#: frontend/ui/widget/button.lua:58 +msgid "Tap Button" +msgstr "" + +#: frontend/ui/data/strings.lua:9 +msgid "Text Align" +msgstr "" + +#: reader.lua:206 +msgid "This software is licensed under the GPLv3." +msgstr "" + +#: frontend/ui/widget/toggleswitch.lua:58 +msgid "Toggle switch" +msgstr "" + +#: frontend/ui/data/strings.lua:13 +msgid "Vertical Text" +msgstr "" + +#: frontend/ui/data/strings.lua:21 +msgid "View mode" +msgstr "" + +#: frontend/ui/data/strings.lua:14 +msgid "Word Gap" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:260 +msgid "Zoom to fit content" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:248 +msgid "Zoom to fit content height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:244 +msgid "Zoom to fit content width" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:264 +msgid "Zoom to fit page" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:256 +msgid "Zoom to fit page height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:252 +msgid "Zoom to fit page width" +msgstr "" + +#: frontend/ui/data/strings.lua:26 +msgid "auto" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:23 +msgid "cancel" +msgstr "" + +#: reader.lua:202 +msgid "chooser will show up and let you select a file" +msgstr "" + +#: frontend/ui/widget/config.lua:20 frontend/ui/widget/config.lua:59 +msgid "chose selected item" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:24 +msgid "chose selected option" +msgstr "" + +#: frontend/ui/reader/readertypeset.lua:43 +msgid "clear all external styles" +msgstr "" + +#: frontend/ui/widget/config.lua:425 +msgid "close config menu" +msgstr "" + +#: frontend/ui/widget/buttontable.lua:18 frontend/ui/widget/dict.lua:20 +#: frontend/ui/widget/infomessage.lua:18 +msgid "close dialog" +msgstr "" + +#: frontend/ui/readerui.lua:33 frontend/ui/readerui.lua:62 +msgid "close document" +msgstr "" + +#: frontend/ui/widget/menu.lua:349 +msgid "close menu" +msgstr "" + +#: frontend/ui/data/strings.lua:36 +msgid "darker" +msgstr "" + +#: frontend/ui/data/strings.lua:37 +msgid "darkest" +msgstr "" + +#: frontend/ui/data/strings.lua:31 +msgid "decrease" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:22 +msgid "decrease font size" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:30 +msgid "decrease line space" +msgstr "" + +#: frontend/ui/data/strings.lua:35 +msgid "default" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:41 +msgid "go to 11%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:43 +msgid "go to 22%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:45 +msgid "go to 33%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:47 +msgid "go to 44%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:49 +msgid "go to 55%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:51 +msgid "go to 66%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:53 +msgid "go to 77%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:55 +msgid "go to 88%" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:57 +msgid "go to end" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:20 +msgid "go to next view" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:25 +msgid "go to previous view" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:39 +msgid "go to start" +msgstr "" + +#: frontend/ui/widget/menu.lua:351 +msgid "goto next page of the menu" +msgstr "" + +#: frontend/ui/widget/menu.lua:354 +msgid "goto previous page of the menu" +msgstr "" + +#: frontend/ui/data/strings.lua:39 +msgid "high" +msgstr "" + +#: frontend/ui/reader/readerhighlight.lua:10 +msgid "highlight text" +msgstr "" + +#: frontend/ui/data/strings.lua:32 +msgid "increase" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:18 +msgid "increase font size" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:26 +msgid "increase line space" +msgstr "" + +#: frontend/ui/data/strings.lua:44 +msgid "landscape" +msgstr "" + +#: frontend/ui/data/strings.lua:30 +msgid "large" +msgstr "" + +#: frontend/ui/data/strings.lua:34 +msgid "lighter" +msgstr "" + +#: frontend/ui/data/strings.lua:33 +msgid "lightest" +msgstr "" + +#: frontend/ui/data/strings.lua:38 +msgid "low" +msgstr "" + +#: frontend/ui/data/strings.lua:27 +msgid "manual" +msgstr "" + +#: frontend/ui/data/strings.lua:29 +msgid "medium" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:35 +msgid "move view down" +msgstr "" + +#: frontend/ui/reader/readerrolling.lua:30 +msgid "move view up" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:20 +msgid "move visible area down" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:23 +msgid "move visible area left" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:26 +msgid "move visible area right" +msgstr "" + +#: frontend/ui/reader/readerpanning.lua:17 +msgid "move visible area up" +msgstr "" + +#: frontend/ui/widget/menu.lua:433 +msgid "no choices available" +msgstr "" + +#: frontend/ui/widget/confirmbox.lua:9 +msgid "no text" +msgstr "" + +#: frontend/ui/data/strings.lua:25 +msgid "off" +msgstr "" + +#: frontend/ui/data/strings.lua:24 +msgid "on" +msgstr "" + +#: frontend/ui/data/strings.lua:47 +msgid "page" +msgstr "" + +#: frontend/ui/widget/menu.lua:431 +msgid "page " +msgstr "" + +#: frontend/ui/data/strings.lua:43 +msgid "portrait" +msgstr "" + +#: frontend/ui/reader/readerrotation.lua:12 +msgid "rotate left by 90 degrees" +msgstr "" + +#: frontend/ui/reader/readerrotation.lua:16 +msgid "rotate right by 90 degrees" +msgstr "" + +#: frontend/ui/data/strings.lua:46 +msgid "scroll" +msgstr "" + +#: frontend/ui/widget/config.lua:429 frontend/ui/widget/menu.lua:363 +msgid "select current menu item" +msgstr "" + +#: frontend/ui/reader/readertoc.lua:11 +msgid "show Table of Content menu" +msgstr "" + +#: frontend/ui/reader/readerbookmark.lua:13 +msgid "show bookmarks" +msgstr "" + +#: frontend/ui/reader/readerconfig.lua:53 +msgid "show config dialog" +msgstr "" + +#: frontend/ui/reader/readerfont.lua:15 +msgid "show font menu" +msgstr "" + +#: frontend/ui/reader/readermenu.lua:34 +msgid "show menu" +msgstr "" + +#: frontend/ui/data/strings.lua:28 +msgid "small" +msgstr "" + +#: frontend/ui/data/strings.lua:45 +msgid "toggle bold" +msgstr "" + +#: reader.lua:195 +msgid "usage: ./reader.lua [OPTION] ... path" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:15 +msgid "zoom in" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:20 +msgid "zoom out" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:30 +msgid "zoom to fit content" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:50 +msgid "zoom to fit content height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:40 +msgid "zoom to fit content width" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:25 +msgid "zoom to fit page" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:45 +msgid "zoom to fit page height" +msgstr "" + +#: frontend/ui/reader/readerzooming.lua:35 +msgid "zoom to fit page width" +msgstr "" From bbd287d26435c50e097def18c11f7e2162104412 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Thu, 26 Sep 2013 01:06:10 -0400 Subject: [PATCH 15/18] update readmes --- README.md | 4 +++- l10n/README.md | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 l10n/README.md diff --git a/README.md b/README.md index d52357037..1ca04dbfc 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,9 @@ OS. Windows users are suggested to develop in a Linux VM or use andLinux, Wubi. To get and compile the source you must have `patch`, `wget`, `unzip`, `git`, -`svn` and `cmake` installed. +`svn`, `autoconf` and `cmake` installed. + +Version of autoconf need to be greater than 2.64. You might also need SDL library packages if you want to compile and run the PC emulator. Fedora users can install `SDL` and `SDL-devel`. Ubuntu users can diff --git a/l10n/README.md b/l10n/README.md new file mode 100644 index 000000000..49f95a5ec --- /dev/null +++ b/l10n/README.md @@ -0,0 +1,8 @@ +# How to sync this folder with transifex + +1. install transifex client. For example: `apt-get install transifex-client`. + +2. configure the client: + http://support.transifex.com/customer/portal/articles/1000855-configuring-the-client + +3. pull changes from transifex: `make update` From ffd31613a5b731598f11f9473fb40f972b175b17 Mon Sep 17 00:00:00 2001 From: chrox Date: Thu, 26 Sep 2013 14:51:27 +0800 Subject: [PATCH 16/18] estimate cache size of koptcontext This should fix #285. --- frontend/document/koptinterface.lua | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/document/koptinterface.lua b/frontend/document/koptinterface.lua index 1fa2f01a1..7726174a4 100644 --- a/frontend/document/koptinterface.lua +++ b/frontend/document/koptinterface.lua @@ -8,6 +8,8 @@ KoptInterface = { tessocr_data = "data", ocr_lang = "eng", ocr_type = 3, -- default 0, for more accuracy use 3 + last_context_size = nil, + default_context_size = 1024*1024, } ContextCacheItem = CacheItem:new{} @@ -253,11 +255,18 @@ function KoptInterface:getCachedContext(doc, pageno) --self:logReflowDuration(pageno, dur) local fullwidth, fullheight = kc:getPageDim() DEBUG("reflowed page", pageno, "fullwidth:", fullwidth, "fullheight:", fullheight) - Cache:insert(kctx_hash, ContextCacheItem:new{ kctx = kc }) + self.last_context_size = fullwidth * fullheight + 128 -- estimation + Cache:insert(kctx_hash, ContextCacheItem:new{ + size = self.last_context_size, + kctx = kc + }) return kc else -- wait for background thread - return self:waitForContext(cached.kctx) + local kc = self:waitForContext(cached.kctx) + local fullwidth, fullheight = kc:getPageDim() + self.last_context_size = fullwidth * fullheight + 128 -- estimation + return kc end end @@ -325,7 +334,10 @@ function KoptInterface:hintPage(doc, pageno, zoom, rotation, gamma, render_mode) kc:setPreCache() page:reflow(kc, 0) page:close() - Cache:insert(kctx_hash, ContextCacheItem:new{ kctx = kc }) + Cache:insert(kctx_hash, ContextCacheItem:new{ + size = self.last_context_size or self.default_context_size, + kctx = kc, + }) end end From 5cab12dfc1e8a86dc52c886a8f4370369162bdee Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sun, 29 Sep 2013 21:30:14 +0200 Subject: [PATCH 17/18] Startup script tweaks. Make the user's custom fonts available to Koreader. Handle both SyV & upstart properly Handle the 'no framework' mode on upstart systems, even through KUAL. Plug the 'no framework' mode to the KUAL extension. This is a mix of some stuff I completely forgot I had in my tree, and what Aeris did for http://www.mobileread.com/forums/showthread.php?t=223684 Tested on a Touch. --- extensions/koreader/config.xml | 2 +- extensions/koreader/menu.json | 29 ++++++++-- koreader.sh | 96 ++++++++++++++++++++++++++++------ 3 files changed, 107 insertions(+), 20 deletions(-) diff --git a/extensions/koreader/config.xml b/extensions/koreader/config.xml index cf18e6b4c..2bf4a2da3 100644 --- a/extensions/koreader/config.xml +++ b/extensions/koreader/config.xml @@ -2,7 +2,7 @@ Koreader - 0.0 + 0.1 Koreader dev team helper diff --git a/extensions/koreader/menu.json b/extensions/koreader/menu.json index 02ee707ff..99b808488 100644 --- a/extensions/koreader/menu.json +++ b/extensions/koreader/menu.json @@ -1,12 +1,33 @@ { "items": [ - { + { "name": "Koreader", "priority": 0, "items": [ - {"name": "Start in documents", "priority": 1, "action": "/mnt/us/koreader/koreader.sh", "params": "/mnt/us/documents"}, - {"name": "Open last document", "priority": 2, "action": "/mnt/us/koreader/koreader.sh"} - ] + { + "name": "Start in documents", + "priority": 1, + "action": "/mnt/us/koreader/koreader.sh", + "params": "/mnt/us/documents" + }, + { + "name": "Open last document", + "priority": 2, + "action": "/mnt/us/koreader/koreader.sh" + }, + { + "name": "Start without framework", + "priority": 3, + "action": "/mnt/us/koreader/koreader.sh", + "params": "--framework_stop /mnt/us/documents" + }, + { + "name": "Open last document without framework", + "priority": 4, + "action": "/mnt/us/koreader/koreader.sh", + "params": "--framework_stop" } + ] + } ] } diff --git a/koreader.sh b/koreader.sh index f10015fc7..d5251e470 100755 --- a/koreader.sh +++ b/koreader.sh @@ -3,11 +3,29 @@ export LC_ALL="en_US.UTF-8" PROC_KEYPAD="/proc/keypad" PROC_FIVEWAY="/proc/fiveway" -test -e $PROC_KEYPAD && echo unlock > $PROC_KEYPAD -test -e $PROC_FIVEWAY && echo unlock > $PROC_FIVEWAY +[ -e $PROC_KEYPAD ] && echo unlock > $PROC_KEYPAD +[ -e $PROC_FIVEWAY ] && echo unlock > $PROC_FIVEWAY + +# By default, don't stop the framework. +if [ "$1" == "--framework_stop" ] ; then + shift 1 + STOP_FRAMEWORK="yes" + # Yield a bit to let stuff stop properly... + echo "Stopping framework . . ." + sleep 2 +else + STOP_FRAMEWORK="no" +fi + +# Check which type of init system we're using +if [ -d /etc/upstart ] ; then + INIT_TYPE="upstart" +else + INIT_TYPE="sysv" +fi # we're always starting from our working directory -cd /mnt/us/koreader/ +cd /mnt/us/koreader # export trained OCR data directory export TESSDATA_PREFIX="data" @@ -16,20 +34,45 @@ export TESSDATA_PREFIX="data" export STARDICT_DATA_DIR="data/dict" # bind-mount system fonts -if ! grep /mnt/us/koreader/fonts/host /proc/mounts; then +if ! grep /mnt/us/koreader/fonts/host /proc/mounts ; then mount -o bind /usr/java/lib/fonts /mnt/us/koreader/fonts/host fi +# bind-mount altfonts +if [ -d /mnt/us/fonts ] ; then + mkdir -p /mnt/us/koreader/fonts/altfonts + if ! grep /mnt/us/koreader/fonts/altfonts /proc/mounts ; then + mount -o bind /mnt/us/fonts /mnt/us/koreader/fonts/altfonts + fi +fi + +# bind-mount linkfonts +if [ -d /mnt/us/linkfonts/fonts ] ; then + mkdir -p /mnt/us/koreader/fonts/linkfonts + if ! grep /mnt/us/koreader/fonts/linkfonts /proc/mounts ; then + mount -o bind /mnt/us/linkfonts/fonts /mnt/us/koreader/fonts/linkfonts + fi +fi + # check if we are supposed to shut down the Amazon framework -if test "$1" == "--framework_stop"; then - shift 1 - /etc/init.d/framework stop +if [ "${STOP_FRAMEWORK}" == "yes" ]; then + # Upstart or SysV? + if [ "${INIT_TYPE}" == "sysv" ] ; then + /etc/init.d/framework stop + else + # The framework job sends a SIGTERM on stop, trap it so we don't get killed if we were launched by KUAL + trap "" SIGTERM + stop lab126_gui + fi fi # check if kpvbooklet was launched for more than once, if not we will disable pillow -count=`lipc-get-prop -eiq com.github.koreader.kpvbooklet.timer count` -if [ "$count" == "" -o "$count" == "0" ]; then - lipc-set-prop com.lab126.pillow disableEnablePillow disable +# there's no pillow if we stopped the framework, and it's only there on systems with upstart anyway +if [ "${STOP_FRAMEWORK}" == "no" -a "${INIT_TYPE}" == "upstart" ] ; then + count=`lipc-get-prop -eiq com.github.koreader.kpvbooklet.timer count` + if [ "$count" == "" -o "$count" == "0" ]; then + lipc-set-prop com.lab126.pillow disableEnablePillow disable + fi fi # stop cvm @@ -39,16 +82,39 @@ fi ./reader.lua "$@" 2> crash.log # clean up forked process in case the reader crashed -killall reader.lua +if [ "${INIT_TYPE}" == "sysv" ] ; then + killall -TERM reader.lua +else + # We trapped SIGTERM, remember? ;) + killall -KILL reader.lua +fi # unmount system fonts -if grep /mnt/us/koreader/fonts/host /proc/mounts; then +if grep /mnt/us/koreader/fonts/host /proc/mounts ; then umount /mnt/us/koreader/fonts/host fi +# unmount altfonts +if grep /mnt/us/koreader/fonts/altfonts /proc/mounts ; then + umount /mnt/us/koreader/fonts/altfonts +fi + +# unmount linkfonts +if grep /mnt/us/koreader/fonts/linkfonts /proc/mounts ; then + umount /mnt/us/koreader/fonts/linkfonts +fi + # always try to continue cvm -killall -cont cvm || /etc/init.d/framework start +if ! killall -cont cvm ; then + if [ "${INIT_TYPE}" == "sysv" ] ; then + /etc/init.d/framework start + else + start lab126_gui + fi +fi -# display chrome bar -lipc-set-prop com.lab126.pillow disableEnablePillow enable +# display chrome bar (upstart & framework up only) +if [ "${STOP_FRAMEWORK}" == "no" -a "${INIT_TYPE}" == "upstart" ] ; then + lipc-set-prop com.lab126.pillow disableEnablePillow enable +fi From de119c66262f41b7de06f7962a349b1ec9b7b38d Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sun, 29 Sep 2013 21:54:23 +0200 Subject: [PATCH 18/18] Minor startup script tweaks. Try to SIGSTOP cvm on sysv systems, like kpv Tweak the wording of the KUAL buttons a bit --- extensions/koreader/menu.json | 8 ++++---- koreader.sh | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/extensions/koreader/menu.json b/extensions/koreader/menu.json index 99b808488..4c5a99892 100644 --- a/extensions/koreader/menu.json +++ b/extensions/koreader/menu.json @@ -5,24 +5,24 @@ "priority": 0, "items": [ { - "name": "Start in documents", + "name": "Start the filemanager", "priority": 1, "action": "/mnt/us/koreader/koreader.sh", "params": "/mnt/us/documents" }, { - "name": "Open last document", + "name": "Open the last document", "priority": 2, "action": "/mnt/us/koreader/koreader.sh" }, { - "name": "Start without framework", + "name": "Start the filemanager (no framework)", "priority": 3, "action": "/mnt/us/koreader/koreader.sh", "params": "--framework_stop /mnt/us/documents" }, { - "name": "Open last document without framework", + "name": "Open the last document (no framework)", "priority": 4, "action": "/mnt/us/koreader/koreader.sh", "params": "--framework_stop" diff --git a/koreader.sh b/koreader.sh index d5251e470..e6aa5463c 100755 --- a/koreader.sh +++ b/koreader.sh @@ -75,8 +75,10 @@ if [ "${STOP_FRAMEWORK}" == "no" -a "${INIT_TYPE}" == "upstart" ] ; then fi fi -# stop cvm -#killall -stop cvm +# stop cvm (sysv & framework up only) +if [ "${STOP_FRAMEWORK}" == "no" -a "${INIT_TYPE}" == "sysv" ] ; then + killall -stop cvm +fi # finally call reader ./reader.lua "$@" 2> crash.log