Improve translation of dashboard and list

This commit is contained in:
2025-05-02 11:59:10 +02:00
parent ba46c10449
commit 2c23992e52
4 changed files with 27 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ import { Link, useNavigate } from "react-router"
import React, { useContext } from "react";
import { Button } from "@mui/material";
import { FirmContext } from "../../../contexts/FirmContext";
import { useTranslation } from "@refinedev/core";
type ListProps<T extends GridValidRowModel> = {
resource: string,
@@ -15,6 +16,7 @@ type ListProps<T extends GridValidRowModel> = {
const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
const { resource, columns } = props;
const { translate: t } = useTranslation();
const { currentFirm } = useContext(FirmContext);
const resourceBasePath = `firm/${currentFirm.instance}/${currentFirm.firm}`
@@ -33,7 +35,7 @@ const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
return (
<RefineList>
<Link to={"create"} >
<Button>Create</Button>
<Button>{t("buttons.create")}</Button>
</Link>
<DataGrid
{...dataGridProps}