diff --git a/_locales/de/messages.json b/_locales/de/messages.json index fbef2d4..e54d3c5 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -8,6 +8,19 @@ "description": "" }, + "browserAction_title_default": { + "message": "CanvasBlocker", + "description": "" + }, + "browserAction_title_notified": { + "message": "CanvasBlocker\n\nSchutz erfolgreich für:", + "description": "" + }, + "browserAction_title_protectedAPIs": { + "message": "\n \u00B7 {api}", + "description": "" + }, + "more": { "message": "mehr", "description": "" diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f305508..aceece8 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -8,6 +8,19 @@ "description": "" }, + "browserAction_title_default": { + "message": "CanvasBlocker", + "description": "" + }, + "browserAction_title_notified": { + "message": "CanvasBlocker\n\nprotection successful for:", + "description": "" + }, + "browserAction_title_protectedAPIs": { + "message": "\n \u00B7 {api}", + "description": "" + }, + "more": { "message": "more", "description": "" diff --git a/lib/notification.js b/lib/notification.js index 187becd..0be74ae 100644 --- a/lib/notification.js +++ b/lib/notification.js @@ -67,11 +67,11 @@ let apiList = ""; apis.forEach(function(api){ - apiList += "\n \u00B7 " + api; + apiList += browser.i18n.getMessage("browserAction_title_protectedAPIs").replace(/{api}/g, api); }); browser.browserAction.setTitle({ tabId: tabId, - title: "CanvasBlocker" + apiList + title: browser.i18n.getMessage("browserAction_title_notified") + apiList }); }; @@ -93,7 +93,7 @@ }); browser.browserAction.setTitle({ tabId: tabId, - title: "CanvasBlocker" + title: browser.i18n.getMessage("browserAction_title_default") }); }; diff --git a/manifest.json b/manifest.json index 7452b3e..431ba68 100644 --- a/manifest.json +++ b/manifest.json @@ -57,7 +57,7 @@ "browser_action": { "browser_style": false, "default_icon": "icons/browserAction-notPrinted.svg", - "default_title": "CanvasBlocker", + "default_title": "__MSG_browserAction_title_default__", "default_popup": "browserAction/browserAction.html" }, "page_action": {