From db0df815425912269fcef29740a3bb6964953b44 Mon Sep 17 00:00:00 2001 From: sebipap Date: Fri, 29 Sep 2023 10:32:38 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20add=20missing=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/getEXA/ReviewRoute.tsx | 2 +- components/getEXA/Route.tsx | 12 ++++++++---- components/getEXA/Routes.tsx | 4 +++- components/getEXA/SelectRoute.tsx | 2 +- contexts/GetEXAContext.tsx | 3 --- i18n/es/translation.json | 13 ++++++++----- pages/get-exa.tsx | 29 +++++++++++++++++------------ 7 files changed, 38 insertions(+), 27 deletions(-) diff --git a/components/getEXA/ReviewRoute.tsx b/components/getEXA/ReviewRoute.tsx index 365cc4f70..7dd9f3dcb 100644 --- a/components/getEXA/ReviewRoute.tsx +++ b/components/getEXA/ReviewRoute.tsx @@ -43,7 +43,7 @@ const ReviewRoute = () => { - {EXA} + {asset.symbol} {formatNumber(qtyIn)} {asset.symbol} diff --git a/components/getEXA/Route.tsx b/components/getEXA/Route.tsx index a5cb284ae..451f78f07 100644 --- a/components/getEXA/Route.tsx +++ b/components/getEXA/Route.tsx @@ -49,7 +49,7 @@ const Route = ({ route, tags }: Props) => { - {protocol?.displayName}{' '} + {protocol?.displayName} {serviceTime && ~ {Math.round(serviceTime / 60)} min} @@ -66,15 +66,19 @@ const Route = ({ route, tags }: Props) => { bgcolor={tag === 'fastest' ? '#33CC59' : '#0095FF'} > - {t(tag.toUpperCase())} + {tag === 'fastest' ? t('FASTEST') : t('BEST RETURN')} ))} - Est. Output: {formatNumber(Number(toAmount) / 1e18)} EXA - Gas fees: ${formatNumber(totalGasFeesInUsd)} + + {t('Est. Output')}: {formatNumber(Number(toAmount) / 1e18)} EXA + + + {t('Gas fees')}: ${formatNumber(totalGasFeesInUsd)} + diff --git a/components/getEXA/Routes.tsx b/components/getEXA/Routes.tsx index e6b627e43..b31d66d1d 100644 --- a/components/getEXA/Routes.tsx +++ b/components/getEXA/Routes.tsx @@ -2,9 +2,11 @@ import React, { Box, Skeleton } from '@mui/material'; import { useGetEXA } from 'contexts/GetEXAContext'; import { memo } from 'react'; import Route from './Route'; +import { useTranslation } from 'react-i18next'; const Routes = () => { const { routes } = useGetEXA(); + const { t } = useTranslation(); const fastestRouteId = routes?.sort( (r1, r2) => (r1.userTxs[0].serviceTime || 0) - (r2.userTxs[0].serviceTime || 0), @@ -30,7 +32,7 @@ const Routes = () => { /> )) ) : ( - 'no routes' + t('No routes') )} ); diff --git a/components/getEXA/SelectRoute.tsx b/components/getEXA/SelectRoute.tsx index c9359b99e..0dd96fb0e 100644 --- a/components/getEXA/SelectRoute.tsx +++ b/components/getEXA/SelectRoute.tsx @@ -154,7 +154,7 @@ const SelectRoute = () => { )} {exaBalance !== undefined ? ( - Balance: {formatNumber(formatUnits(exaBalance, 18))} + {t('Balance')}: {formatNumber(formatUnits(exaBalance, 18))} ) : ( diff --git a/contexts/GetEXAContext.tsx b/contexts/GetEXAContext.tsx index 1d96f1940..aff84feac 100644 --- a/contexts/GetEXAContext.tsx +++ b/contexts/GetEXAContext.tsx @@ -129,9 +129,7 @@ export const GetEXAProvider: FC = ({ children }) => { const [activeRoutes, setActiveRoutes] = useState(); const [bridgeStatus, setBridgeStatus] = useState(); - // const { chain: activeChain } = useNetwork(); const { walletAddress, opts, chain: appChain } = useWeb3(); - const { data: walletClient } = useWalletClient({ chainId: chain?.chainId }); const { t } = useTranslation(); const swapper = useSwapper(); @@ -281,7 +279,6 @@ export const GetEXAProvider: FC = ({ children }) => { }).then(splitSignature); const permit = { - // owner: walletAddress, value, deadline, ...{ v, r: r as Hex, s: s as Hex }, diff --git a/i18n/es/translation.json b/i18n/es/translation.json index be571e7b8..eedef0aaa 100644 --- a/i18n/es/translation.json +++ b/i18n/es/translation.json @@ -125,7 +125,7 @@ "Add tokens to Metamask": "Añadir tokens a Metamask", "Mint": "Mint", "Borrow Limit": "Límite de Préstamo", - "Slippage Tolerance": "Tolerancia de Slippage", + "Slippage Tolerance": "Tolerancia de ", "Pool Utilization Rate": "Tasa de Utilización del Pool", "Your Health Factor": "Tu Factor de Salud", "Total deposits": "Depósitos totales", @@ -481,10 +481,10 @@ "On connected wallet": "En billetera conectada", "Delegated to": "Delegado a", "Transaction Summary": "Resumen de la Transacción", - "Estimated Output": "Salida Estimada", + "Estimated Output": "Monto Estimado", "Dex": "Dex", "Gas Fee": "Tarifa de Gas", - "Swap Slippage": "Deslizamiento de Swap", + "Swap Slippage": "Tolerancia para el Swap", "Confirm": "Confirmar", "in": "en", "Get EXA": "Obtener EXA", @@ -503,6 +503,9 @@ "Error approving token": "Error al aprobar token", "Ready to take part in the Protocol's Governance, Vesting Program, or simply hold EXA? Begin by getting EXA today.": "¿Listo para participar en la Gobernanza del Protocolo, el Programa de Vencimiento o simplemente mantener EXA? Comienza obteniendo EXA hoy.", "GET": "OBTENER", - "Getting EXA gives you the ability to make the most of the Protocol's offerings, actively engaging in \t": "Obtener EXA te brinda la capacidad de aprovechar al máximo las ofertas del Protocolo, participando activamente en él. \t", - ", or joining the community as an EXA holder.": ", o unirte a la comunidad como poseedor de EXA." + "FASTEST": "MÁS RÁPIDO", + "BEST RETURN": "MEJOR RETORNO", + "Est. Output": "Monto Estimado", + "Gas fees": "Costo de la transacción", + "No routes": "No hay rutas" } diff --git a/pages/get-exa.tsx b/pages/get-exa.tsx index 4865fd9ea..d69196892 100644 --- a/pages/get-exa.tsx +++ b/pages/get-exa.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { NextPage } from 'next'; import { Box, Typography } from '@mui/material'; -import { useTranslation } from 'react-i18next'; +import { Trans, useTranslation } from 'react-i18next'; import { GetEXAProvider } from '../contexts/GetEXAContext'; import { usePageView } from '../hooks/useAnalytics'; import GetEXA from '../components/getEXA'; @@ -18,18 +18,23 @@ const GetExaPage: NextPage = () => { {t(`Get EXA`)} - {t(`Getting EXA gives you the ability to make the most of the Protocol's offerings, actively engaging in `)} - + {t('Governance')} + + ), }} - > - Governance - - {t(`, or joining the community as an EXA holder.`)} + />