diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/popup')
4 files changed, 51 insertions, 49 deletions
diff --git a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx index f81929b21..46fe027c9 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 <http://www.gnu.org/licenses/> */ -import { Amounts, Balance, Translate } from "@gnu-taler/taler-util"; +import { Amounts, Balance, i18n } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { BalanceTable } from "../components/BalanceTable"; @@ -49,7 +49,7 @@ export function BalancePage({ if (state.hasError) { return ( <LoadingError - title={<Translate>Could not load balance page</Translate>} + title={<i18n.Translate>Could not load balance page</i18n.Translate>} error={state} /> ); @@ -104,18 +104,18 @@ export function BalanceView({ </section> <footer style={{ justifyContent: "space-between" }}> <ButtonPrimary onClick={goToWalletManualWithdraw}> - <Translate>Withdraw</Translate> + <i18n.Translate>Withdraw</i18n.Translate> </ButtonPrimary> {currencyWithNonZeroAmount.length > 0 && ( <MultiActionButton - label={(s) => <Translate>Deposit {s}</Translate>} + label={(s) => <i18n.Translate>Deposit {s}</i18n.Translate>} actions={currencyWithNonZeroAmount} onClick={(c) => goToWalletDeposit(c)} /> )} <JustInDevMode> <ButtonBoxPrimary onClick={goToAddAction}> - <Translate>Enter URI</Translate> + <i18n.Translate>Enter URI</i18n.Translate> </ButtonBoxPrimary> </JustInDevMode> </footer> diff --git a/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx index b3da48a93..228c3cdfd 100644 --- a/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx +++ b/packages/taler-wallet-webextension/src/popup/DeveloperPage.tsx @@ -151,14 +151,14 @@ export function View({ return ( <div> <p> - <Translate>Debug tools</Translate>: + <i18n.Translate>Debug tools</i18n.Translate>: </p> <button onClick={confirmReset}> - <Translate>reset</Translate> + <i18n.Translate>reset</i18n.Translate> </button> <br /> <button onClick={() => fileRef?.current?.click()}> - <Translate>import database</Translate> + <i18n.Translate>import database</i18n.Translate> </button> <input ref={fileRef} @@ -179,11 +179,11 @@ export function View({ /> <br /> <button onClick={onExportDatabase}> - <Translate>export database</Translate> + <i18n.Translate>export database</i18n.Translate> </button> {downloadedDatabase && ( <div> - <Translate> + <i18n.Translate> Database exported at <Time timestamp={{ t_ms: downloadedDatabase.time.getTime() }} @@ -198,15 +198,15 @@ export function View({ "yyyy/MM/dd_HH:mm", )}.json`} > - <Translate>click here</Translate> + <i18n.Translate>click here</i18n.Translate> </a> to download - </Translate> + </i18n.Translate> </div> )} <br /> <p> - <Translate>Coins</Translate>: + <i18n.Translate>Coins</i18n.Translate>: </p> {Object.keys(money_by_exchange).map((ex) => { const allcoins = money_by_exchange[ex]; @@ -233,7 +233,7 @@ export function View({ {operations && operations.length > 0 && ( <Fragment> <p> - <Translate>Pending operations</Translate> + <i18n.Translate>Pending operations</i18n.Translate> </p> <dl> {operations.reverse().map((o) => { @@ -272,7 +272,7 @@ function ShowAllCoins({ </p> <p> <b> - <Translate>usable coins</Translate> + <i18n.Translate>usable coins</i18n.Translate> </b> </p> {collapsedUnspent ? ( @@ -281,19 +281,19 @@ function ShowAllCoins({ <table onClick={() => setCollapsedUnspent(true)}> <tr> <td> - <Translate>id</Translate> + <i18n.Translate>id</i18n.Translate> </td> <td> - <Translate>denom</Translate> + <i18n.Translate>denom</i18n.Translate> </td> <td> - <Translate>value</Translate> + <i18n.Translate>value</i18n.Translate> </td> <td> - <Translate>status</Translate> + <i18n.Translate>status</i18n.Translate> </td> <td> - <Translate>from refresh?</Translate> + <i18n.Translate>from refresh?</i18n.Translate> </td> </tr> {coins.usable.map((c) => { @@ -310,29 +310,29 @@ function ShowAllCoins({ </table> )} <p> - <Translate>spent coins</Translate> + <i18n.Translate>spent coins</i18n.Translate> </p> {collapsedSpent ? ( <div onClick={() => setCollapsedSpent(false)}> - <Translate>click to show</Translate> + <i18n.Translate>click to show</i18n.Translate> </div> ) : ( <table onClick={() => setCollapsedSpent(true)}> <tr> <td> - <Translate>id</Translate> + <i18n.Translate>id</i18n.Translate> </td> <td> - <Translate>denom</Translate> + <i18n.Translate>denom</i18n.Translate> </td> <td> - <Translate>value</Translate> + <i18n.Translate>value</i18n.Translate> </td> <td> - <Translate>status</Translate> + <i18n.Translate>status</i18n.Translate> </td> <td> - <Translate>from refresh?</Translate> + <i18n.Translate>from refresh?</i18n.Translate> </td> </tr> {coins.spent.map((c) => { diff --git a/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx b/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx index 6e2bf1e63..b8b21b24c 100644 --- a/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx +++ b/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx @@ -1,4 +1,4 @@ -import { Translate } from "@gnu-taler/taler-util"; +import { i18n } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { ButtonBoxWarning, WarningBox } from "../components/styled"; @@ -11,16 +11,16 @@ export function NoBalanceHelp({ <WarningBox> <p> <b> - <Translate>You have no balance to show.</Translate> + <i18n.Translate>You have no balance to show.</i18n.Translate> </b> <br /> - <Translate> + <i18n.Translate> To withdraw money you can start from your bank site or click the "withdraw" button to use a known exchange. - </Translate> + </i18n.Translate> </p> <ButtonBoxWarning onClick={() => goToWalletManualWithdraw()}> - <Translate>Withdraw</Translate> + <i18n.Translate>Withdraw</i18n.Translate> </ButtonBoxWarning> </WarningBox> ); diff --git a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx index a69352c9f..6410ae40e 100644 --- a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx +++ b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx @@ -19,11 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { - classifyTalerUri, - TalerUriType, - Translate, -} from "@gnu-taler/taler-util"; +import { classifyTalerUri, TalerUriType, i18n } from "@gnu-taler/taler-util"; import { Fragment, h } from "preact"; import { ButtonPrimary, ButtonSuccess } from "../components/styled"; import { actionForTalerUri } from "../utils/index"; @@ -57,54 +53,58 @@ export function TalerActionFound({ url, onDismiss }: Props) { <Fragment> <section> <h1> - <Translate>Taler Action</Translate> + <i18n.Translate>Taler Action</i18n.Translate> </h1> {uriType === TalerUriType.TalerPay && ( <div> <p> - <Translate>This page has pay action.</Translate> + <i18n.Translate>This page has pay action.</i18n.Translate> </p> <ButtonSuccess onClick={() => { navigateTo(actionForTalerUri(uriType, url)); }} > - <Translate>Open pay page</Translate> + <i18n.Translate>Open pay page</i18n.Translate> </ButtonSuccess> </div> )} {uriType === TalerUriType.TalerWithdraw && ( <div> <p> - <Translate>This page has a withdrawal action.</Translate> + <i18n.Translate> + This page has a withdrawal action. + </i18n.Translate> </p> <ButtonSuccess onClick={() => { navigateTo(actionForTalerUri(uriType, url)); }} > - <Translate>Open withdraw page</Translate> + <i18n.Translate>Open withdraw page</i18n.Translate> </ButtonSuccess> </div> )} {uriType === TalerUriType.TalerTip && ( <div> <p> - <Translate>This page has a tip action.</Translate> + <i18n.Translate>This page has a tip action.</i18n.Translate> </p> <ButtonSuccess onClick={() => { navigateTo(actionForTalerUri(uriType, url)); }} > - <Translate>Open tip page</Translate> + <i18n.Translate>Open tip page</i18n.Translate> </ButtonSuccess> </div> )} {uriType === TalerUriType.TalerNotifyReserve && ( <div> <p> - <Translate>This page has a notify reserve action.</Translate> + <i18n.Translate> + This page has a notify reserve action. + </i18n.Translate> </p> <ButtonSuccess onClick={() => { @@ -118,21 +118,23 @@ export function TalerActionFound({ url, onDismiss }: Props) { {uriType === TalerUriType.TalerRefund && ( <div> <p> - <Translate>This page has a refund action.</Translate> + <i18n.Translate>This page has a refund action.</i18n.Translate> </p> <ButtonSuccess onClick={() => { navigateTo(actionForTalerUri(uriType, url)); }} > - <Translate>Open refund page</Translate> + <i18n.Translate>Open refund page</i18n.Translate> </ButtonSuccess> </div> )} {uriType === TalerUriType.Unknown && ( <div> <p> - <Translate>This page has a malformed taler uri.</Translate> + <i18n.Translate> + This page has a malformed taler uri. + </i18n.Translate> </p> <p>{url}</p> </div> @@ -142,7 +144,7 @@ export function TalerActionFound({ url, onDismiss }: Props) { <div /> <ButtonPrimary onClick={() => onDismiss()}> {" "} - <Translate>Dismiss</Translate>{" "} + <i18n.Translate>Dismiss</i18n.Translate>{" "} </ButtonPrimary> </footer> </Fragment> |