Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation: desktop-client/src/components/reports/reports/CustomRepo… #3722

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -102,6 +103,7 @@ function useSelectedCategories(
}

export function CustomReport() {
const { t } = useTranslation();
const categories = useCategories();
const { isNarrowWidth } = useResponsive();
const [_firstDayOfWeekIdx] = useSyncedPref('firstDayOfWeekIdx');
Expand Down Expand Up @@ -644,16 +646,20 @@ export function CustomReport() {
header={
isNarrowWidth ? (
<MobilePageHeader
title={`Custom Report: ${report.name || 'Unsaved report'}`}
title={
report.name
? t('Custom Report: {{name}}', { name: report.name })
: t('Custom Report: Unsaved report')
}
leftContent={<MobileBackButton onPress={onBackClick} />}
/>
) : (
<PageHeader
title={
<>
<Text>Custom Report:</Text>
<Text>{t('Custom Report:')}</Text>
<Text style={{ marginLeft: 5, color: theme.pageTextPositive }}>
{report.name || 'Unsaved report'}
{report.name || t('Unsaved report')}
</Text>
</>
}
Expand Down Expand Up @@ -766,8 +772,9 @@ export function CustomReport() {

{hasWarning && (
<Warning style={{ paddingTop: 5, paddingBottom: 5 }}>
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).',
)}
</Warning>
)}
</View>
Expand Down Expand Up @@ -830,7 +837,7 @@ export function CustomReport() {
intervalsCount={intervals.length}
/>
) : (
<LoadingIndicator message="Loading report..." />
<LoadingIndicator message={t('Loading report...')} />
)}
</View>
</View>
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3722.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [AhmedElbohoty]
---

Translation support for desktop-client/src/components/reports/reports/CustomReport.tsx