restored localized commands

This commit is contained in:
Er2 2022-01-23 21:44:39 +03:00
parent f50fe9e35b
commit dffe9cc9b2
2 changed files with 13 additions and 10 deletions

@ -1 +1 @@
Subproject commit 4dec8003ed89e5a05ee992448747096f72ce718b Subproject commit 5e6f1b9ec7665adc121c03757775e65fc587a37b

View file

@ -27,17 +27,20 @@ end
return function(C, api) return function(C, api)
C:load 'cmds' C:load 'cmds'
local a = {} local a
for k, v in pairs(C.cmds) do for _, lang in pairs(C.locale.list) do
if not (v.private or v.hide) then a = {}
local cmd = C.locale:get('cmds', k) or {} for k, v in pairs(C.cmds) do
table.insert(a, { if not (v.private or v.hide) then
command = k, local cmd = C.locale:get('cmds', k, lang) or {}
description = (cmd.args and cmd.args .. ' - ' or '') .. (cmd.desc or C.locale:get('cmds', 'not_des')) table.insert(a, {
}) command = k,
description = (cmd.args and cmd.args .. ' - ' or '') .. (cmd.desc or C.locale:get('cmds', 'not_des'))
})
end
end end
api:setMyCommands(a, lang)
end end
api:setMyCommands(a)
--[[ --[[
a = {'levels', } a = {'levels', }