forked from XimeX/usrspace-browser-addon
set html lang by browser language
This commit is contained in:
parent
4de8c9c1cb
commit
c2cc850e1f
|
@ -1,5 +1,7 @@
|
|||
import Config from './config.js';
|
||||
|
||||
document.querySelector('html').setAttribute('lang', browser.i18n.getUILanguage());
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @returns {Promise<any>}
|
||||
|
|
|
@ -20,6 +20,8 @@ const doorOpenSVG = `
|
|||
const dateTimeFormat = Intl.DateTimeFormat([], {dateStyle: 'medium', timeStyle: 'short'});
|
||||
|
||||
function setL10n() {
|
||||
document.querySelector('html').setAttribute('lang', browser.i18n.getUILanguage());
|
||||
|
||||
const loadingText = browser.i18n.getMessage('loading');
|
||||
document.getElementById('state').textContent = loadingText;
|
||||
document.getElementById('calendar').textContent = loadingText;
|
||||
|
|
Loading…
Reference in a new issue