From c98400e71fc9d72ecd1365e6c07b41f013f4cf1f Mon Sep 17 00:00:00 2001 From: memoyil <2213635+memoyil@users.noreply.github.com> Date: Mon, 13 Jan 2025 18:47:45 +0100 Subject: [PATCH] fix: Add v1link translation --- apps/web/src/pages/bridge/index.tsx | 3 +++ packages/canonical-bridge/src/components/V1BridgeLink.tsx | 4 ++-- packages/canonical-bridge/src/views/index.tsx | 5 +++-- packages/localization/src/config/translations.json | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/web/src/pages/bridge/index.tsx b/apps/web/src/pages/bridge/index.tsx index 3f448d8728c61..980f205f758cc 100644 --- a/apps/web/src/pages/bridge/index.tsx +++ b/apps/web/src/pages/bridge/index.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from '@pancakeswap/localization' import { Flex, useMatchBreakpoints } from '@pancakeswap/uikit' import ConnectWalletButton from 'components/ConnectWalletButton' import { PUBLIC_NODES } from 'config/nodes' @@ -11,6 +12,7 @@ const CanonicalBridge = lazy(() => const BridgePage = () => { const { isMobile } = useMatchBreakpoints() + const { t } = useTranslation() return ( @@ -31,6 +33,7 @@ const BridgePage = () => { supportedChainIds={CHAIN_IDS} // @ts-ignore rpcConfig={PUBLIC_NODES} + v1LinkText={t('V1 Bridge supports bridging to/from Aptos')} /> diff --git a/packages/canonical-bridge/src/components/V1BridgeLink.tsx b/packages/canonical-bridge/src/components/V1BridgeLink.tsx index 35e62f5d4676d..f86370dbe1ba4 100644 --- a/packages/canonical-bridge/src/components/V1BridgeLink.tsx +++ b/packages/canonical-bridge/src/components/V1BridgeLink.tsx @@ -2,11 +2,11 @@ import { Flex, Link } from '@pancakeswap/uikit' import { styled } from 'styled-components' import { ExternalLinkIcon } from './icons/ExternalLinkIcon' -export function V1BridgeLink() { +export function V1BridgeLink({ v1LinkText }: { v1LinkText: string }) { return ( - V1 Bridge supports bridging to/from Aptos + {v1LinkText} diff --git a/packages/canonical-bridge/src/views/index.tsx b/packages/canonical-bridge/src/views/index.tsx index 16c1cc771fa62..1da5863877f07 100644 --- a/packages/canonical-bridge/src/views/index.tsx +++ b/packages/canonical-bridge/src/views/index.tsx @@ -27,10 +27,11 @@ export interface CanonicalBridgeProps { connectWalletButton: CanonicalBridgeProviderProps['connectWalletButton'] supportedChainIds: number[] rpcConfig: Record + v1LinkText: string } export const CanonicalBridge = (props: CanonicalBridgeProps) => { - const { connectWalletButton, supportedChainIds } = props + const { connectWalletButton, supportedChainIds, v1LinkText } = props const transferConfig = useTransferConfig() const { currentLanguage } = useTranslation() @@ -101,7 +102,7 @@ export const CanonicalBridge = (props: CanonicalBridgeProps) => { > - + diff --git a/packages/localization/src/config/translations.json b/packages/localization/src/config/translations.json index be65e30e66f8a..70a88ea81a0ef 100644 --- a/packages/localization/src/config/translations.json +++ b/packages/localization/src/config/translations.json @@ -3678,5 +3678,6 @@ "Please fix form errors.": "Please fix form errors.", "Title is required": "Title is required", "Content is required": "Content is required", - "Please provide valid choices": "Please provide valid choices" + "Please provide valid choices": "Please provide valid choices", + "V1 Bridge supports bridging to/from Aptos": "V1 Bridge supports bridging to/from Aptos" }