Skip to content

Commit

Permalink
fix: Add v1link translation
Browse files Browse the repository at this point in the history
  • Loading branch information
memoyil committed Jan 13, 2025
1 parent 7995228 commit c98400e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions apps/web/src/pages/bridge/index.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -11,6 +12,7 @@ const CanonicalBridge = lazy(() =>

const BridgePage = () => {
const { isMobile } = useMatchBreakpoints()
const { t } = useTranslation()

return (
<Page removePadding hideFooterOnDesktop={false} showExternalLink={false} showHelpLink={false} noMinHeight>
Expand All @@ -31,6 +33,7 @@ const BridgePage = () => {
supportedChainIds={CHAIN_IDS}
// @ts-ignore
rpcConfig={PUBLIC_NODES}
v1LinkText={t('V1 Bridge supports bridging to/from Aptos')}
/>
</Suspense>
</Flex>
Expand Down
4 changes: 2 additions & 2 deletions packages/canonical-bridge/src/components/V1BridgeLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Flex marginTop="16px" alignItems="center" justifyContent="center">
<StyledLink href="https://bridge.pancakeswap.finance/" target="_blank" rel="noopener">
V1 Bridge supports bridging to/from Aptos
{v1LinkText}
<ExternalLinkIcon />
</StyledLink>
</Flex>
Expand Down
5 changes: 3 additions & 2 deletions packages/canonical-bridge/src/views/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ export interface CanonicalBridgeProps {
connectWalletButton: CanonicalBridgeProviderProps['connectWalletButton']
supportedChainIds: number[]
rpcConfig: Record<number, string[]>
v1LinkText: string
}

export const CanonicalBridge = (props: CanonicalBridgeProps) => {
const { connectWalletButton, supportedChainIds } = props
const { connectWalletButton, supportedChainIds, v1LinkText } = props

const transferConfig = useTransferConfig()
const { currentLanguage } = useTranslation()
Expand Down Expand Up @@ -101,7 +102,7 @@ export const CanonicalBridge = (props: CanonicalBridgeProps) => {
>
<Flex flexDirection="column" justifyContent="center" maxWidth="480px" width="100%">
<BridgeTransfer />
<V1BridgeLink />
<V1BridgeLink v1LinkText={v1LinkText} />
</Flex>
<BridgeRoutes />
</CanonicalBridgeProvider>
Expand Down
3 changes: 2 additions & 1 deletion packages/localization/src/config/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit c98400e

Please sign in to comment.