chore: sync and leave bug to be fixed
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
local M = {}
|
||||
|
||||
|
||||
local baidu = require('Trans').conf.engines.baidu
|
||||
local app_id = baidu.app_id
|
||||
local app_passwd = baidu.app_passwd
|
||||
|
@@ -1,7 +1,9 @@
|
||||
return setmetatable({}, {
|
||||
__index = function(t, k)
|
||||
local res, engine = pcall(require, [[Trans.backend.]] .. k)
|
||||
assert(res, [[No such Backend: ]] .. k)
|
||||
if not res then
|
||||
error([[Fail to load backend: ]] .. k .. '\n ' .. engine)
|
||||
end
|
||||
t[k] = engine
|
||||
return engine
|
||||
end
|
||||
|
Reference in New Issue
Block a user