2023-03-09 19:42:41 +08:00
|
|
|
local M = setmetatable({}, {
|
|
|
|
__index = function(tbl, key)
|
|
|
|
local status, field = pcall(require, 'Trans.core.' .. key)
|
|
|
|
assert(status, 'Unknown field: ' .. key)
|
|
|
|
|
|
|
|
tbl[key] = field
|
|
|
|
return field
|
|
|
|
end
|
|
|
|
})
|
2023-02-03 11:57:42 +08:00
|
|
|
|
2023-03-11 00:24:48 +08:00
|
|
|
M.cache = {}
|
|
|
|
|
2022-12-17 16:07:27 +08:00
|
|
|
return M
|