mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Dictionary and wikipedia enhancements (#2393)
Stardict:
- remove duplicate results
- better cleaning of selection
- append results from a 2nd query of a 2nd set of dictionaries
in data/dict_ext/
Wikipedia:
- use the search API for better results
- allow viewing the full page content of a result in a bigger window
- allow queries for multiple languages
- available languages can be set in settings.reader.lua :
["wikipedia_languages"] = {"en", "fr", "it"}
- "Wikipedia lookup" added to Tools menu
For both:
- allow selection of multiple words for a new lookup (so one can
actually browse wikipedia)
- allow continuous reading with Tap
- display "current result / total number of results"
Details in #2393
This commit is contained in:
@@ -494,8 +494,7 @@ function ReaderHighlight:onHighlightDictLookup()
|
||||
DEBUG("dictionary lookup highlight")
|
||||
self:highlightFromHoldPos()
|
||||
if self.selected_text then
|
||||
local text = require("util").stripePunctuations(self.selected_text.text)
|
||||
self.ui:handleEvent(Event:new("LookupWord", text))
|
||||
self.ui:handleEvent(Event:new("LookupWord", self.selected_text.text))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user