pass linter, update ui test

feature/default_network_editable
Nick Doiron 7 years ago
parent 9c133aaab3
commit f673c2a8a4
  1. 2
      test/integration/lib/first-time.js
  2. 18
      ui/i18n.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]

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

Loading…
Cancel
Save