i18n-helper - abort on i18n failure

feature/default_network_editable
kumavis 7 years ago committed by GitHub
parent ac334d7b1a
commit 3500689ed0
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 { 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 ''
} }
let phrase = entry.message let phrase = entry.message
// perform substitutions // perform substitutions

Loading…
Cancel
Save