mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
load lang from chrome.i18n.getUILanguage()
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 3f17b642b4...7d8143b288
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user