Merge pull request #913 from Blizzard/fix-translate
Fix subtle bug in table.translate
This commit is contained in:
commit
798b72b7d4
@ -401,12 +401,12 @@
|
||||
if not translation then return {} end
|
||||
|
||||
local result = {}
|
||||
for _, value in ipairs(arr) do
|
||||
for i = 1, #arr do
|
||||
local tvalue
|
||||
if type(translation) == "function" then
|
||||
tvalue = translation(value)
|
||||
tvalue = translation(arr[i])
|
||||
else
|
||||
tvalue = translation[value]
|
||||
tvalue = translation[arr[i]]
|
||||
end
|
||||
if (tvalue) then
|
||||
table.insert(result, tvalue)
|
||||
|
Loading…
Reference in New Issue
Block a user