Merge pull request #807 from conde2/otclient-locales
Show missing translation on console
This commit is contained in:
commit
e44b33fc67
|
@ -113,15 +113,18 @@ function installLocale(locale)
|
||||||
if _G.allowedLocales and not _G.allowedLocales[locale.name] then return end
|
if _G.allowedLocales and not _G.allowedLocales[locale.name] then return end
|
||||||
|
|
||||||
if locale.name ~= defaultLocaleName then
|
if locale.name ~= defaultLocaleName then
|
||||||
local updatesNeeded = 0
|
local updatesNamesMissing = {}
|
||||||
for _i,k in pairs(neededTranslations) do
|
for _,k in pairs(neededTranslations) do
|
||||||
if locale.translation[k] == nil then
|
if locale.translation[k] == nil then
|
||||||
updatesNeeded = updatesNeeded + 1
|
updatesNamesMissing[#updatesNamesMissing + 1] = k
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if updatesNeeded > 0 then
|
if #updatesNamesMissing > 0 then
|
||||||
pdebug('Locale \'' .. locale.name .. '\' is missing ' .. updatesNeeded .. ' translations.')
|
pdebug('Locale \'' .. locale.name .. '\' is missing ' .. #updatesNamesMissing .. ' translations.')
|
||||||
|
for _,name in pairs(updatesNamesMissing) do
|
||||||
|
pdebug('["' .. name ..'"] = \"\",')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue