wikipedia: fix languages rotation and query

Fix innacurate language query and rotation when back from nested lookups.
More informative lookup message (langage used, search or full page)
Allow for screen refresh with diagonal swipe (like in readerpaging).
This commit is contained in:
poire-z
2017-01-01 10:34:21 +01:00
committed by Qingping Hou
parent ebe0c08bfb
commit 130f7b0773
2 changed files with 44 additions and 5 deletions

View File

@@ -11,7 +11,6 @@ local ReaderWikipedia = ReaderDictionary:extend{
is_wiki = true,
wiki_languages = {},
no_page = _("No wiki page found."),
lookup_msg = _("Searching Wikipedia for:\n%1")
}
function ReaderWikipedia:init()
@@ -88,6 +87,13 @@ function ReaderWikipedia:onLookupWikipedia(word, box, get_fullpage)
if word == "" then
return
end
-- Fix lookup message to include lang
if get_fullpage then
self.lookup_msg = T(_("Getting Wikipedia %2 page:\n%1"), "%1", lang:upper())
else
self.lookup_msg = T(_("Searching Wikipedia %2 for:\n%1"), "%1", lang:upper())
end
self:onLookupStarted(word)
local results = {}
local ok, pages