feat(localization): update and enhance localization files for multiple languages
- Updated localization files for various languages, including English, German, Spanish, Portuguese, and Chinese, to ensure consistency and accuracy across the application. - Added new keys and updated existing ones to support recent UI changes and features, particularly in project views, task lists, and admin center settings. - Enhanced the structure of localization files to improve maintainability and facilitate future updates. - Implemented performance optimizations in the frontend components to better handle localization data.
This commit is contained in:
@@ -2,38 +2,40 @@ import { lazy, Suspense } from 'react';
|
||||
import { Spin } from '@/shared/antd-imports';
|
||||
|
||||
// Lazy load Chart.js components
|
||||
const LazyBarChart = lazy(() =>
|
||||
const LazyBarChart = lazy(() =>
|
||||
import('react-chartjs-2').then(module => ({ default: module.Bar }))
|
||||
);
|
||||
|
||||
const LazyLineChart = lazy(() =>
|
||||
const LazyLineChart = lazy(() =>
|
||||
import('react-chartjs-2').then(module => ({ default: module.Line }))
|
||||
);
|
||||
|
||||
const LazyPieChart = lazy(() =>
|
||||
const LazyPieChart = lazy(() =>
|
||||
import('react-chartjs-2').then(module => ({ default: module.Pie }))
|
||||
);
|
||||
|
||||
const LazyDoughnutChart = lazy(() =>
|
||||
const LazyDoughnutChart = lazy(() =>
|
||||
import('react-chartjs-2').then(module => ({ default: module.Doughnut }))
|
||||
);
|
||||
|
||||
// Lazy load Gantt components
|
||||
const LazyGanttChart = lazy(() =>
|
||||
const LazyGanttChart = lazy(() =>
|
||||
import('gantt-task-react').then(module => ({ default: module.Gantt }))
|
||||
);
|
||||
|
||||
// Chart loading fallback
|
||||
const ChartLoadingFallback = () => (
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: '300px',
|
||||
background: '#fafafa',
|
||||
borderRadius: '8px',
|
||||
border: '1px solid #f0f0f0'
|
||||
}}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: '300px',
|
||||
background: '#fafafa',
|
||||
borderRadius: '8px',
|
||||
border: '1px solid #f0f0f0',
|
||||
}}
|
||||
>
|
||||
<Spin size="large" />
|
||||
</div>
|
||||
);
|
||||
@@ -75,10 +77,10 @@ export const usePreloadCharts = () => {
|
||||
// Preload Chart.js
|
||||
import('react-chartjs-2');
|
||||
import('chart.js');
|
||||
|
||||
|
||||
// Preload Gantt
|
||||
import('gantt-task-react');
|
||||
};
|
||||
|
||||
return { preloadCharts };
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user