Skip to content

Commit

Permalink
feat: Backing terminology for nomination list items (#2449)
Browse files Browse the repository at this point in the history
Co-authored-by: Ting A Lin <[email protected]>
Co-authored-by: Joel Kenny <[email protected]>
  • Loading branch information
3 people authored Jan 19, 2025
1 parent 12379a5 commit adcbc97
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/app/src/library/ListItem/Labels/NominationStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const NominationStatus = ({
} = useStaking()
const { syncing } = useSyncing(['era-stakers'])

// determine staked amount
let stakedAmount = new BigNumber(0)
if (bondFor === 'nominator') {
// bonded amount within the validator.
Expand All @@ -44,10 +43,19 @@ export const NominationStatus = ({
}
}

let statusTKey
if (status === 'active') {
statusTKey = 'backing'
} else if (status === 'inactive') {
statusTKey = 'notBacking'
} else {
statusTKey = 'waiting'
}

return (
<ValidatorStatusWrapper $status={status || 'waiting'} $noMargin={noMargin}>
<h5>
{t(`${status || 'waiting'}`)}
{t(statusTKey)}
{stakedAmount.isGreaterThan(0)
? ` / ${syncing ? '...' : `${stakedAmount.toFormat()} ${unit}`}`
: null}
Expand Down
2 changes: 2 additions & 0 deletions packages/locales/src/resources/cn/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"available": "可用",
"backToMethods": "返回方案选择",
"backToScan": "回到扫描",
"backing": "资金支持中",
"blocked": "己关闭",
"blockedNominations": "己冻结提名",
"blockingNominations": "冻结提名中",
Expand Down Expand Up @@ -132,6 +133,7 @@
"nominations": "提名",
"nominationsReverted": "已恢复原来提名",
"nominator": "提名人",
"notBacking": "非资金支持中",
"notEnough": "不足",
"notEnoughAfter": "交易费用后 {{unit}} 不足以质押",
"notEnoughFunds": "您的 {{unit}} 不足以提交这次交易",
Expand Down
2 changes: 2 additions & 0 deletions packages/locales/src/resources/en/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"available": "Available",
"backToMethods": "Back to Methods",
"backToScan": "Back to Scan",
"backing": "Backing",
"blocked": "Blocked",
"blockedNominations": "Blocked Nominations",
"blockingNominations": "Blocking Nominations",
Expand Down Expand Up @@ -135,6 +136,7 @@
"nominations_one": "Nomination",
"nominations_other": "Nominations",
"nominator": "Nominator",
"notBacking": "Not Backing",
"notEnough": "Not Enough",
"notEnoughAfter": "Not enough {{unit}} to bond after transaction fees.",
"notEnoughFunds": "The sender does have enough {{unit}} to submit this transaction.",
Expand Down
2 changes: 2 additions & 0 deletions packages/locales/src/resources/es/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"available": "Disponible",
"backToMethods": "Volver a Métodos",
"backToScan": "Volver al Escaneo",
"backing": "Respaldando",
"blocked": "Bloqueado",
"blockedNominations": "Nominaciones Bloqueadas",
"blockingNominations": "Bloqueando Nominaciones",
Expand Down Expand Up @@ -135,6 +136,7 @@
"nominations_one": "Nominación",
"nominations_other": "Nominaciones",
"nominator": "Nominador",
"notBacking": "No Respaldando",
"notEnough": "No es suficiente",
"notEnoughAfter": "No queda suficiente {{unit}} para vincular después de las tarifas de transacción.",
"notEnoughFunds": "El remitente no tiene suficiente {{unit}} para realizar esta transacción.",
Expand Down

0 comments on commit adcbc97

Please sign in to comment.