diff --git a/packages/taler-wallet-webextension/src/NavigationBar.tsx b/packages/taler-wallet-webextension/src/NavigationBar.tsx index 11f684af5..f0fc3da28 100644 --- a/packages/taler-wallet-webextension/src/NavigationBar.tsx +++ b/packages/taler-wallet-webextension/src/NavigationBar.tsx @@ -18,17 +18,23 @@ * Popup shown to the user when they click * the Taler browser action button. * - * @author Florian Dold + * @author sebasjm */ /** * Imports. */ -import { i18n } from "@gnu-taler/taler-util"; +import { i18n, Translate } from "@gnu-taler/taler-util"; import { VNode, h } from "preact"; import { JustInDevMode } from "./components/JustInDevMode"; import { NavigationHeader, NavigationHeaderHolder } from "./components/styled"; +/** + * List of pages used by the wallet + * + * @author sebasjm + */ + export enum Pages { welcome = "/welcome", @@ -60,17 +66,15 @@ export function PopupNavBar({ path = "" }: { path?: string }): VNode { : "#"; return ( - {i18n.str`Balance`} - {i18n.str`Backup`} + + Balance + + + Backup + -
+
); @@ -80,20 +84,17 @@ export function WalletNavBar({ path = "" }: { path?: string }): VNode { return ( - {i18n.str`Balance`} - {i18n.str`Backup`} + + Balance + + + Backup + - {i18n.str`Dev`} + + Dev + @@ -101,7 +102,7 @@ export function WalletNavBar({ path = "" }: { path?: string }): VNode { href="/settings" class={path.startsWith("/settings") ? "active" : ""} > -
+ Settings diff --git a/packages/taler-wallet-webextension/src/background.ts b/packages/taler-wallet-webextension/src/background.ts index 428cd86f5..d6aeddc1d 100644 --- a/packages/taler-wallet-webextension/src/background.ts +++ b/packages/taler-wallet-webextension/src/background.ts @@ -17,7 +17,7 @@ /** * Entry point for the background page. * - * @author Florian Dold + * @author sebasjm */ /** diff --git a/packages/taler-wallet-webextension/src/browserCryptoWorkerFactory.js b/packages/taler-wallet-webextension/src/browserCryptoWorkerFactory.js deleted file mode 100644 index 8d958d6bd..000000000 --- a/packages/taler-wallet-webextension/src/browserCryptoWorkerFactory.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -/* - This file is part of TALER - (C) 2016 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BrowserCryptoWorkerFactory = void 0; -/** - * API to access the Taler crypto worker thread. - * @author Florian Dold - */ -class BrowserCryptoWorkerFactory { - startWorker() { - const workerCtor = Worker; - const workerPath = "/browserWorkerEntry.js"; - return new workerCtor(workerPath); - } - getConcurrency() { - let concurrency = 2; - try { - // only works in the browser - // tslint:disable-next-line:no-string-literal - concurrency = navigator["hardwareConcurrency"]; - concurrency = Math.max(1, Math.ceil(concurrency / 2)); - } catch (e) { - concurrency = 2; - } - return concurrency; - } -} -exports.BrowserCryptoWorkerFactory = BrowserCryptoWorkerFactory; -//# sourceMappingURL=browserCryptoWorkerFactory.js.map diff --git a/packages/taler-wallet-webextension/src/browserCryptoWorkerFactory.js.map b/packages/taler-wallet-webextension/src/browserCryptoWorkerFactory.js.map deleted file mode 100644 index db56d4451..000000000 --- a/packages/taler-wallet-webextension/src/browserCryptoWorkerFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"browserCryptoWorkerFactory.js","sourceRoot":"","sources":["browserCryptoWorkerFactory.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;GAGG;AAEH,MAAa,0BAA0B;IACrC,WAAW;QACT,MAAM,UAAU,GAAG,MAAM,CAAC;QAC1B,MAAM,UAAU,GAAG,wBAAwB,CAAC;QAC5C,OAAO,IAAI,UAAU,CAAC,UAAU,CAAiB,CAAC;IACpD,CAAC;IAED,cAAc;QACZ,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI;YACF,4BAA4B;YAC5B,6CAA6C;YAC7C,WAAW,GAAI,SAAiB,CAAC,qBAAqB,CAAC,CAAC;YACxD,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;SACvD;QAAC,OAAO,CAAC,EAAE;YACV,WAAW,GAAG,CAAC,CAAC;SACjB;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AAnBD,gEAmBC"} \ No newline at end of file diff --git a/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx b/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx index 71365e089..205413007 100644 --- a/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx +++ b/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ -import { PaytoUri } from "@gnu-taler/taler-util"; +import { PaytoUri, Translate } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; import { CopiedIcon, CopyIcon } from "../svg"; @@ -34,23 +34,23 @@ export function BankDetailsByPaytoType({ amount, }: BankDetailsProps): VNode { const firstPart = !payto ? undefined : !payto.isKnown ? ( - + Account} value={payto.targetPath} /> ) : payto.targetType === "x-taler-bank" ? ( - - + Bank host} value={payto.host} /> + Bank account} value={payto.account} /> ) : payto.targetType === "iban" ? ( - + IBAN} value={payto.iban} /> ) : undefined; return (

Bank transfer details

{firstPart} - - - + Exchange} value={exchangeBaseUrl} /> + Chosen amount} value={amount} /> + Subject} value={subject} literal />
); @@ -61,7 +61,7 @@ function Row({ value, literal, }: { - name: string; + name: VNode; value: string; literal?: boolean; }): VNode { diff --git a/packages/taler-wallet-webextension/src/components/Checkbox.tsx b/packages/taler-wallet-webextension/src/components/Checkbox.tsx index 59e84f4b0..0eb087b07 100644 --- a/packages/taler-wallet-webextension/src/components/Checkbox.tsx +++ b/packages/taler-wallet-webextension/src/components/Checkbox.tsx @@ -19,9 +19,9 @@ import { h, VNode } from "preact"; interface Props { enabled: boolean; onToggle: () => void; - label: string; + label: VNode; name: string; - description?: string; + description?: VNode; } export function Checkbox({ name, diff --git a/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx b/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx index 16909d29a..de7fb5e6c 100644 --- a/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx +++ b/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx @@ -20,7 +20,7 @@ import { h, VNode } from "preact"; interface Props { enabled: boolean; onToggle: () => void; - label: string; + label: VNode; name: string; } diff --git a/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx b/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx index b57075805..522fbce98 100644 --- a/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx +++ b/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx @@ -14,6 +14,7 @@ TALER; see the file COPYING. If not, see */ +import { Translate } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; export function DebugCheckbox({ @@ -36,7 +37,7 @@ export function DebugCheckbox({ htmlFor="checkbox-perm" style={{ marginLeft: "0.5em", fontWeight: "bold" }} > - Automatically open wallet based on page content + Automatically open wallet based on page content - (Enabling this option below will make using the wallet faster, but - requires more permissions from your browser.) + ( + + Enabling this option below will make using the wallet faster, but + requires more permissions from your browser. + + )
); diff --git a/packages/taler-wallet-webextension/src/components/Diagnostics.tsx b/packages/taler-wallet-webextension/src/components/Diagnostics.tsx index d368a10bf..04b6abb55 100644 --- a/packages/taler-wallet-webextension/src/components/Diagnostics.tsx +++ b/packages/taler-wallet-webextension/src/components/Diagnostics.tsx @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ -import { WalletDiagnostics } from "@gnu-taler/taler-util"; +import { Translate, WalletDiagnostics } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { PageLink } from "../renderHtml"; @@ -25,7 +25,13 @@ interface Props { export function Diagnostics({ timedOut, diagnostics }: Props): VNode { if (timedOut) { - return

Diagnostics timed out. Could not talk to the wallet backend.

; + return ( +

+ + Diagnostics timed out. Could not talk to the wallet backend. + +

+ ); } if (diagnostics) { @@ -41,7 +47,9 @@ export function Diagnostics({ timedOut, diagnostics }: Props): VNode { paddingBottom: "0.2em", }} > -

Problems detected:

+

+ Problems detected: +

    {diagnostics.errors.map((errMsg) => (
  1. {errMsg}
  2. @@ -49,22 +57,32 @@ export function Diagnostics({ timedOut, diagnostics }: Props): VNode {
{diagnostics.firefoxIdbProblem ? (

- Please check in your about:config settings that you - have IndexedDB enabled (check the preference name{" "} - dom.indexedDB.enabled). + + Please check in your about:config settings that you + have IndexedDB enabled (check the preference name{" "} + dom.indexedDB.enabled). +

) : null} {diagnostics.dbOutdated ? (

- Your wallet database is outdated. Currently automatic migration is - not supported. Please go{" "} - here to reset the - wallet database. + + Your wallet database is outdated. Currently automatic migration is + not supported. Please go{" "} + + here + {" "} + to reset the wallet database. +

) : null}
); } - return

Running diagnostics ...

; + return ( +

+ Running diagnostics ... +

+ ); } diff --git a/packages/taler-wallet-webextension/src/components/EditableText.tsx b/packages/taler-wallet-webextension/src/components/EditableText.tsx index 72bfbe809..c5d6e397e 100644 --- a/packages/taler-wallet-webextension/src/components/EditableText.tsx +++ b/packages/taler-wallet-webextension/src/components/EditableText.tsx @@ -14,6 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ +import { Translate } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useRef, useState } from "preact/hooks"; @@ -39,7 +40,9 @@ export function EditableText({ return (

{value}

- +
); }; @@ -54,7 +57,7 @@ export function EditableText({ onChange(ref.current.value).then(() => setEditing(false)); }} > - confirm + Confirm
); diff --git a/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx b/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx index 21f10eeef..085bf0b82 100644 --- a/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx +++ b/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx @@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see */ -import { VNode, h } from "preact"; +import { VNode, h, ComponentChildren } from "preact"; import { useState } from "preact/hooks"; import arrowDown from "../../static/img/chevron-down.svg"; import { ErrorBox } from "./styled"; @@ -22,11 +22,10 @@ export function ErrorMessage({ title, description, }: { - title?: string | VNode; + title: VNode; description?: string; }): VNode | null { const [showErrorDetail, setShowErrorDetail] = useState(false); - if (!title) return null; return (
diff --git a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx index a7b66ea3d..4852a71b1 100644 --- a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx +++ b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx @@ -24,7 +24,7 @@ export function ErrorTalerOperation({ title, error, }: { - title?: string; + title?: VNode; error?: TalerErrorDetails; }): VNode | null { const { devMode } = useDevContext(); diff --git a/packages/taler-wallet-webextension/src/components/Loading.tsx b/packages/taler-wallet-webextension/src/components/Loading.tsx index 34edac551..ff6d21376 100644 --- a/packages/taler-wallet-webextension/src/components/Loading.tsx +++ b/packages/taler-wallet-webextension/src/components/Loading.tsx @@ -13,8 +13,13 @@ You should have received a copy of the GNU General Public License along with TALER; see the file COPYING. If not, see */ +import { Translate } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; export function Loading(): VNode { - return
Loading...
; + return ( +
+ Loading... +
+ ); } diff --git a/packages/taler-wallet-webextension/src/components/LoadingError.tsx b/packages/taler-wallet-webextension/src/components/LoadingError.tsx index 6f572b882..ea0ff40d6 100644 --- a/packages/taler-wallet-webextension/src/components/LoadingError.tsx +++ b/packages/taler-wallet-webextension/src/components/LoadingError.tsx @@ -19,7 +19,7 @@ import { ErrorMessage } from "./ErrorMessage"; import { ErrorTalerOperation } from "./ErrorTalerOperation"; export interface Props { - title: string; + title: VNode; error: HookError; } export function LoadingError({ title, error }: Props): VNode { diff --git a/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx b/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx index 977ac557d..1f46cf82c 100644 --- a/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx +++ b/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx @@ -4,7 +4,7 @@ import { ButtonBoxPrimary, ButtonPrimary, ParagraphClickable } from "./styled"; import { useState } from "preact/hooks"; export interface Props { - label: (s: string) => string; + label: (s: string) => VNode; actions: string[]; onClick: (s: string) => void; } diff --git a/packages/taler-wallet-webextension/src/components/Part.tsx b/packages/taler-wallet-webextension/src/components/Part.tsx index c8ecb46d2..05da90b2d 100644 --- a/packages/taler-wallet-webextension/src/components/Part.tsx +++ b/packages/taler-wallet-webextension/src/components/Part.tsx @@ -15,11 +15,11 @@ */ import { AmountLike } from "@gnu-taler/taler-util"; import { ExtraLargeText, LargeText, SmallLightText } from "./styled"; -import { h } from "preact"; +import { h, VNode } from "preact"; export type Kind = "positive" | "negative" | "neutral"; interface Props { - title: string; + title: VNode; text: AmountLike; kind: Kind; big?: boolean; diff --git a/packages/taler-wallet-webextension/src/components/SelectList.tsx b/packages/taler-wallet-webextension/src/components/SelectList.tsx index c17b87339..a5f182d77 100644 --- a/packages/taler-wallet-webextension/src/components/SelectList.tsx +++ b/packages/taler-wallet-webextension/src/components/SelectList.tsx @@ -14,13 +14,14 @@ GNU Taler; see the file COPYING. If not, see */ +import { Translate } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { NiceSelect } from "./styled"; interface Props { value?: string; onChange: (s: string) => void; - label: string; + label: VNode; list: { [label: string]: string; }; @@ -58,7 +59,7 @@ export function SelectList({ {value === undefined || (canBeNull && ( // ) : ( // diff --git a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx index 89d6235aa..5c8897006 100644 --- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx +++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx @@ -21,6 +21,7 @@ import { Timestamp, Transaction, TransactionType, + Translate, } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import imageBank from "../../static/img/ri-bank-line.svg"; @@ -133,7 +134,7 @@ function TransactionLayout(props: TransactionLayoutProps): VNode { {props.pending && ( - Waiting for confirmation + Waiting for confirmation )} @@ -195,7 +196,11 @@ function TransactionAmount(props: TransactionAmountProps): VNode { {sign} {Amounts.stringifyValue(props.amount)} - {props.pending &&
PENDING
} + {props.pending && ( +
+ PENDING +
+ )} ); } diff --git a/packages/taler-wallet-webextension/src/cta/Deposit.tsx b/packages/taler-wallet-webextension/src/cta/Deposit.tsx index 39ccdbac0..5adc641f4 100644 --- a/packages/taler-wallet-webextension/src/cta/Deposit.tsx +++ b/packages/taler-wallet-webextension/src/cta/Deposit.tsx @@ -35,6 +35,7 @@ import { NotificationType, PreparePayResult, PreparePayResultType, + Translate, } from "@gnu-taler/taler-util"; import { OperationFailedError } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, VNode } from "preact"; @@ -108,7 +109,11 @@ export function DepositPage({ talerPayUri, goBack }: Props): VNode { }, [talerPayUri, foundAmountStr]); if (!talerPayUri) { - return missing pay uri; + return ( + + missing pay uri + + ); } if (!payStatus) { @@ -116,10 +121,16 @@ export function DepositPage({ talerPayUri, goBack }: Props): VNode { return ( -

{i18n.str`Digital cash payment`}

+

+ Digital cash payment +

+ Could not get the payment information for this order + + } error={payErrMsg?.operationError} />
@@ -130,15 +141,25 @@ export function DepositPage({ talerPayUri, goBack }: Props): VNode { return ( -

{i18n.str`Digital cash payment`}

+

+ Digital cash payment +

-

Could not get the payment information for this order

+

+ + Could not get the payment information for this order + +

{payErrMsg}
); } - return Loading payment information ...; + return ( + + Loading payment information ... + + ); } const onClick = async (): Promise => { @@ -183,20 +204,32 @@ export function PaymentRequestView({ -

{i18n.str`Digital cash deposit`}

+

+ Digital cash deposit +

{payStatus.status === PreparePayResultType.AlreadyConfirmed && (payStatus.paid ? ( - Already paid + + Already paid + ) : ( - Already claimed + + Already claimed + ))} {payResult && payResult.type === ConfirmPayResultType.Done && ( -

Payment complete

+

+ Payment complete +

- {!payResult.contractTerms.fulfillment_message - ? "You will now be sent back to the merchant you came from." - : payResult.contractTerms.fulfillment_message} + {!payResult.contractTerms.fulfillment_message ? ( + + You will now be sent back to the merchant you came from. + + ) : ( + payResult.contractTerms.fulfillment_message + )}

)} @@ -205,7 +238,7 @@ export function PaymentRequestView({ Amounts.isNonZero(totalFees) && ( Total to pay} text={amountToPretty( Amounts.parseOrThrow(payStatus.amountEffective), )} @@ -214,7 +247,7 @@ export function PaymentRequestView({ )} Purchase amount} text={amountToPretty(Amounts.parseOrThrow(payStatus.amountRaw))} kind="neutral" /> @@ -222,21 +255,25 @@ export function PaymentRequestView({ Fee} text={amountToPretty(totalFees)} kind="negative" /> )} Merchant} text={contractTerms.merchant.name} kind="neutral" /> - + Purchase} + text={contractTerms.summary} + kind="neutral" + /> {contractTerms.order_id && ( Receipt} text={`#${contractTerms.order_id}`} kind="neutral" /> diff --git a/packages/taler-wallet-webextension/src/cta/Pay.tsx b/packages/taler-wallet-webextension/src/cta/Pay.tsx index 7f5f42e8d..7ed0d072f 100644 --- a/packages/taler-wallet-webextension/src/cta/Pay.tsx +++ b/packages/taler-wallet-webextension/src/cta/Pay.tsx @@ -37,10 +37,12 @@ import { PreparePayResult, PreparePayResultType, Product, + Translate, } from "@gnu-taler/taler-util"; import { OperationFailedError } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; +import { ErrorMessage } from "../components/ErrorMessage"; import { Loading } from "../components/Loading"; import { LoadingError } from "../components/LoadingError"; import { LogoHeader } from "../components/LogoHeader"; @@ -106,7 +108,12 @@ export function PayPage({ } if (hook.hasError) { - return ; + return ( + Could not load pay status} + error={hook} + /> + ); } const foundBalance = hook.response.balance.balances.find( @@ -178,9 +185,13 @@ export function PaymentRequestView({ if (!contractTerms) { return ( - - Error: did not get contract terms from merchant or wallet backend. - + + Could not load contract terms from merchant or wallet backend. + + } + /> ); } @@ -192,13 +203,6 @@ export function PaymentRequestView({ totalFees = Amounts.sub(amountEffective, amountRaw).amount; } - // let merchantName: VNode; - // if (contractTerms.merchant && contractTerms.merchant.name) { - // merchantName = {contractTerms.merchant.name}; - // } else { - // merchantName = (pub: {contractTerms.merchant_pub}); - // } - function Alternative(): VNode { const [showQR, setShowQR] = useState(false); const privateUri = @@ -209,12 +213,21 @@ export function PaymentRequestView({ return (
setShowQR((qr) => !qr)}> - {!showQR ? i18n.str`Pay with a mobile phone` : i18n.str`Hide QR`} + {!showQR ? ( + Pay with a mobile phone + ) : ( + Hide QR + )} {showQR && (
- Scan the QR code or click here + + Scan the QR code or + + click here + +
)}
@@ -227,7 +240,9 @@ export function PaymentRequestView({ return (
-

Processing...

+

+ Processing... +

); @@ -239,7 +254,9 @@ export function PaymentRequestView({
- {i18n.str`Pay`} {amountToString(payStatus.amountEffective)} + + Pay {amountToString(payStatus.amountEffective)} +
@@ -252,18 +269,22 @@ export function PaymentRequestView({
{balance ? ( - Your balance of {amountToString(balance)} is not enough to pay - for this purchase + + Your balance of {amountToString(balance)} is not enough to pay + for this purchase + ) : ( - Your balance is not enough to pay for this purchase. + + Your balance is not enough to pay for this purchase. + )}
- {i18n.str`Withdraw digital cash`} + Withdraw digital cash
@@ -276,7 +297,7 @@ export function PaymentRequestView({
{payStatus.paid && contractTerms.fulfillment_message && ( Merchant message} text={contractTerms.fulfillment_message} kind="neutral" /> @@ -293,31 +314,48 @@ export function PaymentRequestView({ -

{i18n.str`Digital cash payment`}

+

+ Digital cash payment +

{payStatus.status === PreparePayResultType.AlreadyConfirmed && (payStatus.paid ? ( payStatus.contractTerms.fulfillment_url ? ( - Already paid, you are going to be redirected to{" "} - - {payStatus.contractTerms.fulfillment_url} - + + Already paid, you are going to be redirected to{" "} + + {payStatus.contractTerms.fulfillment_url} + + ) : ( - Already paid + + Already paid + ) ) : ( - Already claimed + + Already claimed + ))} {payResult && payResult.type === ConfirmPayResultType.Done && ( -

Payment complete

+

+ Payment complete +

- {!payResult.contractTerms.fulfillment_message - ? payResult.contractTerms.fulfillment_url - ? `You are going to be redirected to ${payResult.contractTerms.fulfillment_url}` - : "You can close this page." - : payResult.contractTerms.fulfillment_message} + {!payResult.contractTerms.fulfillment_message ? ( + payResult.contractTerms.fulfillment_url ? ( + + You are going to be redirected to $ + {payResult.contractTerms.fulfillment_url} + + ) : ( + You can close this page. + ) + ) : ( + payResult.contractTerms.fulfillment_message + )}

)} @@ -326,14 +364,14 @@ export function PaymentRequestView({ Amounts.isNonZero(totalFees) && ( Total to pay} text={amountToString(payStatus.amountEffective)} kind="negative" /> )} Purchase amount} text={amountToString(payStatus.amountRaw)} kind="neutral" /> @@ -341,21 +379,25 @@ export function PaymentRequestView({ Fee} text={amountToString(totalFees)} kind="negative" /> )} Merchant} text={contractTerms.merchant.name} kind="neutral" /> - + Purchase} + text={contractTerms.summary} + kind="neutral" + /> {contractTerms.order_id && ( Receipt} text={`#${contractTerms.order_id}`} kind="neutral" /> @@ -373,7 +415,7 @@ function ProductList({ products }: { products: Product[] }): VNode { return ( - List of products + List of products
{products.map((p, i) => { @@ -415,15 +457,18 @@ function ProductList({ products }: { products: Product[] }): VNode { {p.quantity ?? 1} x {p.description}
- Total{` `} - {p.price - ? `${Amounts.stringifyValue( - Amounts.mult( - Amounts.parseOrThrow(p.price), - p.quantity ?? 1, - ).amount, - )} ${p}` - : "free"} + Total + {` `} + {p.price ? ( + `${Amounts.stringifyValue( + Amounts.mult( + Amounts.parseOrThrow(p.price), + p.quantity ?? 1, + ).amount, + )} ${p}` + ) : ( + free + )}
diff --git a/packages/taler-wallet-webextension/src/cta/Refund.tsx b/packages/taler-wallet-webextension/src/cta/Refund.tsx index cecd1ac00..ec32cc37a 100644 --- a/packages/taler-wallet-webextension/src/cta/Refund.tsx +++ b/packages/taler-wallet-webextension/src/cta/Refund.tsx @@ -17,10 +17,10 @@ /** * Page that shows refund status for purchases. * - * @author Florian Dold + * @author sebasjm */ -import { Amounts, ApplyRefundResponse } from "@gnu-taler/taler-util"; +import { Amounts, ApplyRefundResponse, Translate } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; import { AmountView } from "../renderHtml"; @@ -37,20 +37,28 @@ export function View({ applyResult }: ViewProps): VNode {

GNU Taler Wallet

-

Refund Status

+

+ Refund Status +

- The product {applyResult.info.summary} has received a total - effective refund of{" "} + + The product {applyResult.info.summary} has received a total + effective refund of{" "} + .

{applyResult.pendingAtExchange ? ( -

Refund processing is still in progress.

+

+ Refund processing is still in progress. +

) : null} {!Amounts.isZero(applyResult.amountRefundGone) ? (

- The refund amount of{" "} - could not be - applied. + + The refund amount of{" "} + could not be + applied. +

) : null}
@@ -82,15 +90,27 @@ export function RefundPage({ talerRefundUri }: Props): VNode { console.log("rendering"); if (!talerRefundUri) { - return missing taler refund uri; + return ( + + missing taler refund uri + + ); } if (errMsg) { - return Error: {errMsg}; + return ( + + Error: {errMsg} + + ); } if (!applyResult) { - return Updating refund status; + return ( + + Updating refund status + + ); } return ; diff --git a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx index 584da6d29..00f7bd211 100644 --- a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx +++ b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx @@ -1,4 +1,4 @@ -import { i18n } from "@gnu-taler/taler-util"; +import { i18n, Translate } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { CheckboxOutlined } from "../components/CheckboxOutlined"; import { ExchangeXmlTos } from "../components/ExchangeToS"; @@ -34,7 +34,7 @@ export function TermsOfServiceSection({ {terms.status === "notfound" && (
- {i18n.str`Exchange doesn't have terms of service`} + Exchange doesn't have terms of service
)} @@ -46,21 +46,21 @@ export function TermsOfServiceSection({ {terms.status === "notfound" && (
- {i18n.str`Exchange doesn't have terms of service`} + Exchange doesn't have terms of service
)} {terms.status === "new" && (
onReview(true)}> - {i18n.str`Review exchange terms of service`} + Review exchange terms of service
)} {terms.status === "changed" && (
onReview(true)}> - {i18n.str`Review new version of terms of service`} + Review new version of terms of service
)} @@ -72,7 +72,7 @@ export function TermsOfServiceSection({ {onReview && (
onReview(true)}> - {i18n.str`Show terms of service`} + Show terms of service
)} @@ -80,7 +80,9 @@ export function TermsOfServiceSection({ I accept the exchange terms of service + } onToggle={() => { onAccept(!reviewed); if (onReview) onReview(false); @@ -95,7 +97,9 @@ export function TermsOfServiceSection({ {terms.status !== "notfound" && !terms.content && (
- The exchange reply with a empty terms of service + + The exchange reply with a empty terms of service +
)} @@ -116,7 +120,7 @@ export function TermsOfServiceSection({ )} {terms.content.type === "pdf" && ( - Download Terms of Service + Download Terms of Service )}
@@ -124,7 +128,7 @@ export function TermsOfServiceSection({ {reviewed && onReview && (
onReview(false)}> - {i18n.str`Hide terms of service`} + Hide terms of service
)} @@ -133,7 +137,9 @@ export function TermsOfServiceSection({ I accept the exchange terms of service + } onToggle={() => { onAccept(!reviewed); if (onReview) onReview(false); diff --git a/packages/taler-wallet-webextension/src/cta/Tip.tsx b/packages/taler-wallet-webextension/src/cta/Tip.tsx index 3f8b09bd1..9bb03b7ac 100644 --- a/packages/taler-wallet-webextension/src/cta/Tip.tsx +++ b/packages/taler-wallet-webextension/src/cta/Tip.tsx @@ -17,10 +17,10 @@ /** * Page shown to the user to accept or ignore a tip from a merchant. * - * @author Florian Dold + * @author sebasjm */ -import { PrepareTipResult } from "@gnu-taler/taler-util"; +import { PrepareTipResult, Translate } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; import { Loading } from "../components/Loading"; @@ -46,21 +46,29 @@ export function View({
{prepareTipResult.accepted ? ( - Tip from {prepareTipResult.merchantBaseUrl} accepted. - Check your transactions list for more details. + + Tip from {prepareTipResult.merchantBaseUrl} accepted. + Check your transactions list for more details. + ) : (

- The merchant {prepareTipResult.merchantBaseUrl} is - offering you a tip of{" "} - - - {" "} - via the exchange {prepareTipResult.exchangeBaseUrl} + + The merchant {prepareTipResult.merchantBaseUrl} is + offering you a tip of{" "} + + + {" "} + via the exchange {prepareTipResult.exchangeBaseUrl} +

- - + +
)}
@@ -98,11 +106,19 @@ export function TipPage({ talerTipUri }: Props): VNode { }; if (!talerTipUri) { - return missing tip uri; + return ( + + missing tip uri + + ); } if (tipIgnored) { - return You've ignored the tip.; + return ( + + You've ignored the tip. + + ); } if (!prepareTipResult) { 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} /> ); diff --git a/packages/taler-wallet-webextension/src/cta/payback.tsx b/packages/taler-wallet-webextension/src/cta/payback.tsx deleted file mode 100644 index 1c81b48a0..000000000 --- a/packages/taler-wallet-webextension/src/cta/payback.tsx +++ /dev/null @@ -1,31 +0,0 @@ -/* - This file is part of TALER - (C) 2017 Inria - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see - */ - -import { h, VNode } from "preact"; - -/** - * View and edit auditors. - * - * @author Florian Dold - */ - -/** - * Imports. - */ - -export function makePaybackPage(): VNode { - return
not implemented
; -} diff --git a/packages/taler-wallet-webextension/src/cta/reset-required.tsx b/packages/taler-wallet-webextension/src/cta/reset-required.tsx index 75c4c1962..e8c5a0dff 100644 --- a/packages/taler-wallet-webextension/src/cta/reset-required.tsx +++ b/packages/taler-wallet-webextension/src/cta/reset-required.tsx @@ -17,9 +17,10 @@ /** * Page to inform the user when a database reset is required. * - * @author Florian Dold + * @author sebasjm */ +import { Translate } from "@gnu-taler/taler-util"; import { Component, h, VNode } from "preact"; import * as wxApi from "../wxApi"; @@ -49,14 +50,20 @@ class ResetNotification extends Component { if (this.state.resetRequired) { return (
-

Manual Reset Required

+

+ Manual Reset Required +

- The wallet's database in your browser is incompatible with the{" "} - currently installed wallet. Please reset manually. + + The wallet's database in your browser is incompatible with + the currently installed wallet. Please reset manually. +

- Once the database format has stabilized, we will provide automatic - upgrades. + + Once the database format has stabilized, we will provide automatic + upgrades. +

{ }} />{" "}
); } return (
-

Everything is fine!

A reset is not required anymore, you can - close this page. +

+ Everything is fine! +

+

+ + A reset is not required anymore, you can close this page. + +

); } diff --git a/packages/taler-wallet-webextension/src/cta/return-coins.tsx b/packages/taler-wallet-webextension/src/cta/return-coins.tsx index 55f0297d4..22b373899 100644 --- a/packages/taler-wallet-webextension/src/cta/return-coins.tsx +++ b/packages/taler-wallet-webextension/src/cta/return-coins.tsx @@ -14,16 +14,21 @@ TALER; see the file COPYING. If not, see */ +import { Translate } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; /** * Return coins to own bank account. * - * @author Florian Dold + * @author sebasjm */ /** * Imports. */ export function createReturnCoinsPage(): VNode { - return Not implemented yet.; + return ( + + Not implemented yet. + + ); } diff --git a/packages/taler-wallet-webextension/src/i18n/strings.ts b/packages/taler-wallet-webextension/src/i18n/strings.ts index b73d44cab..1e02a1b9e 100644 --- a/packages/taler-wallet-webextension/src/i18n/strings.ts +++ b/packages/taler-wallet-webextension/src/i18n/strings.ts @@ -1,443 +1,1014 @@ -/* - This file is part of TALER - (C) 2016 Inria - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see - */ - -export const strings: { [s: string]: any } = {}; -strings["de"] = { - domain: "messages", - locale_data: { - messages: { +strings['de'] = { + "domain": "messages", + "locale_data": { + "messages": { "": { - domain: "messages", - plural_forms: "nplurals=2; plural=(n != 1);", - lang: "", + "domain": "messages", + "plural_forms": "nplurals=2; plural=n != 1;", + "lang": "de" }, - "Invalid Wire": [""], - "Invalid Test Wire Detail": [""], - "Test Wire Acct #%1$s on %2$s": [""], - "Unknown Wire Detail": [""], - Operation: [""], - "time (ms/op)": [""], + "Invalid Wire": [ + "Ungültige Überweisung" + ], + "Invalid Test Wire Detail": [ + "Ungültige Überweisungsdaten" + ], + "Test Wire Acct #%1$s on %2$s": [ + "Testkonto #%1$s auf %2$s" + ], + "Unknown Wire Detail": [ + "Unbekannte Überweisungsdaten" + ], + "Operation": [ + "" + ], + "time (ms/op)": [ + "" + ], "The merchant %1$s offers you to purchase:": [ - "Der Händler %1$s möchte einen Vertrag über %2$s mit Ihnen abschließen.", - ], - "The total price is %1$s (plus %2$s fees).": [""], - "The total price is %1$s.": [""], - Retry: [""], - "Confirm payment": ["Bezahlung bestätigen"], - Balance: ["Guthaben"], - History: ["Verlauf"], - Debug: ["Debug"], - "You have no balance to show. Need some %1$s getting started?": [ - "Sie haben kein Guthaben. Wollen Sie %1$s abheben?", - ], - "%1$s incoming": [""], - "%1$s being spent": [""], - "Error: could not retrieve balance information.": [""], - "Invalid ": [""], - "Fees ": [""], - "Refresh sessions has completed": [""], - "Order Refused": [""], - "Order redirected": [""], - "Payment aborted": [""], - "Payment Sent": [""], - "Order accepted": [""], - "Reserve balance updated": [""], - "Payment refund": [""], - Withdrawn: ["Abheben bei %1$s"], - "Tip Accepted": [""], - "Tip Declined": [""], - "%1$s": [""], - "Your wallet has no events recorded.": [ - "Ihre Geldbörse verzeichnet keine Vorkommnisse.", - ], - "Wire to bank account": [""], - Confirm: ["Bezahlung bestätigen"], - Cancel: ["Saldo"], - "Could not get details for withdraw operation:": [""], - "Chose different exchange provider": [""], - "Please select an exchange. You can review the details before after your selection.": [ - "", - ], - "Select %1$s": [""], - "Select custom exchange": [""], - "You are about to withdraw %1$s from your bank account into your wallet.": [ - "", - ], - "Accept fees and withdraw": [""], - "Cancel withdraw operation": [""], - "Withdrawal fees:": ["Abheben bei"], - "Rounding loss:": [""], - "Earliest expiration (for deposit): %1$s": [""], - "# Coins": [""], - Value: [""], - "Withdraw Fee": ["Abheben bei %1$s"], - "Refresh Fee": [""], - "Deposit Fee": [""], - }, - }, -}; - -strings["en-US"] = { - domain: "messages", - locale_data: { - messages: { - "": { - domain: "messages", - plural_forms: "nplurals=2; plural=(n != 1);", - lang: "", - }, - "Invalid Wire": [""], - "Invalid Test Wire Detail": [""], - "Test Wire Acct #%1$s on %2$s": [""], - "Unknown Wire Detail": [""], - Operation: [""], - "time (ms/op)": [""], - "The merchant %1$s offers you to purchase:": [""], - "The total price is %1$s (plus %2$s fees).": [""], - "The total price is %1$s.": [""], - Retry: [""], - "Confirm payment": [""], - Balance: [""], - History: [""], - Debug: [""], - "You have no balance to show. Need some %1$s getting started?": [""], - "%1$s incoming": [""], - "%1$s being spent": [""], - "Error: could not retrieve balance information.": [""], - "Invalid ": [""], - "Fees ": [""], - "Refresh sessions has completed": [""], - "Order Refused": [""], - "Order redirected": [""], - "Payment aborted": [""], - "Payment Sent": [""], - "Order accepted": [""], - "Reserve balance updated": [""], - "Payment refund": [""], - Withdrawn: [""], - "Tip Accepted": [""], - "Tip Declined": [""], - "%1$s": [""], - "Your wallet has no events recorded.": [""], - "Wire to bank account": [""], - Confirm: [""], - Cancel: [""], - "Could not get details for withdraw operation:": [""], - "Chose different exchange provider": [""], - "Please select an exchange. You can review the details before after your selection.": [ - "", - ], - "Select %1$s": [""], - "Select custom exchange": [""], - "You are about to withdraw %1$s from your bank account into your wallet.": [ - "", - ], - "Accept fees and withdraw": [""], - "Cancel withdraw operation": [""], - "Withdrawal fees:": [""], - "Rounding loss:": [""], - "Earliest expiration (for deposit): %1$s": [""], - "# Coins": [""], - Value: [""], - "Withdraw Fee": [""], - "Refresh Fee": [""], - "Deposit Fee": [""], - }, - }, -}; - -strings["es"] = { - domain: "messages", - locale_data: { - messages: { - "": { - domain: "messages", - plural_forms: "nplurals=2; plural=(n != 1);", - lang: "", - }, - "Invalid Wire": [""], - "Invalid Test Wire Detail": [""], - "Test Wire Acct #%1$s on %2$s": [""], - "Unknown Wire Detail": [""], - Operation: [""], - "time (ms/op)": [""], - "The merchant %1$s offers you to purchase:": [""], - "The total price is %1$s (plus %2$s fees).": [""], - "The total price is %1$s.": [""], - Retry: [""], - "Confirm payment": [""], - Balance: [""], - History: ["Historial"], - Debug: [""], - "You have no balance to show. Need some %1$s getting started?": [""], - "%1$s incoming": [""], - "%1$s being spent": [""], - "Error: could not retrieve balance information.": [""], - "Invalid ": [""], - "Fees ": [""], - "Refresh sessions has completed": [""], - "Order Refused": [""], - "Order redirected": [""], - "Payment aborted": [""], - "Payment Sent": [""], - Backup: ["Resguardo"], - "Order accepted": [""], - "Reserve balance updated": [""], - "Payment refund": [""], - Withdrawn: [""], - "Tip Accepted": [""], - "Tip Declined": [""], - "%1$s": [""], - "Your wallet has no events recorded.": [""], - "Wire to bank account": [""], - Confirm: ["Confirmar"], - Cancel: ["Cancelar"], - "Could not get details for withdraw operation:": [""], - "Chose different exchange provider": [""], - "Please select an exchange. You can review the details before after your selection.": [ - "", - ], - "Select %1$s": [""], - "Select custom exchange": [""], - "You are about to withdraw %1$s from your bank account into your wallet.": [ - "", - ], - "Accept fees and withdraw": [""], - "Cancel withdraw operation": [""], - "Withdrawal fees:": [""], - "Rounding loss:": [""], - "Earliest expiration (for deposit): %1$s": [""], - "# Coins": [""], - Value: [""], - "Withdraw Fee": [""], - "Refresh Fee": [""], - "Deposit Fee": [""], - }, - }, -}; - -strings["fr"] = { - domain: "messages", - locale_data: { - messages: { - "": { - domain: "messages", - plural_forms: "nplurals=2; plural=(n != 1);", - lang: "", - }, - "Invalid Wire": [""], - "Invalid Test Wire Detail": [""], - "Test Wire Acct #%1$s on %2$s": [""], - "Unknown Wire Detail": [""], - Operation: [""], - "time (ms/op)": [""], - "The merchant %1$s offers you to purchase:": [""], - "The total price is %1$s (plus %2$s fees).": [""], - "The total price is %1$s.": [""], - Retry: [""], - "Confirm payment": [""], - Balance: [""], - History: [""], - Debug: [""], - "You have no balance to show. Need some %1$s getting started?": [""], - "%1$s incoming": [""], - "%1$s being spent": [""], - "Error: could not retrieve balance information.": [""], - "Invalid ": [""], - "Fees ": [""], - "Refresh sessions has completed": [""], - "Order Refused": [""], - "Order redirected": [""], - "Payment aborted": [""], - "Payment Sent": [""], - "Order accepted": [""], - "Reserve balance updated": [""], - "Payment refund": [""], - Withdrawn: [""], - "Tip Accepted": [""], - "Tip Declined": [""], - "%1$s": [""], - "Your wallet has no events recorded.": [""], - "Wire to bank account": [""], - Confirm: [""], - Cancel: [""], - "Could not get details for withdraw operation:": [""], - "Chose different exchange provider": [""], - "Please select an exchange. You can review the details before after your selection.": [ - "", - ], - "Select %1$s": [""], - "Select custom exchange": [""], - "You are about to withdraw %1$s from your bank account into your wallet.": [ - "", - ], - "Accept fees and withdraw": [""], - "Cancel withdraw operation": [""], - "Withdrawal fees:": [""], - "Rounding loss:": [""], - "Earliest expiration (for deposit): %1$s": [""], - "# Coins": [""], - Value: [""], - "Withdraw Fee": [""], - "Refresh Fee": [""], - "Deposit Fee": [""], - }, - }, -}; - -strings["it"] = { - domain: "messages", - locale_data: { - messages: { - "": { - domain: "messages", - plural_forms: "nplurals=2; plural=(n != 1);", - lang: "", - }, - "Invalid Wire": [""], - "Invalid Test Wire Detail": [""], - "Test Wire Acct #%1$s on %2$s": [""], - "Unknown Wire Detail": [""], - Operation: [""], - "time (ms/op)": [""], - "The merchant %1$s offers you to purchase:": [""], - "The total price is %1$s (plus %2$s fees).": [""], - "The total price is %1$s.": [""], - Retry: [""], - "Confirm payment": [""], - Balance: [""], - History: [""], - Debug: [""], - "You have no balance to show. Need some %1$s getting started?": [""], - "%1$s incoming": [""], - "%1$s being spent": [""], - "Error: could not retrieve balance information.": [""], - "Invalid ": [""], - "Fees ": [""], - "Refresh sessions has completed": [""], - "Order Refused": [""], - "Order redirected": [""], - "Payment aborted": [""], - "Payment Sent": [""], - "Order accepted": [""], - "Reserve balance updated": [""], - "Payment refund": [""], - Withdrawn: [""], - "Tip Accepted": [""], - "Tip Declined": [""], - "%1$s": [""], - "Your wallet has no events recorded.": [""], - "Wire to bank account": [""], - Confirm: [""], - Cancel: [""], - "Could not get details for withdraw operation:": [""], - "Chose different exchange provider": [""], - "Please select an exchange. You can review the details before after your selection.": [ - "", - ], - "Select %1$s": [""], - "Select custom exchange": [""], - "You are about to withdraw %1$s from your bank account into your wallet.": [ - "", - ], - "Accept fees and withdraw": [""], - "Cancel withdraw operation": [""], - "Withdrawal fees:": [""], - "Rounding loss:": [""], - "Earliest expiration (for deposit): %1$s": [""], - "# Coins": [""], - Value: [""], - "Withdraw Fee": [""], - "Refresh Fee": [""], - "Deposit Fee": [""], - }, - }, -}; - -strings["sv"] = { - domain: "messages", - locale_data: { - messages: { - "": { - domain: "messages", - plural_forms: "nplurals=2; plural=(n != 1);", - lang: "", - }, - "Invalid Wire": [""], - "Invalid Test Wire Detail": [""], - "Test Wire Acct #%1$s on %2$s": [""], - "Unknown Wire Detail": ["visa mer"], - Operation: [""], - "time (ms/op)": [""], - "The merchant %1$s offers you to purchase:": [ - "Säljaren %1$s erbjuder följande:", + "Der Händler %1$s bietet Ihnen zum Kauf an:" ], "The total price is %1$s (plus %2$s fees).": [ - "Det totala priset är %1$s (plus %2$s avgifter).\n", + "Gesamtbetrag %1$s (zuzüglich %2$s Gebühren)." + ], + "The total price is %1$s.": [ + "Gesamter Zahlbetrag: %1$s." + ], + "Retry": [ + "Erneut versuchen" + ], + "Confirm payment": [ + "Zahlung bestätigen" + ], + "Balance": [ + "Guthaben" + ], + "History": [ + "Verlauf" + ], + "Debug": [ + "Debug" ], - "The total price is %1$s.": ["Det totala priset är %1$s."], - Retry: [""], - "Confirm payment": ["Godkän betalning"], - Balance: ["Balans"], - History: ["Historia"], - Debug: [""], "You have no balance to show. Need some %1$s getting started?": [ - "Du har ingen balans att visa. Behöver du\n %1$s att börja?\n", + "Sie haben kein Guthaben. Wollen Sie %1$s abheben?" + ], + "%1$s incoming": [ + "%1$s empfangen" + ], + "%1$s being spent": [ + "%1$s ausgezahlt" + ], + "Error: could not retrieve balance information.": [ + "" + ], + "Invalid ": [ + "" + ], + "Fees ": [ + "" + ], + "Refresh sessions has completed": [ + "" + ], + "Order Refused": [ + "" + ], + "Order redirected": [ + "" + ], + "Payment aborted": [ + "" + ], + "Payment Sent": [ + "" + ], + "Order accepted": [ + "" + ], + "Reserve balance updated": [ + "" + ], + "Payment refund": [ + "" + ], + "Withdrawn": [ + "Abgehoben" + ], + "Tip Accepted": [ + "" + ], + "Tip Declined": [ + "" + ], + "%1$s": [ + "" + ], + "Your wallet has no events recorded.": [ + "Ihre Geldbörse verzeichnet keine Vorkommnisse." + ], + "Wire to bank account": [ + "" + ], + "Confirm": [ + "Bestätigen" + ], + "Cancel": [ + "Abbrechen" + ], + "Could not get details for withdraw operation:": [ + "" + ], + "Chose different exchange provider": [ + "" ], - "%1$s incoming": ["%1$s inkommande"], - "%1$s being spent": [""], - "Error: could not retrieve balance information.": [""], - "Invalid ": [""], - "Fees ": [""], - "Refresh sessions has completed": [""], - "Order Refused": [""], - "Order redirected": [""], - "Payment aborted": [""], - "Payment Sent": [""], - "Order accepted": [""], - "Reserve balance updated": [""], - "Payment refund": [""], - Withdrawn: ["Utbetalnings avgift"], - "Tip Accepted": [""], - "Tip Declined": [""], - "%1$s": [""], - "Your wallet has no events recorded.": ["plånboken"], - "Wire to bank account": ["Övervisa till bank konto"], - Confirm: ["Bekräfta"], - Cancel: ["Avbryt"], - "Could not get details for withdraw operation:": [""], - "Chose different exchange provider": ["Ändra tjänsteleverantörer"], "Please select an exchange. You can review the details before after your selection.": [ - "", + "" + ], + "Select %1$s": [ + "" + ], + "Select custom exchange": [ + "" ], - "Select %1$s": ["Välj %1$s"], - "Select custom exchange": [""], "You are about to withdraw %1$s from your bank account into your wallet.": [ - "Du är på väg att ta ut\n %1$s från ditt bankkonto till din plånbok.\n", + "" ], - "Accept fees and withdraw": ["Acceptera avgifter och utbetala"], - "Cancel withdraw operation": [""], - "Withdrawal fees:": ["Utbetalnings avgifter:"], - "Rounding loss:": [""], - "Earliest expiration (for deposit): %1$s": [""], - "# Coins": ["# Mynt"], - Value: ["Värde"], - "Withdraw Fee": ["Utbetalnings avgift"], - "Refresh Fee": ["Återhämtnings avgift"], - "Deposit Fee": ["Depostitions avgift"], - }, - }, + "Accept fees and withdraw": [ + "" + ], + "Cancel withdraw operation": [ + "" + ], + "Withdrawal fees:": [ + "Abhebegebühren:" + ], + "Rounding loss:": [ + "" + ], + "Earliest expiration (for deposit): %1$s": [ + "" + ], + "# Coins": [ + "" + ], + "Value": [ + "" + ], + "Withdraw Fee": [ + "Abhebegebühr" + ], + "Refresh Fee": [ + "" + ], + "Deposit Fee": [ + "" + ] + } + } }; + +strings['en-US'] = { + "domain": "messages", + "locale_data": { + "messages": { + "": { + "domain": "messages", + "plural_forms": "nplurals=2; plural=n != 1;", + "lang": "en-US" + }, + "Invalid Wire": [ + "" + ], + "Invalid Test Wire Detail": [ + "" + ], + "Test Wire Acct #%1$s on %2$s": [ + "" + ], + "Unknown Wire Detail": [ + "" + ], + "Operation": [ + "" + ], + "time (ms/op)": [ + "" + ], + "The merchant %1$s offers you to purchase:": [ + "" + ], + "The total price is %1$s (plus %2$s fees).": [ + "" + ], + "The total price is %1$s.": [ + "" + ], + "Retry": [ + "" + ], + "Confirm payment": [ + "" + ], + "Balance": [ + "Credit" + ], + "History": [ + "" + ], + "Debug": [ + "" + ], + "You have no balance to show. Need some %1$s getting started?": [ + "You have no deposit to show. Need some %1$s getting started?" + ], + "%1$s incoming": [ + "" + ], + "%1$s being spent": [ + "" + ], + "Error: could not retrieve balance information.": [ + "" + ], + "Invalid ": [ + "" + ], + "Fees ": [ + "" + ], + "Refresh sessions has completed": [ + "" + ], + "Order Refused": [ + "" + ], + "Order redirected": [ + "" + ], + "Payment aborted": [ + "" + ], + "Payment Sent": [ + "" + ], + "Order accepted": [ + "" + ], + "Reserve balance updated": [ + "" + ], + "Payment refund": [ + "" + ], + "Withdrawn": [ + "" + ], + "Tip Accepted": [ + "" + ], + "Tip Declined": [ + "" + ], + "%1$s": [ + "" + ], + "Your wallet has no events recorded.": [ + "" + ], + "Wire to bank account": [ + "" + ], + "Confirm": [ + "Accept" + ], + "Cancel": [ + "Abort" + ], + "Could not get details for withdraw operation:": [ + "" + ], + "Chose different exchange provider": [ + "" + ], + "Please select an exchange. You can review the details before after your selection.": [ + "" + ], + "Select %1$s": [ + "" + ], + "Select custom exchange": [ + "" + ], + "You are about to withdraw %1$s from your bank account into your wallet.": [ + "" + ], + "Accept fees and withdraw": [ + "" + ], + "Cancel withdraw operation": [ + "" + ], + "Withdrawal fees:": [ + "" + ], + "Rounding loss:": [ + "" + ], + "Earliest expiration (for deposit): %1$s": [ + "" + ], + "# Coins": [ + "" + ], + "Value": [ + "" + ], + "Withdraw Fee": [ + "" + ], + "Refresh Fee": [ + "" + ], + "Deposit Fee": [ + "" + ] + } + } +}; + +strings['fr'] = { + "domain": "messages", + "locale_data": { + "messages": { + "": { + "domain": "messages", + "plural_forms": "nplurals=2; plural=(n!=1);", + "lang": "fr" + }, + "Invalid Wire": [ + "" + ], + "Invalid Test Wire Detail": [ + "" + ], + "Test Wire Acct #%1$s on %2$s": [ + "" + ], + "Unknown Wire Detail": [ + "" + ], + "Operation": [ + "" + ], + "time (ms/op)": [ + "" + ], + "The merchant %1$s offers you to purchase:": [ + "" + ], + "The total price is %1$s (plus %2$s fees).": [ + "" + ], + "The total price is %1$s.": [ + "" + ], + "Retry": [ + "" + ], + "Confirm payment": [ + "" + ], + "Balance": [ + "" + ], + "History": [ + "" + ], + "Debug": [ + "" + ], + "You have no balance to show. Need some %1$s getting started?": [ + "" + ], + "%1$s incoming": [ + "" + ], + "%1$s being spent": [ + "" + ], + "Error: could not retrieve balance information.": [ + "" + ], + "Invalid ": [ + "" + ], + "Fees ": [ + "" + ], + "Refresh sessions has completed": [ + "" + ], + "Order Refused": [ + "" + ], + "Order redirected": [ + "" + ], + "Payment aborted": [ + "" + ], + "Payment Sent": [ + "" + ], + "Order accepted": [ + "" + ], + "Reserve balance updated": [ + "" + ], + "Payment refund": [ + "" + ], + "Withdrawn": [ + "" + ], + "Tip Accepted": [ + "" + ], + "Tip Declined": [ + "" + ], + "%1$s": [ + "" + ], + "Your wallet has no events recorded.": [ + "" + ], + "Wire to bank account": [ + "" + ], + "Confirm": [ + "Confirmer" + ], + "Cancel": [ + "" + ], + "Could not get details for withdraw operation:": [ + "" + ], + "Chose different exchange provider": [ + "" + ], + "Please select an exchange. You can review the details before after your selection.": [ + "" + ], + "Select %1$s": [ + "" + ], + "Select custom exchange": [ + "" + ], + "You are about to withdraw %1$s from your bank account into your wallet.": [ + "" + ], + "Accept fees and withdraw": [ + "" + ], + "Cancel withdraw operation": [ + "" + ], + "Withdrawal fees:": [ + "" + ], + "Rounding loss:": [ + "" + ], + "Earliest expiration (for deposit): %1$s": [ + "" + ], + "# Coins": [ + "" + ], + "Value": [ + "" + ], + "Withdraw Fee": [ + "" + ], + "Refresh Fee": [ + "" + ], + "Deposit Fee": [ + "" + ] + } + } +}; + +strings['it'] = { + "domain": "messages", + "locale_data": { + "messages": { + "": { + "domain": "messages", + "plural_forms": "nplurals=2; plural=n != 1;", + "lang": "it" + }, + "Invalid Wire": [ + "" + ], + "Invalid Test Wire Detail": [ + "" + ], + "Test Wire Acct #%1$s on %2$s": [ + "" + ], + "Unknown Wire Detail": [ + "" + ], + "Operation": [ + "" + ], + "time (ms/op)": [ + "" + ], + "The merchant %1$s offers you to purchase:": [ + "" + ], + "The total price is %1$s (plus %2$s fees).": [ + "" + ], + "The total price is %1$s.": [ + "" + ], + "Retry": [ + "" + ], + "Confirm payment": [ + "" + ], + "Balance": [ + "" + ], + "History": [ + "" + ], + "Debug": [ + "" + ], + "You have no balance to show. Need some %1$s getting started?": [ + "" + ], + "%1$s incoming": [ + "" + ], + "%1$s being spent": [ + "" + ], + "Error: could not retrieve balance information.": [ + "" + ], + "Invalid ": [ + "" + ], + "Fees ": [ + "" + ], + "Refresh sessions has completed": [ + "" + ], + "Order Refused": [ + "" + ], + "Order redirected": [ + "" + ], + "Payment aborted": [ + "" + ], + "Payment Sent": [ + "" + ], + "Order accepted": [ + "" + ], + "Reserve balance updated": [ + "" + ], + "Payment refund": [ + "" + ], + "Withdrawn": [ + "" + ], + "Tip Accepted": [ + "" + ], + "Tip Declined": [ + "" + ], + "%1$s": [ + "" + ], + "Your wallet has no events recorded.": [ + "" + ], + "Wire to bank account": [ + "" + ], + "Confirm": [ + "Confermare" + ], + "Cancel": [ + "" + ], + "Could not get details for withdraw operation:": [ + "" + ], + "Chose different exchange provider": [ + "" + ], + "Please select an exchange. You can review the details before after your selection.": [ + "" + ], + "Select %1$s": [ + "" + ], + "Select custom exchange": [ + "" + ], + "You are about to withdraw %1$s from your bank account into your wallet.": [ + "" + ], + "Accept fees and withdraw": [ + "" + ], + "Cancel withdraw operation": [ + "" + ], + "Withdrawal fees:": [ + "" + ], + "Rounding loss:": [ + "" + ], + "Earliest expiration (for deposit): %1$s": [ + "" + ], + "# Coins": [ + "" + ], + "Value": [ + "" + ], + "Withdraw Fee": [ + "" + ], + "Refresh Fee": [ + "" + ], + "Deposit Fee": [ + "" + ] + } + } +}; + +strings['sv'] = { + "domain": "messages", + "locale_data": { + "messages": { + "": { + "domain": "messages", + "plural_forms": "nplurals=2; plural=n != 1;", + "lang": "sv" + }, + "Invalid Wire": [ + "" + ], + "Invalid Test Wire Detail": [ + "" + ], + "Test Wire Acct #%1$s on %2$s": [ + "" + ], + "Unknown Wire Detail": [ + "visa mer" + ], + "Operation": [ + "" + ], + "time (ms/op)": [ + "" + ], + "The merchant %1$s offers you to purchase:": [ + "Säljaren %1$s erbjuder följande:" + ], + "The total price is %1$s (plus %2$s fees).": [ + "Det totala priset är %1$s (plus %2$s avgifter)." + ], + "The total price is %1$s.": [ + "Det totala priset är %1$s." + ], + "Retry": [ + "" + ], + "Confirm payment": [ + "Godkän betalning" + ], + "Balance": [ + "Balans" + ], + "History": [ + "Historia" + ], + "Debug": [ + "" + ], + "You have no balance to show. Need some %1$s getting started?": [ + "Du har ingen balans att visa. Behöver du\n %1$s att börja?\n" + ], + "%1$s incoming": [ + "%1$s inkommande" + ], + "%1$s being spent": [ + "" + ], + "Error: could not retrieve balance information.": [ + "" + ], + "Invalid ": [ + "" + ], + "Fees ": [ + "" + ], + "Refresh sessions has completed": [ + "" + ], + "Order Refused": [ + "" + ], + "Order redirected": [ + "" + ], + "Payment aborted": [ + "" + ], + "Payment Sent": [ + "" + ], + "Order accepted": [ + "" + ], + "Reserve balance updated": [ + "" + ], + "Payment refund": [ + "" + ], + "Withdrawn": [ + "Utbetalnings avgift" + ], + "Tip Accepted": [ + "" + ], + "Tip Declined": [ + "" + ], + "%1$s": [ + "" + ], + "Your wallet has no events recorded.": [ + "plånboken" + ], + "Wire to bank account": [ + "Övervisa till bank konto" + ], + "Confirm": [ + "Bekräfta" + ], + "Cancel": [ + "Avbryt" + ], + "Could not get details for withdraw operation:": [ + "" + ], + "Chose different exchange provider": [ + "Ändra tjänsteleverantörer" + ], + "Please select an exchange. You can review the details before after your selection.": [ + "" + ], + "Select %1$s": [ + "Välj %1$s" + ], + "Select custom exchange": [ + "" + ], + "You are about to withdraw %1$s from your bank account into your wallet.": [ + "Du är på väg att ta ut %1$s från ditt bankkonto till din plånbok." + ], + "Accept fees and withdraw": [ + "Acceptera avgifter och utbetala" + ], + "Cancel withdraw operation": [ + "" + ], + "Withdrawal fees:": [ + "Utbetalnings avgifter:" + ], + "Rounding loss:": [ + "" + ], + "Earliest expiration (for deposit): %1$s": [ + "" + ], + "# Coins": [ + "# Mynt" + ], + "Value": [ + "Värde" + ], + "Withdraw Fee": [ + "Utbetalnings avgift" + ], + "Refresh Fee": [ + "Återhämtnings avgift" + ], + "Deposit Fee": [ + "Depostitions avgift" + ] + } + } +}; + +strings['tr'] = { + "domain": "messages", + "locale_data": { + "messages": { + "": { + "domain": "messages", + "plural_forms": "nplurals=2; plural=n != 1;", + "lang": "tr" + }, + "Invalid Wire": [ + "" + ], + "Invalid Test Wire Detail": [ + "" + ], + "Test Wire Acct #%1$s on %2$s": [ + "" + ], + "Unknown Wire Detail": [ + "" + ], + "Operation": [ + "" + ], + "time (ms/op)": [ + "" + ], + "The merchant %1$s offers you to purchase:": [ + "" + ], + "The total price is %1$s (plus %2$s fees).": [ + "" + ], + "The total price is %1$s.": [ + "" + ], + "Retry": [ + "" + ], + "Confirm payment": [ + "" + ], + "Balance": [ + "" + ], + "History": [ + "" + ], + "Debug": [ + "" + ], + "You have no balance to show. Need some %1$s getting started?": [ + "" + ], + "%1$s incoming": [ + "" + ], + "%1$s being spent": [ + "" + ], + "Error: could not retrieve balance information.": [ + "" + ], + "Invalid ": [ + "" + ], + "Fees ": [ + "" + ], + "Refresh sessions has completed": [ + "" + ], + "Order Refused": [ + "" + ], + "Order redirected": [ + "" + ], + "Payment aborted": [ + "" + ], + "Payment Sent": [ + "" + ], + "Order accepted": [ + "" + ], + "Reserve balance updated": [ + "" + ], + "Payment refund": [ + "" + ], + "Withdrawn": [ + "" + ], + "Tip Accepted": [ + "" + ], + "Tip Declined": [ + "" + ], + "%1$s": [ + "" + ], + "Your wallet has no events recorded.": [ + "" + ], + "Wire to bank account": [ + "" + ], + "Confirm": [ + "Onaylamak" + ], + "Cancel": [ + "" + ], + "Could not get details for withdraw operation:": [ + "" + ], + "Chose different exchange provider": [ + "" + ], + "Please select an exchange. You can review the details before after your selection.": [ + "" + ], + "Select %1$s": [ + "" + ], + "Select custom exchange": [ + "" + ], + "You are about to withdraw %1$s from your bank account into your wallet.": [ + "" + ], + "Accept fees and withdraw": [ + "" + ], + "Cancel withdraw operation": [ + "" + ], + "Withdrawal fees:": [ + "" + ], + "Rounding loss:": [ + "" + ], + "Earliest expiration (for deposit): %1$s": [ + "" + ], + "# Coins": [ + "" + ], + "Value": [ + "" + ], + "Withdraw Fee": [ + "" + ], + "Refresh Fee": [ + "" + ], + "Deposit Fee": [ + "" + ] + } + } +}; + diff --git a/packages/taler-wallet-webextension/src/i18n/taler-wallet-webex.pot b/packages/taler-wallet-webextension/src/i18n/taler-wallet-webex.pot index 70aa9c708..3703114aa 100644 --- a/packages/taler-wallet-webextension/src/i18n/taler-wallet-webex.pot +++ b/packages/taler-wallet-webextension/src/i18n/taler-wallet-webex.pot @@ -17,275 +17,38 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/NavigationBar.tsx:86 -#, c-format -msgid "Balance" -msgstr "" - -#: src/NavigationBar.tsx:87 -#, c-format -msgid "Pending" -msgstr "" - -#: src/NavigationBar.tsx:88 -#, c-format -msgid "Backup" -msgstr "" - -#: src/NavigationBar.tsx:89 +#: src/NavigationBar.tsx:71 #, c-format msgid "Settings" msgstr "" -#: src/NavigationBar.tsx:90 -#, c-format -msgid "Dev" -msgstr "" - -#: src/wallet/BackupPage.tsx:127 -#, c-format -msgid "Add provider" -msgstr "" - -#: src/wallet/BackupPage.tsx:137 -#, c-format -msgid "Sync all backups" -msgstr "" - -#: src/wallet/BackupPage.tsx:139 -#, c-format -msgid "Sync now" -msgstr "" - -#: src/popup/BalancePage.tsx:79 -#, c-format -msgid "You have no balance to show. Need some %1$s getting started?" -msgstr "" - -#: src/wallet/ProviderAddPage.tsx:145 -#, c-format -msgid "< Back" -msgstr "" - -#: src/wallet/ProviderAddPage.tsx:156 -#, c-format -msgid "Next" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:57 -#, c-format -msgid "Loading..." -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:64 -#, c-format -msgid "There was an error loading the provider detail for \"%1$s\"" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:75 -#, c-format -msgid "There is not known provider with url \"%1$s\". Redirecting back..." -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:131 -#, c-format -msgid "Back up" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:142 -#, c-format -msgid "Extend" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:148 +#: src/popup/DeveloperPage.tsx:377 #, c-format msgid "" -"terms has changed, extending the service will imply accepting the new terms of " -"service" +"Do you want to IRREVOCABLY DESTROY everything inside your wallet and LOSE ALL " +"YOUR COINS?" msgstr "" -#: src/wallet/ProviderDetailPage.tsx:158 +#: src/wallet/CreateManualWithdraw.tsx:102 #, c-format -msgid "old" +msgid "Manual Withdrawal" msgstr "" -#: src/wallet/ProviderDetailPage.tsx:162 +#: src/wallet/CreateManualWithdraw.tsx:104 #, c-format -msgid "new" +msgid "" +"Choose a exchange from where the coins will be withdrawn. The exchange\n" +" will send the coins to this wallet after receiving a wire transfer\n" +" with the correct subject." msgstr "" -#: src/wallet/ProviderDetailPage.tsx:169 +#: src/wallet/CreateManualWithdraw.tsx:109 #, c-format -msgid "fee" +msgid "No exchange configured" msgstr "" -#: src/wallet/ProviderDetailPage.tsx:177 -#, c-format -msgid "storage" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:190 -#, c-format -msgid "< back" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:194 -#, c-format -msgid "remove provider" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:213 -#, c-format -msgid "There is conflict with another backup from %1$s" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:228 -#, c-format -msgid "Unknown backup problem: %1$s" -msgstr "" - -#: src/wallet/ProviderDetailPage.tsx:247 -#, c-format -msgid "service paid" -msgstr "" - -#: src/popup/Settings.tsx:46 -#, c-format -msgid "Permissions" -msgstr "" - -#: src/cta/TermsOfServiceSection.tsx:37 -#, c-format -msgid "Exchange doesn't have terms of service" -msgstr "" - -#: src/cta/TermsOfServiceSection.tsx:56 -#, c-format -msgid "Review exchange terms of service" -msgstr "" - -#: src/cta/TermsOfServiceSection.tsx:63 -#, c-format -msgid "Review new version of terms of service" -msgstr "" - -#: src/cta/TermsOfServiceSection.tsx:75 -#, c-format -msgid "Show terms of service" -msgstr "" - -#: src/cta/TermsOfServiceSection.tsx:83 -#, c-format -msgid "I accept the exchange terms of service" -msgstr "" - -#: src/cta/TermsOfServiceSection.tsx:127 -#, c-format -msgid "Hide terms of service" -msgstr "" - -#: src/wallet/ExchangeAddConfirm.tsx:110 -#, c-format -msgid "Cancel" -msgstr "" - -#: src/wallet/ExchangeAddConfirm.tsx:114 -#, c-format -msgid "Loading terms.." -msgstr "" - -#: src/wallet/ExchangeAddConfirm.tsx:121 +#: src/wallet/CreateManualWithdraw.tsx:111 #, c-format msgid "Add exchange" msgstr "" -#: src/wallet/ExchangeAddConfirm.tsx:131 -#, c-format -msgid "Add exchange anyway" -msgstr "" - -#: src/wallet/Settings.tsx:95 -#, c-format -msgid "Known exchanges" -msgstr "" - -#: src/wallet/Transaction.tsx:159 -#, c-format -msgid "retry" -msgstr "" - -#: src/wallet/Transaction.tsx:163 -#, c-format -msgid "Forget" -msgstr "" - -#: src/wallet/Transaction.tsx:198 -#, c-format -msgid "Confirm" -msgstr "" - -#: src/cta/Pay.tsx:211 -#, c-format -msgid "Pay with a mobile phone" -msgstr "" - -#: src/cta/Pay.tsx:211 -#, c-format -msgid "Hide QR" -msgstr "" - -#: src/cta/Pay.tsx:241 -#, c-format -msgid "Pay" -msgstr "" - -#: src/cta/Pay.tsx:265 -#, c-format -msgid "Withdraw digital cash" -msgstr "" - -#: src/cta/Pay.tsx:295 -#, c-format -msgid "Digital cash payment" -msgstr "" - -#: src/cta/Withdraw.tsx:101 -#, c-format -msgid "Digital cash withdrawal" -msgstr "" - -#: src/cta/Withdraw.tsx:149 -#, c-format -msgid "Cancel exchange selection" -msgstr "" - -#: src/cta/Withdraw.tsx:150 -#, c-format -msgid "Confirm exchange selection" -msgstr "" - -#: src/cta/Withdraw.tsx:155 -#, c-format -msgid "Switch exchange" -msgstr "" - -#: src/cta/Withdraw.tsx:174 -#, c-format -msgid "Confirm withdrawal" -msgstr "" - -#: src/cta/Withdraw.tsx:183 -#, c-format -msgid "Withdraw anyway" -msgstr "" - -#: src/cta/Withdraw.tsx:310 -#, c-format -msgid "missing withdraw uri" -msgstr "" - -#: src/cta/Deposit.tsx:186 -#, c-format -msgid "Digital cash deposit" -msgstr "" - diff --git a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx index 3ca5b3a02..f81929b21 100644 --- a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx +++ b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ -import { Amounts, Balance } from "@gnu-taler/taler-util"; +import { Amounts, Balance, Translate } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { BalanceTable } from "../components/BalanceTable"; @@ -47,7 +47,12 @@ export function BalancePage({ } if (state.hasError) { - return ; + return ( + Could not load balance page} + error={state} + /> + ); } if (addingAction) { @@ -99,17 +104,19 @@ export function BalanceView({
- Withdraw + Withdraw {currencyWithNonZeroAmount.length > 0 && ( `Deposit ${s}`} + label={(s) => Deposit {s}} actions={currencyWithNonZeroAmount} onClick={(c) => goToWalletDeposit(c)} /> )} - enter uri + + Enter URI +
diff --git a/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx index 3326be8df..b3da48a93 100644 --- a/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx +++ b/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx @@ -20,6 +20,8 @@ import { CoinDumpJson, ExchangeListItem, NotificationType, + Translate, + i18n, } from "@gnu-taler/taler-util"; import { PendingTaskInfo } from "@gnu-taler/taler-wallet-core"; import { format } from "date-fns"; @@ -31,7 +33,6 @@ import { Time } from "../components/Time"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; import { useDiagnostics } from "../hooks/useDiagnostics"; import * as wxApi from "../wxApi"; -import BalanceStories from "./Balance.stories"; export function DeveloperPage(): VNode { const [status, timedOut] = useDiagnostics(); @@ -149,10 +150,16 @@ export function View({ return (
-

Debug tools:

- +

+ Debug tools: +

+
- +
- + {downloadedDatabase && (
- Database exported at -
)}
-

Coins:

+

+ Coins: +

{Object.keys(money_by_exchange).map((ex) => { const allcoins = money_by_exchange[ex]; allcoins.sort((a, b) => { @@ -220,7 +232,9 @@ export function View({ {operations && operations.length > 0 && ( -

Pending operations

+

+ Pending operations +

{operations.reverse().map((o) => { return ( @@ -257,18 +271,30 @@ function ShowAllCoins({ {ex}: {total} {currencies[ex]}

- usable coins + + usable coins +

{collapsedUnspent ? (
setCollapsedUnspent(false)}>click to show
) : ( setCollapsedUnspent(true)}> - - - - - + + + + + {coins.usable.map((c) => { return ( @@ -283,17 +309,31 @@ function ShowAllCoins({ })}
iddenomvaluestatusfrom refresh? + id + + denom + + value + + status + + from refresh? +
)} -

spent coins

+

+ spent coins +

{collapsedSpent ? ( -
setCollapsedSpent(false)}>click to show
+
setCollapsedSpent(false)}> + click to show +
) : ( setCollapsedSpent(true)}> - - - - - + + + + + {coins.spent.map((c) => { return ( @@ -335,8 +375,7 @@ function runIntegrationTest() {} export async function confirmReset(): Promise { if ( confirm( - "Do you want to IRREVOCABLY DESTROY everything inside your" + - " wallet and LOSE ALL YOUR COINS?", + i18n.str`Do you want to IRREVOCABLY DESTROY everything inside your wallet and LOSE ALL YOUR COINS?`, ) ) { await wxApi.resetDb(); diff --git a/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx b/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx index baff0aadf..6e2bf1e63 100644 --- a/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx +++ b/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx @@ -1,4 +1,4 @@ -import { i18n } from "@gnu-taler/taler-util"; +import { Translate } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { ButtonBoxWarning, WarningBox } from "../components/styled"; @@ -11,16 +11,16 @@ export function NoBalanceHelp({

- You have no balance to show. + You have no balance to show.
- + To withdraw money you can start from your bank site or click the "withdraw" button to use a known exchange. - +

goToWalletManualWithdraw()}> - Withdraw + Withdraw
); diff --git a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx index 5de457614..a69352c9f 100644 --- a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx +++ b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx @@ -19,7 +19,11 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { classifyTalerUri, TalerUriType } from "@gnu-taler/taler-util"; +import { + classifyTalerUri, + TalerUriType, + Translate, +} from "@gnu-taler/taler-util"; import { Fragment, h } from "preact"; import { ButtonPrimary, ButtonSuccess } from "../components/styled"; import { actionForTalerUri } from "../utils/index"; @@ -52,46 +56,56 @@ export function TalerActionFound({ url, onDismiss }: Props) { return (
-

Taler Action

+

+ Taler Action +

{uriType === TalerUriType.TalerPay && (
-

This page has pay action.

+

+ This page has pay action. +

{ navigateTo(actionForTalerUri(uriType, url)); }} > - Open pay page + Open pay page
)} {uriType === TalerUriType.TalerWithdraw && (
-

This page has a withdrawal action.

+

+ This page has a withdrawal action. +

{ navigateTo(actionForTalerUri(uriType, url)); }} > - Open withdraw page + Open withdraw page
)} {uriType === TalerUriType.TalerTip && (
-

This page has a tip action.

+

+ This page has a tip action. +

{ navigateTo(actionForTalerUri(uriType, url)); }} > - Open tip page + Open tip page
)} {uriType === TalerUriType.TalerNotifyReserve && (
-

This page has a notify reserve action.

+

+ This page has a notify reserve action. +

{ navigateTo(actionForTalerUri(uriType, url)); @@ -103,26 +117,33 @@ export function TalerActionFound({ url, onDismiss }: Props) { )} {uriType === TalerUriType.TalerRefund && (
-

This page has a refund action.

+

+ This page has a refund action. +

{ navigateTo(actionForTalerUri(uriType, url)); }} > - Open refund page + Open refund page
)} {uriType === TalerUriType.Unknown && (
-

This page has a malformed taler uri.

+

+ This page has a malformed taler uri. +

{url}

)}
- onDismiss()}> Dismiss + onDismiss()}> + {" "} + Dismiss{" "} +
); diff --git a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx index fa0e6e3df..6e270f676 100644 --- a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx +++ b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx @@ -17,10 +17,10 @@ /** * Main entry point for extension pages. * - * @author Florian Dold + * @author sebasjm */ -import { setupI18n } from "@gnu-taler/taler-util"; +import { setupI18n, Translate } from "@gnu-taler/taler-util"; import { createHashHistory } from "history"; import { Fragment, h, render, VNode } from "preact"; import Router, { route, Route } from "preact-router"; @@ -87,27 +87,20 @@ function Application(): VNode { - - - goToWalletPage( - Pages.balance_manual_withdraw.replace(":currency?", ""), - ) + route(Pages.balance_manual_withdraw.replace(":currency?", "")) } goToWalletDeposit={(currency: string) => - goToWalletPage( - Pages.balance_deposit.replace(":currency", currency), - ) + route(Pages.balance_deposit.replace(":currency", currency)) } goToWalletHistory={(currency: string) => - goToWalletPage( - Pages.balance_history.replace(":currency", currency), - ) + route(Pages.balance_history.replace(":currency", currency)) } /> + - { - route(Pages.backup); - }} - /> { - route(Pages.balance); - }} + path={Pages.balance_manual_withdraw} + component={RedirectToWalletPage} /> + + + + + + @@ -165,15 +166,26 @@ function Application(): VNode { ); } -async function goToWalletPage(page: Pages | string): Promise { - // eslint-disable-next-line no-undef - await chrome.tabs.create({ - active: true, - // eslint-disable-next-line no-undef - url: chrome.runtime.getURL(`/static/wallet.html#${page}`), +function RedirectToWalletPage(): VNode { + const page = document.location.hash || "#/"; + useEffect(() => { + chrome.tabs + .create({ + active: true, + // eslint-disable-next-line no-undef + url: chrome.runtime.getURL(`/static/wallet.html${page}`), + }) + .then(() => { + window.close(); + }); }); - window.close(); - // return null; + return ( + + + this popup is being closed and you are being redirected to {page} + + + ); } function Redirect({ to }: { to: string }): null { diff --git a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx index d4158973e..d47803212 100644 --- a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx +++ b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx @@ -1,4 +1,8 @@ -import { classifyTalerUri, TalerUriType } from "@gnu-taler/taler-util"; +import { + classifyTalerUri, + TalerUriType, + Translate, +} from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { Button, ButtonSuccess, InputWithLabel } from "../components/styled"; @@ -8,20 +12,20 @@ export interface Props { onCancel: () => void; } -function buttonLabelByTalerType(type: TalerUriType): string { +function buttonLabelByTalerType(type: TalerUriType): VNode { switch (type) { case TalerUriType.TalerNotifyReserve: - return "Open reserve page"; + return Open reserve page; case TalerUriType.TalerPay: - return "Open pay page"; + return Open pay page; case TalerUriType.TalerRefund: - return "Open refund page"; + return Open refund page; case TalerUriType.TalerTip: - return "Open tip page"; + return Open tip page; case TalerUriType.TalerWithdraw: - return "Open withdraw page"; + return Open withdraw page; } - return ""; + return ; } export function AddNewActionView({ onCancel }: Props): VNode { @@ -47,7 +51,9 @@ export function AddNewActionView({ onCancel }: Props): VNode {
- + {uriType !== TalerUriType.Unknown && ( { diff --git a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx index daea9e3bd..73fff6e85 100644 --- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ -import { i18n, Timestamp } from "@gnu-taler/taler-util"; +import { i18n, Timestamp, Translate } from "@gnu-taler/taler-util"; import { ProviderInfo, ProviderPaymentPaid, @@ -71,7 +71,10 @@ export function BackupPage({ onAddProvider }: Props): VNode { } if (status.hasError) { return ( - + Could not load backup providers} + error={status} + /> ); } @@ -122,9 +125,11 @@ export function BackupView({ ))} {!providers.length && ( - No backup providers configured + + No backup providers configured + - Add provider + Add provider )} @@ -135,12 +140,14 @@ export function BackupView({
{providers.length > 1 ? ( - Sync all backups + Sync all backups ) : ( - Sync now + Sync now )} - Add provider + + Add provider +
)} @@ -176,10 +183,14 @@ function BackupLayout(props: TransactionLayoutProps): VNode { {dateStr && ( - Last synced: {dateStr} + + Last synced: {dateStr} + )} {!dateStr && ( - Not synced + + Not synced + )}
@@ -196,7 +207,9 @@ function BackupLayout(props: TransactionLayoutProps): VNode { function ExpirationText({ until }: { until: Timestamp }): VNode { return ( - Expires in + + Expires in + {" "} {daysUntil(until)}{" "} diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx index 0ca07816e..b0eddeda5 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,16 +99,22 @@ export function CreateManualWithdraw({ if (!initialExchange) { return (
-

Manual Withdrawal

+

+ Manual Withdrawal +

- 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. + + 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. + - No exchange configured + + No exchange configured + - Add exchange + Add exchange
@@ -118,20 +124,26 @@ export function CreateManualWithdraw({ return (
- -

Manual Withdrawal

+ {error && ( + Can't create the reserve} + description={error} + /> + )} +

+ Manual Withdrawal +

- 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. + + 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. +

Currency} list={currencyMap} name="currency" value={currency} @@ -140,7 +152,7 @@ export function CreateManualWithdraw({ Exchange} list={exchangeMap} name="currency" value={exchange} @@ -149,12 +161,14 @@ export function CreateManualWithdraw({

- Add exchange + Add Exchange
{currency && ( - +
{currency} onCreate(exchange, parsedAmount!)} > - Start withdrawal + Start withdrawal diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx index abe830e87..7a5e02d3b 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx @@ -19,6 +19,7 @@ import { Amounts, AmountString, PaytoUri, + Translate, } from "@gnu-taler/taler-util"; import { DepositFee } from "@gnu-taler/taler-wallet-core/src/operations/deposits"; import { Fragment, h, VNode } from "preact"; @@ -132,13 +133,21 @@ export function View({ }, [amount]); if (!balance) { - return
no balance
; + return ( +
+ no balance +
+ ); } if (!knownBankAccounts || !knownBankAccounts.length) { return ( -

There is no known bank account to send money to

- Withdraw +

+ There is no known bank account to send money to +

+ + Withdraw +
); } @@ -162,11 +171,13 @@ export function View({ return ( -

Send {currency} to your account

+

+ Send {currency} to your account +

Bank account IBAN number} list={accountMap} name="account" value={String(accountIdx)} @@ -174,7 +185,9 @@ export function View({ /> - +
{currency} - +
{currency} - +
{currency}
{unableToDeposit ? ( - Deposit + + Deposit + ) : ( onSend(accountURI, amountStr)}> - Deposit {Amounts.stringifyValue(totalToDeposit)} {currency} + + Deposit {Amounts.stringifyValue(totalToDeposit)} {currency} + )} diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx index 562a2c956..06d8abd2b 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx @@ -1,4 +1,4 @@ -import { i18n } from "@gnu-taler/taler-util"; +import { i18n, Translate } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { Button, ButtonSuccess, ButtonWarning } from "../components/styled"; @@ -84,9 +84,11 @@ export function View({ return (
-

Review terms of service

+

+ Review terms of service +

- Exchange URL: + Exchange URL: {url} @@ -107,28 +109,28 @@ export function View({
{!terms && ( )} {terms && ( {needsReview && !reviewed && ( - {i18n.str`Add exchange`} + Add exchange )} {(terms.status === "accepted" || (needsReview && reviewed)) && ( - {i18n.str`Add exchange`} + Add exchange )} {terms.status === "notfound" && ( - {i18n.str`Add exchange anyway`} + Add exchange anyway )} diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx index c4ba4f2a3..909afc4b7 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx @@ -2,6 +2,7 @@ import { canonicalizeBaseUrl, i18n, TalerConfigResponse, + Translate, } from "@gnu-taler/taler-util"; import { Fragment, h } from "preact"; import { useEffect, useState } from "preact/hooks"; @@ -91,32 +92,46 @@ export function ExchangeSetUrlPage({
{!expectedCurrency ? ( -

Add new exchange

+

+ Add new exchange +

) : ( -

Add exchange for {expectedCurrency}

+

+ Add exchange for {expectedCurrency} +

)} {!result && ( - Enter the URL of an exchange you trust. + + Enter the URL of an exchange you trust. + )} {result && ( - An exchange has been found! Review the information and click next + + An exchange has been found! Review the information and click next + )} {result && expectedCurrency && expectedCurrency !== result.currency && ( - This exchange doesn't match the expected currency{" "} - {expectedCurrency} + + This exchange doesn't match the expected currency + {expectedCurrency} + )} - - + {error && ( + Unable to verify this exchange} + description={error} + /> + )} + {confirmationError && ( + Unable to add this exchange} + description={confirmationError} + /> + )}

@@ -127,15 +142,23 @@ export function ExchangeSetUrlPage({ onInput={(e) => updateEndpoint(e.currentTarget.value)} /> - {loading &&

loading...
} + {loading && ( +
+ loading... +
+ )} {result && !loading && ( - + - + @@ -144,7 +167,7 @@ export function ExchangeSetUrlPage({
- Next + Next
diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx index 2fae07525..a3e8ecc67 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.tsx @@ -19,6 +19,7 @@ import { Balance, NotificationType, Transaction, + Translate, } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; @@ -66,7 +67,7 @@ export function HistoryPage({ if (transactionQuery.hasError) { return ( Could not load the list of transactions} error={transactionQuery} /> ); @@ -193,21 +194,23 @@ export function HistoryView({ style={{ marginLeft: 0, marginTop: 8 }} onClick={() => goToWalletManualWithdraw(selectedCurrency)} > - Withdraw + Withdraw {currencyAmount && Amounts.isNonZero(currencyAmount) && ( goToWalletDeposit(selectedCurrency)} > - Deposit + Deposit )}
{datesWithTransaction.length === 0 ? ( -
There is no history for this currency
+
+ There is no history for this currency +
) : (
{datesWithTransaction.map((d, i) => { diff --git a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx index 1f8603794..8eca733d4 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx @@ -19,6 +19,7 @@ import { AmountJson, Amounts, NotificationType, + Translate, } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useState } from "preact/hooks"; @@ -95,7 +96,9 @@ export function ManualWithdrawPage({ currency, onCancel }: Props): VNode { if (state.hasError) { return ( Could not load the list of known exchanges + } error={state} /> ); diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx index 44d1049b9..55e2b62fb 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx @@ -19,6 +19,7 @@ import { BackupBackupProviderTerms, canonicalizeBaseUrl, i18n, + Translate, } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; @@ -113,15 +114,23 @@ export function SetUrlView({ return (
-

Add backup provider

- - Backup providers may charge for their service +

+ Add backup provider +

+ {error && ( + Could not get provider information} + description={error} + /> + )} + + Backup providers may charge for their service +

- + - +

- Next + Next
@@ -177,29 +188,41 @@ export function ConfirmProviderView({ return (
-

Review terms of service

+

+ Review terms of service +

- Provider URL:{" "} + Provider URL:{" "} {url}
- Please review and accept this provider's terms of service + + Please review and accept this provider's terms of service + -

1. Pricing

+

+ 1. Pricing +

- {Amounts.isZero(provider.annual_fee) - ? "free of charge" - : `${provider.annual_fee} per year of service`} + {Amounts.isZero(provider.annual_fee) ? ( + free of charge + ) : ( + {provider.annual_fee} per year of service + )}

-

2. Storage

+

+ 2. Storage +

- {provider.storage_limit_in_megabytes} megabytes of storage per year of - service + + {provider.storage_limit_in_megabytes} megabytes of storage per year + of service +

Accept terms of service} name="terms" onToggle={() => setAccepted((old) => !old)} enabled={accepted} @@ -207,10 +230,10 @@ export function ConfirmProviderView({
- Add provider + Add provider
diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx index 239a7b31d..beeedcda7 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ -import { i18n } from "@gnu-taler/taler-util"; +import { Translate } from "@gnu-taler/taler-util"; import { ProviderInfo, ProviderPaymentStatus, @@ -22,6 +22,8 @@ import { } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, VNode } from "preact"; import { ErrorMessage } from "../components/ErrorMessage"; +import { Loading } from "../components/Loading"; +import { LoadingError } from "../components/LoadingError"; import { Button, ButtonDestructive, @@ -52,35 +54,24 @@ export function ProviderDetailPage({ pid: providerURL, onBack }: Props): VNode { const state = useAsyncAsHook(getProviderInfo); if (!state) { - return ( -
- Loading... -
- ); + return ; } if (state.hasError) { return ( -
- - There was an error loading the provider detail for "{providerURL}" - -
+ + There was an error loading the provider detail for "{providerURL}" + + } + error={state} + /> ); } - if (state.response === null) { - onBack(); - return ( -
- - There is not known provider with url "{providerURL}". Redirecting - back... - -
- ); - } return ( wxApi.syncOneProvider(providerURL)} onDelete={async () => wxApi.removeProvider(providerURL).then(onBack)} @@ -93,7 +84,8 @@ export function ProviderDetailPage({ pid: providerURL, onBack }: Props): VNode { } export interface ViewProps { - info: ProviderInfo; + url: string; + info: ProviderInfo | null; onDelete: () => void; onSync: () => void; onBack: () => void; @@ -102,12 +94,30 @@ export interface ViewProps { export function ProviderView({ info, + url, onDelete, onSync, onBack, onExtend, }: ViewProps): VNode { - const lb = info?.lastSuccessfulBackupTimestamp; + if (info === null) { + return ( + +
+

+ There is not known provider with url "{url}". +

+
+
+ +
+
+
+ ); + } + const lb = info.lastSuccessfulBackupTimestamp; const isPaid = info.paymentStatus.type === ProviderPaymentType.Paid || info.paymentStatus.type === ProviderPaymentType.TermsChanged; @@ -125,48 +135,55 @@ export function ProviderView({

- Last backup:

- Back up + Back up {info.terms && (

- Provider fee: {info.terms && info.terms.annualFee} per year + + Provider fee: + {" "} + {info.terms && info.terms.annualFee}{" "} + per year

)}

{descriptionByStatus(info.paymentStatus)}

- Extend + Extend {info.paymentStatus.type === ProviderPaymentType.TermsChanged && (

- + terms has changed, extending the service will imply accepting the new terms of service - +

iddenomvaluestatusrefresh? + id + + denom + + value + + status + + from refresh? +
@@ -174,7 +191,7 @@ export function ProviderView({ @@ -187,11 +204,11 @@ export function ProviderView({
- remove provider + Remove provider
@@ -201,7 +218,12 @@ export function ProviderView({ function Error({ info }: { info: ProviderInfo }): VNode { if (info.lastError) { - return ; + return ( + This provider has reported an error} + description={info.lastError.hint} + /> + ); } if (info.backupProblem) { switch (info.backupProblem.type) { @@ -210,24 +232,26 @@ function Error({ info }: { info: ProviderInfo }): VNode { - + There is conflict with another backup from{" "} {info.backupProblem.otherDeviceId} - + } /> ); case "backup-unreadable": - return ; + return ( + Backup is not readable} /> + ); default: return ( - + Unknown backup problem: {JSON.stringify(info.backupProblem)} - + } /> @@ -239,16 +263,20 @@ function Error({ info }: { info: ProviderInfo }): VNode { function descriptionByStatus(status: ProviderPaymentStatus): VNode { switch (status.type) { - // return i18n.str`no enough balance to make the payment` - // return i18n.str`not paid yet` case ProviderPaymentType.Paid: case ProviderPaymentType.TermsChanged: if (status.paidUntil.t_ms === "never") { - return {i18n.str`service paid`}; + return ( + + service paid + + ); } return ( - Backup valid until:{" "} + + Backup valid until: + {" "} ); diff --git a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx index 7ccef2daa..7de719fc6 100644 --- a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx @@ -1,4 +1,9 @@ -import { AmountJson, Amounts, parsePaytoUri } from "@gnu-taler/taler-util"; +import { + AmountJson, + Amounts, + parsePaytoUri, + Translate, +} from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType"; import { QR } from "../components/QR"; @@ -22,15 +27,23 @@ export function ReserveCreated({ const paytoURI = parsePaytoUri(payto); // const url = new URL(paytoURI?.targetPath); if (!paytoURI) { - return
could not parse payto uri from exchange {payto}
; + return ( +
+ could not parse payto uri from exchange {payto} +
+ ); } return (
-

Exchange is ready for withdrawal!

+

+ Exchange is ready for withdrawal +

- To complete the process you need to wire{" "} - {amountToString(amount)} to the exchange bank account + + To complete the process you need to wire + {amountToString(amount)} to the exchange bank account +

- Make sure to use the correct subject, otherwise the money will not - arrive in this wallet. + + Make sure to use the correct subject, otherwise the money will not + arrive in this wallet. +

- Alternative, you can also scan this QR code or open{" "} - this link if you have a banking app installed that - supports RFC 8905 + + Alternative, you can also scan this QR code or open + this link if you have a banking app installed + that supports RFC 8905 +

- Cancel withdrawal + Cancel withdrawal
diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.tsx index ff47620eb..bac884247 100644 --- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ -import { ExchangeListItem, i18n } from "@gnu-taler/taler-util"; +import { ExchangeListItem, i18n, Translate } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { Checkbox } from "../components/Checkbox"; import { @@ -81,29 +81,46 @@ export function SettingsView({

- Permissions + Permissions

+ Automatically open wallet based on page content + + } name="perm" - description="(Enabling this option below will make using the wallet faster, but requires more permissions from your browser.)" + description={ + + Enabling this option below will make using the wallet faster, but + requires more permissions from your browser. + + } enabled={permissionsEnabled} onToggle={togglePermissions} />

- Known exchanges + Known exchanges

{!knownExchanges || !knownExchanges.length ? ( -
No exchange yet!
+
+ No exchange yet +
) : (
  - old + old -> - new + new
- fee + fee {info.paymentStatus.oldTerms.annualFee} ->
- storage + storage {info.paymentStatus.oldTerms.storageLimitInMegabytes} ->
- - - + + + @@ -116,12 +133,24 @@ export function SettingsView({ ); switch (status) { case "accepted": - return ok; + return ( + + ok + + ); case "changed": - return changed!; + return ( + + changed + + ); case "new": case "notfound": - return not accepted; + return ( + + not accepted + + ); } } return ( @@ -143,15 +172,19 @@ export function SettingsView({
- Add an exchange + Add an exchange

Config

Developer mode} name="devMode" - description="(More options and information useful for debugging)" + description={ + + (More options and information useful for debugging) + + } enabled={developerMode} onToggle={toggleDeveloperMode} /> diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index 423a641a3..a43e9b4a0 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -22,6 +22,7 @@ import { parsePaytoUri, Transaction, TransactionType, + Translate, WithdrawalType, } from "@gnu-taler/taler-util"; import { differenceInSeconds } from "date-fns"; @@ -47,7 +48,6 @@ import { } from "../components/styled"; import { Time } from "../components/Time"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { Pages } from "../NavigationBar"; import * as wxApi from "../wxApi"; interface Props { @@ -76,7 +76,9 @@ export function TransactionPage({ tid, goToWalletHistory }: Props): VNode { if (state.hasError) { return ( Could not load the transaction information + } error={state} /> ); @@ -139,11 +141,17 @@ export function TransactionView({
+ There was an error trying to complete the transaction + + } error={transaction?.error} /> {transaction.pending && ( - This transaction is not completed + + This transaction is not completed + )}
@@ -151,16 +159,16 @@ export function TransactionView({
{showRetry ? ( - retry + Retry ) : null} - Forget + Forget
@@ -184,24 +192,30 @@ export function TransactionView({ {confirmBeforeForget ? ( -
Caution!
+
+ Caution! +
- If you have already wired money to the exchange you will loose - the chance to get the coins form it. + + If you have already wired money to the exchange you will loose + the chance to get the coins form it. +
- Confirm + Confirm
) : undefined} -

Withdrawal

+

+ Withdrawal +

currencyurlterm of service + Currency + + URL + + Term of Service +