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)
C:load 'cmds'
local a = {}
local a
for _, lang in pairs(C.locale.list) do
a = {}
for k, v in pairs(C.cmds) do
if not (v.private or v.hide) then
local cmd = C.locale:get('cmds', k) or {}
local cmd = C.locale:get('cmds', k, lang) or {}
table.insert(a, {
command = k,
description = (cmd.args and cmd.args .. ' - ' or '') .. (cmd.desc or C.locale:get('cmds', 'not_des'))
})
end
end
api:setMyCommands(a)
api:setMyCommands(a, lang)
end
--[[
a = {'levels', }