Skip to content

Commit

Permalink
[NO CHANGELOG] [Add Tokens Widget] Chore/add tokens add wallet text (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mimi-imtbl authored Dec 3, 2024
1 parent 2039ab6 commit 17c8f0e
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 11 deletions.
10 changes: 8 additions & 2 deletions packages/checkout/widgets-lib/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,14 @@
"searchPlaceholder": "Search tokens"
},
"walletSelection": {
"fromText": "Send from",
"toText": "Deliver to"
"from":{
"label": "Send from",
"caption": "Choose a wallet to bridge or swap from"
},
"to": {
"label": "Deliver to",
"caption": "Choose where you want your tokens to go"
}
},
"routeSelection": {
"loadingText": "Finding the best payment route...",
Expand Down
10 changes: 8 additions & 2 deletions packages/checkout/widgets-lib/src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,14 @@
"searchPlaceholder": "トークンを検索"
},
"walletSelection": {
"fromText": "送金元",
"toText": "送金先"
"from": {
"label": "送信元",
"caption": "ブリッジまたはスワップするウォレットを選択してください"
},
"to": {
"label": "送信先",
"caption": "トークンを送信したい場所を選択してください"
}
},
"routeSelection": {
"loadingText": "最適な支払いルートを検索中...",
Expand Down
10 changes: 8 additions & 2 deletions packages/checkout/widgets-lib/src/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,14 @@
"searchPlaceholder": "토큰 검색"
},
"walletSelection": {
"fromText": "보내는 곳",
"toText": "받는 곳"
"from": {
"label": "보내는 곳",
"caption": "브리지 또는 스왑할 지갑을 선택하세요"
},
"to": {
"label": "받는 곳",
"caption": "토큰을 보낼 위치를 선택하세요"
}
},
"routeSelection": {
"loadingText": "최적의 결제 경로를 찾는 중...",
Expand Down
10 changes: 8 additions & 2 deletions packages/checkout/widgets-lib/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,14 @@
"searchPlaceholder": "搜索代币"
},
"walletSelection": {
"fromText": "从此发送",
"toText": "发送到"
"from": {
"label": "发送自",
"caption": "选择要桥接或交换的钱包"
},
"to": {
"label": "发送到",
"caption": "选择您想要发送代币的位置"
}
},
"routeSelection": {
"loadingText": "寻找最佳支付路线中...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const disabledStyles = {
export interface SelectedWalletProps {
children?: ReactNode;
label: string;
caption?: string;
providerInfo?: Partial<EIP6963ProviderInfo & { address?: string }>;
onClick: MouseEventHandler<HTMLSpanElement>;
disabled?: boolean;
Expand All @@ -20,6 +21,7 @@ export interface SelectedWalletProps {

export function SelectedWallet({
label,
caption,
children,
onClick,
providerInfo,
Expand Down Expand Up @@ -52,7 +54,7 @@ export function SelectedWallet({
/>
)}
<MenuItem.Label>{label}</MenuItem.Label>
{providerInfo?.name && (
{providerInfo?.name ? (
<MenuItem.Caption>
{providerInfo?.name}
{' • '}
Expand All @@ -61,7 +63,12 @@ export function SelectedWallet({
sx={{ c: 'inherit', fontSize: 'inherit' }}
/>
</MenuItem.Caption>
) : (
<MenuItem.Caption>
{caption}
</MenuItem.Caption>
)}

<MenuItem.BottomSlot>{children}</MenuItem.BottomSlot>
</MenuItem>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,8 @@ export function AddTokens({
&& selectedAmount
? { animation: `${PULSE_SHADOW} 2s infinite ease-in-out` }
: {}}
label={t('views.ADD_TOKENS.walletSelection.fromText')}
label={t('views.ADD_TOKENS.walletSelection.from.label')}
caption={t('views.ADD_TOKENS.walletSelection.from.caption')}
providerInfo={{
...fromProviderInfo,
address: fromAddress,
Expand Down Expand Up @@ -697,7 +698,8 @@ export function AddTokens({
&& selectedAmount
? { animation: `${PULSE_SHADOW} 2s infinite ease-in-out` }
: {}}
label={t('views.ADD_TOKENS.walletSelection.toText')}
label={t('views.ADD_TOKENS.walletSelection.to.label')}
caption={t('views.ADD_TOKENS.walletSelection.to.caption')}
providerInfo={{
...toProviderInfo,
address: toAddress,
Expand Down

0 comments on commit 17c8f0e

Please sign in to comment.