feat(localization): add and update translations for multiple languages

- Introduced new localization files for Albanian, German, Spanish, Portuguese, and Chinese, enhancing the application's multilingual support.
- Added new keys and updated existing translations in project-view, task-list-table, and settings files to improve user experience across different languages.
- Enhanced error handling and empty state messages in task management components to provide clearer feedback to users.
- Updated tooltip texts and button labels for better clarity and consistency in the user interface.
This commit is contained in:
chamikaJ
2025-07-08 15:26:55 +05:30
parent e750023fdc
commit f06851fa37
53 changed files with 700 additions and 117 deletions

View File

@@ -213,7 +213,7 @@ const useFilterData = (position: 'board' | 'list'): FilterSection[] => {
return [
{
id: 'priority',
label: 'Priority',
label: t('priorityText'),
options: filterData.priorities.map((p: any) => ({
value: p.id,
label: p.name,
@@ -288,7 +288,7 @@ const useFilterData = (position: 'board' | 'list'): FilterSection[] => {
return [
{
id: 'priority',
label: 'Priority',
label: t('priorityText'),
options: filterData.priorities.map((p: any) => ({
value: p.id,
label: p.name,
@@ -719,7 +719,34 @@ const FieldsDropdown: React.FC<{ themeClasses: any; isDarkMode: boolean }> = ({
isDarkMode,
}) => {
const { t } = useTranslation('task-list-filters');
const { t: tTable } = useTranslation('task-list-table');
const dispatch = useAppDispatch();
// Helper function to get translated field label using existing task-list-table translations
const getFieldLabel = useCallback((fieldKey: string) => {
const keyMappings: Record<string, string> = {
'KEY': 'keyColumn',
'DESCRIPTION': 'descriptionColumn',
'PROGRESS': 'progressColumn',
'ASSIGNEES': 'assigneesColumn',
'LABELS': 'labelsColumn',
'PHASE': 'phaseColumn',
'STATUS': 'statusColumn',
'PRIORITY': 'priorityColumn',
'TIME_TRACKING': 'timeTrackingColumn',
'ESTIMATION': 'estimationColumn',
'START_DATE': 'startDateColumn',
'DUE_DATE': 'dueDateColumn',
'DUE_TIME': 'dueTimeColumn',
'COMPLETED_DATE': 'completedDateColumn',
'CREATED_DATE': 'createdDateColumn',
'LAST_UPDATED': 'lastUpdatedColumn',
'REPORTER': 'reporterColumn',
};
const translationKey = keyMappings[fieldKey];
return translationKey ? tTable(translationKey) : fieldKey;
}, [tTable]);
const fieldsRaw = useSelector((state: RootState) => state.taskManagementFields);
const columns = useSelector(selectColumns);
const projectId = useAppSelector(state => state.projectReducer.projectId);
@@ -857,7 +884,7 @@ const FieldsDropdown: React.FC<{ themeClasses: any; isDarkMode: boolean }> = ({
{/* Label and Count */}
<div className="flex-1 flex items-center justify-between">
<span className="truncate">{field.label}</span>
<span className="truncate">{getFieldLabel(field.key)}</span>
</div>
</button>
);