Skip to content

Commit

Permalink
fix: some text (#8844)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhanseng committed Mar 2, 2023
1 parent 474fb6d commit 0c806a1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Expand Up @@ -256,11 +256,12 @@ export function RedPacket(props: RedPacketProps) {
if (listOfStatus.includes(RedPacketStatus.expired)) return t.description_expired()
if (listOfStatus.includes(RedPacketStatus.empty)) return t.description_empty()
if (!payload.password) return t.description_broken()
return t.description_failover({
const i18nParams = {
total: formatBalance(payload.total, token.decimals, 2),
symbol: token.symbol ?? '-',
shares: payload.shares.toString() ?? '-',
})
count: payload.shares.toString() ?? '-',
}
return payload.shares > 1 ? t.description_failover_other(i18nParams) : t.description_failover_one(i18nParams)
}, [availability, canRefund, token, t, payload, listOfStatus])

const handleShare = useCallback(() => {
Expand Down
3 changes: 2 additions & 1 deletion packages/mask/src/plugins/RedPacket/locales/en-US.json
Expand Up @@ -88,7 +88,8 @@
"description_expired": "The Lucky Drop is expired.",
"description_broken": "The Lucky Drop is broken.",
"description_empty": "The Lucky Drop is empty.",
"description_failover": "{{shares}} shares / {{- total}} {{symbol}}",
"description_failover_one": "{{count}} share / {{- total}} {{symbol}}",
"description_failover_other": "{{count}} shares / {{- total}} {{symbol}}",
"recommend_feature_description": "Send a surprise crypto giveaway. Tokens and NFTs on multiple chains are supported.",
"claim_token_successful": "You claimed {{- amount}} {{name}}.",
"claim_nft_successful": "Claimed 1 {{name}} successfully.",
Expand Down
Expand Up @@ -466,8 +466,8 @@ export const ConfirmDialogUI = memo<ConfirmDialogUIProps>(
formatter={formatBalance}
/>
<span>
{gasFeeUSD.includes('<') ? '' : '\u2248'}
{gasFeeUSD}
({gasFeeUSD.includes('<') ? '' : '\u2248'}
{gasFeeUSD})
</span>
</Typography>
</Box>
Expand Down
Expand Up @@ -155,8 +155,8 @@ export const TraderInfoUI = memo<TraderInfoUIProps>(
/>
</Typography>
<Typography fontSize={14} lineHeight="20px" component="span">
{gasFeeValueUSD.includes('<') ? '' : '\u2248'}
{gasFeeValueUSD}
({gasFeeValueUSD.includes('<') ? '' : '\u2248'}
{gasFeeValueUSD})
</Typography>
</Typography>
) : null}
Expand Down

0 comments on commit 0c806a1

Please sign in to comment.