Switched to native

This commit is contained in:
Official Noob 2019-08-12 18:33:36 +01:00 committed by GitHub
parent 5347b9c935
commit c8341a448d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 39 deletions

39
LANG.js
View file

@ -1,39 +0,0 @@
// File to store strings for diffrent languages
lang = navigator.language.replace("-", "_");
// Utils
function getErrorMessage(statusCode) {
if(lang.has(statusCode)) return lang.get(statusCode);
return lang.get('Unknown').concat(" Error code: ") + statusCode;
}
function MSG(message) {
if(lang.has(message)) return lang.get(message);
console.warn("Could not find key " + message + " for lang "+lang);
return "";
}
//Declare Maps
var en_US = new Map();
// Main
en_US.set(400, 'Server said this request was invalid"')
.set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?')
.set(409, 'This has already been submitted before')
.set(502, 'It seems the server is down. Contact the dev to inform them.')
.set('Unknown', 'There was an error submitting your sponsor times, please try again later.')
.set("CWL","Channel Whitelisted!")
.set("SPs","sponsors.")
.set("SP","sponsor.")
.set("SPSEGs","sponsor segments.")
.set("SPSEG","sponsor segment.")
.set("SP_FOUND","This video's sponsors are in the database!")
.set("SP_NONE","No sponsors found")
.set("SP_END","Sponsorship Ends Now")
.set("SP_START","Sponsorship Starts Now")
.set("NOTYT","his probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again.")
.set("VOTE","Thanks for voting!")
.set("VOTE_FAIL","You have already voted this way before.")
.set("It seems the sever is down. Contact the dev immediately.","SBDOWN")

63
_locales/en/messages.json Normal file
View file

@ -0,0 +1,63 @@
{
"Name": {
"message": "SponsorBlock",
"description": "Name of the extension."
},
"Description": {
"message": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.",
"description": "Description of the extension."
},
"400": {
"message": "Server said this request was invalid"
},
"429": {
"message": "You have submitted too many sponsor times for this one video, are you sure there are this many?"
},
"409": {
"message": "This has already been submitted before"
},
"502": {
"message": "It seems the server is down. Contact the dev to inform them."
},
"ChannelWhitelisted": {
"message": "Channel Whitelisted!"
},
"Sponsor": {
"message": "Sponsor"
},
"Sponsors": {
"message": "Sponsors"
},
"Segments": {
"message": "sponsor segments"
},
"Unknown": {
"message": "There was an error submitting your sponsor times, please try again later."
},
"SponsorFound": {
"message": "This video's sponsors are in the database!"
},
"Sponsor404": {
"message": "No sponsors found"
},
"SponsorStart": {
"message": "Sponsorship Starts Now"
},
"SponsorEND": {
"message": "Sponsorship Ends Now"
},
"noVIDEOID": {
"message": "this probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again."
},
"VOTED": {
"message": "Thanks for voting!"
},
"VOTE_FAIL": {
"message": "You have already voted this way before."
},
"ServerDown": {
"message": "It seems the sever is down. Contact the dev immediately."
},
}