Skip to content

Commit

Permalink
add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat committed Apr 2, 2024
1 parent f42fe73 commit acc8f48
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/canvas/JoinPool/Overview/Addresses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Addresses = ({
return (
<CardWrapper className="canvas secondary">
<HeadingWrapper>
<h3>{t('poolAddresses')}</h3>
<h3>{t('addresses')}</h3>
</HeadingWrapper>

<AddressesWrapper>
Expand Down
15 changes: 10 additions & 5 deletions src/canvas/JoinPool/Overview/Roles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,45 @@ import { ButtonHelp } from 'kits/Buttons/ButtonHelp';
import { useHelp } from 'contexts/Help';
import { AddressSection } from './AddressSection';
import type { OverviewSectionProps } from '../types';
import { useTranslation } from 'react-i18next';

export const Roles = ({ bondedPool }: OverviewSectionProps) => {
const { t } = useTranslation('pages');
const { openHelp } = useHelp();

return (
<div>
<CardWrapper className="canvas secondary">
<HeadingWrapper>
<h3>
Pool Roles
{t('pools.roles')}
<ButtonHelp marginLeft onClick={() => openHelp('Pool Roles')} />
</h3>
</HeadingWrapper>

<AddressesWrapper>
{bondedPool.roles.root && (
<AddressSection address={bondedPool.roles.root} label="Root" />
<AddressSection
address={bondedPool.roles.root}
label={t('pools.root')}
/>
)}
{bondedPool.roles.nominator && (
<AddressSection
address={bondedPool.roles.nominator}
label="Nominator"
label={t('pools.nominator')}
/>
)}
{bondedPool.roles.bouncer && (
<AddressSection
address={bondedPool.roles.bouncer}
label="Bounder"
label={t('pools.bouncer')}
/>
)}
{bondedPool.roles.depositor && (
<AddressSection
address={bondedPool.roles.depositor}
label="Depositor"
label={t('pools.depositor')}
/>
)}
</AddressesWrapper>
Expand Down
6 changes: 4 additions & 2 deletions src/canvas/JoinPool/Overview/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import { useApi } from 'contexts/Api';
import BigNumber from 'bignumber.js';
import { useEffect, useState } from 'react';
import type { OverviewSectionProps } from '../types';
import { useTranslation } from 'react-i18next';

export const Stats = ({ bondedPool }: OverviewSectionProps) => {
const { t } = useTranslation('library');
const {
networkData: {
units,
Expand Down Expand Up @@ -50,14 +52,14 @@ export const Stats = ({ bondedPool }: OverviewSectionProps) => {
return (
<HeadingWrapper>
<h4>
<span className="active">Actively Nominating</span>
<span className="active">{t('activelyNominating')}</span>

<span className="balance">
<Token className="icon" />
{!poolBalance
? `...`
: planckToUnit(poolBalance, units).decimalPlaces(3).toFormat()}{' '}
{unit} Bonded
{unit} {t('bonded')}
</span>
</h4>
</HeadingWrapper>
Expand Down
4 changes: 2 additions & 2 deletions src/library/Form/ClaimPermissionInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export const ClaimPermissionInput = ({
description: t('allowAnyoneCompound'),
},
{
label: 'Permissioned',
label: t('permissioned'),
value: 'Permissioned',
description: 'Only you can claim rewards.',
description: t('permissionedSubtitle'),
},
];

Expand Down
5 changes: 4 additions & 1 deletion src/locale/cn/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"activePools": "活跃提名池",
"activeValidator": "活跃验证人",
"activeValidators": "活跃验证人",
"activelyNominating": "Actively Nominating",
"add": "添加",
"addFromFavorites": "从收藏夹添加",
"address": "地址",
"addressCopiedToClipboard": "复制到剪贴板的地址",
"addresses": "Addresses",
"all": "全部",
"allowAll": "允许所有",
"allowAnyoneCompound": "允许任何人代表您复利收益",
Expand Down Expand Up @@ -41,6 +43,8 @@
"chooseValidators": "最多能选择 {{maxNominations}} 个验证人。",
"chooseValidators2": "自动生成提名或手动加入提名",
"claimSetting": "Claim Setting",
"permissioned": "Permissioned",
"permissionedSubtitle": "Only you can claim rewards.",
"clear": "清除",
"clearSelection": "清除选择",
"clickToReload": "重新加载",
Expand Down Expand Up @@ -152,7 +156,6 @@
"permissionlessClaimingTurnedOff": "己许可申领己关闭",
"points": "点数",
"pool": "提名池",
"poolAddresses": "Pool Addresses",
"poolClaim": "提名池申领",
"poolCommission": "提名池佣金",
"poolId": "提名池ID",
Expand Down
5 changes: 4 additions & 1 deletion src/locale/en/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"activePools": "Active Pools",
"activeValidator": "Active Validator",
"activeValidators": "Active Validators",
"activelyNominating": "Actively Nominating",
"add": "Add",
"addFromFavorites": "Add From Favorites",
"address": "Address",
"addressCopiedToClipboard": "Address Copied to Clipboard",
"addresses": "Addresses",
"all": "All",
"allowAll": "Allow All",
"allowAnyoneCompound": "Allow anyone to compound your rewards.",
Expand Down Expand Up @@ -43,6 +45,8 @@
"claimSetting": "Claim Setting",
"clear": "Clear",
"clearSelection": "clear selection",
"permissioned": "Permissioned",
"permissionedSubtitle": "Only you can claim rewards.",
"clickToReload": "Click to reload",
"complete": "Complete",
"confirm": "Confirm",
Expand Down Expand Up @@ -154,7 +158,6 @@
"permissionlessClaimingTurnedOff": "Permissionless claiming is turned off.",
"points": "Points",
"pool": "Pool",
"poolAddresses": "Pool Addresses",
"poolClaim": "Pool Claim",
"poolCommission": "Pool Commission",
"poolId": "Pool ID",
Expand Down

0 comments on commit acc8f48

Please sign in to comment.