Fixed karma failure

This commit is contained in:
Phil Hughes 2017-05-03 13:33:12 +01:00
parent 93f27958d0
commit 9c78b17a11
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ const locales = allLocales.reduce((d, obj) => {
return data;
}, {});
const lang = document.querySelector('html').getAttribute('lang').replace(/-/g, '_') || 'en';
let lang = document.querySelector('html').getAttribute('lang') || 'en';
lang = lang.replace(/-/g, '_');
const locale = new Jed(locales[lang]);
const gettext = locale.gettext.bind(locale);
const ngettext = locale.ngettext.bind(locale);