From 765cd1b495d9db9fefec1122adee111e2883cc28 Mon Sep 17 00:00:00 2001 From: VariableVince <24507472+VariableVince@users.noreply.github.com> Date: Wed, 17 Dec 2025 20:30:12 +0100 Subject: [PATCH] Fix: incorrect Duos Trios Quads texts + display teams in one box (#2632) ## Description: - **Fix wrong Duos Trios Quads text in SP and Private Lobby modals:** PR #2591 overwrote translations for public_lobby.teams_Duos , teams_Trios and teams_Quads. But those translation keys are not only used in Public Lobby, they are also used for the Single player and Private Lobby modals. Where they are displayed in a slightly different context, making the new translations appear off. Fix: add seperate translation keys and restore old strings. - **One box for team text in Public Lobby:** display number of teams and team size in one block instead of two seperate blocks. It is agreed upon also by evan that one block would look better: https://discord.com/channels/1359946986937258015/1360078040222142564/1449498245817569502 --BEFORE:-- Before in public lobby seperated
boxes Before in public lobby seperated
boxes and with change in translation of PR 2591 visible Before naming of Duos Trios Quads
incorrect in SP and private lobby modal after changes in PR 2591 --AFTER:-- After in public lobby now one box for
Team games After in public lobby now one box for
Team games Quads example After in public lobby still same for
other game modes After naming of num teams for Duos
Trios Quads corrected Private lobby modal After naming of num teams for Duos
Trios Quads corrected ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33 --- resources/lang/en.json | 5 ++++- src/client/HostLobbyModal.ts | 2 +- src/client/PublicLobby.ts | 13 ++++++------- src/client/SinglePlayerModal.ts | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/resources/lang/en.json b/resources/lang/en.json index f3f1bda26..aa046e58c 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -292,7 +292,10 @@ "assigned_teams": "Assigned Teams", "empty_teams": "Empty Teams", "empty_team": "Empty", - "remove_player": "Remove {username}" + "remove_player": "Remove {username}", + "teams_Duos": "Duos (teams of 2)", + "teams_Trios": "Trios (teams of 3)", + "teams_Quads": "Quads (teams of 4)" }, "team_colors": { "red": "Red", diff --git a/src/client/HostLobbyModal.ts b/src/client/HostLobbyModal.ts index 5d94324e9..dc0a6cb90 100644 --- a/src/client/HostLobbyModal.ts +++ b/src/client/HostLobbyModal.ts @@ -312,7 +312,7 @@ export class HostLobbyModal extends LitElement { ${typeof o === "string" ? o === HumansVsNations ? translateText("public_lobby.teams_hvn") - : translateText(`public_lobby.teams_${o}`) + : translateText(`host_modal.teams_${o}`) : translateText("public_lobby.teams", { num: o, })} diff --git a/src/client/PublicLobby.ts b/src/client/PublicLobby.ts index b1946e13d..2e79119cb 100644 --- a/src/client/PublicLobby.ts +++ b/src/client/PublicLobby.ts @@ -143,6 +143,11 @@ export class PublicLobby extends LitElement { teamTotal, teamSize, ); + + const fullModeLabel = teamDetailLabel + ? `${modeLabel} ${teamDetailLabel}` + : modeLabel; + const mapImageSrc = this.mapImages.get(lobby.gameID); return html` @@ -176,14 +181,8 @@ export class PublicLobby extends LitElement {
${modeLabel}${fullModeLabel} - ${teamDetailLabel - ? html`${teamDetailLabel}` - : ""} ${translateText( `map.${lobby.gameConfig.gameMap.toLowerCase().replace(/[\s.]+/g, "")}`, diff --git a/src/client/SinglePlayerModal.ts b/src/client/SinglePlayerModal.ts index 9c51bf905..6e8e04096 100644 --- a/src/client/SinglePlayerModal.ts +++ b/src/client/SinglePlayerModal.ts @@ -220,7 +220,7 @@ export class SinglePlayerModal extends LitElement { ${typeof o === "string" ? o === HumansVsNations ? translateText("public_lobby.teams_hvn") - : translateText(`public_lobby.teams_${o}`) + : translateText(`host_modal.teams_${o}`) : translateText(`public_lobby.teams`, { num: o })}