diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Transaction.tsx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index d34e57f58..1ef0f0b79 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -61,7 +61,7 @@ import { import { Time } from "../components/Time.js"; import { alertFromError, useAlertContext } from "../context/alert.js"; import { useBackendContext } from "../context/backend.js"; -import { useTranslationContext } from "../context/translation.js"; +import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; import { Button } from "../mui/Button.js"; import { SafeHandler } from "../mui/handlers.js"; @@ -283,10 +283,7 @@ function TransactionTemplate({ <Button variant="contained" color="error" - onClick={safely( - onDelete, - i18n.str`Could not forget transaction`, - )} + onClick={safely("delete transaction", onDelete)} > <i18n.Translate>Confirm</i18n.Translate> </Button> @@ -322,10 +319,7 @@ function TransactionTemplate({ <Button variant="contained" color="error" - onClick={safely( - onCancel, - i18n.str`Could not cancel the active transaction`, - )} + onClick={safely("cancel active transaction", onCancel)} > <i18n.Translate>Yes</i18n.Translate> </Button> @@ -340,7 +334,7 @@ function TransactionTemplate({ {showSend ? ( <Button variant="contained" - onClick={safely(onSend, i18n.str`Could not send`)} + onClick={safely("send transaction", onSend)} > <i18n.Translate>Send</i18n.Translate> </Button> @@ -350,7 +344,7 @@ function TransactionTemplate({ {showRetry ? ( <Button variant="contained" - onClick={safely(onRetry, i18n.str`Could not retry`)} + onClick={safely("retry transaction", onRetry)} > <i18n.Translate>Retry</i18n.Translate> </Button> @@ -627,9 +621,8 @@ export function TransactionView({ <div> <Button variant="contained" - onClick={safely( - () => onRefund(transaction.proposalId), - i18n.str`Could not refund`, + onClick={safely("refund transaction", () => + onRefund(transaction.proposalId), )} > <i18n.Translate>Accept</i18n.Translate> |