Merge pull request #4065 from MetaMask/i18n-helper-bugfix

i18n-helper - abort on i18n failure
feature/default_network_editable
Dan Finlay 7 years ago committed by GitHub
commit 21349dd612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui/i18n-helper.js

@ -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

Loading…
Cancel
Save