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:
@@ -1,5 +1,6 @@
|
||||
import { Divider, Form, Input, message, Modal, Typography } from 'antd';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { editTeamName, fetchTeams } from '@/features/teams/teamSlice';
|
||||
import { ITeamGetResponse } from '@/types/teams/team.type';
|
||||
@@ -11,6 +12,7 @@ interface EditTeamNameModalProps {
|
||||
}
|
||||
|
||||
const EditTeamNameModal = ({ team, isModalOpen, onCancel }: EditTeamNameModalProps) => {
|
||||
const { t } = useTranslation('settings/teams');
|
||||
const dispatch = useAppDispatch();
|
||||
const [form] = Form.useForm();
|
||||
const [updating, setUpdating] = useState(false);
|
||||
@@ -33,7 +35,7 @@ const EditTeamNameModal = ({ team, isModalOpen, onCancel }: EditTeamNameModalPro
|
||||
}
|
||||
setUpdating(false);
|
||||
} catch (error) {
|
||||
message.error('Team name change failed!');
|
||||
message.error(t('updateFailed'));
|
||||
} finally {
|
||||
setUpdating(false);
|
||||
}
|
||||
@@ -49,13 +51,13 @@ const EditTeamNameModal = ({ team, isModalOpen, onCancel }: EditTeamNameModalPro
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
Edit Team Name
|
||||
{t('editTeamName')}
|
||||
<Divider />
|
||||
</Typography.Text>
|
||||
}
|
||||
open={isModalOpen}
|
||||
onOk={form.submit}
|
||||
okText="Update Name"
|
||||
okText={t('updateName')}
|
||||
onCancel={() => {
|
||||
onCancel();
|
||||
setUpdating(false);
|
||||
@@ -67,15 +69,15 @@ const EditTeamNameModal = ({ team, isModalOpen, onCancel }: EditTeamNameModalPro
|
||||
<Form form={form} layout="vertical" onFinish={handleFormSubmit}>
|
||||
<Form.Item
|
||||
name="name"
|
||||
label="Name"
|
||||
label={t('name')}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please enter a Name',
|
||||
message: t('nameRequired'),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input placeholder="Name" />
|
||||
<Input placeholder={t('namePlaceholder')} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
@@ -65,7 +65,7 @@ const UpdateMemberDrawer = ({ selectedMemberId, onRoleUpdate }: UpdateMemberDraw
|
||||
setJobTitles(res.body.data || []);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching job titles:', error);
|
||||
logger.error('Error fetching job titles:', error);
|
||||
message.error(t('jobTitlesFetchError'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user