Skip to content

Commit

Permalink
fix: update progress text
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jun 9, 2023
1 parent afbf669 commit 5d7030d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { IconButtonProps } from '@mui/material';
import { Box, CircularProgress, IconButton, Tooltip } from '@mui/material';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Trans, useTranslation } from 'react-i18next';

const getProgressValue = (updatedAt: number, timeToUpdate: number) =>
updatedAt
Expand Down Expand Up @@ -44,9 +44,15 @@ export const ProgressToNextUpdate: React.FC<
return (
<IconButton onClick={onClick} disabled={isLoading} {...other}>
<Tooltip
title={t('tooltip.progressToNextUpdate', {
value: getSecondsToUpdate(updatedAt, timeToUpdate),
})}
title={
<Trans
i18nKey="tooltip.progressToNextUpdate"
values={{
value: getSecondsToUpdate(updatedAt, timeToUpdate),
}}
components={[<br />]}
/>
}
placement="top"
enterDelay={400}
arrow
Expand Down
8 changes: 4 additions & 4 deletions packages/widget/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"message": {
"allowanceRequired": "Transfer amount for {{tokenSymbol}} exceeds your current allowance. Please increase your allowance and try again.",
"insufficientFunds": "You don't have enough gas to cover the cost of the transaction.",
"slippageThreshold": "The slippage is larger than the defined threshold. Please request a new route to get a fresh quote.",
"slippageThreshold": "The slippage is larger than the defined threshold. Please request a new quote.",
"transactionFailed": "Please check the block explorer for more information.",
"transactionNotSent": "Transaction was not sent. {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} on {{chainName}} remain in your wallet.",
"transactionRejected": "Your signature is required to complete the transaction. {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} on {{chainName}} remain in your wallet.",
Expand Down Expand Up @@ -151,7 +151,7 @@
"title": "404"
},
"numberOfSteps": "A number of exchange steps. Each step can contain 1-2 transactions that require a signature.",
"progressToNextUpdate": "Displayed data will auto-refresh after {{value}} seconds. Click here to update manually.",
"progressToNextUpdate": "Quotes will update in {{value}} seconds. <0/> Click here to update now.",
"recommended": "A cheap route that balances complexity and ease of use.",
"settingsModified": "Settings (modified)"
},
Expand Down Expand Up @@ -239,8 +239,8 @@
},
"insurance": {
"bridgeExploits": "Bridge malfunctions, hacks or exploits",
"insure": "Insure <strong>{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}}</strong> in transit.",
"insured": "You've insured <strong>{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}}</strong> in transit:",
"insure": "Insure <0>{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}}</0> in transit.",
"insured": "You've insured <0>{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}}</0> in transit:",
"slippageError": "Error in slippage for tokens received"
},
"settings": {
Expand Down

0 comments on commit 5d7030d

Please sign in to comment.