From 6c5d4afbe142180f108300353251fec075cff073 Mon Sep 17 00:00:00 2001 From: shuai Date: Fri, 26 May 2023 17:50:27 +0800 Subject: [PATCH] fix: i8n use backend --- i18n/en_US.yaml | 8 -------- .../pages/Users/Personal/components/Reputation/index.tsx | 6 +----- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml index c7c5e0ac..67d34d6e 100644 --- a/i18n/en_US.yaml +++ b/i18n/en_US.yaml @@ -1086,14 +1086,6 @@ ui: accepted: Accepted answered: answered asked: asked - rank_type: - upvote: upvote - upvoted: upvoted - downvote: downvote - downvoted: downvoted - edit: edit - accept: accept - accepted: accepted downvoted: downvoted mod_short: Mod mod_long: Moderators diff --git a/ui/src/pages/Users/Personal/components/Reputation/index.tsx b/ui/src/pages/Users/Personal/components/Reputation/index.tsx index 936759ca..b9caf624 100644 --- a/ui/src/pages/Users/Personal/components/Reputation/index.tsx +++ b/ui/src/pages/Users/Personal/components/Reputation/index.tsx @@ -1,6 +1,5 @@ import { FC, memo } from 'react'; import { ListGroup, ListGroupItem } from 'react-bootstrap'; -import { useTranslation } from 'react-i18next'; import { FormatTime } from '@/components'; import { pathFactory } from '@/router/pathFactory'; @@ -11,7 +10,6 @@ interface Props { } const Index: FC = ({ visible, data }) => { - const { t } = useTranslation('translation', { keyPrefix: 'personal' }); if (!visible || !data?.length) { return null; } @@ -48,9 +46,7 @@ const Index: FC = ({ visible, data }) => { {item.title}
- - {t(item.rank_type, { keyPrefix: 'personal.rank_type' })} - + {item.rank_type}