mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-21 21:11:35 +01:00
load lang from chrome.i18n.getUILanguage()
This commit is contained in:
parent
972a21a685
commit
70eb421e7a
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 3f17b642b49f838513fcb4d62b5f9b3fbbadf167
|
||||
Subproject commit 7d8143b288a5352c439c2a789f97f906a4f54e27
|
@ -2,6 +2,7 @@ require('./bar.scss');
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
var i18n = {};
|
||||
var lang = window.navigator.language;
|
||||
if (typeof safari !== 'undefined') {
|
||||
const responseCommand = 'notificationBarFrameDataResponse';
|
||||
sendPlatformMessage({
|
||||
@ -25,6 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
i18n.notificationAddDesc = chrome.i18n.getMessage('notificationAddDesc');
|
||||
i18n.notificationChangeSave = chrome.i18n.getMessage('notificationChangeSave');
|
||||
i18n.notificationChangeDesc = chrome.i18n.getMessage('notificationChangeDesc');
|
||||
lang = chrome.i18n.getUILanguage();
|
||||
|
||||
// delay 50ms so that we get proper body dimensions
|
||||
setTimeout(load, 50);
|
||||
@ -36,7 +38,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
bodyRect = body.getBoundingClientRect();
|
||||
|
||||
// i18n
|
||||
body.classList.add('lang-' + window.navigator.language.slice(0, 2));
|
||||
body.classList.add('lang-' + lang.slice(0, 2));
|
||||
|
||||
document.getElementById('logo-link').title = i18n.appName;
|
||||
closeButton.title = i18n.close;
|
||||
|
Loading…
Reference in New Issue
Block a user