diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.tsx b/packages/desktop-client/src/components/reports/reports/CustomReport.tsx index a3a438b0909..8a31f038061 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReport.tsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReport.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import * as d from 'date-fns'; @@ -102,6 +103,7 @@ function useSelectedCategories( } export function CustomReport() { + const { t } = useTranslation(); const categories = useCategories(); const { isNarrowWidth } = useResponsive(); const [_firstDayOfWeekIdx] = useSyncedPref('firstDayOfWeekIdx'); @@ -644,16 +646,20 @@ export function CustomReport() { header={ isNarrowWidth ? ( } /> ) : ( - Custom Report: + {t('Custom Report:')} - {report.name || 'Unsaved report'} + {report.name || t('Unsaved report')} } @@ -766,8 +772,9 @@ export function CustomReport() { {hasWarning && ( - This report is configured to use a non-existing filter value - (i.e. category/account/payee). + {t( + 'This report is configured to use a non-existing filter value (i.e. category/account/payee).', + )} )} @@ -830,7 +837,7 @@ export function CustomReport() { intervalsCount={intervals.length} /> ) : ( - + )} diff --git a/upcoming-release-notes/3722.md b/upcoming-release-notes/3722.md new file mode 100644 index 00000000000..708b67c9269 --- /dev/null +++ b/upcoming-release-notes/3722.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [AhmedElbohoty] +--- + +Translation support for desktop-client/src/components/reports/reports/CustomReport.tsx