diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/index.html | 6 | ||||
-rw-r--r-- | src/app/js/settings.js | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/app/index.html b/src/app/index.html index 8fbcb8a..c61960f 100644 --- a/src/app/index.html +++ b/src/app/index.html @@ -200,12 +200,12 @@ </div> <div id="vpReleaseNotes" class="hidden section"></div> <div id="vpInfo" class="hidden section"> - <h2>%%viper.menu.info.links%%</h2> + <h2>%%viper.info.links%%</h2> <ul> <li>%%viper.info.discord%% <a href="https://northstar.tf/discord">northstar.tf/discord</a></li> <li>%%viper.info.issues%% <a href="https://github.com/0neGal/viper/issues">github.com/0neGal/viper/issues</a></li> </ul> - <h2>%%viper.menu.info.credits%%</h2> + <h2>%%viper.info.credits%%</h2> <ul> <li>Viper Logo: Imply#9781</li> <li>Viper Background: <a href="https://www.reddit.com/r/titanfall/comments/fwuh2x/take_to_the_skies">Uber Panzerhund</a></li> @@ -236,7 +236,7 @@ <div id="nsMods" class="hidden section"> <div id="modsdiv" class="grid"> <div class="line"> - <div class="text" id="modcount">%%gui.mods%%</div> + <div class="text" id="modcount">%%gui.mods.title%%</div> <div class="buttons modbtns"> <button id="removeall" class="bg-red2" onclick="mods.remove('allmods')">%%gui.mods.removeall%%</button> <button id="toggleall" class="bg-orange2" onclick="mods.toggle('allmods')">%%gui.mods.toggleall%%</button> diff --git a/src/app/js/settings.js b/src/app/js/settings.js index 682aa49..69ee7b8 100644 --- a/src/app/js/settings.js +++ b/src/app/js/settings.js @@ -67,9 +67,15 @@ var Settings = { div.innerHTML = ""; let langs = fs.readdirSync(__dirname + "/../lang"); for (let i in langs) { - title = JSON.parse(fs.readFileSync(__dirname + `/../lang/${langs[i]}`, "utf8"))["lang.title"]; + let lang_no_extension = langs[i].replace(/\..*$/, ""); + let title = lang("lang.title", lang_no_extension); + + if (title == "lang.title") { + continue; + } + if (title) { - div.innerHTML += `<option value="${langs[i].replace(/\..*$/, '')}">${title}</option>` + div.innerHTML += `<option value="${lang_no_extension}">${title}</option>` } } |