mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-24 12:11:56 -05:00
Fix map source text for counterpicked maps on team page
This commit is contained in:
parent
62e6313428
commit
3f5e097f06
|
|
@ -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)}
|
||||
</div>
|
||||
</SendouPopover>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"bestOf.label.short": "הטוב מ-",
|
||||
"pickInfo.team": "צוות {{number}} בחרו",
|
||||
"pickInfo.team.specific": "{{team}} נבחר",
|
||||
"pickInfo.team.counterpick": "",
|
||||
"pickInfo.tiebreaker": "שובר שיוויון",
|
||||
"pickInfo.both": "שניהם בחרו",
|
||||
"pickInfo.default": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"bestOf.label.short": "",
|
||||
"pickInfo.team": "",
|
||||
"pickInfo.team.specific": "",
|
||||
"pickInfo.team.counterpick": "",
|
||||
"pickInfo.tiebreaker": "",
|
||||
"pickInfo.both": "",
|
||||
"pickInfo.default": "",
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"bestOf.label.short": "",
|
||||
"pickInfo.team": "",
|
||||
"pickInfo.team.specific": "",
|
||||
"pickInfo.team.counterpick": "",
|
||||
"pickInfo.tiebreaker": "",
|
||||
"pickInfo.both": "",
|
||||
"pickInfo.default": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -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": "",
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"bestOf.label.short": "Лучшее из ",
|
||||
"pickInfo.team": "Выбор команды {{number}}",
|
||||
"pickInfo.team.specific": "",
|
||||
"pickInfo.team.counterpick": "",
|
||||
"pickInfo.tiebreaker": "Тай-брейк",
|
||||
"pickInfo.both": "Выбрано обеими",
|
||||
"pickInfo.default": "",
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"bestOf.label.short": "Bo",
|
||||
"pickInfo.team": "队伍 {{number}} 选择",
|
||||
"pickInfo.team.specific": "{{team}} 选择",
|
||||
"pickInfo.team.counterpick": "",
|
||||
"pickInfo.tiebreaker": "决胜局",
|
||||
"pickInfo.both": "双方都选择",
|
||||
"pickInfo.default": "",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user