diff options
author | 0neGal <mail@0negal.com> | 2022-05-30 18:15:13 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2022-05-30 18:15:13 +0200 |
commit | 6e7b66060e8655e013b74140b30f41f6d5ee52e8 (patch) | |
tree | 993ec8ae42e59f3f26fcc9b0537d45f306321fd4 /src | |
parent | 45bf3b862d45bd925380f9d5be68b823b6df4998 (diff) | |
download | Viper-6e7b66060e8655e013b74140b30f41f6d5ee52e8.tar.gz Viper-6e7b66060e8655e013b74140b30f41f6d5ee52e8.zip |
support for singular players
While it's unlikely we'll ever get down to 1 player, it's best to be on
the safe side :p
Diffstat (limited to 'src')
-rw-r--r-- | src/app/launcher.js | 12 | ||||
-rw-r--r-- | src/lang/en.json | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/app/launcher.js b/src/app/launcher.js index 719048e..569d0fe 100644 --- a/src/app/launcher.js +++ b/src/app/launcher.js @@ -135,14 +135,14 @@ async function loadServers() { if (servercount == 0 || ! servercount || ! playercount) {masterserver = false} + let playerstr = lang("gui.server.players"); + if (playercount == 1) { + playerstr = lang("gui.server.player"); + } + if (masterserver) { serverstatus.classList.add("up"); - // servercount and playercount don't actually get set anywhere, - // the reason for this is, while writing this code, the master - // server is down so I don't have anyway to test the code... - // - // it'll be added whenever the masterserver comes online again. - serverstatus.innerHTML = `${servercount} ${lang("gui.server.servers")} - ${playercount} ${lang("gui.server.players")}`; + serverstatus.innerHTML = `${servercount} ${lang("gui.server.servers")} - ${playercount} ${playerstr}`; } else { serverstatus.classList.add("down"); serverstatus.innerHTML = lang("gui.server.offline"); diff --git a/src/lang/en.json b/src/lang/en.json index 045517d..34c4619 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -113,8 +113,9 @@ "gui.nsupdate.gaming.title": "Northstar update available!", "gui.nsupdate.gaming.body": "An update for Northstar is available.\nYou can force its installation after closing the game.", - "gui.server.servers": "servers", + "gui.server.player": "player", "gui.server.players": "players", + "gui.server.servers": "servers", "gui.server.offline": "Masterserver is Offline", "gui.launch": "Launch", |