mirror of https://github.com/koreader/koreader
parent
39345704ec
commit
3a4b5d3cab
@ -0,0 +1,20 @@
|
||||
local user_path = require("datastorage"):getDataDir() .. "/dictionaries.lua"
|
||||
local ok, dicts = pcall(dofile, user_path)
|
||||
|
||||
local t = {}
|
||||
|
||||
table.insert(t, 1, { "Goldendict", "Goldendict", false, "goldendict" })
|
||||
|
||||
if jit.os == "OSX" then
|
||||
table.insert(t, 1, { "Apple", "AppleDict", false, "dict://" })
|
||||
end
|
||||
|
||||
if ok then
|
||||
-- append user dictionaries to the bottom of the menu
|
||||
for k, v in pairs(dicts) do
|
||||
table.insert(t, #t + 1, v)
|
||||
end
|
||||
end
|
||||
|
||||
return t
|
||||
|
Loading…
Reference in New Issue