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:
@@ -21,7 +21,8 @@ export function createStream(obj) {
|
||||
ip: iphmac,
|
||||
exp: exp,
|
||||
isAudioOnly: obj.isAudioOnly ? true : false,
|
||||
time: obj.time
|
||||
time: obj.time,
|
||||
lang: obj.lang
|
||||
});
|
||||
return `${process.env.selfURL}api/stream?t=${streamUUID}&e=${exp}&h=${ghmac}`;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import got from "got";
|
||||
import { ffmpegArgs, genericUserAgent } from "../config.js";
|
||||
import { msToTime } from "../sub/utils.js";
|
||||
import { internalError } from "../sub/errors.js";
|
||||
import loc from "../sub/i18n.js";
|
||||
import loc from "../../localization/manager.js";
|
||||
|
||||
export async function streamDefault(streamInfo, res) {
|
||||
try {
|
||||
@@ -69,7 +69,7 @@ export async function streamLiveRender(streamInfo, res) {
|
||||
ffmpegProcess.kill();
|
||||
});
|
||||
} else {
|
||||
res.status(400).json({ status: "error", text: loc('en', 'apiError', 'corruptedStream') });
|
||||
res.status(400).json({ status: "error", text: loc(streamInfo.lang, 'ErrorCorruptedStream') });
|
||||
}
|
||||
} catch (e) {
|
||||
internalError(res);
|
||||
|
||||
Reference in New Issue
Block a user