aboutsummaryrefslogtreecommitdiffhomepage
path: root/popup.js
diff options
context:
space:
mode:
authorOfficial Noob <[email protected]>2019-08-12 19:47:11 +0100
committerGitHub <[email protected]>2019-08-12 19:47:11 +0100
commit334e32fb6bdf671b78756eee1a96d962639f54f8 (patch)
tree512188f2ca3340a8872b6e96d4ca2092b818c498 /popup.js
parent7a362776955dc0d24433418b863196f23df614ab (diff)
downloadSponsorBlock-334e32fb6bdf671b78756eee1a96d962639f54f8.tar.gz
SponsorBlock-334e32fb6bdf671b78756eee1a96d962639f54f8.zip
i18n
Diffstat (limited to 'popup.js')
-rw-r--r--popup.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/popup.js b/popup.js
index ec6e1f3c..ded54fef 100644
--- a/popup.js
+++ b/popup.js
@@ -159,9 +159,9 @@ function runThePopup() {
chrome.storage.sync.get(["sponsorTimesContributed"], function(result) {
if (result.sponsorTimesContributed != undefined) {
if (result.sponsorTimesContributed > 1) {
- SB.sponsorTimesContributionsDisplayEndWord.innerText = MSG("SPs");
+ SB.sponsorTimesContributionsDisplayEndWord.innerText = browser.i18n.getMessage("Sponsors");
} else {
- SB.sponsorTimesContributionsDisplayEndWord.innerText = MSG("SP");
+ SB.sponsorTimesContributionsDisplayEndWord.innerText = browser.i18n.getMessage("Sponsor");
}
SB.sponsorTimesContributionsDisplay.innerText = result.sponsorTimesContributed;
SB.sponsorTimesContributionsContainer.style.display = "unset";
@@ -177,9 +177,9 @@ function runThePopup() {
let viewCount = JSON.parse(xmlhttp.responseText).viewCount;
if (viewCount != 0) {
if (viewCount > 1) {
- SB.sponsorTimesViewsDisplayEndWord.innerText = MSG("SPSEGs");
+ SB.sponsorTimesViewsDisplayEndWord.innerText = browser.i18n.getMessage("Segments");
} else {
- SB.sponsorTimesViewsDisplayEndWord.innerText = MSG("SPSEG");
+ SB.sponsorTimesViewsDisplayEndWord.innerText = browser.i18n.getMessage("Segment");
}
SB.sponsorTimesViewsDisplay.innerText = viewCount;
@@ -256,11 +256,11 @@ function runThePopup() {
SB.loadingIndicator.innerHTML = "";
if (request.found) {
- SB.videoFound.innerHTML = MSG("SP_FOUND");
+ SB.videoFound.innerHTML = browser.i18n.getMessage("SponsorFound");
displayDownloadedSponsorTimes(request);
} else {
- SB.videoFound.innerHTML = MSG("SP_NONE");
+ SB.videoFound.innerHTML = browser.i18n.getMessage("Sponsor404");
}
}
@@ -358,7 +358,7 @@ function runThePopup() {
function displayDownloadedSponsorTimes(request) {
if (request.sponsorTimes != undefined) {
//set it to the message
- if (SB.downloadedSponsorMessageTimes.innerText != MSG("CWL")) {
+ if (SB.downloadedSponsorMessageTimes.innerText != browser.i18n.getMessage("ChannelWhitelisted")) {
SB.downloadedSponsorMessageTimes.innerText = getSponsorTimesMessage(request.sponsorTimes);
}
@@ -873,7 +873,7 @@ function runThePopup() {
//update startTimeChosen letiable
if (!startTimeChosen) {
startTimeChosen = true;
- SB.sponsorStart.innerHTML = MSG("SP_END");
+ SB.sponsorStart.innerHTML = browser.i18n.getMessage("SponsorEND");
} else {
resetStartTimeChosen();
}
@@ -905,7 +905,7 @@ function runThePopup() {
//this is not a YouTube video page
function displayNoVideo() {
- document.getElementById("loadingIndicator").innerHTML = MSG("NOTYT");
+ document.getElementById("loadingIndicator").innerHTML = browser.i18n.getMessage("Sponsor404");
}
function reportAnIssue() {
@@ -942,16 +942,16 @@ function runThePopup() {
//see if it was a success or failure
if (response.successType == 1) {
//success
- addVoteMessage(MSG("VOTE"), UUID)
+ addVoteMessage(browser.i18n.getMessage("VOTED"), UUID)
} else if (response.successType == 0) {
//failure: duplicate vote
- addVoteMessage("You have already voted this way before.", UUID)
+ addVoteMessage(browser.i18n.getMessage("VOTE_FAIL"), UUID)
} else if (response.successType == -1) {
if (response.statusCode == 502) {
- addVoteMessage("It seems the sever is down. Contact the dev immediately.", UUID)
+ addVoteMessage(browser.i18n.getMessage("ServerDown"), UUID)
} else {
//failure: unknown error
- addVoteMessage("A connection error has occured. Error code: " + response.statusCode, UUID)
+ addVoteMessage(browser.i18n.getMessage("connectionError") + response.statusCode, UUID)
}
}
}