translate swap page

This commit is contained in:
rjpeterson 2021-12-21 13:56:14 -06:00
parent 021800f012
commit 7abb205502
11 changed files with 236 additions and 84 deletions

View File

@ -48,10 +48,12 @@ import Modal from './Modal'
import { ElementTitle } from './styles'
import { WalletIcon } from './icons'
import Tooltip from './Tooltip'
import { useTranslation } from 'next-i18next'
type UseJupiterProps = Parameters<typeof useJupiter>[0]
const JupiterForm: FunctionComponent = () => {
const { t } = useTranslation(['common', 'swap'])
const wallet = useMangoStore(walletSelector)
const connection = useMangoStore(connectionSelector)
const connected = useMangoStore(walletConnectedSelector)
@ -418,13 +420,13 @@ const JupiterForm: FunctionComponent = () => {
return (
<div className="bg-th-bkg-3 flex min-w-[120px] p-2 rounded">
<div>
<div className="text-th-fgd-3 text-xs">Time</div>
<div className="text-th-fgd-3 text-xs">{t('time')}</div>
<div className="font-bold text-th-fgd-1 text-xs">
{dayjs(tooltipProps.payload[0].payload.time).format('h:mma')}
</div>
</div>
<div className="pl-3">
<div className="text-th-fgd-3 text-xs">Price</div>
<div className="text-th-fgd-3 text-xs">{t('price')}</div>
<div className="font-bold text-th-fgd-1 text-xs">
{usdFormatter(tooltipProps.payload[0].payload.price)}
</div>
@ -451,7 +453,7 @@ const JupiterForm: FunctionComponent = () => {
className={`bg-th-bkg-3 max-h-[500px] overflow-auto pb-4 pt-6 rounded-r-md w-64 thin-scroll`}
>
<div className="flex items-center justify-between pb-2 px-4">
<div className="font-bold text-base text-th-fgd-1">Wallet</div>
<div className="font-bold text-base text-th-fgd-1">{t('wallet')}</div>
<a
className="flex items-center text-th-fgd-4 text-xs hover:text-th-fgd-3"
href={`https://explorer.solana.com/address/${wallet?.publicKey}`}
@ -502,7 +504,7 @@ const JupiterForm: FunctionComponent = () => {
<div className="ml-2 text-th-fgd-4 text-xs">
{walletTokenPrices[geckoId]
? `$${walletTokenPrices[geckoId].usd}`
: 'Unavailable'}
: t('swap:unavailable')}
</div>
) : null}
</div>
@ -538,11 +540,11 @@ const JupiterForm: FunctionComponent = () => {
<div className="mt-8 bg-th-bkg-2 rounded-lg px-6 py-8">
<div className="flex justify-between">
<label htmlFor="inputMint" className="block text-sm font-semibold">
Pay
{t('swap:pay')}
</label>
<div className="space-x-3">
<label htmlFor="amount" className="text-th-fgd-3 text-xs">
Bal: {inputWalletBalance()}
{t('swap:bal')} {inputWalletBalance()}
</label>
{connected ? (
<>
@ -555,7 +557,7 @@ const JupiterForm: FunctionComponent = () => {
}))
}}
>
Max
{t('max')}
</LinkButton>
</>
) : null}
@ -609,10 +611,10 @@ const JupiterForm: FunctionComponent = () => {
<div className="flex justify-between">
<label htmlFor="outputMint" className="font-semibold">
Receive
{t('swap:receive')}
</label>
<span className="text-th-fgd-3 text-xs">
Bal: {outputWalletBalance()}
{t('swap:bal')} {outputWalletBalance()}
</span>
</div>
<div className="flex items-center mt-3">
@ -636,7 +638,9 @@ const JupiterForm: FunctionComponent = () => {
{routes ? (
<div>
<div className="text-th-fgd-4 text-center text-xs">
{routes?.length} routes found!
{t('swap:routes-found', {
numberOfRoutes: routes?.length
})}
</div>
<div
className="transition-all duration-700 mt-3 max-h-80 overflow-x-hidden overflow-y-auto thin-scroll pr-1"
@ -718,7 +722,7 @@ const JupiterForm: FunctionComponent = () => {
onClick={handleShowMore}
>
<ChevronDownIcon className="h-5 mr-1 w-5" />
Show more
{t('show-more')}
</button>
) : (
<button
@ -726,17 +730,17 @@ const JupiterForm: FunctionComponent = () => {
onClick={handleShowLess}
>
<ChevronUpIcon className="h-5 mr-1 w-5" />
Show less
{t('show-less')}
</button>
)}
</div>
) : null}
{routes.length ? (
<div className="text-xs">
from{' '}
{t('swap:from')}{' '}
{routes[routes.length - 1].outAmount /
10 ** (outputTokenInfo?.decimals || 1)}{' '}
to{' '}
{t('swap:to')}{' '}
{routes[0].outAmount /
10 ** (outputTokenInfo?.decimals || 1)}
</div>
@ -758,7 +762,7 @@ const JupiterForm: FunctionComponent = () => {
{error && (
<div className="flex items-center justify-center mt-2 text-th-red">
<ExclamationCircleIcon className="h-5 mr-1.5 w-5" />
Error in Jupiter Try changing your input
{t('swap:jupiter-error')}
</div>
)}
</div>
@ -780,7 +784,7 @@ const JupiterForm: FunctionComponent = () => {
errorTxid = txid
notify({
type: 'confirm',
title: 'Confirming Transaction',
title: t('confirming-transaction'),
txid,
})
}
@ -807,7 +811,7 @@ const JupiterForm: FunctionComponent = () => {
} else if ('txid' in swapResult) {
notify({
type: 'success',
title: 'Swap Successful',
title: t('swap-successful'),
description: `Swapped ${
swapResult.inputAmount /
10 ** (inputTokenInfo?.decimals || 1)
@ -826,7 +830,7 @@ const JupiterForm: FunctionComponent = () => {
}}
className="h-12 mt-6 text-base w-full"
>
{connected ? (swapping ? 'Swapping...' : 'Swap') : 'Connect Wallet'}
{connected ? (swapping ? t('swap:swapping') : t('swap')) : t('connect-wallet')}
</Button>
{inputTokenStats?.prices?.length && outputTokenStats?.prices?.length ? (
<>
@ -945,7 +949,7 @@ const JupiterForm: FunctionComponent = () => {
{selectedRoute && isTablet ? (
<div className="flex flex-col space-y-2.5 mt-6 text-th-fgd-3 text-xs">
<div className="flex justify-between">
<span>Rate</span>
<span>{t('rate')}</span>
<span className="text-th-fgd-1">
1 {outputTokenInfo?.symbol} {' '}
{(formValue?.amount / outAmountUi).toFixed(6)}{' '}
@ -953,7 +957,7 @@ const JupiterForm: FunctionComponent = () => {
</span>
</div>
<div className="flex justify-between">
<span>Price Impact</span>
<span>{t('price-impact')}</span>
<span className="text-th-fgd-1">
{selectedRoute.priceImpactPct * 100 < 0.1
? '< 0.1%'
@ -961,7 +965,7 @@ const JupiterForm: FunctionComponent = () => {
</span>
</div>
<div className="flex justify-between">
<span>Minimum Received</span>
<span>{t('swap:minimum-received')}</span>
<span className="text-th-fgd-1">
{(
selectedRoute.outAmountWithSlippage /
@ -976,7 +980,11 @@ const JupiterForm: FunctionComponent = () => {
)
return (
<div className="flex justify-between" key={index}>
<span>Fees paid to {info.marketMeta?.amm?.label}</span>
<span>
{t('swap:fees-paid-to', {
feeRecipient: info.marketMeta?.amm?.label
})}
</span>
<span className="text-th-fgd-1">
{(
info.lpFee?.amount / Math.pow(10, feeToken?.decimals)
@ -989,7 +997,7 @@ const JupiterForm: FunctionComponent = () => {
{connected ? (
<>
<div className="flex justify-between">
<span>Transaction Fee</span>
<span>{t('swap:transaction-fee')}</span>
<span className="text-th-fgd-1">
{depositAndFee
? depositAndFee?.signatureFee / Math.pow(10, 9)
@ -998,18 +1006,21 @@ const JupiterForm: FunctionComponent = () => {
</span>
</div>
<div className="flex justify-between items-center">
<span>Deposit</span>
<span>{t('swap:ata-deposit')}</span>
<div className="flex flex-col text-right">
<span className="text-th-fgd-1">
{depositAndFee?.ataDeposit / Math.pow(10, 9)} SOL for{' '}
{depositAndFee?.ataDepositLength} ATA Account
{t('swap:ata-deposit-details', {
cost: depositAndFee?.ataDeposit / Math.pow(10, 9),
count: depositAndFee?.ataDepositLength
})}
</span>
{depositAndFee?.openOrdersDeposits?.length ? (
<span className="text-th-fgd-1">
{sum(depositAndFee?.openOrdersDeposits) /
Math.pow(10, 9)}{' '}
SOL for {depositAndFee?.openOrdersDeposits.length} Serum
OpenOrders Account
{t('swap:serum-details', {
cost: sum(depositAndFee?.openOrdersDeposits) /
Math.pow(10, 9),
count: depositAndFee?.openOrdersDeposits.length
})}
</span>
) : null}
</div>
@ -1048,17 +1059,16 @@ const JupiterForm: FunctionComponent = () => {
) : null}
{connected && !hasSwapped ? (
<Modal isOpen={!hasSwapped} onClose={() => setHasSwapped(true)}>
<ElementTitle>Before you get started...</ElementTitle>
<ElementTitle>{t('swap:get-started')}</ElementTitle>
<div className="flex flex-col justify-center">
<div className="text-center text-th-fgd-3">
Swaps interact directly with your connected wallet, not your
Mango Account.
{t('swap:swap-in-wallet')}
</div>
<Button
className="mt-6 mx-auto"
onClick={() => setHasSwapped(true)}
>
Got It
{t('swap:got-it')}
</Button>
</div>
</Modal>
@ -1074,7 +1084,7 @@ const JupiterForm: FunctionComponent = () => {
>
<div className="space-y-2.5 text-th-fgd-3 text-xs">
<div>
<span>Rate</span>
<span>{t('rate')}</span>
<div className="mt-0.5 text-th-fgd-1">
1 {outputTokenInfo?.symbol} {' '}
{(formValue?.amount / outAmountUi).toFixed(6)}{' '}
@ -1082,7 +1092,7 @@ const JupiterForm: FunctionComponent = () => {
</div>
</div>
<div>
<span>Price Impact</span>
<span>{t('price-impact')}</span>
<div className="mt-0.5 text-th-fgd-1">
{selectedRoute?.priceImpactPct * 100 < 0.1
? '< 0.1%'
@ -1090,7 +1100,7 @@ const JupiterForm: FunctionComponent = () => {
</div>
</div>
<div>
<span>Minimum Received</span>
<span>{t('swap:minimum-received')}</span>
<div className="mt-0.5 text-th-fgd-1">
{(
selectedRoute?.outAmountWithSlippage /
@ -1102,7 +1112,7 @@ const JupiterForm: FunctionComponent = () => {
{!isNaN(feeValue) ? (
<div>
<div className="flex items-center">
<span>Swap Fee</span>
<span>{t('swap:swap-fee')}</span>
<Tooltip
content={
<div className="space-y-2.5">
@ -1113,7 +1123,9 @@ const JupiterForm: FunctionComponent = () => {
return (
<div key={index}>
<span>
Fees paid to {info.marketMeta?.amm?.label}
{t('swap:fees-paid-to', {
feeRecipient: info.marketMeta?.amm?.label
})}
</span>
<div className="text-th-fgd-1">
{(
@ -1143,7 +1155,11 @@ const JupiterForm: FunctionComponent = () => {
)
return (
<div key={index}>
<span>Fees paid to {info.marketMeta?.amm?.label}</span>
<span>
{t('swap:fees-paid-to', {
feeRecipient: info.marketMeta?.amm?.label
})}
</span>
<div className="mt-0.5 text-th-fgd-1">
{(
info.lpFee?.amount / Math.pow(10, feeToken?.decimals)
@ -1157,7 +1173,7 @@ const JupiterForm: FunctionComponent = () => {
{connected ? (
<>
<div>
<span>Transaction Fee</span>
<span>{t('swap:transaction-fee')}</span>
<div className="mt-0.5 text-th-fgd-1">
{depositAndFee
? depositAndFee?.signatureFee / Math.pow(10, 9)
@ -1169,26 +1185,24 @@ const JupiterForm: FunctionComponent = () => {
depositAndFee?.openOrdersDeposits?.length ? (
<div>
<div className="flex items-center">
<span>Deposit</span>
<span>{t('deposit')}</span>
<Tooltip
content={
<>
{depositAndFee?.ataDepositLength ? (
<div>
You need to have an Associated Token Account.
{t('swap:need-ata-account')}
</div>
) : null}
{depositAndFee?.openOrdersDeposits?.length ? (
<div className="mt-2">
Serum requires an OpenOrders account for each
token. You can close the account and recover the
SOL later.{' '}
{t('swap:serum-requires-openorders')}{' '}
<a
href="https://docs.google.com/document/d/1qEWc_Bmc1aAxyCUcilKB4ZYpOu3B0BxIbe__dRYmVns/"
target="_blank"
rel="noopener noreferrer"
>
Here&apos;s how
{t('swap:heres-how')}
</a>
</div>
) : null}
@ -1202,23 +1216,18 @@ const JupiterForm: FunctionComponent = () => {
<div>
{depositAndFee?.ataDepositLength ? (
<div className="mt-0.5 text-th-fgd-1">
{(
depositAndFee?.ataDeposit / Math.pow(10, 9)
).toFixed(5)}{' '}
SOL for {depositAndFee?.ataDepositLength} ATA Account
{t('swap:ata-deposit-details', {
cost: (depositAndFee?.ataDeposit / Math.pow(10, 9)).toFixed(5),
count: depositAndFee?.ataDepositLength
})}
</div>
) : null}
{depositAndFee?.openOrdersDeposits?.length ? (
<div className="mt-0.5 text-th-fgd-1">
{(
sum(depositAndFee?.openOrdersDeposits) /
Math.pow(10, 9)
).toFixed(5)}{' '}
SOL for {depositAndFee?.openOrdersDeposits.length}{' '}
Serum OpenOrders{' '}
{depositAndFee?.openOrdersDeposits.length > 1
? 'Accounts'
: 'Account'}
{t('swap:serum-details', {
cost: (sum(depositAndFee?.openOrdersDeposits) / Math.pow(10, 9)).toFixed(5),
count: depositAndFee?.openOrdersDeposits.length
})}
</div>
) : null}
</div>

View File

@ -729,10 +729,7 @@ export default function AdvancedTradeForm({
</ElementTitle>
{insufficientSol ? (
<div className="pb-3 text-left">
<InlineNotification
desc="Add more SOL to your wallet to avoid failed transactions."
type="warning"
/>
<InlineNotification desc={t('add-more-sol')} type="warning" />
</div>
) : null}
<OrderSideTabs onChange={onChangeSide} side={side} />

View File

@ -17,14 +17,14 @@ import { zeroKey } from '@blockworks-foundation/mango-client'
export async function getStaticProps({ locale }) {
return {
props: {
...(await serverSideTranslations(locale, ['common'])),
...(await serverSideTranslations(locale, ['common', 'swap'])),
// Will be passed to the page component as props
},
}
}
export default function Swap() {
// const { t } = useTranslation('common')
// const { t } = useTranslation(['common', 'swap'])
const connection = useMangoStore(connectionSelector)
const connected = useMangoStore(walletConnectedSelector)
const wallet = useMangoStore(walletSelector)

View File

@ -13,6 +13,7 @@
"account-risk": "Account Risk",
"account-value": "Account Value",
"accounts": "Accounts",
"add-more-sol": "Add more SOL to your wallet to avoid failed transactions.",
"add-name": "Add Name",
"all-assets": "All Assets",
"amount": "Amount",
@ -64,6 +65,7 @@
"condition": "Condition",
"confirm-deposit": "Confirm Deposit",
"confirm-withdraw": "Confirm Withdraw",
"confirming-transaction": "Confirming Transaction",
"connect": "Connect",
"connect-view": "Connect a wallet to view your account",
"connect-wallet": "Connect Wallet",
@ -113,8 +115,8 @@
"estimated-liq-price": "Est. Liq. Price",
"explorer": "Explorer",
"export-data": "Export CSV",
"export-data-success": "CSV exported successfully",
"export-data-empty": "No data to export",
"export-data-success": "CSV exported successfully",
"fee": "Fee",
"fee-discount": "Fee Discount",
"first-deposit-desc": "There is a one-time cost of 0.035 SOL when you make your first deposit. This covers the rent on the Solana Blockchain for your account.",
@ -163,8 +165,8 @@
"limit": "Limit",
"limit-order": "Limit",
"limit-price": "Limit Price",
"liquidations": "Liquidations",
"liquidation-history": "Liquidation History",
"liquidations": "Liquidations",
"liquidity": "Liquidity",
"liquidity-mining": "Liquidity Mining",
"long": "long",
@ -288,6 +290,8 @@
"settle-success": "Successfully settled funds",
"short": "short",
"show-all": "Show all in Nav",
"show-less": "Show less",
"show-more": "Show more",
"show-tips": "Show Tips",
"show-zero": "Show zero balances",
"side": "Side",
@ -345,8 +349,8 @@
"totals": "Totals",
"trade": "Trade",
"trade-history": "Trade History",
"trades-history": "Trade History",
"trades": "Trades",
"trades-history": "Trade History",
"transaction-sent": "Transaction sent",
"trigger-price": "Trigger Price",
"try-again": "Please try again",
@ -357,8 +361,8 @@
"unsettled-balances": "Unsettled Balances",
"unsettled-positions": "Unsettled Positions",
"use-explorer-one": "Use the ",
"use-explorer-two": "Explorer ",
"use-explorer-three": "to verify any delayed transactions.",
"use-explorer-two": "Explorer ",
"utilization": "Utilization",
"v3-new": "V3 is a new and separate program from V2. You can access your V2 account in the 'More' section of the top bar or by using this link:",
"v3-unaudited": "The V3 protocol is in public beta. This is unaudited software, use it at your own risk.",
@ -371,11 +375,14 @@
"withdraw": "Withdraw",
"withdraw-error": "Could not perform withdraw",
"withdraw-funds": "Withdraw Funds",
"withdraw-success": "Withdraw successful",
"withdraw-history": "Withdrawal History",
"withdraw-success": "Withdraw successful",
"withdrawals": "Withdrawals",
"you-must-leave-enough-sol": "You must leave enough SOL in your wallet to pay for the transaction",
"your-account": "Your Account",
"your-assets": "Your Assets",
"your-borrows": "Your Borrows"
"your-borrows": "Your Borrows",
"wallet": "Wallet",
"confirm": "Confirm"
}

View File

@ -0,0 +1,31 @@
{
"ata-deposit": "Deposit",
"ata-deposit-details": "{{cost}} SOL for {{count}} ATA Account",
"ata-deposit-details_plural": "{{cost}} SOL for {{count}} ATA Accounts",
"fees-paid-to": "Fees paid to {{feeRecipient}}",
"from": "from",
"jupiter-error": "Error in Jupiter Try changing your input",
"minimum-received": "Minimum Received",
"price-info": "Price Info",
"routes-found": "{{numberOfRoutes}} routes found!",
"serum-details": "{{cost}} SOL for {{count}} Serum OpenOrders Account",
"serum-details_plural": "{{cost}} SOL for {{count}} Serum OpenOrders Accounts",
"swap-successful": "Swap Successful",
"swapping": "Swapping...",
"to": "to",
"you-pay": "You pay",
"you-receive": "You receive",
"unavailable": "Unavailable",
"pay": "Pay",
"bal": "Bal:",
"receive": "Receive",
"transaction-fee": "Transaction Fee",
"get-started": "Before you get started...",
"swap-in-wallet": "Swaps interact directly with your connected wallet, not your Mango Account.",
"got-it": "Got It",
"need-ata-account": "You need to have an Associated Token Account.",
"serum-requires-openorders": "Serum requires an OpenOrders account for each token. You can close the account and recover the SOL later.",
"heres-how": "Here's how",
"swap-fee": "Swap Fee"
}

View File

@ -13,6 +13,7 @@
"account-risk": "Riesgo de cuenta",
"account-value": "Valor de la cuenta",
"accounts": "Cuentas",
"add-more-sol": "Add more SOL to your wallet to avoid failed transactions.",
"add-name": "Añadir nombre",
"all-assets": "Todos los activos",
"amount": "Monto",
@ -64,6 +65,7 @@
"condition": "Condición",
"confirm-deposit": "Confirmar depósito",
"confirm-withdraw": "Confirmar retiro",
"confirming-transaction": "Confirming Transaction",
"connect": "Conectar",
"connect-view": "Conecte una billetera para ver su cuenta",
"connect-wallet": "Conecte una billetera",
@ -161,8 +163,8 @@
"light": "Ligera",
"limit": "Limite",
"limit-order": "orden de límite",
"liquidations": "Liquidaciones",
"liquidation-history": "Historial de liquidación",
"liquidations": "Liquidaciones",
"liquidity": "Liquidez",
"liquidity-mining": "Liquidity Mining",
"long": "larga",
@ -286,6 +288,8 @@
"settle-success": "Fondos liquidados con éxito",
"short": "Vender",
"show-all": "Mostrar todo en Nav",
"show-less": "Show less",
"show-more": "Show more",
"show-tips": "Mostrar sugerencias",
"show-zero": "Mostrar saldos cero",
"side": "Lado",
@ -299,6 +303,7 @@
"stop-price": "Precio de parada",
"successfully-placed": "Comercio colocado con éxito",
"supported-assets": "Financie la billetera con uno de los activos admitidos.",
"swap": "Swap",
"take-profit": "Tomar ganancias",
"take-profit-limit": "Tomar el límite de ganancias",
"taker-fee": "Orden mercado",
@ -342,8 +347,8 @@
"totals": "Totales",
"trade": "Comercio",
"trade-history": "Historial comercial",
"trades-history": "Historial comercial",
"trades": "Trades",
"trades-history": "Historial comercial",
"transaction-sent": "Transacción enviada",
"trigger-price": "Precio de activación",
"try-again": "Inténtalo de nuevo",
@ -354,8 +359,8 @@
"unsettled-balances": "Saldos pendientes",
"unsettled-positions": "Posiciones sin saldar",
"use-explorer-one": "Use the ",
"use-explorer-two": "Explorer ",
"use-explorer-three": "to verify any delayed transactions.",
"use-explorer-two": "Explorer ",
"utilization": "Utilización",
"v3-new": "V3 es un programa nuevo e independiente de V2. Puede acceder a su cuenta V2 en el 'More' sección de la barra superior o usando este enlace:",
"v3-unaudited": "El protocolo V3 está en versión beta pública. Este es un software no auditado, utilícelo bajo su propio riesgo.",
@ -368,8 +373,8 @@
"withdraw": "Retirar",
"withdraw-error": "No se pudo realizar el retiro",
"withdraw-funds": "Retirar Fondos",
"withdraw-success": "Retirarse exitoso",
"withdraw-history": "Historial de retiros",
"withdraw-success": "Retirarse exitoso",
"withdrawals": "Retiros",
"you-must-leave-enough-sol": "You must leave enough SOL in your wallet to pay for the transaction",
"your-account": "Su cuenta",

View File

@ -0,0 +1,31 @@
{
"ata-deposit": "Deposit",
"ata-deposit-details": "{{cost}} SOL for {{count}} ATA Account",
"ata-deposit-details_plural": "{{cost}} SOL for {{count}} ATA Accounts",
"fees-paid-to": "Fees paid to {{feeRecipient}}",
"from": "from",
"jupiter-error": "Error in Jupiter try changing your input",
"minimum-received": "Minimum Received",
"price-info": "Price Info",
"routes-found": "{{numberOfRoutes}} routes found!",
"serum-details": "{{cost}} SOL for {{count}} Serum OpenOrders Account",
"serum-details_plural": "{{cost}} SOL for {{count}} Serum OpenOrders Accounts",
"swap-successful": "Swap Successful",
"swapping": "Swapping...",
"to": "to",
"you-pay": "You pay",
"you-receive": "You receive",
"unavailable": "Unavailable",
"pay": "Pay",
"bal": "Bal:",
"receive": "Receive",
"transaction-fee": "Transaction Fee",
"get-started": "Before you get started...",
"swap-in-wallet": "Swaps interact directly with your connected wallet, not your Mango Account.",
"got-it": "Got It",
"need-ata-account": "You need to have an Associated Token Account.",
"serum-requires-openorders": "Serum requires an OpenOrders account for each token. You can close the account and recover the SOL later.",
"heres-how": "Here's how",
"swap-fee": "Swap Fee"
}

View File

@ -13,6 +13,7 @@
"account-risk": "帐户风险度",
"account-value": "帐户价值",
"accounts": "帐户",
"add-more-sol": "为了避免交易出错请给被连结的钱包多存入一点SOL。",
"add-name": "加标签",
"all-assets": "所有资产",
"amount": "数量",
@ -64,6 +65,7 @@
"condition": "状态",
"confirm-deposit": "确认存款",
"confirm-withdraw": "确认取款",
"confirming-transaction": "正在确认交易...",
"connect": "连结",
"connect-view": "连结钱包而看帐户状态",
"connect-wallet": "连结钱包",
@ -161,8 +163,8 @@
"light": "明亮",
"limit": "限价",
"limit-order": "限价",
"liquidations": "清算历史",
"liquidation-history": "清算历史",
"liquidations": "清算历史",
"liquidity": "流动性",
"liquidity-mining": "流动性挖矿",
"long": "做多",
@ -286,6 +288,8 @@
"settle-success": "已结清好",
"short": "做空",
"show-all": "在导航栏中显示全部",
"show-less": "显示较少",
"show-more": "显示更多",
"show-tips": "显示提示",
"show-zero": "显示零余额",
"side": "方向",
@ -299,6 +303,7 @@
"stop-price": "止损价格",
"successfully-placed": "已下单了",
"supported-assets": "请给钱包存入已被支持的币种。",
"swap": "换币",
"take-profit": "止盈",
"take-profit-limit": "限价止盈",
"taker-fee": "吃单费率",
@ -342,8 +347,8 @@
"totals": "总量",
"trade": "交易",
"trade-history": "交易纪录",
"trades-history": "交易纪录",
"trades": "成交",
"trades-history": "交易纪录",
"transaction-sent": "已下订单",
"trigger-price": "触发价格",
"try-again": "请再试一次",
@ -354,8 +359,8 @@
"unsettled-balances": "未结清余额",
"unsettled-positions": "未结清持仓",
"use-explorer-one": "使用",
"use-explorer-two": "浏览器",
"use-explorer-three": "来验证延迟的交易",
"use-explorer-two": "浏览器",
"utilization": "利用率",
"v3-new": "V3与V2完全不一样。仍要登录V2的人可以在导航栏点「更多」或此链接",
"v3-unaudited": "Mango V3目前还是测试版。此软体未经过审计。风险自负。",
@ -368,8 +373,8 @@
"withdraw": "取款",
"withdraw-error": "无法取款",
"withdraw-funds": "取款",
"withdraw-success": "已取款",
"withdraw-history": "提款记录",
"withdraw-success": "已取款",
"withdrawals": "取款",
"you-must-leave-enough-sol": "您必须在钱包中保留足够的 SOL 来支付交易费用",
"your-account": "您的帐户",

View File

@ -0,0 +1,31 @@
{
"ata-deposit": "押金",
"ata-deposit-details": "{{cost}} SOL为 {{count}} ATA帐户",
"ata-deposit-details_plural": "{{cost}} SOL为 {{count}} ATA帐户",
"fees-paid-to": "费用缴给{{feeRecipient}}",
"from": "从",
"jupiter-error": "Jupiter出错请更改输入",
"minimum-received": "最好获得",
"price-info": "价格细节",
"routes-found": "找到{{numberOfRoutes}}路线!",
"serum-details": "{{cost}} SOL为 {{count}} Serum OpenOrders帐户",
"serum-details_plural": "{{cost}} SOL为 {{count}} Serum OpenOrders帐户",
"swap-successful": "交易成功",
"swapping": "正在交易...",
"to": "到",
"you-pay": "您付出",
"you-receive": "您收到",
"unavailable": "Unavailable",
"pay": "Pay",
"bal": "Bal:",
"receive": "Receive",
"transaction-fee": "Transaction Fee",
"get-started": "Before you get started...",
"swap-in-wallet": "Swaps interact directly with your connected wallet, not your Mango Account.",
"got-it": "Got It",
"need-ata-account": "You need to have an Associated Token Account.",
"serum-requires-openorders": "Serum requires an OpenOrders account for each token. You can close the account and recover the SOL later.",
"heres-how": "Here's how",
"swap-fee": "Swap Fee"
}

View File

@ -13,6 +13,7 @@
"account-risk": "帳戶風險度",
"account-value": "帳戶價值",
"accounts": "帳戶",
"add-more-sol": "為了避免交易出錯請給被連結的錢包多存入一點SOL。",
"add-name": "加標籤",
"all-assets": "所有資產",
"amount": "數量",
@ -64,6 +65,7 @@
"condition": "狀態",
"confirm-deposit": "確認存款",
"confirm-withdraw": "確認取款",
"confirming-transaction": "正在確認交易...",
"connect": "連結",
"connect-view": "連結錢包而看帳戶狀態",
"connect-wallet": "連結錢包",
@ -161,8 +163,8 @@
"light": "明亮",
"limit": "限價",
"limit-order": "限價",
"liquidations": "清算歷史",
"liquidation-history": "清算歷史",
"liquidations": "清算歷史",
"liquidity": "流動性",
"liquidity-mining": "流動性挖礦",
"long": "做多",
@ -286,6 +288,8 @@
"settle-success": "已結清好",
"short": "做空",
"show-all": "在導航欄中顯示全部",
"show-less": "顯示較少",
"show-more": "顯示更多",
"show-tips": "顯示提示",
"show-zero": "顯示零餘額",
"side": "方向",
@ -299,6 +303,7 @@
"stop-price": "止損價格",
"successfully-placed": "已下單了",
"supported-assets": "請給錢包存入已被支持的幣種。",
"swap": "換幣",
"take-profit": "止盈",
"take-profit-limit": "限價止盈",
"taker-fee": "吃單費率",
@ -342,8 +347,8 @@
"totals": "總量",
"trade": "交易",
"trade-history": "交易紀錄",
"trades-history": "交易紀錄",
"trades": "成交",
"trades-history": "交易紀錄",
"transaction-sent": "已下訂單",
"trigger-price": "觸發價格",
"try-again": "請再試一次",
@ -354,8 +359,8 @@
"unsettled-balances": "未結清餘額",
"unsettled-positions": "未結清持倉",
"use-explorer-one": "使用",
"use-explorer-two": "瀏覽器",
"use-explorer-three": "來驗證延遲的交易",
"use-explorer-two": "瀏覽器",
"utilization": "利用率",
"v3-new": "V3與V2完全不一樣。仍要登錄V2的人可以在導航欄點「更多」或此鏈接",
"v3-unaudited": "Mango V3目前還是測試版。此軟體未經過審計。風險自負。",
@ -368,8 +373,8 @@
"withdraw": "取款",
"withdraw-error": "無法取款",
"withdraw-funds": "取款",
"withdraw-success": "已取款",
"withdraw-history": "提款記錄",
"withdraw-success": "已取款",
"withdrawals": "取款",
"you-must-leave-enough-sol": "您必須在錢包中保留足夠的 SOL 來支付交易費用",
"your-account": "您的帳戶",

View File

@ -0,0 +1,31 @@
{
"ata-deposit": "押金",
"ata-deposit-details": "{{cost}} SOL為 {{count}} ATA帳戶",
"ata-deposit-details_plural": "{{cost}} SOL為 {{count}} ATA帳戶",
"fees-paid-to": "費用繳給{{feeRecipient}}",
"from": "從",
"jupiter-error": "Jupiter出錯請更改輸入",
"minimum-received": "最好獲得",
"price-info": "價格細節",
"routes-found": "找到{{numberOfRoutes}}路線!",
"serum-details": "{{cost}} SOL為 {{count}} Serum OpenOrders帳戶",
"serum-details_plural": "{{cost}} SOL為 {{count}} Serum OpenOrders帳戶",
"swap-successful": "交易成功",
"swapping": "正在交易...",
"to": "到",
"you-pay": "您付出",
"you-receive": "您收到",
"unavailable": "Unavailable",
"pay": "Pay",
"bal": "Bal:",
"receive": "Receive",
"transaction-fee": "Transaction Fee",
"get-started": "Before you get started...",
"swap-in-wallet": "Swaps interact directly with your connected wallet, not your Mango Account.",
"got-it": "Got It",
"need-ata-account": "You need to have an Associated Token Account.",
"serum-requires-openorders": "Serum requires an OpenOrders account for each token. You can close the account and recover the SOL later.",
"heres-how": "Here's how",
"swap-fee": "Swap Fee"
}