From ad806c6808c7feaa6585d22e19700a04fead87c8 Mon Sep 17 00:00:00 2001 From: Pixelcode <52963327+realpixelcode@users.noreply.github.com> Date: Sat, 2 Apr 2022 15:23:43 +0000 Subject: Add i18n * add i18n for translation * German translation * Arabic translation * RTL support --- src/pages/background/background.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pages/background') diff --git a/src/pages/background/background.js b/src/pages/background/background.js index c0b1b73f..e54627c4 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -237,7 +237,7 @@ function changeWholeInstance(url) { browser.commands.onCommand.addListener( command => { if (command === 'switchInstance') - chrome.tabs.query( + browser.tabs.query( { active: true, currentWindow: true }, tabs => { let url; @@ -252,13 +252,13 @@ browser.commands.onCommand.addListener( browser.menus.create({ id: "settings", - title: "Settings", + title: browser.i18n.getMessage("Settings"), contexts: ["browser_action"] }); browser.menus.create({ id: "switchInstance", - title: "Switch Instance", + title: chrome.i18n.getMessage("switchInstance"), contexts: ["browser_action"] }); @@ -272,4 +272,4 @@ browser.menus.onClicked.addListener((info, tab) => { } else if (info.menuItemId == 'settings') browser.runtime.openOptionsPage() -}); \ No newline at end of file +}); -- cgit 1.4.1