mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #4065 from MetaMask/i18n-helper-bugfix
i18n-helper - abort on i18n failure
This commit is contained in:
commit
21349dd612
@ -11,8 +11,9 @@ const getMessage = (locale, key, substitutions) => {
|
|||||||
const { current, en } = locale
|
const { current, en } = locale
|
||||||
const entry = current[key] || en[key]
|
const entry = current[key] || en[key]
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
log.error(`Translator - Unable to find value for "${key}"`)
|
|
||||||
// throw new Error(`Translator - Unable to find value for "${key}"`)
|
// throw new Error(`Translator - Unable to find value for "${key}"`)
|
||||||
|
log.error(`Translator - Unable to find value for "${key}"`)
|
||||||
|
return `[${key}]`
|
||||||
}
|
}
|
||||||
let phrase = entry.message
|
let phrase = entry.message
|
||||||
// perform substitutions
|
// perform substitutions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user