diff --git a/public/locales/en/app.json b/public/locales/en/app.json index 4fb33f8ce..2b8a71372 100644 --- a/public/locales/en/app.json +++ b/public/locales/en/app.json @@ -121,6 +121,7 @@ "weekView": "Week view", "whatsThis": "What's this?", "yes": "Yes", + "you": "You", "yourDetails": "Your details", "yourName": "Your name…", "yourPolls": "Your polls" diff --git a/src/components/poll/user-avatar.tsx b/src/components/poll/user-avatar.tsx index 5368b18c0..4e4444c33 100644 --- a/src/components/poll/user-avatar.tsx +++ b/src/components/poll/user-avatar.tsx @@ -1,4 +1,5 @@ import clsx from "clsx"; +import { useTranslation } from "next-i18next"; import * as React from "react"; import { stringToValue } from "@/utils/string-to-value"; @@ -110,6 +111,7 @@ const UserAvatar: React.VoidFunctionComponent = ({ className, ...forwardedProps }) => { + const { t } = useTranslation("app"); if (!showName) { return ; } @@ -125,7 +127,7 @@ const UserAvatar: React.VoidFunctionComponent = ({
{forwardedProps.name}
- {isYou ? You : null} + {isYou ? {t("you")} : null} ); };