diff --git a/resources/lang/en.json b/resources/lang/en.json index b9c5a79f3..8d41f9170 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -115,7 +115,7 @@ "ui_options": "Options", "ui_options_desc": "The following elements can be found inside:", "ui_playeroverlay": "Player info overlay", - "ui_playeroverlay_desc": "When you hover over a country, the Player info overlay is displayed under Options. It shows the type of player: Human, Nation (smart bot), or Bot. A Nation's attitude towards you, ranging from Hostile to Friendly. And defending troops, gold, plus the number of Warships and various buildings the player has.", + "ui_playeroverlay_desc": "When you hover over a country, the Player info overlay is displayed under Options. It shows the type of player: Human, Nation, or Tribe. A Nation's attitude towards you, ranging from Hostile to Friendly. And defending troops, gold, plus the number of Warships and various buildings the player has.", "ui_wilderness": "Wilderness", "option_pause": "Pause/Unpause the game - Only available in single player mode.", "option_timer": "Timer - Time passed since the start of the game.", @@ -137,7 +137,7 @@ "info_trade": "Use \"Stop trading\" to stop giving the player gold and receiving their gold via trade ships. If you both click \"Start trading\" it will start again.", "info_ally_panel": "Ally info panel", "info_ally_desc": "When you ally with a player, the following new icons become available:", - "ally_betray": "Betray your ally, ending the alliance, halting trade, and weakening your defense. Trading between you is paused for 5 minutes (or until you become allies again) and others may stop trading too. And unless the other player was a traitor themselves, you'll be marked a traitor for 30 seconds. During this time an icon will be above your name and you will have a 50% defense debuff. Bots are less likely to ally with you and players will think twice before doing so.", + "ally_betray": "Betray your ally, ending the alliance, halting trade, and weakening your defense. Trading between you is paused for 5 minutes (or until you become allies again) and others may stop trading too. And unless the other player was a traitor themselves, you'll be marked a traitor for 30 seconds. During this time an icon will be above your name and you will have a 50% defense debuff. Tribes are less likely to ally with you and players will think twice before doing so.", "ally_donate": "Donate some of your troops to your ally. Used when they're low on troops and are being attacked, or when they need that extra power to crush an enemy.", "ally_donate_gold": "Donate some of your gold to your ally. Used when they're low on gold and need it for buildings, or when your team member is saving for that MIRV.", "build_menu_title": "Build menu", @@ -184,7 +184,7 @@ "toggle_achievements": "Toggle achievements", "sign_in_for_achievements": "Sign in for achievements", "options_title": "Options", - "bots": "Bots: ", + "bots": "Tribes: ", "bots_disabled": "Disabled", "disable_nations": "Disable Nations", "instant_build": "Instant build", @@ -264,7 +264,7 @@ "conquest_gold": "Conquered player gold", "stolen_gold": "Stolen with warships", "num_of_conquests_humans": "Player kills", - "num_of_conquests_bots": "Bot kills", + "num_of_conquests_bots": "Tribe kills", "duration": "Duration", "survival_time": "Survival time", "war": "War", @@ -399,7 +399,7 @@ "team_count": "Number of Teams", "team_type": "Team Type", "options_title": "Options", - "bots": "Bots: ", + "bots": "Tribes: ", "bots_disabled": "Disabled", "player_immunity_duration": "PVP immunity duration (minutes)", "disable_nations": "Disable Nations", @@ -440,7 +440,9 @@ "yellow": "Yellow", "orange": "Orange", "green": "Green", - "bot": "Bot" + "bot": "Tribes", + "humans": "Humans", + "nations": "Nations" }, "game_starting_modal": { "title": "Game is Starting...", @@ -779,7 +781,7 @@ "player_type": { "player": "Player", "nation": "Nation", - "bot": "Bot" + "bot": "Tribe" }, "relation": { "hostile": "Hostile", diff --git a/src/client/Utils.ts b/src/client/Utils.ts index eceba18c9..92b106a38 100644 --- a/src/client/Utils.ts +++ b/src/client/Utils.ts @@ -6,6 +6,7 @@ import { MessageType, PublicGameModifiers, Quads, + Team, Trios, } from "../core/game/Game"; import { GameConfig } from "../core/Schemas"; @@ -408,6 +409,13 @@ export const translateText = ( } }; +export function getTranslatedPlayerTeamLabel(team: Team | null): string { + if (!team) return ""; + const translationKey = `team_colors.${team.toLowerCase()}`; + const translated = translateText(translationKey); + return translated === translationKey ? team : translated; +} + /** * Severity colors mapping for message types */ diff --git a/src/client/components/LobbyPlayerView.ts b/src/client/components/LobbyPlayerView.ts index 6429ffef7..d5b9c5259 100644 --- a/src/client/components/LobbyPlayerView.ts +++ b/src/client/components/LobbyPlayerView.ts @@ -18,7 +18,7 @@ import { assignTeamsLobbyPreview } from "../../core/game/TeamAssignment"; import { UserSettings } from "../../core/game/UserSettings"; import { ClientInfo, TeamCountConfig } from "../../core/Schemas"; import { createRandomName } from "../../core/Util"; -import { translateText } from "../Utils"; +import { getTranslatedPlayerTeamLabel, translateText } from "../Utils"; export interface TeamPreviewData { team: Team; @@ -193,6 +193,8 @@ export class LobbyTeamView extends LitElement { ? effectiveNationCount : this.teamMaxSize; + const teamLabel = getTranslatedPlayerTeamLabel(preview.team); + return html`