add a bunch of missing translations to the swap page

This commit is contained in:
Moody Salem 2021-05-29 00:16:57 -05:00
parent 3e9289dc35
commit f340537544
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB
4 changed files with 117 additions and 22 deletions

@ -1,3 +1,4 @@
import { t, Trans } from '@lingui/macro'
import React, { useContext, useRef, useState } from 'react'
import { Settings, X } from 'react-feather'
import ReactGA from 'react-ga'
@ -138,31 +139,34 @@ export default function SettingsTab({ placeholderSlippage }: { placeholderSlippa
<RowBetween style={{ padding: '0 2rem' }}>
<div />
<Text fontWeight={500} fontSize={20}>
Are you sure?
<Trans>Are you sure?</Trans>
</Text>
<StyledCloseIcon onClick={() => setShowConfirmation(false)} />
</RowBetween>
<Break />
<AutoColumn gap="lg" style={{ padding: '0 2rem' }}>
<Text fontWeight={500} fontSize={20}>
<Trans>
Expert mode turns off the confirm transaction prompt and allows high slippage trades that often result
in bad rates and lost funds.
</Trans>
</Text>
<Text fontWeight={600} fontSize={20}>
ONLY USE THIS MODE IF YOU KNOW WHAT YOU ARE DOING.
<Trans>ONLY USE THIS MODE IF YOU KNOW WHAT YOU ARE DOING.</Trans>
</Text>
<ButtonError
error={true}
padding={'12px'}
onClick={() => {
if (window.prompt(`Please type the word "confirm" to enable expert mode.`) === 'confirm') {
const confirmWord = t`confirm`
if (window.prompt(t`Please type the word "${confirmWord}" to enable expert mode.`) === confirmWord) {
toggleExpertMode()
setShowConfirmation(false)
}
}}
>
<Text fontSize={20} fontWeight={500} id="confirm-expert-mode">
Turn On Expert Mode
<Trans>Turn On Expert Mode</Trans>
</Text>
</ButtonError>
</AutoColumn>
@ -183,18 +187,20 @@ export default function SettingsTab({ placeholderSlippage }: { placeholderSlippa
<MenuFlyout>
<AutoColumn gap="md" style={{ padding: '1rem' }}>
<Text fontWeight={600} fontSize={14}>
Transaction Settings
<Trans>Transaction Settings</Trans>
</Text>
<TransactionSettings placeholderSlippage={placeholderSlippage} />
<Text fontWeight={600} fontSize={14}>
Interface Settings
<Trans>Interface Settings</Trans>
</Text>
<RowBetween>
<RowFixed>
<TYPE.black fontWeight={400} fontSize={14} color={theme.text2}>
Toggle Expert Mode
<Trans>Toggle Expert Mode</Trans>
</TYPE.black>
<QuestionHelper text="Allow high price impact trades and skip the confirm screen. Use at your own risk." />
<QuestionHelper
text={t`Allow high price impact trades and skip the confirm screen. Use at your own risk.`}
/>
</RowFixed>
<Toggle
id="toggle-expert-mode-button"
@ -215,9 +221,9 @@ export default function SettingsTab({ placeholderSlippage }: { placeholderSlippa
<RowBetween>
<RowFixed>
<TYPE.black fontWeight={400} fontSize={14} color={theme.text2}>
Disable Multihops
<Trans>Disable Multihops</Trans>
</TYPE.black>
<QuestionHelper text="Restricts swaps to direct pairs only." />
<QuestionHelper text={t`Restricts swaps to direct pairs only.`} />
</RowFixed>
<Toggle
id="toggle-disable-multihop-button"

@ -1,3 +1,4 @@
import { t, Trans } from '@lingui/macro'
import React, { useState, useContext } from 'react'
import { Percent } from '@uniswap/sdk-core'
import styled, { ThemeContext } from 'styled-components'
@ -155,9 +156,11 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
<AutoColumn gap="sm">
<RowFixed>
<TYPE.black fontWeight={400} fontSize={14} color={theme.text2}>
Slippage tolerance
<Trans>Slippage tolerance</Trans>
</TYPE.black>
<QuestionHelper text="Your transaction will revert if the price changes unfavorably by more than this percentage." />
<QuestionHelper
text={t`Your transaction will revert if the price changes unfavorably by more than this percentage.`}
/>
</RowFixed>
<RowBetween>
<Option
@ -166,7 +169,7 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
}}
active={userSlippageTolerance === 'auto'}
>
Auto
<Trans>Auto</Trans>
</Option>
<OptionCustom active={userSlippageTolerance !== 'auto'} warning={!!slippageError} tabIndex={-1}>
<RowBetween>
@ -206,10 +209,10 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
}}
>
{slippageError
? 'Enter a valid slippage percentage'
? t`Enter a valid slippage percentage`
: tooLow
? 'Your transaction may fail'
: 'Your transaction may be frontrun'}
? t`Your transaction may fail`
: t`Your transaction may be frontrun`}
</RowBetween>
) : null}
</AutoColumn>
@ -217,9 +220,9 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
<AutoColumn gap="sm">
<RowFixed>
<TYPE.black fontSize={14} fontWeight={400} color={theme.text2}>
Transaction deadline
<Trans>Transaction deadline</Trans>
</TYPE.black>
<QuestionHelper text="Your transaction will revert if it is pending for more than this period of time." />
<QuestionHelper text={t`Your transaction will revert if it is pending for more than this period of time.`} />
</RowFixed>
<RowFixed>
<OptionCustom style={{ width: '80px' }} warning={!!deadlineError} tabIndex={-1}>
@ -241,7 +244,7 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
/>
</OptionCustom>
<TYPE.body style={{ paddingLeft: '8px' }} fontSize={14}>
minutes
<Trans>minutes</Trans>
</TYPE.body>
</RowFixed>
</AutoColumn>

@ -1,3 +1,4 @@
import { Trans } from '@lingui/macro'
import React from 'react'
import styled from 'styled-components/macro'
import SettingsTab from '../Settings'
@ -18,7 +19,7 @@ export default function SwapHeader({ allowedSlippage }: { allowedSlippage: Perce
<RowBetween>
<RowFixed>
<TYPE.black fontWeight={500} fontSize={16} style={{ marginRight: '8px' }}>
Swap{' '}
<Trans>Swap</Trans>
</TYPE.black>
</RowFixed>
<RowFixed>

@ -211,6 +211,10 @@ msgstr ""
msgid "Allow LP token migration"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Allow high price impact trades and skip the confirm screen. Use at your own risk."
msgstr "Allow high price impact trades and skip the confirm screen. Use at your own risk."
#: src/pages/Swap/index.tsx
msgid "Allow the Uniswap Protocol to use your {0}"
msgstr ""
@ -255,6 +259,10 @@ msgstr ""
msgid "Approving {0}"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Are you sure?"
msgstr ""
#: src/components/claim/ClaimModal.tsx
msgid "As a member of the Uniswap community you may claim UNI to be used for voting and governance.<0/><1/><2>Read more about UNI</2>"
msgstr ""
@ -263,6 +271,10 @@ msgstr ""
msgid "At least {0} {1} and {2} {3} will be refunded to your wallet due to selected price range."
msgstr ""
#: src/components/TransactionSettings/index.tsx
msgid "Auto"
msgstr "Auto"
#: src/components/earn/StakingModal.tsx
msgid "Available to deposit:"
msgstr ""
@ -564,6 +576,10 @@ msgstr ""
msgid "Details"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Disable Multihops"
msgstr ""
#: src/components/AccountDetails/index.tsx
msgid "Disconnect"
msgstr ""
@ -588,6 +604,10 @@ msgstr ""
msgid "Earned UNI tokens represent voting shares in Uniswap governance."
msgstr ""
#: src/components/TransactionSettings/index.tsx
msgid "Enter a valid slippage percentage"
msgstr "Enter a valid slippage percentage"
#: src/components/claim/AddressClaimModal.tsx
msgid "Enter an address to trigger a UNI claim. If the address has any claimable UNI it will be sent to them on submission."
msgstr ""
@ -626,6 +646,10 @@ msgstr ""
msgid "Expanded results from inactive Token Lists"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Expert mode turns off the confirm transaction prompt and allows high slippage trades that often result in bad rates and lost funds."
msgstr ""
#: src/pages/Pool/CTACards.tsx
msgid "Explore popular pools on Uniswap Analytics."
msgstr ""
@ -718,6 +742,10 @@ msgstr ""
msgid "Insufficient liquidity for this trade. Try enabling multi-hop trades."
msgstr ""
#: src/components/Settings/index.tsx
msgid "Interface Settings"
msgstr ""
#: src/pages/PoolFinder/index.tsx
msgid "Invalid pair."
msgstr ""
@ -878,6 +906,10 @@ msgstr ""
msgid "No results found."
msgstr ""
#: src/components/Settings/index.tsx
msgid "ONLY USE THIS MODE IF YOU KNOW WHAT YOU ARE DOING."
msgstr ""
#: src/pages/AddLiquidityV2/index.tsx
msgid "Once you are happy with the rate click supply to review."
msgstr ""
@ -919,6 +951,10 @@ msgstr ""
msgid "Please connect to the appropriate Ethereum network."
msgstr ""
#: src/components/Settings/index.tsx
msgid "Please type the word \"{confirmWord}\" to enable expert mode."
msgstr "Please type the word \"{confirmWord}\" to enable expert mode."
#: src/components/Header/index.tsx
#: src/components/NavigationTabs/index.tsx
msgid "Pool"
@ -1060,6 +1096,10 @@ msgstr ""
msgid "Removing {0} {1} and {2} {3}"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Restricts swaps to direct pairs only."
msgstr "Restricts swaps to direct pairs only."
#: src/components/TransactionConfirmationModal/index.tsx
msgid "Return"
msgstr ""
@ -1124,6 +1164,10 @@ msgstr ""
msgid "Simple"
msgstr ""
#: src/components/TransactionSettings/index.tsx
msgid "Slippage tolerance"
msgstr "Slippage tolerance"
#: src/components/swap/UnsupportedCurrencyFooter.tsx
msgid "Some assets are not available through this interface because they may not work well with the smart contracts or we are unable to allow trading for legal reasons."
msgstr ""
@ -1146,6 +1190,7 @@ msgstr ""
#: src/components/Header/index.tsx
#: src/components/NavigationTabs/index.tsx
#: src/components/swap/SwapHeader.tsx
#: src/pages/Swap/index.tsx
#: src/pages/Swap/index.tsx
msgid "Swap"
@ -1193,6 +1238,10 @@ msgstr ""
msgid "To (at least)"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Toggle Expert Mode"
msgstr ""
#: src/components/SearchModal/Manage.tsx
msgid "Tokens"
msgstr ""
@ -1217,6 +1266,10 @@ msgstr ""
msgid "Total deposits"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Transaction Settings"
msgstr ""
#: src/components/TransactionConfirmationModal/index.tsx
#: src/components/earn/ClaimRewardModal.tsx
#: src/components/earn/StakingModal.tsx
@ -1226,10 +1279,18 @@ msgstr ""
msgid "Transaction Submitted"
msgstr ""
#: src/components/TransactionSettings/index.tsx
msgid "Transaction deadline"
msgstr "Transaction deadline"
#: src/components/WalletModal/PendingView.tsx
msgid "Try Again"
msgstr ""
#: src/components/Settings/index.tsx
msgid "Turn On Expert Mode"
msgstr ""
#: src/components/Header/UniBalanceContent.tsx
msgid "UNI in circulation:"
msgstr ""
@ -1553,6 +1614,22 @@ msgstr ""
msgid "Your transaction cost will be much higher as it includes the gas to create the pool."
msgstr ""
#: src/components/TransactionSettings/index.tsx
msgid "Your transaction may be frontrun"
msgstr "Your transaction may be frontrun"
#: src/components/TransactionSettings/index.tsx
msgid "Your transaction may fail"
msgstr "Your transaction may fail"
#: src/components/TransactionSettings/index.tsx
msgid "Your transaction will revert if it is pending for more than this period of time."
msgstr "Your transaction will revert if it is pending for more than this period of time."
#: src/components/TransactionSettings/index.tsx
msgid "Your transaction will revert if the price changes unfavorably by more than this percentage."
msgstr "Your transaction will revert if the price changes unfavorably by more than this percentage."
#: src/components/AccountDetails/index.tsx
msgid "Your transactions will appear here..."
msgstr ""
@ -1561,6 +1638,10 @@ msgstr ""
msgid "Your unclaimed UNI"
msgstr ""
#: src/components/Settings/index.tsx
msgid "confirm"
msgstr "confirm"
#: src/components/claim/AddressClaimModal.tsx
msgid "for {0}"
msgstr ""
@ -1569,6 +1650,10 @@ msgstr ""
msgid "has socks emoji"
msgstr ""
#: src/components/TransactionSettings/index.tsx
msgid "minutes"
msgstr "minutes"
#: src/components/SearchModal/ImportRow.tsx
msgid "via {0}"
msgstr ""