languages sub directory
langauges no longer clutter the plugin directory `langauge/init.lua` will load all languages as the plugins loader does. (literally copy pasted, but fenced to avoid a "require overflow")
This commit is contained in:
parent
1db1f0bceb
commit
9fa57a209b
|
@ -0,0 +1,16 @@
|
||||||
|
local core = require "core"
|
||||||
|
|
||||||
|
local no_errors = true
|
||||||
|
local files = system.list_dir(EXEDIR .. "/data/plugins/language")
|
||||||
|
for _, filename in ipairs(files) do
|
||||||
|
local langname = filename:gsub(".lua$", "")
|
||||||
|
if langname ~= "init" then
|
||||||
|
local ok = core.try(require, "plugins.language." .. langname)
|
||||||
|
if ok then
|
||||||
|
core.log_quiet("Loaded language %q", langname)
|
||||||
|
else
|
||||||
|
no_errors = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return no_errors
|
Loading…
Reference in New Issue