From 5d7030d26a9dabfd8ec8bf49017e61c226ecc2c7 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Fri, 9 Jun 2023 18:27:51 +0200 Subject: [PATCH] fix: update progress text --- .../ProgressToNextUpdate/ProgressToNextUpdate.tsx | 14 ++++++++++---- packages/widget/src/i18n/en.json | 8 ++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/widget/src/components/ProgressToNextUpdate/ProgressToNextUpdate.tsx b/packages/widget/src/components/ProgressToNextUpdate/ProgressToNextUpdate.tsx index 9af77e89d..84212bcb0 100644 --- a/packages/widget/src/components/ProgressToNextUpdate/ProgressToNextUpdate.tsx +++ b/packages/widget/src/components/ProgressToNextUpdate/ProgressToNextUpdate.tsx @@ -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 @@ -44,9 +44,15 @@ export const ProgressToNextUpdate: React.FC< return ( ]} + /> + } placement="top" enterDelay={400} arrow diff --git a/packages/widget/src/i18n/en.json b/packages/widget/src/i18n/en.json index 4481099ee..6e29b32d4 100644 --- a/packages/widget/src/i18n/en.json +++ b/packages/widget/src/i18n/en.json @@ -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.", @@ -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)" }, @@ -239,8 +239,8 @@ }, "insurance": { "bridgeExploits": "Bridge malfunctions, hacks or exploits", - "insure": "Insure {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} in transit.", - "insured": "You've insured {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} in transit:", + "insure": "Insure <0>{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} in transit.", + "insured": "You've insured <0>{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} in transit:", "slippageError": "Error in slippage for tokens received" }, "settings": {