diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx index 0d58093d3..dcac23983 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx @@ -19,6 +19,7 @@ * @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"; @@ -29,7 +30,6 @@ import { useInstanceTemplates, useTemplateAPI, } from "../../../../hooks/templates.js"; -import { useTranslator } from "../../../../i18n/index.js"; import { Notification } from "../../../../utils/types.js"; import { ListPage } from "./ListPage.js"; @@ -49,7 +49,7 @@ export default function ListTemplates({ onNotFound, }: Props): VNode { const [position, setPosition] = useState<string | undefined>(undefined); - const i18n = useTranslator(); + const { i18n } = useTranslationContext(); const [notif, setNotif] = useState<Notification | undefined>(undefined); const { deleteTemplate } = useTemplateAPI(); const result = useInstanceTemplates({ position }, (id) => setPosition(id)); @@ -77,13 +77,13 @@ export default function ListTemplates({ deleteTemplate(e.template_id) .then(() => setNotif({ - message: i18n`template delete successfully`, + message: i18n.str`template delete successfully`, type: "SUCCESS", }), ) .catch((error) => setNotif({ - message: i18n`could not delete the template`, + message: i18n.str`could not delete the template`, type: "ERROR", description: error.message, }), |