merchant-backoffice

ZZZ: Inactive/Deprecated
Log | Files | Refs | Submodules | README

commit 5189b9dc44519bcd60b73bf4483aace5e52e271d
parent 96950208e39fd6a891fa79894de0098db5f80c30
Author: ms <ms@taler.net>
Date:   Fri,  7 Jan 2022 08:07:42 +0100

Wrap more strings into i18n().

Diffstat:
Mpackages/bank/src/i18n/bank.pot | 30++++++++++++++++++++++++++++++
Mpackages/bank/src/i18n/de.po | 30++++++++++++++++++++++++++++++
Mpackages/bank/src/i18n/en.po | 30++++++++++++++++++++++++++++++
Mpackages/bank/src/i18n/strings.ts | 36++++++++++++++++++++++++++++++++++++
Mpackages/bank/src/pages/home/index.tsx | 29+++++++----------------------
5 files changed, 133 insertions(+), 22 deletions(-)

diff --git a/packages/bank/src/i18n/bank.pot b/packages/bank/src/i18n/bank.pot @@ -23,6 +23,36 @@ msgstr "" msgid "Page has a problem:" msgstr "" +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:560 +#, c-format +msgid "Page has a problem: logged in but backend state is lost." +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:588 +#, c-format +msgid "Charge Taler wallet" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:594 +#, c-format +msgid "Close" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:601 +#, c-format +msgid "Confirm withdrawal" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:606 +#, c-format +msgid "Abort withdrawal" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:656 +#, c-format +msgid "Sign in" +msgstr "" + # This file is part of GNU Taler # (C) 2021 Taler Systems S.A. # GNU Taler is free software; you can redistribute it and/or modify it under the diff --git a/packages/bank/src/i18n/de.po b/packages/bank/src/i18n/de.po @@ -23,6 +23,36 @@ msgstr "" msgid "Page has a problem:" msgstr "Es gibt ein Problem:" +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:560 +#, c-format +msgid "Page has a problem: logged in but backend state is lost." +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:588 +#, c-format +msgid "Charge Taler wallet" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:594 +#, c-format +msgid "Close" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:601 +#, c-format +msgid "Confirm withdrawal" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:606 +#, c-format +msgid "Abort withdrawal" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:656 +#, c-format +msgid "Sign in" +msgstr "" + # This file is part of GNU Taler # (C) 2021 Taler Systems S.A. # GNU Taler is free software; you can redistribute it and/or modify it under the diff --git a/packages/bank/src/i18n/en.po b/packages/bank/src/i18n/en.po @@ -23,6 +23,36 @@ msgstr "seconds" msgid "Page has a problem:" msgstr "" +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:560 +#, c-format +msgid "Page has a problem: logged in but backend state is lost." +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:588 +#, c-format +msgid "Charge Taler wallet" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:594 +#, c-format +msgid "Close" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:601 +#, c-format +msgid "Confirm withdrawal" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:606 +#, c-format +msgid "Abort withdrawal" +msgstr "" + +#: /home/job/merchant-backoffice/packages/bank/src/pages/home/index.tsx:656 +#, c-format +msgid "Sign in" +msgstr "" + # This file is part of GNU Taler # (C) 2021 Taler Systems S.A. # GNU Taler is free software; you can redistribute it and/or modify it under the diff --git a/packages/bank/src/i18n/strings.ts b/packages/bank/src/i18n/strings.ts @@ -36,6 +36,24 @@ strings['de'] = { "Page has a problem:": [ "Es gibt ein Problem:" ], + "Page has a problem: logged in but backend state is lost.": [ + "" + ], + "Charge Taler wallet": [ + "" + ], + "Close": [ + "" + ], + "Confirm withdrawal": [ + "" + ], + "Abort withdrawal": [ + "" + ], + "Sign in": [ + "" + ], "": { "domain": "messages", "plural_forms": "nplurals=2; plural=(n != 1);", @@ -64,6 +82,24 @@ strings['en'] = { "Page has a problem:": [ "" ], + "Page has a problem: logged in but backend state is lost.": [ + "" + ], + "Charge Taler wallet": [ + "" + ], + "Close": [ + "" + ], + "Confirm withdrawal": [ + "" + ], + "Abort withdrawal": [ + "" + ], + "Sign in": [ + "" + ], "": { "domain": "messages", "plural_forms": "nplurals=2; plural=(n != 1);", diff --git a/packages/bank/src/pages/home/index.tsx b/packages/bank/src/pages/home/index.tsx @@ -2,7 +2,7 @@ import useSWR, { SWRConfig, useSWRConfig } from "swr"; import { h, Fragment, ComponentChildren, VNode } from "preact"; import { useState, useEffect, StateUpdater } from "preact/hooks"; import { Buffer } from "buffer"; -import { useTranslator } from "../../i18n"; +import { useTranslator, Translate } from "../../i18n"; import { QR } from "../../components/QR"; /********************************************** @@ -557,7 +557,7 @@ export function BankHome(): VNode { if (pageState.isLoggedIn) { if (typeof backendState === "undefined") { pageStateSetter((prevState) => ({ ...prevState, hasError: true })); - return <p>Page has a problem: logged in but backend state is lost.</p>; + return <p>{i18n`Page has a problem: logged in but backend state is lost.`}</p>; } return ( <SWRWithCredentials @@ -585,42 +585,29 @@ export function BankHome(): VNode { "EUR:5", backendState, pageStateSetter - )}}>Charge Taler wallet</button> + )}}>{i18n`Charge Taler wallet`}</button> } {pageState.withdrawalOutcome && <button onClick={() => { pageStateSetter((prevState) => { const { withdrawalOutcome, ...rest } = prevState; - return {...rest, withdrawalInProgress: false};})}}>Close</button> + return {...rest, withdrawalInProgress: false};})}}>{i18n`Close`}</button> } {pageState.talerWithdrawUri && <div><button onClick={() => { confirmWithdrawalCall( backendState, pageState.withdrawalId, - pageStateSetter);}}>Confirm withdrawal</button> + pageStateSetter);}}>{i18n`Confirm withdrawal`}</button> <button onClick={() => { abortWithdrawalCall( backendState, pageState.withdrawalId, - pageStateSetter);}}>Abort withdrawal</button> + pageStateSetter);}}>{i18n`Abort withdrawal`}</button> </div>} - </Account> </SWRWithCredentials> ); - - /** - * FIXME: need to offer a Taler withdraw button here. - */ - - /** - * FIXME: need to offer the withdraw confirmation page, - * after the wallet has 'selected' an exchange and a reserve. - * - * The selection can be detected by asking the withdrawal - * status to the bank's backend. - */ } var submitData: CredentialsRequestType; @@ -666,9 +653,7 @@ export function BankHome(): VNode { backendStateSetter, pageStateSetter ); - }}> - Sign in - </button> + }}>{i18n`Sign in`}</button> </div> ); }