Skip to content

Commit e9b52e6

Browse files
committed
add back to changelog
1 parent 38e7aa2 commit e9b52e6

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
5+
* `FIX` convert all keys to string before using
56

67
## 3.16.4
78
`2025-12-25`

script/locale-loader.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ local function mergeKey(key, k)
33
return k
44
end
55
k = tostring(k)
6-
if k:sub(1, 1):match("%w") then
7-
return key .. "." .. k
6+
if k:sub(1, 1):match '%w' then
7+
return key .. '.' .. k
88
else
99
return key .. k
1010
end
1111
end
1212

1313
local function proxy(results, key)
1414
return setmetatable({}, {
15-
__index = function(_, k)
15+
__index = function (_, k)
1616
return proxy(results, mergeKey(key, k))
1717
end,
18-
__newindex = function(_, k, v)
18+
__newindex = function (_, k, v)
1919
results[mergeKey(key, k)] = v
20-
end,
20+
end
2121
})
2222
end
2323

24-
return function(text, path, results)
24+
return function (text, path, results)
2525
results = results or {}
26-
assert(load(text, "@" .. path, "t", proxy(results)))()
26+
assert(load(text, '@' .. path, "t", proxy(results)))()
2727
return results
2828
end

0 commit comments

Comments
 (0)