mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
updating notify-link-clicks-i18n to use placeholders member in messages.json files, plus getting rid of my changes that are not needed at the moment
This commit is contained in:
@@ -15,7 +15,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"notificationContent": {
|
"notificationContent": {
|
||||||
"message": "Du hast $1 angeklickt",
|
"message": "Du hast $URL$ angeklickt",
|
||||||
"description": "Tells the user which link they clicked: the $1 placeholder is the url."
|
"description": "Tells the user which link they clicked.",
|
||||||
|
"placeholders": {
|
||||||
|
"url" : {
|
||||||
|
"content" : "$1",
|
||||||
|
"example" : "https://developer.mozilla.org"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"notificationContent": {
|
"notificationContent": {
|
||||||
"message": "You clicked $1.",
|
"message": "You clicked $URL$.",
|
||||||
"description": "Tells the user which link they clicked: the $1 placeholder is the url."
|
"description": "Tells the user which link they clicked.",
|
||||||
|
"placeholders": {
|
||||||
|
"url" : {
|
||||||
|
"content" : "$1",
|
||||||
|
"example" : "https://developer.mozilla.org"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"notificationContent": {
|
"notificationContent": {
|
||||||
"message": "$1がクリックされました。",
|
"message": "$URL$がクリックされました。",
|
||||||
"description": "リンクをクリックした時通知を表示します。:変数$1にはurlが代入されます。"
|
"description": "リンクをクリックした時通知を表示します。:変数$1にはurlが代入されます。",
|
||||||
|
"placeholders": {
|
||||||
|
"url" : {
|
||||||
|
"content" : "$1",
|
||||||
|
"example" : "https://developer.mozilla.org"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"notificationContent": {
|
"notificationContent": {
|
||||||
"message": "U klikte op $1",
|
"message": "U klikte op $URL$",
|
||||||
"description": "Tells the user which link they clicked: the $1 placeholder is the url."
|
"description": "Tells the user which link they clicked.",
|
||||||
|
"placeholders": {
|
||||||
|
"url" : {
|
||||||
|
"content" : "$1",
|
||||||
|
"example" : "https://developer.mozilla.org"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function notify(message) {
|
|||||||
var content = chrome.i18n.getMessage("notificationContent", message.url);
|
var content = chrome.i18n.getMessage("notificationContent", message.url);
|
||||||
chrome.notifications.create({
|
chrome.notifications.create({
|
||||||
"type": "basic",
|
"type": "basic",
|
||||||
"iconUrl": chrome.extension.getURL("icons/__MSG_@@ui_locale__/link-48-__MSG_@@ui_locale__.png"),
|
"iconUrl": chrome.extension.getURL("icons/link-48.png"),
|
||||||
"title": title,
|
"title": title,
|
||||||
"message": content
|
"message": content
|
||||||
});
|
});
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 704 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 621 B |
Binary file not shown.
|
Before Width: | Height: | Size: 605 B |
Reference in New Issue
Block a user