diff --git a/packages/odyssey-react-mui/src/InfinitelyScrolledDataGrid.tsx b/packages/odyssey-react-mui/src/InfinitelyScrolledDataGrid.tsx index cf9cf50f62..10ff6d8112 100644 --- a/packages/odyssey-react-mui/src/InfinitelyScrolledDataGrid.tsx +++ b/packages/odyssey-react-mui/src/InfinitelyScrolledDataGrid.tsx @@ -27,7 +27,7 @@ import { useRef, useState, } from "react"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; export type DefaultMaterialReactTableData = Record; @@ -130,11 +130,23 @@ const InfinitelyScrolledDataGrid = < () => fetchMoreData ? ( - {t("datagrid.fetchedrows.text", String(totalFetchedRows))} + ) : ( - {t("datagrid.rows.text", String(totalFetchedRows))} + ), [fetchMoreData, totalFetchedRows] diff --git a/packages/odyssey-react-mui/src/properties/odyssey-react-mui.properties b/packages/odyssey-react-mui/src/properties/odyssey-react-mui.properties index 7c340c8818..b5025ece76 100644 --- a/packages/odyssey-react-mui/src/properties/odyssey-react-mui.properties +++ b/packages/odyssey-react-mui/src/properties/odyssey-react-mui.properties @@ -1,6 +1,8 @@ datagrid.error = Error loading data. -datagrid.fetchedrows.text = Fetched {0} total rows -datagrid.rows.text = {0} rows +datagrid.fetchedrows.text = Fetched {{totalRows}} row +datagrid.fetchedrows.text_plural = Fetched {{totalRows}} total rows +datagrid.rows.text = {{totalRows}} row +datagrid.rows.text_plural = {{totalRows}} rows fielderror.screenreader.text = Error fieldlabel.optional.text = Optional fieldlabel.required.text = Required