Skip to content

Commit

Permalink
chore: amend text
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat committed Oct 24, 2023
1 parent 4ff9717 commit b84dbd0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions src/library/ListItem/Labels/Quartile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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}%`
: ``}
</div>
);
};
2 changes: 1 addition & 1 deletion src/locale/cn/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"createPool": "创建提名池",
"dayAverage": "日平均值",
"dayPerformance": "天内表现",
"dayPerformanceStanding": "天内表现排名",
"dayPerformanceStanding": "{{count}}天活跃验证人内表现排名",
"dayPoolPerformance": "天内提名池表现",
"destroying": "销毁中",
"destroyingPools": "正在销毁提名池",
Expand Down
2 changes: 1 addition & 1 deletion src/locale/en/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b84dbd0

Please sign in to comment.