aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2020-08-27 21:35:06 -0400
committerGitHub <[email protected]>2020-08-27 21:35:06 -0400
commit3ec3a011281f946b749335aafaf5aad8d64d7422 (patch)
tree29c074686fc10f672e3ae4b2330e9ef1743fe407
parentd2e389296b203bf8eabb1cba6a5be76cf10b617a (diff)
parent042c305cecf323945e54db7dfadf4f0f0f9a54d2 (diff)
downloadSponsorBlock-3ec3a011281f946b749335aafaf5aad8d64d7422.tar.gz
SponsorBlock-3ec3a011281f946b749335aafaf5aad8d64d7422.zip
Merge pull request #450 from maximmax42/patch-1
Missing localized messages
-rw-r--r--public/_locales/en/messages.json3
-rw-r--r--src/content.ts2
-rw-r--r--src/popup.ts8
3 files changed, 8 insertions, 5 deletions
diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json
index 7f26105a..3ae46303 100644
--- a/public/_locales/en/messages.json
+++ b/public/_locales/en/messages.json
@@ -112,6 +112,9 @@
"openPopup": {
"message": "Open SponsorBlock Popup"
},
+ "closePopup": {
+ "message": "Close Popup"
+ },
"SubmitTimes": {
"message": "Submit Segments"
},
diff --git a/src/content.ts b/src/content.ts
index 8c761ecc..7f75ada0 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -1243,7 +1243,7 @@ function openInfoMenu() {
//close button
let closeButton = document.createElement("div");
- closeButton.innerText = "Close Popup";
+ closeButton.innerText = chrome.i18n.getMessage("closePopup");
closeButton.classList.add("smallLink");
closeButton.setAttribute("align", "center");
closeButton.addEventListener("click", closeInfoMenu);
diff --git a/src/popup.ts b/src/popup.ts
index 678fb0e3..85f46af8 100644
--- a/src/popup.ts
+++ b/src/popup.ts
@@ -392,7 +392,7 @@ async function runThePopup(messageListener?: MessageListener) {
extraInfo = " (" + chrome.i18n.getMessage("hiddenDueToDuration") + ")";
}
- sponsorTimeButton.innerText = getFormattedTime(request.sponsorTimes[i].segment[0]) + " to " + getFormattedTime(request.sponsorTimes[i].segment[1]) + extraInfo;
+ sponsorTimeButton.innerText = getFormattedTime(request.sponsorTimes[i].segment[0]) + " " + chrome.i18n.getMessage("to") + " " + getFormattedTime(request.sponsorTimes[i].segment[1]) + extraInfo;
let votingButtons = document.createElement("div");
@@ -448,7 +448,7 @@ async function runThePopup(messageListener?: MessageListener) {
let timeMessage = getFormattedTime(sponsorTimes[i].segment[s]);
//if this is an end time
if (s == 1) {
- timeMessage = " to " + timeMessage;
+ timeMessage = " " + chrome.i18n.getMessage("to") + " " + timeMessage;
} else if (i > 0) {
//add commas if necessary
timeMessage = ", " + timeMessage;
@@ -505,7 +505,7 @@ async function runThePopup(messageListener?: MessageListener) {
let timeMessage = getFormattedTime(sponsorTimes[i][s]);
//if this is an end time
if (s == 1) {
- timeMessage = " to " + timeMessage;
+ timeMessage = " " + chrome.i18n.getMessage("to") + " " + timeMessage;
} else if (i > 0) {
//add commas if necessary
timeMessage = timeMessage;
@@ -614,7 +614,7 @@ async function runThePopup(messageListener?: MessageListener) {
colonText.innerText = ":";
let toText = document.createElement("span");
- toText.innerText = " to ";
+ toText.innerText = " " + chrome.i18n.getMessage("to") + " ";
//remove all children to replace
while (sponsorTimeContainer.firstChild) {