diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx index 25dc9abdc..4a4cc4274 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx @@ -19,18 +19,17 @@ * @author Sebastian Javier Marchano (sebasjm) */ +import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { Loading } from "../../../../components/exception/loading.js"; import { NotificationCard } from "../../../../components/menu/index.js"; import { MerchantBackend, WithId } from "../../../../declaration.js"; import { HttpError } from "../../../../hooks/backend.js"; -import { useProductAPI, useProductDetails } from "../../../../hooks/product.js"; import { useTemplateAPI, useTemplateDetails, } from "../../../../hooks/templates.js"; -import { useTranslator } from "../../../../i18n/index.js"; import { Notification } from "../../../../utils/types.js"; import { UpdatePage } from "./UpdatePage.js"; @@ -56,7 +55,7 @@ export default function UpdateTemplate({ const result = useTemplateDetails(tid); const [notif, setNotif] = useState<Notification | undefined>(undefined); - const i18n = useTranslator(); + const { i18n } = useTranslationContext(); if (result.clientError && result.isUnauthorized) return onUnauthorized(); if (result.clientError && result.isNotfound) return onNotFound(); @@ -74,7 +73,7 @@ export default function UpdateTemplate({ .then(onConfirm) .catch((error) => { setNotif({ - message: i18n`could not update template`, + message: i18n.str`could not update template`, type: "ERROR", description: error.message, }); |