1
0
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:
Dan Finlay 2018-04-25 15:47:07 -07:00 committed by GitHub
commit 21349dd612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,9 @@ const getMessage = (locale, key, substitutions) => {
const { current, en } = locale
const entry = current[key] || en[key]
if (!entry) {
log.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
// perform substitutions