diff --git a/notify-link-clicks-i18n/_locales/de/messages.json b/notify-link-clicks-i18n/_locales/de/messages.json index 2974e5b..498f35a 100644 --- a/notify-link-clicks-i18n/_locales/de/messages.json +++ b/notify-link-clicks-i18n/_locales/de/messages.json @@ -1,10 +1,21 @@ { - "notify-title": { - "message": "My hovercraft is full of eels", - "description": "Title of the click notification" + "extensionName": { + "message": "My German-language example extension", + "description": "Name of the extension." }, - "notify-content": { + + "extensionDescription": { + "message": "Notifies the user of link clicks, in German", + "description": "Description of the extension." + }, + + "notificationTitle": { + "message": "My hovercraft is full of eels", + "description": "Title of the click notification." + }, + + "notificationContent": { "message": "$1 was the link you clicked", - "description": "Tells the user which link they clicked: the placeholder is the url" + "description": "Tells the user which link they clicked: the placeholder is the url." } } diff --git a/notify-link-clicks-i18n/_locales/en/messages.json b/notify-link-clicks-i18n/_locales/en/messages.json index 778518d..a18d6b3 100644 --- a/notify-link-clicks-i18n/_locales/en/messages.json +++ b/notify-link-clicks-i18n/_locales/en/messages.json @@ -1,9 +1,20 @@ { - "notify-title": { + "extensionName": { + "message": "Notify link clicks", + "description": "Name of the extension." + }, + + "extensionDescription": { + "message": "Shows a notification when the user clicks on links, on mozilla.org pages.", + "description": "Description of the extension." + }, + + "notificationTitle": { "message": "Click notification", "description": "Title of the click notification" }, - "notify-content": { + + "notificationContent": { "message": "You clicked $1", "description": "Tells the user which link they clicked: the placeholder is the url" } diff --git a/notify-link-clicks-i18n/background-script.js b/notify-link-clicks-i18n/background-script.js index 867b0ef..24d5ccb 100644 --- a/notify-link-clicks-i18n/background-script.js +++ b/notify-link-clicks-i18n/background-script.js @@ -2,12 +2,12 @@ chrome.runtime.onMessage.addListener(notify); function notify(message) { console.log("background script received message"); - var notificationTitle = chrome.i18n.getMessage("notify-title"); - var notificationContent = chrome.i18n.getMessage("notify-content", message.url); + var title = chrome.i18n.getMessage("notificationTitle"); + var content = chrome.i18n.getMessage("notificationContent", message.url); chrome.notifications.create({ "type": "basic", "iconUrl": chrome.extension.getURL("link.png"), - "title": notificationTitle, - "message": notificationContent + "title": title, + "message": content }); } diff --git a/notify-link-clicks-i18n/manifest.json b/notify-link-clicks-i18n/manifest.json index 69012d1..7cc33c3 100644 --- a/notify-link-clicks-i18n/manifest.json +++ b/notify-link-clicks-i18n/manifest.json @@ -1,14 +1,15 @@ { "manifest_version": 2, - "name": "Notify link clicks", + "name": "__MSG_extensionName__", + "description": "__MSG_extensionDescription__", "version": "1.0", "applications": { "gecko": { "id": "notify-link-clicks@mozilla.org" } }, - + "permissions": ["notifications"], "background": {