summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx52
1 files changed, 33 insertions, 19 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
index 0ca07816e..96644be28 100644
--- a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
@@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { AmountJson, Amounts, i18n } from "@gnu-taler/taler-util";
+import { AmountJson, Amounts, i18n, Translate } from "@gnu-taler/taler-util";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { ErrorMessage } from "../components/ErrorMessage";
@@ -99,14 +99,20 @@ export function CreateManualWithdraw({
if (!initialExchange) {
return (
<section>
- <h2>Manual Withdrawal</h2>
+ <h2>
+ <i18n.Translate>Manual Withdrawal</i18n.Translate>
+ </h2>
<LightText>
- Choose a exchange from where the coins will be withdrawn. The exchange
- will send the coins to this wallet after receiving a wire transfer
- with the correct subject.
+ <i18n.Translate>
+ Choose a exchange from where the coins will be withdrawn. The
+ exchange will send the coins to this wallet after receiving a wire
+ transfer with the correct subject.
+ </i18n.Translate>
</LightText>
<Centered style={{ marginTop: 100 }}>
- <BoldLight>No exchange configured</BoldLight>
+ <BoldLight>
+ <i18n.Translate>No exchange configured</i18n.Translate>
+ </BoldLight>
<ButtonSuccess onClick={onAddExchange}>
<i18n.Translate>Add exchange</i18n.Translate>
</ButtonSuccess>
@@ -118,20 +124,26 @@ export function CreateManualWithdraw({
return (
<Fragment>
<section>
- <ErrorMessage
- title={error && "Can't create the reserve"}
- description={error}
- />
- <h2>Manual Withdrawal</h2>
+ {error && (
+ <ErrorMessage
+ title={<i18n.Translate>Can't create the reserve</i18n.Translate>}
+ description={error}
+ />
+ )}
+ <h2>
+ <i18n.Translate>Manual Withdrawal</i18n.Translate>
+ </h2>
<LightText>
- Choose a exchange from where the coins will be withdrawn. The exchange
- will send the coins to this wallet after receiving a wire transfer
- with the correct subject.
+ <i18n.Translate>
+ Choose a exchange from where the coins will be withdrawn. The
+ exchange will send the coins to this wallet after receiving a wire
+ transfer with the correct subject.
+ </i18n.Translate>
</LightText>
<p>
<Input>
<SelectList
- label="Currency"
+ label={<i18n.Translate>Currency</i18n.Translate>}
list={currencyMap}
name="currency"
value={currency}
@@ -140,7 +152,7 @@ export function CreateManualWithdraw({
</Input>
<Input>
<SelectList
- label="Exchange"
+ label={<i18n.Translate>Exchange</i18n.Translate>}
list={exchangeMap}
name="currency"
value={exchange}
@@ -149,12 +161,14 @@ export function CreateManualWithdraw({
</Input>
<div style={{ display: "flex", justifyContent: "space-between" }}>
<LinkPrimary onClick={onAddExchange} style={{ marginLeft: "auto" }}>
- <i18n.Translate>Add exchange</i18n.Translate>
+ <i18n.Translate>Add Exchange</i18n.Translate>
</LinkPrimary>
</div>
{currency && (
<InputWithLabel invalid={!!amount && !parsedAmount}>
- <label>Amount</label>
+ <label>
+ <i18n.Translate>Amount</i18n.Translate>
+ </label>
<div>
<span>{currency}</span>
<input
@@ -173,7 +187,7 @@ export function CreateManualWithdraw({
disabled={!parsedAmount || !exchange}
onClick={() => onCreate(exchange, parsedAmount!)}
>
- Start withdrawal
+ <i18n.Translate>Start withdrawal</i18n.Translate>
</ButtonPrimary>
</footer>
</Fragment>