Bladeren bron

added tooltip message for blocked domains

Gildas 7 jaren geleden
bovenliggende
commit
10ea765a64

+ 8 - 0
_locales/en/messages.json

@@ -67,6 +67,14 @@
         "message": "Save page with SingleFile",
         "description": "Button title: 'Save page with SingleFile'"
     },
+    "buttonBlockedBadge": {
+        "message": "🛇",
+        "description": "Button badge when the page is blacked: '🛇'"
+    },
+    "buttonBlockedTooltip": {
+        "message": "This page cannot be saved with SingleFile",
+        "description": "Button title: 'This page cannot be saved with SingleFile'"
+    },
     "buttonInitializingTooltip": {
         "message": "Initializing SingleFile",
         "description": "Button title during initialization: 'Initializing SingleFile (x/2)'"

+ 8 - 0
_locales/fr/messages.json

@@ -67,6 +67,14 @@
         "message": "Sauver la page avec SingleFile",
         "description": "Button title: 'Save page with SingleFile'"
     },
+    "buttonBlockedBadge": {
+        "message": "🛇",
+        "description": "Button badge when the page is blacked: '🛇'"
+    },
+    "buttonBlockedTooltip": {
+        "message": "Cette page ne peut pas être sauvée avec SingleFile",
+        "description": "Button title: 'This page cannot be saved with SingleFile'"
+    },
     "buttonInitializingTooltip": {
         "message": "Initialisation de SingleFile",
         "description": "Button title during initialization: 'Initializing SingleFile (x/2)'"

+ 8 - 0
_locales/ja/messages.json

@@ -67,6 +67,14 @@
         "message": "SingleFile でページを保存",
         "description": "ボタンのタイトル: 'SingleFile でページを保存'"
     },
+    "buttonBlockedBadge": {
+        "message": "🛇",
+        "description": "Button badge when the page is blacked: '🛇'"
+    },
+    "buttonBlockedTooltip": {
+        "message": "This page cannot be saved with SingleFile",
+        "description": "Button title: 'This page cannot be saved with SingleFile'"
+    },
     "buttonInitializingTooltip": {
         "message": "SingleFile の初期化",
         "description": "初期化中のボタンのタイトル: 'SingleFile の初期化 (x/2)'"

+ 8 - 0
_locales/pl/messages.json

@@ -67,6 +67,14 @@
         "message": "Zapisz stronę z SingleFile",
         "description": "Button title: 'Save page with SingleFile'"
     },
+    "buttonBlockedBadge": {
+        "message": "🛇",
+        "description": "Button badge when the page is blacked: '🛇'"
+    },
+    "buttonBlockedTooltip": {
+        "message": "This page cannot be saved with SingleFile",
+        "description": "Button title: 'This page cannot be saved with SingleFile'"
+    },
     "buttonInitializingTooltip": {
         "message": "Inicjowanie SingleFile",
         "description": "Button title during initialization: 'Initializing SingleFile (x/2)'"

+ 8 - 0
_locales/ru/messages.json

@@ -67,6 +67,14 @@
         "message": "Сохранить страницу с помощью SingleFile",
         "description": "Button title: 'Save page with SingleFile'"
     },
+    "buttonBlockedBadge": {
+        "message": "🛇",
+        "description": "Button badge when the page is blacked: '🛇'"
+    },
+    "buttonBlockedTooltip": {
+        "message": "This page cannot be saved with SingleFile",
+        "description": "Button title: 'This page cannot be saved with SingleFile'"
+    },
     "buttonInitializingTooltip": {
         "message": "Инициализация SingleFile",
         "description": "Button title during initialization: 'Initializing SingleFile (x/2)'"

+ 8 - 0
_locales/zh_CN/messages.json

@@ -67,6 +67,14 @@
         "message": "使用 SingleFile 保存页面",
         "description": "按钮标题: '使用 SingleFile 保存页面'"
     },
+    "buttonBlockedBadge": {
+        "message": "🛇",
+        "description": "Button badge when the page is blacked: '🛇'"
+    },
+    "buttonBlockedTooltip": {
+        "message": "This page cannot be saved with SingleFile",
+        "description": "Button title: 'This page cannot be saved with SingleFile'"
+    },
     "buttonInitializingTooltip": {
         "message": "正在初始化 SingleFile",
         "description": "保存时候的按钮标题: '正在初始化 SingleFile (x/2)'"

+ 3 - 1
extension/ui/bg/ui-button.js

@@ -25,9 +25,11 @@ singlefile.ui.button = (() => {
 	const DEFAULT_ICON_PATH = "/extension/ui/resources/icon_128.png";
 	const WAIT_ICON_PATH_PREFIX = "/extension/ui/resources/icon_128_wait";
 	const BUTTON_DEFAULT_TOOLTIP_MESSAGE = browser.i18n.getMessage("buttonDefaultTooltip");
+	const BUTTON_BLOCKED_TOOLTIP_MESSAGE = browser.i18n.getMessage("buttonBlockedTooltip");
 	const BUTTON_INITIALIZING_BADGE_MESSAGE = browser.i18n.getMessage("buttonInitializingBadge");
 	const BUTTON_INITIALIZING_TOOLTIP_MESSAGE = browser.i18n.getMessage("buttonInitializingTooltip");
 	const BUTTON_ERROR_BADGE_MESSAGE = browser.i18n.getMessage("buttonErrorBadge");
+	const BUTTON_BLOCKED_BADGE_MESSAGE = browser.i18n.getMessage("buttonBlockedBadge");
 	const BUTTON_OK_BADGE_MESSAGE = browser.i18n.getMessage("buttonOKBadge");
 	const BUTTON_SAVE_PROGRESS_TOOLTIP_MESSAGE = browser.i18n.getMessage("buttonSaveProgressTooltip");
 	const BUTTON_AUTOSAVE_ACTIVE_BADGE_MESSAGE = browser.i18n.getMessage("buttonAutoSaveActiveBadge");
@@ -112,7 +114,7 @@ singlefile.ui.button = (() => {
 	}
 
 	function onForbiddenDomain(tabId, options) {
-		refresh(tabId, getProperties(options, "🛇", [224, 89, 0, 255], BUTTON_BLOCKED_TOOLTIP_MESSAGE));
+		refresh(tabId, getProperties(options, BUTTON_BLOCKED_BADGE_MESSAGE, [224, 89, 0, 255], BUTTON_BLOCKED_TOOLTIP_MESSAGE));
 	}
 
 	function onCancelled(tabId, options) {