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 +- src/pages/errors/instance_offline.html | 11 +- src/pages/errors/instance_offline.js | 4 +- src/pages/options/general/general.html | 78 +++--- src/pages/options/imgur/imgur.html | 58 ++-- src/pages/options/init.js | 3 + src/pages/options/instagram/instagram.html | 68 +++-- src/pages/options/lbry/lbry.html | 77 ++++-- src/pages/options/maps/maps.html | 47 ++-- src/pages/options/medium/medium.html | 58 ++-- src/pages/options/peertube/peertube.html | 59 +++-- src/pages/options/pixiv/pixiv.html | 62 ++--- src/pages/options/reddit/reddit.html | 72 ++--- src/pages/options/search/search.html | 68 ++--- src/pages/options/sendTargets/sendTargets.html | 79 +++--- src/pages/options/spotify/spotify.html | 59 +++-- src/pages/options/tiktok/tiktok.html | 59 +++-- src/pages/options/translate/translate.html | 237 ++++++++--------- src/pages/options/twitter/twitter.html | 258 +++++++++--------- src/pages/options/wikipedia/wikipedia.html | 235 +++++++++-------- src/pages/options/youtube/youtube.html | 243 +++++++++-------- src/pages/options/youtubeMusic/youtubeMusic.html | 292 +++++++++++---------- src/pages/popup/popup.html | 44 ++-- src/pages/popup/style.css | 2 +- .../NotoNaskhArabic-VariableFont_wght.ttf | Bin 0 -> 196420 bytes .../NotoSansArabic-VariableFont_wdth,wght.ttf | Bin 0 -> 765740 bytes .../stylesheets/Vazirmatn-VariableFont_wght.ttf | Bin 0 -> 285620 bytes src/pages/stylesheets/styles.css | 41 +++ 28 files changed, 1188 insertions(+), 1034 deletions(-) create mode 100644 src/pages/stylesheets/NotoNaskhArabic-VariableFont_wght.ttf create mode 100644 src/pages/stylesheets/NotoSansArabic-VariableFont_wdth,wght.ttf create mode 100644 src/pages/stylesheets/Vazirmatn-VariableFont_wght.ttf (limited to 'src/pages') 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 +}); diff --git a/src/pages/errors/instance_offline.html b/src/pages/errors/instance_offline.html index 09ffb431..4c47997b 100644 --- a/src/pages/errors/instance_offline.html +++ b/src/pages/errors/instance_offline.html @@ -5,7 +5,7 @@ -