aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Doiron <ndoiron@mapmeld.com>2018-01-28 13:20:56 +0800
committerNick Doiron <ndoiron@mapmeld.com>2018-01-28 13:20:56 +0800
commitf673c2a8a4d6aac1d22813c3e076fe91f08823f2 (patch)
tree8d83fc28a5c86044ef0a44544e0b49f3cc00dc9f
parent9c133aaab30decce16a1bf4120071d4614f99bc8 (diff)
downloadtangerine-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
-rw-r--r--test/integration/lib/first-time.js2
-rw-r--r--ui/i18n.js18
2 files changed, 11 insertions, 9 deletions
diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js
index e59897713..318119902 100644
--- a/test/integration/lib/first-time.js
+++ b/test/integration/lib/first-time.js
@@ -41,7 +41,7 @@ async function runFirstTimeUsageTest(assert, done) {
// Scroll through terms
const title = app.find('h1').text()
// TODO Find where Metamask is getting added twice in the title
- assert.equal(title, 'MetaMaskMetaMask', 'title screen')
+ assert.equal(title, 'MetaMask', 'title screen')
// enter password
const pwBox = app.find('#password-box')[0]
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