remade localization system once again

- new localization system: fast, dynamic, way more organized
- localization strings are WAY more descriptive
- it's now easier to add support for other languages (just one loc file instead of five)
- localization now falls back to english if localized string isnt available
- got rid of all static language selectors (probably)
- slightly updated english and russian strings
- miscellaneous settings items have been bundled together and moved to the bottom, cause they're used the least
- bottom links should no longer touch the popup border on overflow
- rearranged popup order in the rendered page
- bumped version up to 2.2.5

if you see strings that are like this: !!EXAMPLE!! or withoutspace please file an issue on github
This commit is contained in:
wukko
2022-07-24 16:54:05 +06:00
parent 8d275b0213
commit a4a9af6120
32 changed files with 339 additions and 299 deletions

View File

@@ -25,7 +25,7 @@ export default async function (host, patternMatch, url, ip, lang, format, qualit
videoId: patternMatch["videoId"],
lang: lang, quality: quality
});
return (!r.error) ? apiJSON(2, { type: "bridge", u: r.url, filename: r.filename, service: host, ip: ip, salt: process.env.streamSalt }) : apiJSON(0, { t: r.error });
return (!r.error) ? apiJSON(2, { type: "bridge", lang: lang, u: r.url, filename: r.filename, service: host, ip: ip, salt: process.env.streamSalt }) : apiJSON(0, { t: r.error });
} else throw Error()
case "bilibili":
if (patternMatch["id"] && patternMatch["id"].length >= 12) {
@@ -62,7 +62,7 @@ export default async function (host, patternMatch, url, ip, lang, format, qualit
}
let r = await youtube(fetchInfo);
return (!r.error) ? apiJSON(2, {
type: r.type, u: r.urls, service: host, ip: ip,
type: r.type, u: r.urls, lang: lang, service: host, ip: ip,
filename: r.filename, salt: process.env.streamSalt,
isAudioOnly: fetchInfo["isAudioOnly"] ? fetchInfo["isAudioOnly"] : false,
time: r.time,
@@ -76,7 +76,7 @@ export default async function (host, patternMatch, url, ip, lang, format, qualit
title: patternMatch["title"], lang: lang,
});
return (!r.error) ? apiJSON(r.typeId, {
type: r.type, u: r.urls,
type: r.type, u: r.urls, lang: lang,
service: host, ip: ip,
filename: r.filename, salt: process.env.streamSalt
}) : apiJSON(0, { t: r.error });