aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components/product/ProductList.tsx')
-rw-r--r--packages/merchant-backoffice-ui/src/components/product/ProductList.tsx13
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx b/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx
index 774da8975..29556ea70 100644
--- a/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx
+++ b/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx
@@ -16,8 +16,8 @@
import { Amounts } from "@gnu-taler/taler-util";
import { h, VNode } from "preact";
import emptyImage from "../../assets/empty.png";
+import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
import { MerchantBackend } from "../../declaration.js";
-import { Translate } from "../../i18n/index.js";
interface Props {
list: MerchantBackend.Product[];
@@ -28,25 +28,26 @@ interface Props {
}[];
}
export function ProductList({ list, actions = [] }: Props): VNode {
+ const { i18n } = useTranslationContext();
return (
<div class="table-container">
<table class="table is-fullwidth is-striped is-hoverable is-fullwidth">
<thead>
<tr>
<th>
- <Translate>image</Translate>
+ <i18n.Translate>image</i18n.Translate>
</th>
<th>
- <Translate>description</Translate>
+ <i18n.Translate>description</i18n.Translate>
</th>
<th>
- <Translate>quantity</Translate>
+ <i18n.Translate>quantity</i18n.Translate>
</th>
<th>
- <Translate>unit price</Translate>
+ <i18n.Translate>unit price</i18n.Translate>
</th>
<th>
- <Translate>total price</Translate>
+ <i18n.Translate>total price</i18n.Translate>
</th>
<th />
</tr>