diff options
author | Nick Doiron <ndoiron@mapmeld.com> | 2018-01-28 13:20:56 +0800 |
---|---|---|
committer | Nick Doiron <ndoiron@mapmeld.com> | 2018-01-28 13:20:56 +0800 |
commit | f673c2a8a4d6aac1d22813c3e076fe91f08823f2 (patch) | |
tree | 8d83fc28a5c86044ef0a44544e0b49f3cc00dc9f /ui | |
parent | 9c133aaab30decce16a1bf4120071d4614f99bc8 (diff) | |
download | tangerine-wallet-browser-f673c2a8a4d6aac1d22813c3e076fe91f08823f2.tar tangerine-wallet-browser-f673c2a8a4d6aac1d22813c3e076fe91f08823f2.tar.gz tangerine-wallet-browser-f673c2a8a4d6aac1d22813c3e076fe91f08823f2.tar.bz2 tangerine-wallet-browser-f673c2a8a4d6aac1d22813c3e076fe91f08823f2.tar.lz tangerine-wallet-browser-f673c2a8a4d6aac1d22813c3e076fe91f08823f2.tar.xz tangerine-wallet-browser-f673c2a8a4d6aac1d22813c3e076fe91f08823f2.tar.zst tangerine-wallet-browser-f673c2a8a4d6aac1d22813c3e076fe91f08823f2.zip |
pass linter, update ui test
Diffstat (limited to 'ui')
-rw-r--r-- | ui/i18n.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ui/i18n.js b/ui/i18n.js index c2cf9b449..0f4e9fce4 100644 --- a/ui/i18n.js +++ b/ui/i18n.js @@ -1,18 +1,20 @@ // cross-browser connection to extension i18n API -var getMessage; +const chrome = chrome || null +const browser = browser || null +let getMessage = null if ((chrome && chrome.i18n && chrome.i18n.getMessage) || (browser && browser.i18n && browser.i18n.getMessage)) { - getMessage = (chrome || browser).i18n.getMessage; + getMessage = (chrome || browser).i18n.getMessage } else { // fallback function - console.warn('browser.i18n API not available?'); - let msg = require('../app/_locales/en/messages.json'); - getMessage = function(key) { - return msg[key].message; - }; + console.warn('browser.i18n API not available?') + let msg = require('../app/_locales/en/messages.json') + getMessage = function (key) { + return msg[key].message + } } -module.exports = getMessage; +module.exports = getMessage |