summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Refund.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Refund.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Refund.tsx46
1 files changed, 34 insertions, 12 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Refund.tsx b/packages/taler-wallet-webextension/src/cta/Refund.tsx
index cecd1ac00..8ce008bcd 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, i18n } from "@gnu-taler/taler-util";
import { h, VNode } from "preact";
import { useEffect, useState } from "preact/hooks";
import { AmountView } from "../renderHtml";
@@ -37,20 +37,30 @@ export function View({ applyResult }: ViewProps): VNode {
<section class="main">
<h1>GNU Taler Wallet</h1>
<article class="fade">
- <h2>Refund Status</h2>
+ <h2>
+ <i18n.Translate>Refund Status</i18n.Translate>
+ </h2>
<p>
- The product <em>{applyResult.info.summary}</em> has received a total
- effective refund of{" "}
+ <i18n.Translate>
+ The product <em>{applyResult.info.summary}</em> has received a total
+ effective refund of{" "}
+ </i18n.Translate>
<AmountView amount={applyResult.amountRefundGranted} />.
</p>
{applyResult.pendingAtExchange ? (
- <p>Refund processing is still in progress.</p>
+ <p>
+ <i18n.Translate>
+ Refund processing is still in progress.
+ </i18n.Translate>
+ </p>
) : null}
{!Amounts.isZero(applyResult.amountRefundGone) ? (
<p>
- The refund amount of{" "}
- <AmountView amount={applyResult.amountRefundGone} /> could not be
- applied.
+ <i18n.Translate>
+ The refund amount of{" "}
+ <AmountView amount={applyResult.amountRefundGone} /> could not be
+ applied.
+ </i18n.Translate>
</p>
) : null}
</article>
@@ -82,15 +92,27 @@ export function RefundPage({ talerRefundUri }: Props): VNode {
console.log("rendering");
if (!talerRefundUri) {
- return <span>missing taler refund uri</span>;
+ return (
+ <span>
+ <i18n.Translate>missing taler refund uri</i18n.Translate>
+ </span>
+ );
}
if (errMsg) {
- return <span>Error: {errMsg}</span>;
+ return (
+ <span>
+ <i18n.Translate>Error: {errMsg}</i18n.Translate>
+ </span>
+ );
}
if (!applyResult) {
- return <span>Updating refund status</span>;
+ return (
+ <span>
+ <i18n.Translate>Updating refund status</i18n.Translate>
+ </span>
+ );
}
return <View applyResult={applyResult} />;