From 41850c9f14baa5330919c6dabf161b1aaeda7376 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 23 Feb 2022 15:18:37 -0300 Subject: add i18n where was missing --- .../taler-wallet-webextension/src/cta/Withdraw.tsx | 48 +++++++++++++--------- 1 file changed, 29 insertions(+), 19 deletions(-) (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw.tsx') diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx index 8f45a047c..7d36a6084 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx @@ -18,7 +18,7 @@ * Page shown to the user to confirm creation * of a reserve, usually requested by the bank. * - * @author Florian Dold + * @author sebasjm */ import { @@ -26,6 +26,7 @@ import { Amounts, ExchangeListItem, i18n, + Translate, WithdrawUriInfoResponse, } from "@gnu-taler/taler-util"; import { OperationFailedError } from "@gnu-taler/taler-wallet-core"; @@ -117,37 +118,46 @@ export function View({ return ( -

{i18n.str`Digital cash withdrawal`}

+

+ Digital cash withdrawal +

{withdrawError && ( Could not finish the withdrawal operation + } error={withdrawError.operationError} /> )}
Total to withdraw} text={amountToString(Amounts.sub(amount, withdrawalFee).amount)} kind="positive" /> {Amounts.isNonZero(withdrawalFee) && ( Chosen amount} text={amountToString(amount)} kind="neutral" /> Exchange fee} text={amountToString(withdrawalFee)} kind="negative" /> )} {exchangeBaseUrl && ( - + Exchange} + text={exchangeBaseUrl} + kind="neutral" + big + /> )}
{!reviewing && ( @@ -156,7 +166,7 @@ export function View({
Known exchanges} list={exchanges} value={nextExchange} name="switchingExchange" @@ -172,14 +182,16 @@ export function View({ setSwitchingExchange(false); }} > - {nextExchange === undefined - ? i18n.str`Cancel exchange selection` - : i18n.str`Confirm exchange selection`} + {nextExchange === undefined ? ( + Cancel exchange selection + ) : ( + Confirm exchange selection + )} ) : ( setSwitchingExchange(true)}> - {i18n.str`Switch exchange`} + Switch exchange )} @@ -198,7 +210,7 @@ export function View({ disabled={!exchangeBaseUrl || confirmDisabled} onClick={doWithdrawAndCheckError} > - {i18n.str`Confirm withdrawal`} + Confirm withdrawal )} {terms.status === "notfound" && ( @@ -207,7 +219,7 @@ export function View({ disabled={!exchangeBaseUrl} onClick={doWithdrawAndCheckError} > - {i18n.str`Withdraw anyway`} + Withdraw anyway )} @@ -270,7 +282,7 @@ export function WithdrawPageWithParsedURI({ if (detailsHook.hasError) { return ( Could not load the withdrawal details} error={detailsHook} /> ); @@ -293,9 +305,7 @@ export function WithdrawPageWithParsedURI({ const onWithdraw = async (): Promise => { if (!exchange) return; - console.log("accepting exchange", exchange); const res = await wxApi.acceptWithdrawal(uri, exchange); - console.log("accept withdrawal response", res); if (res.confirmTransferUrl) { document.location.href = res.confirmTransferUrl; } @@ -327,7 +337,7 @@ export function WithdrawPage({ talerWithdrawUri }: Props): VNode { if (!talerWithdrawUri) { return ( - missing withdraw uri + missing withdraw uri ); } @@ -337,7 +347,7 @@ export function WithdrawPage({ talerWithdrawUri }: Props): VNode { if (uriInfoHook.hasError) { return ( Could not get the info from the URI} error={uriInfoHook} /> ); -- cgit v1.2.3