diff --git a/AGENTS.md b/AGENTS.md index ad6c4950f..26086a904 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -77,7 +77,7 @@ - some a11y labels or text that should not normally be encountered by user (example given, error message by server) can be english - before adding a new translation, check that one doesn't already exist you can reuse (particularly in the common.json) - add only English translation and use `pnpm run i18n:sync` to initialize other jsons with empty string ready for translators -- when using namespace e.g. `const { t } = useTranslation("settings"]);` it needs to be defined in the `handle` for that route e.g. `export const handle: SendouRouteHandle = { i18n: ["settings"], ... }` +- when using namespace e.g. `const { t } = useTranslation("settings"]);` it needs to be defined in the `handle` for that route e.g. `export const handle: SendouRouteHandle = { i18n: ["settings"], ... }`. Certain namespaces are always included and you don't have to worry about those: "common", "forms", "game-misc", "weapons", "front", "friends" ## Commit messages diff --git a/app/features/tournament-match/components/TournamentMatchAdminTab.tsx b/app/features/tournament-match/components/TournamentMatchAdminTab.tsx index 3318d1452..9f15ea4c1 100644 --- a/app/features/tournament-match/components/TournamentMatchAdminTab.tsx +++ b/app/features/tournament-match/components/TournamentMatchAdminTab.tsx @@ -382,7 +382,7 @@ function EditReportedScoreRow({ teams: [TournamentDataTeam, TournamentDataTeam]; withPoints: boolean; }) { - const { t } = useTranslation(["common", "tournament"]); + const { t } = useTranslation(["common", "game-misc", "tournament"]); const tournament = useTournament(); const fetcher = useFetcher(); const [editing, setEditing] = React.useState(false); @@ -399,8 +399,6 @@ function EditReportedScoreRow({ previousFetcherStateRef.current = fetcher.state; }, [fetcher.state, fetcher.data]); - const winnerName = - result.winnerTeamId === teams[0].id ? teams[0].name : teams[1].name; const isKo = result.opponentOnePoints === 100 || result.opponentTwoPoints === 100; @@ -412,13 +410,9 @@ function EditReportedScoreRow({ {t("tournament:match.admin.mapNumber", { number: index + 1 })} - {isKo - ? t("tournament:match.admin.winnerWonKo", { - teamName: winnerName, - }) - : t("tournament:match.admin.winnerWon", { - teamName: winnerName, - })} + {t(`game-misc:MODE_SHORT_${result.mode}`)}{" "} + {t(`game-misc:STAGE_${result.stageId}`)} + {isKo ? ` ${t("tournament:match.admin.koSuffix")}` : null}