mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
enable Wikipedia support
Since wikipedia server is language specific we should first detect language of the text by querying Google Translate. Make sure you have access to both Google Translate and Wikipedia service to use this function.
This commit is contained in:
@@ -29,6 +29,7 @@ local ReaderHighlight = require("apps/reader/modules/readerhighlight")
|
||||
local ReaderScreenshot = require("apps/reader/modules/readerscreenshot")
|
||||
local ReaderFrontLight = require("apps/reader/modules/readerfrontlight")
|
||||
local ReaderDictionary = require("apps/reader/modules/readerdictionary")
|
||||
local ReaderWikipedia = require("apps/reader/modules/readerwikipedia")
|
||||
local ReaderHyphenation = require("apps/reader/modules/readerhyphenation")
|
||||
local ReaderActivityIndicator = require("apps/reader/modules/readeractivityindicator")
|
||||
local ReaderLink = require("apps/reader/modules/readerlink")
|
||||
@@ -142,6 +143,13 @@ function ReaderUI:init()
|
||||
ui = self,
|
||||
document = self.document,
|
||||
})
|
||||
-- wikipedia
|
||||
table.insert(self, ReaderWikipedia:new{
|
||||
dialog = self.dialog,
|
||||
view = self[1],
|
||||
ui = self,
|
||||
document = self.document,
|
||||
})
|
||||
-- screenshot controller
|
||||
table.insert(self.active_widgets, ReaderScreenshot:new{
|
||||
dialog = self.dialog,
|
||||
|
||||
Reference in New Issue
Block a user