mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-24 06:17:08 -04:00
Return original token when missing from translation
This commit is contained in:
parent
ce4ac75941
commit
2e9dbfd382
1 changed files with 2 additions and 3 deletions
|
@ -30,9 +30,8 @@ export default function translate(
|
|||
const translation = translations[key] || key;
|
||||
|
||||
if (tokens) {
|
||||
return translation.replace(
|
||||
/\{([a-z0-9]+?)\}/gi,
|
||||
(match, tokenMatch) => String(tokens[tokenMatch]) ?? match
|
||||
return translation.replace(/\{([a-z0-9]+?)\}/gi, (match, tokenMatch) =>
|
||||
String(tokens[tokenMatch] ?? match)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue