From b84dbd0c676359f28bf2147b016164ce25b23d6b Mon Sep 17 00:00:00 2001 From: Ross Bulat Date: Tue, 24 Oct 2023 17:55:10 +0800 Subject: [PATCH] chore: amend text --- src/library/ListItem/Labels/Quartile.tsx | 13 ++++++++----- src/locale/cn/library.json | 2 +- src/locale/en/library.json | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/library/ListItem/Labels/Quartile.tsx b/src/library/ListItem/Labels/Quartile.tsx index 9b6cc79936..c6442f2dbd 100644 --- a/src/library/ListItem/Labels/Quartile.tsx +++ b/src/library/ListItem/Labels/Quartile.tsx @@ -7,15 +7,16 @@ import { useTooltip } from 'contexts/Tooltip'; import { useTranslation } from 'react-i18next'; export const Quartile = ({ address }: { address: string }) => { - const { t } = useTranslation('library'); + const { t } = useTranslation(); const { setTooltipTextAndOpen } = useTooltip(); const { validatorEraPointsHistory, erasRewardPointsFetched } = useValidators(); const quartile = validatorEraPointsHistory[address]?.quartile; - const tooltipText = `${MaxEraRewardPointsEras} ${t( - 'dayPerformanceStanding' - )}`; + const tooltipText = `${t('dayPerformanceStanding', { + count: MaxEraRewardPointsEras, + ns: 'library', + })}`; if (erasRewardPointsFetched !== 'synced') return null; @@ -26,7 +27,9 @@ export const Quartile = ({ address }: { address: string }) => { onMouseMove={() => setTooltipTextAndOpen(tooltipText)} style={{ cursor: 'default' }} > - {![100, undefined].includes(quartile) ? `${t('top')} ${quartile}%` : ``} + {![100, undefined].includes(quartile) + ? `${t('top', { ns: 'library' })} ${quartile}%` + : ``} ); }; diff --git a/src/locale/cn/library.json b/src/locale/cn/library.json index 1da62b1e90..24debbb519 100644 --- a/src/locale/cn/library.json +++ b/src/locale/cn/library.json @@ -47,7 +47,7 @@ "createPool": "创建提名池", "dayAverage": "日平均值", "dayPerformance": "天内表现", - "dayPerformanceStanding": "天内表现排名", + "dayPerformanceStanding": "{{count}}天活跃验证人内表现排名", "dayPoolPerformance": "天内提名池表现", "destroying": "销毁中", "destroyingPools": "正在销毁提名池", diff --git a/src/locale/en/library.json b/src/locale/en/library.json index 7e68eab8aa..a2d856f2b2 100644 --- a/src/locale/en/library.json +++ b/src/locale/en/library.json @@ -47,7 +47,7 @@ "createPool": "Create Pool", "dayAverage": "Day Average", "dayPerformance": "Day Performance", - "dayPerformanceStanding": "Day Performance Standing", + "dayPerformanceStanding": "{{count}} Day Active Validators Performance Standing", "dayPoolPerformance": "Day Pool Performance", "destroying": "Destroying", "destroyingPools": "Destroying Pools",