Removed a bunch of "successfully", replaced an ellipsis, and some deviant spellings of KOReader.

pull/1973/head
Frans de Jonge 8 years ago
parent 6f02b2ca2a
commit 5638819f25

@ -149,7 +149,7 @@ DDICT_FONT_SIZE = 20
-- e.g. 2 changes the sensitivity by 1/2, 3 by 1/3 etc. -- e.g. 2 changes the sensitivity by 1/2, 3 by 1/3 etc.
FRONTLIGHT_SENSITIVITY_DECREASE = 2 FRONTLIGHT_SENSITIVITY_DECREASE = 2
-- Normally, Koreader will present file lists sorted in case insensitive manner -- Normally, KOReader will present file lists sorted in case insensitive manner
-- when presenting an alphatically sorted list. So the Order is "A, b, C, d". -- when presenting an alphatically sorted list. So the Order is "A, b, C, d".
-- You can switch to a case sensitive sort ("A", "C", "b", "d") by disabling -- You can switch to a case sensitive sort ("A", "C", "b", "d") by disabling
-- insensitive sort -- insensitive sort

@ -322,7 +322,7 @@ function FileManager:deleteFile(file)
os.remove(legacy_history_file) os.remove(legacy_history_file)
end end
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
text = util.template(_("Successfully deleted %1"), file), text = util.template(_("Deleted %1"), file),
timeout = 2, timeout = 2,
}) })
else else
@ -350,7 +350,7 @@ function FileManager:renameFile(file)
end end
if move_history then if move_history then
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
text = util.template(_("Successfully renamed from %1 to %2"), file, dest), text = util.template(_("Renamed from %1 to %2"), file, dest),
timeout = 2, timeout = 2,
}) })
else else

@ -85,7 +85,7 @@ end
function DocSettings:flush() function DocSettings:flush()
-- write serialized version of the data table into -- write serialized version of the data table into
-- i) history directory in root directory of koreader -- i) history directory in root directory of KOReader
-- ii) sidecar directory in the same directory of the document -- ii) sidecar directory in the same directory of the document
if not self.history_file and not self.sidecar_file then if not self.history_file and not self.sidecar_file then
return return

@ -100,14 +100,14 @@ function Document:discardChange()
end end
-- calculate partial digest of the document -- calculate partial digest of the document
-- since only PDF documents could be modified by koreader by appending data -- since only PDF documents could be modified by KOReader by appending data
-- at the end of the files when highlighting, we use a non-even sampling -- at the end of the files when highlighting, we use a non-even sampling
-- algorithm which samples with larger weight at file head and much smaller -- algorithm which samples with larger weight at file head and much smaller
-- weight at file tail, thus reduces the probability that appended data may change -- weight at file tail, thus reduces the probability that appended data may change
-- the digest value. -- the digest value.
-- Note that if PDF file size is around 1024, 4096, 16384, 65536, 262144 -- Note that if PDF file size is around 1024, 4096, 16384, 65536, 262144
-- 1048576, 4194304, 16777216, 67108864, 268435456 or 1073741824, appending data -- 1048576, 4194304, 16777216, 67108864, 268435456 or 1073741824, appending data
-- by highlighting in koreader may change the digest value. -- by highlighting in KOReader may change the digest value.
function Document:fastDigest() function Document:fastDigest()
local md5 = require("ffi/MD5") local md5 = require("ffi/MD5")
local lshift = bit.lshift local lshift = bit.lshift

@ -476,9 +476,9 @@ function OPDSBrowser:downloadFile(item, format, remote_url)
} }
if c == 200 then if c == 200 then
DEBUG("file downloaded successfully to", local_path) DEBUG("file downloaded to", local_path)
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
text = _("File successfully saved to:\n") .. local_path, text = _("File saved to:\n") .. local_path,
timeout = 3, timeout = 3,
}) })
else else
@ -511,7 +511,7 @@ function OPDSBrowser:showDownloads(item)
end) end)
UIManager:close(self.download_dialog) UIManager:close(self.download_dialog)
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
text = _("Downloading may take several minutes..."), text = _("Downloading may take several minutes"),
timeout = 3, timeout = 3,
}) })
end end

@ -212,7 +212,7 @@ function EvernoteExporter:doLogin(username, password)
self.evernote_token = token self.evernote_token = token
self.notebook_guid = guid self.notebook_guid = guid
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
text = _("Logged in to Evernote successfully."), text = _("Logged in to Evernote."),
}) })
end end

@ -177,7 +177,7 @@ function KOSync:doRegister(username, password)
self.kosync_username = username self.kosync_username = username
self.kosync_userkey = userkey self.kosync_userkey = userkey
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
text = _("Registered to KOReader server successfully."), text = _("Registered to KOReader server."),
}) })
else else
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
@ -207,7 +207,7 @@ function KOSync:doLogin(username, password)
self.kosync_username = username self.kosync_username = username
self.kosync_userkey = userkey self.kosync_userkey = userkey
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{
text = _("Logged in to KOReader server successfully."), text = _("Logged in to KOReader server."),
}) })
else else
UIManager:show(InfoMessage:new{ UIManager:show(InfoMessage:new{

@ -128,10 +128,10 @@ if Device:isKobo() then
-- default powerd.is_fl_on is false, turn it on -- default powerd.is_fl_on is false, turn it on
powerd:toggleFrontlight() powerd:toggleFrontlight()
else else
-- the light can still be turned on manually outside of koreader -- the light can still be turned on manually outside of KOReader
-- or nickel. so we always set the intensity to 0 here to keep it -- or Nickel. so we always set the intensity to 0 here to keep it
-- in sync with powerd.is_fl_on (false by default) -- in sync with powerd.is_fl_on (false by default)
-- NOTE: we cant use setIntensity method here because for kobo the -- NOTE: we cant use setIntensity method here because for Kobo the
-- min intensity is 1 :( -- min intensity is 1 :(
powerd.fl:setBrightness(0) powerd.fl:setBrightness(0)
end end

@ -55,7 +55,7 @@ describe("FileManager module", function()
assert.is_not_nil(lfs.attributes(tmp_history)) assert.is_not_nil(lfs.attributes(tmp_history))
UIManager.show = function(self, w) UIManager.show = function(self, w)
assert.Equals(w.text, "Successfully deleted "..tmp_fn) assert.Equals(w.text, "Deleted "..tmp_fn)
end end
filemanager:deleteFile(tmp_fn) filemanager:deleteFile(tmp_fn)
UIManager.show = old_show UIManager.show = old_show
@ -90,7 +90,7 @@ describe("FileManager module", function()
assert.is_not_nil(lfs.attributes(tmp_history)) assert.is_not_nil(lfs.attributes(tmp_history))
UIManager.show = function(self, w) UIManager.show = function(self, w)
assert.Equals(w.text, "Successfully deleted "..tmp_fn) assert.Equals(w.text, "Deleted "..tmp_fn)
end end
filemanager:deleteFile(tmp_fn) filemanager:deleteFile(tmp_fn)
UIManager.show = old_show UIManager.show = old_show

@ -14,12 +14,12 @@ describe("util module", function()
end) end)
it("should split string with patterns", function() it("should split string with patterns", function()
local sentence = "Hello world, welcome to KoReader!" local sentence = "Hello world, welcome to KOReader!"
local words = {} local words = {}
for word in util.gsplit(sentence, "%s+", false) do for word in util.gsplit(sentence, "%s+", false) do
table.insert(words, word) table.insert(words, word)
end end
assert.are_same(words, {"Hello", "world,", "welcome", "to", "KoReader!"}) assert.are_same(words, {"Hello", "world,", "welcome", "to", "KOReader!"})
end) end)
it("should split command line arguments with quotation", function() it("should split command line arguments with quotation", function()

Loading…
Cancel
Save