Fix the localization function and provide a special placeholder for when the user doesn't have a die assigned to their stat
This commit is contained in:
parent
c1ee1a9ef8
commit
2065596686
6 changed files with 71 additions and 40 deletions
|
|
@ -14,8 +14,8 @@ export function localizer(key, args = {}, depth = 0) {
|
|||
const subkey = match.groups.key;
|
||||
localized =
|
||||
localized.slice(0, match.index)
|
||||
+ localizer(subkey.slice(1), args, depth + 1)
|
||||
+ localized.slice(match.index + subkey.length)
|
||||
+ localizer(subkey, args, depth + 1)
|
||||
+ localized.slice(match.index + subkey.length + 1)
|
||||
};
|
||||
return localized;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue