add i18n
This commit is contained in:
parent
da0cf7a6de
commit
50df5de3c9
3 changed files with 21 additions and 0 deletions
10
_locales/en/messages.json
Normal file
10
_locales/en/messages.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"extention_description": {
|
||||||
|
"message": "[the description]",
|
||||||
|
"description": "the short discription shown in the extention list"
|
||||||
|
},
|
||||||
|
"popup_text": {
|
||||||
|
"message": "This page uses Piwik",
|
||||||
|
"description": "text shown in popup when clicked on button in navigation bar"
|
||||||
|
}
|
||||||
|
}
|
8
popup.html
Normal file
8
popup.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="popup.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2 id="text"></h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
3
popup.js
Normal file
3
popup.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
document.getElementById("text").innerHTML = chrome.i18n.getMessage("popup_text");
|
||||||
|
});
|
Reference in a new issue