From 1b652f52f050868206175e9c2ea129ce3a1b0a22 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 13 Aug 2022 10:27:19 +0300 Subject: [PATCH] Add translations to user page --- app/routes/u.$identifier/results.tsx | 12 ++++++------ public/locales/en/user.json | 8 +++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/routes/u.$identifier/results.tsx b/app/routes/u.$identifier/results.tsx index d81a93b80..71a65bf36 100644 --- a/app/routes/u.$identifier/results.tsx +++ b/app/routes/u.$identifier/results.tsx @@ -9,7 +9,7 @@ import { calendarEventPage, userPage } from "~/utils/urls"; import type { UserPageLoaderData } from "../u.$identifier"; export default function UserResultsPage() { - const { i18n } = useTranslation(); + const { t, i18n } = useTranslation("user"); const [, parentRoute] = useMatches(); invariant(parentRoute); const data = parentRoute.data as UserPageLoaderData; @@ -19,11 +19,11 @@ export default function UserResultsPage() { - - - - - + + + + + diff --git a/public/locales/en/user.json b/public/locales/en/user.json index fe45d5000..9ff731824 100644 --- a/public/locales/en/user.json +++ b/public/locales/en/user.json @@ -1,4 +1,10 @@ { "country": "Country", - "bio": "Bio" + "bio": "Bio", + + "results.placing": "Placing", + "results.team": "Team", + "results.tournament": "Tournament", + "results.date": "Date", + "results.mates": "Mates" }
PlacingTeamTournamentDateMates{t("results.placing")}{t("results.team")}{t("results.tournament")}{t("results.date")}{t("results.mates")}