mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
applied i18n to background context menus
This commit is contained in:
parent
bfe2edcdea
commit
03e614e58b
@ -91,6 +91,14 @@
|
||||
"message": "Copy Username",
|
||||
"description": "Copy Username"
|
||||
},
|
||||
"autoFill": {
|
||||
"message": "Auto-fill",
|
||||
"description": "Auto-fill"
|
||||
},
|
||||
"generatePasswordCopied": {
|
||||
"message": "Generate Password (copied)",
|
||||
"description": "Generate Password (copied)"
|
||||
},
|
||||
"autoFillInfo": {
|
||||
"message": "There are no sites available to auto-fill for the current browser tab.",
|
||||
"description": "There are no sites available to auto-fill for the current browser tab."
|
||||
|
@ -77,21 +77,21 @@ function buildContextMenu() {
|
||||
type: 'normal',
|
||||
id: 'autofill',
|
||||
contexts: ['all'],
|
||||
title: 'Auto-fill'
|
||||
title: i18nService.autoFill
|
||||
});
|
||||
|
||||
chrome.contextMenus.create({
|
||||
type: 'normal',
|
||||
id: 'copy-username',
|
||||
contexts: ['all'],
|
||||
title: 'Copy Username'
|
||||
title: i18nService.copyUsername
|
||||
});
|
||||
|
||||
chrome.contextMenus.create({
|
||||
type: 'normal',
|
||||
id: 'copy-password',
|
||||
contexts: ['all'],
|
||||
title: 'Copy Password'
|
||||
title: i18nService.copyPassword
|
||||
});
|
||||
|
||||
chrome.contextMenus.create({
|
||||
@ -102,7 +102,7 @@ function buildContextMenu() {
|
||||
type: 'normal',
|
||||
id: 'generate-password',
|
||||
contexts: ['all'],
|
||||
title: 'Generate Password (copied)'
|
||||
title: i18nService.generatePasswordCopied
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,8 @@ function i18nService() {
|
||||
currentTab: chrome.i18n.getMessage("currentTab"),
|
||||
copyPassword: chrome.i18n.getMessage("copyPassword"),
|
||||
copyUsername: chrome.i18n.getMessage("copyUsername"),
|
||||
autoFill: chrome.i18n.getMessage("autoFill"),
|
||||
generatePasswordCopied: chrome.i18n.getMessage("generatePasswordCopied"),
|
||||
autoFillInfo: chrome.i18n.getMessage("autoFillInfo"),
|
||||
addSite: chrome.i18n.getMessage("addSite"),
|
||||
passwordHint: chrome.i18n.getMessage("passwordHint"),
|
||||
|
@ -107,7 +107,7 @@ function initPasswordGenerationService() {
|
||||
|
||||
var bits_needed = Math.ceil(Math.log2(range));
|
||||
if (bits_needed > 53) {
|
||||
throw new Exception("We cannot generate numbers larger than 53 bits.");
|
||||
throw new Exception('We cannot generate numbers larger than 53 bits.');
|
||||
}
|
||||
var bytes_needed = Math.ceil(bits_needed / 8);
|
||||
var mask = Math.pow(2, bits_needed) - 1;
|
||||
|
@ -11,13 +11,13 @@ function initUtilsService() {
|
||||
return this.browserCache;
|
||||
}
|
||||
|
||||
if (navigator.userAgent.indexOf("Firefox") !== -1 || navigator.userAgent.indexOf("Gecko/") !== -1) {
|
||||
if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Gecko/') !== -1) {
|
||||
this.browserCache = 'firefox';
|
||||
}
|
||||
else if ((!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) {
|
||||
this.browserCache = 'opera';
|
||||
}
|
||||
else if (navigator.userAgent.indexOf(" Edge/") !== -1) {
|
||||
else if (navigator.userAgent.indexOf(' Edge/') !== -1) {
|
||||
this.browserCache = 'edge';
|
||||
}
|
||||
else if (window.chrome) {
|
||||
|
Loading…
Reference in New Issue
Block a user