diff --git a/src/renderer/Grid/Grid.tsx b/src/renderer/Grid/Grid.tsx index 5688091f..813c2367 100644 --- a/src/renderer/Grid/Grid.tsx +++ b/src/renderer/Grid/Grid.tsx @@ -100,6 +100,7 @@ const GridComponent: React.FC = memo(({ return ( = memo(({ title, todotxtAttribute, filters, onClick }) => { - +const Group: React.FC = memo(({ settings, t, title, todotxtAttribute, filters, onClick }) => { if (!title || title.length === 0) { return ; } const groupElements = (typeof title === 'string') ? [title] : title + const formattedGroupElements = groupElements.map( + (groupElement) => formatGroupElement({ groupElement, settings, t, todotxtAttribute }) + ); return ( - {groupElements.map((groupElement, index) => { + {formattedGroupElements.map((groupElement, index) => { const selected: boolean = filters && (filters[todotxtAttribute as keyof Filters] || []).some( (filter: Filter) => filter && filter.name === groupElement.trim() ); @@ -41,4 +72,4 @@ const Group: React.FC = memo(({ title, todotxtAttribute, filters, on ); }); -export default Group; \ No newline at end of file +export default withTranslation()(Group); diff --git a/src/renderer/Shared.tsx b/src/renderer/Shared.tsx index ded3c1c2..ccf2c327 100644 --- a/src/renderer/Shared.tsx +++ b/src/renderer/Shared.tsx @@ -4,6 +4,7 @@ import duration from 'dayjs/plugin/duration'; import calendar from 'dayjs/plugin/calendar'; import weekday from 'dayjs/plugin/weekday'; import updateLocale from 'dayjs/plugin/updateLocale'; +import { i18n } from './Settings/LanguageSelector'; dayjs.extend(relativeTime); dayjs.extend(duration); dayjs.extend(calendar); @@ -112,4 +113,4 @@ export const friendlyDate = (value: string, attributeKey: string, settings: Sett } return results; -}; \ No newline at end of file +};