diff --git a/app/features/tournament/routes/to.$id.teams.$tid.tsx b/app/features/tournament/routes/to.$id.teams.$tid.tsx index fb7ab40eb..bcf693767 100644 --- a/app/features/tournament/routes/to.$id.teams.$tid.tsx +++ b/app/features/tournament/routes/to.$id.teams.$tid.tsx @@ -189,7 +189,7 @@ function SetInfo({ set, team }: { set: PlayedSet; team: TournamentDataTeam }) { const { t } = useTranslation(["tournament"]); const tournament = useTournament(); - const sourceToText = (source: TournamentMaplistSource) => { + const sourceToText = (source: TournamentMaplistSource, mapIndex: number) => { switch (source) { case "BOTH": return t("tournament:pickInfo.both"); @@ -197,6 +197,19 @@ function SetInfo({ set, team }: { set: PlayedSet; team: TournamentDataTeam }) { return t("tournament:pickInfo.default"); case "TIEBREAKER": return t("tournament:pickInfo.tiebreaker"); + case "COUNTERPICK": { + if (mapIndex > 0) { + const previousMap = set.maps[mapIndex - 1]; + const counterpickerName = + previousMap.result === "win" ? set.opponent.name : team.name; + return t("tournament:pickInfo.team.counterpick", { + team: counterpickerName, + }); + } + return t("tournament:pickInfo.counterpick"); + } + case "TO": + return null; default: { const teamName = source === set.opponent.id ? set.opponent.name : team.name; @@ -253,7 +266,7 @@ function SetInfo({ set, team }: { set: PlayedSet; team: TournamentDataTeam }) { width={125} className="rounded-sm" /> - {sourceToText(source)} + {sourceToText(source, i)} ); diff --git a/locales/da/tournament.json b/locales/da/tournament.json index 969620b39..eff3627f0 100644 --- a/locales/da/tournament.json +++ b/locales/da/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Bo", "pickInfo.team": "Hold {{number}} banevalg", "pickInfo.team.specific": "{{team}} valgte", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Tiebreak", "pickInfo.both": "begge hold valgte", "pickInfo.default": "", diff --git a/locales/de/tournament.json b/locales/de/tournament.json index 1647e526a..4a701604a 100644 --- a/locales/de/tournament.json +++ b/locales/de/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Bo", "pickInfo.team": "Team {{number}} Auswahl", "pickInfo.team.specific": "Von {{team}} ausgewählt", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Tiebreaker", "pickInfo.both": "Von beiden ausgewählt", "pickInfo.default": "", diff --git a/locales/en/tournament.json b/locales/en/tournament.json index c31be0a8f..3a9c6b311 100644 --- a/locales/en/tournament.json +++ b/locales/en/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Bo", "pickInfo.team": "Team {{number}} pick", "pickInfo.team.specific": "{{team}} picked", + "pickInfo.team.counterpick": "{{team}} counterpicked", "pickInfo.tiebreaker": "Tiebreaker", "pickInfo.both": "Both picked", "pickInfo.default": "Community's choice", diff --git a/locales/es-ES/tournament.json b/locales/es-ES/tournament.json index 338e699c9..54ddc34e0 100644 --- a/locales/es-ES/tournament.json +++ b/locales/es-ES/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Mejor de", "pickInfo.team": "Equipo {{number}} elige", "pickInfo.team.specific": "{{team}} eligió", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Desempate", "pickInfo.both": "Ambos eligieron", "pickInfo.default": "", diff --git a/locales/es-US/tournament.json b/locales/es-US/tournament.json index 1f73f5438..da6f94fed 100644 --- a/locales/es-US/tournament.json +++ b/locales/es-US/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Mejor de", "pickInfo.team": "Equipo {{number}} elige", "pickInfo.team.specific": "{{team}} eligió", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Desempate", "pickInfo.both": "Ambos eligieron", "pickInfo.default": "", diff --git a/locales/fr-CA/tournament.json b/locales/fr-CA/tournament.json index 6130e4943..5bb0c89f7 100644 --- a/locales/fr-CA/tournament.json +++ b/locales/fr-CA/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Md", "pickInfo.team": "L'équipe {{number}} fait son choix.", "pickInfo.team.specific": "{{team}} a fait son choix.", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Tiebreaker", "pickInfo.both": "Les deux ont choisi", "pickInfo.default": "", diff --git a/locales/fr-EU/tournament.json b/locales/fr-EU/tournament.json index 1c6be772b..58267d566 100644 --- a/locales/fr-EU/tournament.json +++ b/locales/fr-EU/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Md", "pickInfo.team": "L'équipe {{number}} fait son choix.", "pickInfo.team.specific": "{{team}} a fait son choix.", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Manche décisive", "pickInfo.both": "Les deux ont choisi", "pickInfo.default": "", diff --git a/locales/he/tournament.json b/locales/he/tournament.json index 41b4511f7..313539e7a 100644 --- a/locales/he/tournament.json +++ b/locales/he/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "הטוב מ-", "pickInfo.team": "צוות {{number}} בחרו", "pickInfo.team.specific": "{{team}} נבחר", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "שובר שיוויון", "pickInfo.both": "שניהם בחרו", "pickInfo.default": "", diff --git a/locales/it/tournament.json b/locales/it/tournament.json index 3997120ad..e3c5ae142 100644 --- a/locales/it/tournament.json +++ b/locales/it/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "★", "pickInfo.team": "Scelta del team {{number}}", "pickInfo.team.specific": "{{team}} ha scelto", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Spareggio", "pickInfo.both": "Scelto da entrambi", "pickInfo.default": "", diff --git a/locales/ja/tournament.json b/locales/ja/tournament.json index 82e08cf4c..ef734e8c7 100644 --- a/locales/ja/tournament.json +++ b/locales/ja/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Bo", "pickInfo.team": "チーム {{number}} の選択", "pickInfo.team.specific": "{{team}} picked", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "タイブレイカー", "pickInfo.both": "両者選択", "pickInfo.default": "", diff --git a/locales/ko/tournament.json b/locales/ko/tournament.json index f0af7b595..9be4f1f73 100644 --- a/locales/ko/tournament.json +++ b/locales/ko/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "", "pickInfo.team": "", "pickInfo.team.specific": "", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "", "pickInfo.both": "", "pickInfo.default": "", diff --git a/locales/nl/tournament.json b/locales/nl/tournament.json index cb0cd7e10..2fcabcd39 100644 --- a/locales/nl/tournament.json +++ b/locales/nl/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "", "pickInfo.team": "", "pickInfo.team.specific": "", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "", "pickInfo.both": "", "pickInfo.default": "", diff --git a/locales/pl/tournament.json b/locales/pl/tournament.json index 41fad228d..ca4001ba0 100644 --- a/locales/pl/tournament.json +++ b/locales/pl/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Bo", "pickInfo.team": "Drużyna {{number}} wybiera", "pickInfo.team.specific": "", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Tiebreaker", "pickInfo.both": "Oba wybrane", "pickInfo.default": "", diff --git a/locales/pt-BR/tournament.json b/locales/pt-BR/tournament.json index bbf8bddc2..787109de7 100644 --- a/locales/pt-BR/tournament.json +++ b/locales/pt-BR/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Md", "pickInfo.team": "Escolha do time {{number}}", "pickInfo.team.specific": "{{team}} escolheu", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Desempate", "pickInfo.both": "Ambos escolheram", "pickInfo.default": "", diff --git a/locales/ru/tournament.json b/locales/ru/tournament.json index b72eadade..c8704afdf 100644 --- a/locales/ru/tournament.json +++ b/locales/ru/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Лучшее из ", "pickInfo.team": "Выбор команды {{number}}", "pickInfo.team.specific": "", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "Тай-брейк", "pickInfo.both": "Выбрано обеими", "pickInfo.default": "", diff --git a/locales/zh/tournament.json b/locales/zh/tournament.json index 50b21a3ab..cdb04bf57 100644 --- a/locales/zh/tournament.json +++ b/locales/zh/tournament.json @@ -46,6 +46,7 @@ "bestOf.label.short": "Bo", "pickInfo.team": "队伍 {{number}} 选择", "pickInfo.team.specific": "{{team}} 选择", + "pickInfo.team.counterpick": "", "pickInfo.tiebreaker": "决胜局", "pickInfo.both": "双方都选择", "pickInfo.default": "",