Skip to content

Commit

Permalink
Localize option page
Browse files Browse the repository at this point in the history
  • Loading branch information
nralbrecht committed Oct 12, 2016
1 parent 1a918e6 commit 6d143de
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
8 changes: 8 additions & 0 deletions _locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
"extensionDescription": {
"message": "Verschiebt die aus einem angehefteten Tab geöffneten Tabs an den rechten Rand der Tableiste.",
"description": "Beschreibung des Add-ons."
},
"loadInBackgroundName": {
"message": "Tabs im Vordergrund öffnen",
"description": "Name der loadInBackground Option"
},
"loadInBackgroundDescription": {
"message": "Wenn aktiv, werden alle vom Add-on betroffenen Tabs im Vordergrund geöffnet. Diese Option ersetzt die globale Einstellung für diese Tabs.",
"description": "Beschreibung der loadInBackground Option"
}
}
8 changes: 8 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
"extensionDescription": {
"message": "Opens tabs opened from a pinned tab on the far right end of the tab bar.",
"description": "Description of the extension."
},
"loadInBackgroundName": {
"message": "Open tabs in forground",
"description": "Name of the loadInBackground option"
},
"loadInBackgroundDescription": {
"message": "When activated, all tabs affected by this add-on will be opend in the forground. This option replaces the global preference for said tabs.",
"description": "Description of the loadInBackground option"
}
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"manifest_version": 2,
"name": "Pined Tab Fix",
"version": "2.0.3",
"version": "2.0.4",

"description": "__MSG_extensionDescription__",
"homepage_url": "https://github.com/nralbrecht/pinned-tab-fix",
Expand Down
6 changes: 3 additions & 3 deletions options.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<head>
<title>Pined Tab Fix Options</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="options.css">
</head>
<body>
<div class="setting">
<div class="preferences-info">
<div class="preferences-title">Tabs im Vordergrund öffnen</div>
<div class="preferences-description">Wenn aktiv, werden alle vom Add-on betroffenen Tabs im Vordergrund geöffnet. Diese Option ersetzt die globale Einstellung für diese Tabs.</div>
<div class="preferences-title">Open tabs in forground</div>
<div class="preferences-description">When activated, all tabs affected by this add-on will be opend in the forground. This option replaces the global preference for said tabs.</div>
</div>
<div class="preferences-input">
<input type="checkbox" id="loadInBackground" name="loadInBackground">
</div>
</div>
<link rel="stylesheet" type="text/css" href="options.css">
<script type="text/javascript" src="options.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions options.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ checkbox.addEventListener("click", function(e) {
"loadInBackground": !e.target.checked
});
});

document.getElementsByClassName('preferences-title')[0].innerText = chrome.i18n.getMessage("loadInBackgroundName");
document.getElementsByClassName('preferences-description')[0].innerText = chrome.i18n.getMessage("loadInBackgroundDescription");

0 comments on commit 6d143de

Please sign in to comment.