From b6052bc3e515fd261c8ec519b5250a83401e041e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C5=82ownia?= Date: Fri, 17 Nov 2023 21:01:18 +0100 Subject: [PATCH] feat(markets): use i18next (#5255) --- .../liquidity-header/liquidity-header.tsx | 5 +- libs/i18n/src/index.ts | 2 + libs/i18n/src/locales/en/markets.json | 143 +++++++++ .../last-24h-price-change.tsx | 3 +- .../last-24h-volume/last-24h-volume.tsx | 7 +- .../market-info/info-key-value-table.tsx | 6 +- .../market-info/market-info-accordion.tsx | 8 +- .../market-info/market-info-panels.tsx | 145 +++++---- .../market-info/tooltip-mapping.tsx | 286 +++++++++--------- .../oracle-banner/oracle-banner.tsx | 32 +- .../oracle-banner/oracle-statuses.ts | 31 +- .../oracle-basic-profile.tsx | 24 +- .../oracle-full-profile.tsx | 107 ++++--- libs/markets/src/lib/use-t.jsx | 3 + libs/markets/src/setup-tests.ts | 13 + 15 files changed, 520 insertions(+), 295 deletions(-) create mode 100644 libs/i18n/src/locales/en/markets.json create mode 100644 libs/markets/src/lib/use-t.jsx diff --git a/apps/trading/components/liquidity-header/liquidity-header.tsx b/apps/trading/components/liquidity-header/liquidity-header.tsx index 9b71989a9..dd5444187 100644 --- a/apps/trading/components/liquidity-header/liquidity-header.tsx +++ b/apps/trading/components/liquidity-header/liquidity-header.tsx @@ -1,6 +1,6 @@ import { getAsset, - tooltipMapping, + useTooltipMapping, useMarket, useStaticMarketData, } from '@vegaprotocol/markets'; @@ -27,6 +27,7 @@ import { useT } from '../../lib/use-t'; export const LiquidityHeader = () => { const t = useT(); + const tooltipMapping = useTooltipMapping(); const { marketId } = useParams(); const { data: market } = useMarket(marketId); const { data: marketData } = useStaticMarketData(marketId); @@ -122,7 +123,7 @@ export const LiquidityHeader = () => {