From dc8bc2f010a7c367f0bf7eac47a57e10358fbb0f Mon Sep 17 00:00:00 2001 From: Owen Young Date: Sun, 20 Nov 2022 15:59:19 +0800 Subject: [PATCH] Popup remove always translate lang, if lang is equal to the target lang. --- CHANGELOG.md | 5 +++-- src/chrome_manifest.json | 2 +- src/manifest.json | 2 +- src/popup/old-popup.js | 7 +++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc08a2a..6bac6ac4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # ChangeLog -## 0.0.34 (not released) +## 0.0.34 -- Fix copy img node. +- Fix copy img node, if a block node is only contains img node, then do not copy that node. +- Popup remove always translate lang, if lang is equal to the target lang. ## 0.0.33 diff --git a/src/chrome_manifest.json b/src/chrome_manifest.json index 63edce27..c973422c 100644 --- a/src/chrome_manifest.json +++ b/src/chrome_manifest.json @@ -3,7 +3,7 @@ "default_locale": "en", "name": "Immersive Translate", "description": "Let's experience immersive web translation, with bilingual simultaneous display and translation of only the important content.", - "version": "0.0.33", + "version": "0.0.34", "homepage_url": "https://github.com/immersive-translate/immersive-translate", "commands": { diff --git a/src/manifest.json b/src/manifest.json index 63823ac1..275bea7b 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,7 +3,7 @@ "default_locale": "en", "name": "Immersive Translate", "description": "Let's experience immersive web translation, with bilingual simultaneous display and translation of only the important content.", - "version": "0.0.33", + "version": "0.0.34", "homepage_url": "https://github.com/immersive-translate/immersive-translate", "browser_specific_settings": { diff --git a/src/popup/old-popup.js b/src/popup/old-popup.js index c5e29898..46fd2ea8 100644 --- a/src/popup/old-popup.js +++ b/src/popup/old-popup.js @@ -217,8 +217,11 @@ twpConfig.onReady(function () { $("option[data-i18n=btnNeverTranslateThisLanguage]").textContent = "✔ " + neverTranslateLangText } $("option[data-i18n=btnNeverTranslateThisLanguage]").style.display = "block" - - showAlwaysTranslateCheckbox = true + + // check is lang is equal to the target lang + if(originalTabLanguage !== selectTargetLanguage.value) { + showAlwaysTranslateCheckbox = true + } } btnRestore.className = btnRestore.className.replace(" w3-disabled", "")