diff --git a/packages/desktop-client/src/components/Modals.tsx b/packages/desktop-client/src/components/Modals.tsx index ef458ef87b4..a52f6fef71d 100644 --- a/packages/desktop-client/src/components/Modals.tsx +++ b/packages/desktop-client/src/components/Modals.tsx @@ -1,5 +1,6 @@ // @ts-strict-ignore import React, { useEffect } from 'react'; +import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; import { useLocation } from 'react-router-dom'; @@ -81,6 +82,8 @@ export function Modals() { } }, [location]); + const { t } = useTranslation(); + const modals = modalStack .map(({ name, options }) => { switch (name) { @@ -287,10 +290,12 @@ export function Modals() { Header={props => ( } + title={ + + } /> )} - inputPlaceholder="Category name" + inputPlaceholder={t('Category name')} buttonText="Add" onValidate={options.onValidate} onSubmit={options.onSubmit} @@ -306,12 +311,15 @@ export function Modals() { + } /> )} - inputPlaceholder="Category group name" - buttonText="Add" + inputPlaceholder={t('Category group name')} + buttonText={t('Add')} onValidate={options.onValidate} onSubmit={options.onSubmit} /> diff --git a/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx b/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx index ad01f64d19f..8e96583490c 100644 --- a/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx @@ -2,6 +2,7 @@ import React, { type ComponentPropsWithoutRef, type CSSProperties, } from 'react'; +import { useTranslation } from 'react-i18next'; import { useLocalPref } from '../../hooks/useLocalPref'; import { theme, styles } from '../../style'; @@ -77,6 +78,7 @@ function BudgetPageMenu({ throw new Error(`Unrecognized menu item: ${name}`); } }; + const { t } = useTranslation(); return (