mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 10:52:23 +01:00
LawinServer News Tab for CH2 & CH3
Furthermore: - Fixed the playlist images not loading on some builds. - Added the original solo, duo and squads images. - Fixed not being able to press "Play" when StW was selected via the discovery menu on latest. - Fixed the translations not diplaying for the Portugese (Brazil) language.
This commit is contained in:
@@ -191,7 +191,7 @@ function getContentPages(req) {
|
||||
var Language = "en";
|
||||
|
||||
if (req.headers["accept-language"]) {
|
||||
if (req.headers["accept-language"].includes("-") && req.headers["accept-language"] != "es-419") {
|
||||
if (req.headers["accept-language"].includes("-") && req.headers["accept-language"] != "es-419" && req.headers["accept-language"] != "pt-BR") {
|
||||
Language = req.headers["accept-language"].split("-")[0];
|
||||
} else {
|
||||
Language = req.headers["accept-language"];
|
||||
@@ -200,6 +200,7 @@ function getContentPages(req) {
|
||||
|
||||
const modes = ["saveTheWorldUnowned", "battleRoyale", "creative", "saveTheWorld"];
|
||||
const news = ["savetheworldnews", "battleroyalenews"]
|
||||
const motdnews = ["battleroyalenews", "battleroyalenewsv2"]
|
||||
|
||||
try {
|
||||
modes.forEach(mode => {
|
||||
@@ -217,6 +218,15 @@ function getContentPages(req) {
|
||||
}
|
||||
} catch (err) {}
|
||||
|
||||
try {
|
||||
motdnews.forEach(news => {
|
||||
contentpages[news].news.motds.forEach(motd => {
|
||||
motd.title = motd.title[Language];
|
||||
motd.body = motd.body[Language];
|
||||
})
|
||||
})
|
||||
} catch (err) {}
|
||||
|
||||
try {
|
||||
contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = `season${memory.season}`;
|
||||
contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = `season${memory.season}`;
|
||||
|
||||
Reference in New Issue
Block a user