ncase / wbwwb

We Become What We Behold – a minigame about the news!
1.15k stars 235 forks source link

Game is crashing from "textStrings" variable #44

Open WillYuum opened 2 years ago

WillYuum commented 2 years ago

Game is crashing with this error:

Error: Scene_Preloader.js:49 Uncaught ReferenceError: textStrings is not defined

This issue is happening because textStrings doesn't even exist in code base and the game is trying to access it since it has multiple languages.

This issue should be fixed in this Pull Request.

Until the Pull Request can be merged you can add this at the bottom of the folder: textStrings.js

const textStrings = (() => {
    switch (navigator.language) {
        case "en-US":
            return textStrings_EN;
        case "da":
            return textStrings_DA;
        case "fa":
            return textStrings_FA;
        case "pt-pt":
            return textStrings_PT;
        case "pt-BR":
            return textStrings_PT_BR;
        case "es":
            return textStrings_ES;
        default:
            return textStrings_EN;
    }
}
)();
sponege commented 1 year ago

I have the same issue all the way in 2023