feat(localization): add new label management translations for multiple languages
- Introduced new translation keys for label management features in Albanian, German, Spanish, Portuguese, Chinese, and English. - Updated placeholder texts, button labels, and paths to enhance user experience in the task list component.
This commit is contained in:
@@ -48,6 +48,9 @@
|
|||||||
"searchInputPlaceholder": "Kërko ose krijo",
|
"searchInputPlaceholder": "Kërko ose krijo",
|
||||||
"assigneeSelectorInviteButton": "Fto një anëtar të ri me email",
|
"assigneeSelectorInviteButton": "Fto një anëtar të ri me email",
|
||||||
"labelInputPlaceholder": "Kërko ose krijo",
|
"labelInputPlaceholder": "Kërko ose krijo",
|
||||||
|
"searchLabelsPlaceholder": "Kërko etiketa...",
|
||||||
|
"createLabelButton": "Krijo \"{{name}}\"",
|
||||||
|
"manageLabelsPath": "Cilësimet → Etiketat",
|
||||||
|
|
||||||
"pendingInvitation": "Ftesë në Pritje",
|
"pendingInvitation": "Ftesë në Pritje",
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,9 @@
|
|||||||
"searchInputPlaceholder": "Suchen oder erstellen",
|
"searchInputPlaceholder": "Suchen oder erstellen",
|
||||||
"assigneeSelectorInviteButton": "Neues Mitglied per E-Mail einladen",
|
"assigneeSelectorInviteButton": "Neues Mitglied per E-Mail einladen",
|
||||||
"labelInputPlaceholder": "Suchen oder erstellen",
|
"labelInputPlaceholder": "Suchen oder erstellen",
|
||||||
|
"searchLabelsPlaceholder": "Labels suchen...",
|
||||||
|
"createLabelButton": "\"{{name}}\" erstellen",
|
||||||
|
"manageLabelsPath": "Einstellungen → Labels",
|
||||||
|
|
||||||
"pendingInvitation": "Einladung ausstehend",
|
"pendingInvitation": "Einladung ausstehend",
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,9 @@
|
|||||||
"searchInputPlaceholder": "Search or create",
|
"searchInputPlaceholder": "Search or create",
|
||||||
"assigneeSelectorInviteButton": "Invite a new member by email",
|
"assigneeSelectorInviteButton": "Invite a new member by email",
|
||||||
"labelInputPlaceholder": "Search or create",
|
"labelInputPlaceholder": "Search or create",
|
||||||
|
"searchLabelsPlaceholder": "Search labels...",
|
||||||
|
"createLabelButton": "Create \"{{name}}\"",
|
||||||
|
"manageLabelsPath": "Settings → Labels",
|
||||||
|
|
||||||
"pendingInvitation": "Pending Invitation",
|
"pendingInvitation": "Pending Invitation",
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,9 @@
|
|||||||
"searchInputPlaceholder": "Buscar o crear",
|
"searchInputPlaceholder": "Buscar o crear",
|
||||||
"assigneeSelectorInviteButton": "Invitar a un nuevo miembro por correo",
|
"assigneeSelectorInviteButton": "Invitar a un nuevo miembro por correo",
|
||||||
"labelInputPlaceholder": "Buscar o crear",
|
"labelInputPlaceholder": "Buscar o crear",
|
||||||
|
"searchLabelsPlaceholder": "Buscar etiquetas...",
|
||||||
|
"createLabelButton": "Crear \"{{name}}\"",
|
||||||
|
"manageLabelsPath": "Configuración → Etiquetas",
|
||||||
|
|
||||||
"pendingInvitation": "Invitación pendiente",
|
"pendingInvitation": "Invitación pendiente",
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,9 @@
|
|||||||
"searchInputPlaceholder": "Buscar ou criar",
|
"searchInputPlaceholder": "Buscar ou criar",
|
||||||
"assigneeSelectorInviteButton": "Convide um novo membro por e-mail",
|
"assigneeSelectorInviteButton": "Convide um novo membro por e-mail",
|
||||||
"labelInputPlaceholder": "Buscar ou criar",
|
"labelInputPlaceholder": "Buscar ou criar",
|
||||||
|
"searchLabelsPlaceholder": "Buscar etiquetas...",
|
||||||
|
"createLabelButton": "Criar \"{{name}}\"",
|
||||||
|
"manageLabelsPath": "Configurações → Etiquetas",
|
||||||
|
|
||||||
"pendingInvitation": "Convite Pendente",
|
"pendingInvitation": "Convite Pendente",
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,9 @@
|
|||||||
"searchInputPlaceholder": "搜索或创建",
|
"searchInputPlaceholder": "搜索或创建",
|
||||||
"assigneeSelectorInviteButton": "通过电子邮件邀请新成员",
|
"assigneeSelectorInviteButton": "通过电子邮件邀请新成员",
|
||||||
"labelInputPlaceholder": "搜索或创建",
|
"labelInputPlaceholder": "搜索或创建",
|
||||||
|
"searchLabelsPlaceholder": "搜索标签...",
|
||||||
|
"createLabelButton": "创建 \"{{name}}\"",
|
||||||
|
"manageLabelsPath": "设置 → 标签",
|
||||||
"pendingInvitation": "待处理邀请",
|
"pendingInvitation": "待处理邀请",
|
||||||
"contextMenu": {
|
"contextMenu": {
|
||||||
"assignToMe": "分配给我",
|
"assignToMe": "分配给我",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React, { useState, useRef, useEffect, useMemo, useCallback } from 'react'
|
|||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { PlusOutlined, TagOutlined } from '@ant-design/icons';
|
import { PlusOutlined, TagOutlined } from '@ant-design/icons';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { RootState } from '@/app/store';
|
import { RootState } from '@/app/store';
|
||||||
import { IProjectTask } from '@/types/project/projectTasksViewModel.types';
|
import { IProjectTask } from '@/types/project/projectTasksViewModel.types';
|
||||||
import { ITaskLabel } from '@/types/tasks/taskLabel.types';
|
import { ITaskLabel } from '@/types/tasks/taskLabel.types';
|
||||||
@@ -26,6 +27,7 @@ const LabelsSelector: React.FC<LabelsSelectorProps> = ({ task, isDarkMode = fals
|
|||||||
const { labels } = useSelector((state: RootState) => state.taskLabelsReducer);
|
const { labels } = useSelector((state: RootState) => state.taskLabelsReducer);
|
||||||
const currentSession = useAuthService().getCurrentSession();
|
const currentSession = useAuthService().getCurrentSession();
|
||||||
const { socket } = useSocket();
|
const { socket } = useSocket();
|
||||||
|
const { t } = useTranslation('task-list-table');
|
||||||
|
|
||||||
const filteredLabels = useMemo(() => {
|
const filteredLabels = useMemo(() => {
|
||||||
return (
|
return (
|
||||||
@@ -203,7 +205,7 @@ const LabelsSelector: React.FC<LabelsSelectorProps> = ({ task, isDarkMode = fals
|
|||||||
value={searchQuery}
|
value={searchQuery}
|
||||||
onChange={e => setSearchQuery(e.target.value)}
|
onChange={e => setSearchQuery(e.target.value)}
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
placeholder="Search labels..."
|
placeholder={t('searchLabelsPlaceholder')}
|
||||||
className={`
|
className={`
|
||||||
w-full px-2 py-1 text-xs rounded border
|
w-full px-2 py-1 text-xs rounded border
|
||||||
${
|
${
|
||||||
@@ -257,7 +259,7 @@ const LabelsSelector: React.FC<LabelsSelectorProps> = ({ task, isDarkMode = fals
|
|||||||
<div
|
<div
|
||||||
className={`p-4 text-center ${isDarkMode ? 'text-gray-400' : 'text-gray-500'}`}
|
className={`p-4 text-center ${isDarkMode ? 'text-gray-400' : 'text-gray-500'}`}
|
||||||
>
|
>
|
||||||
<div className="text-xs">No labels found</div>
|
<div className="text-xs">{t('noLabelsFound')}</div>
|
||||||
{searchQuery.trim() && (
|
{searchQuery.trim() && (
|
||||||
<button
|
<button
|
||||||
onClick={handleCreateLabel}
|
onClick={handleCreateLabel}
|
||||||
@@ -270,7 +272,7 @@ const LabelsSelector: React.FC<LabelsSelectorProps> = ({ task, isDarkMode = fals
|
|||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
Create "{searchQuery}"
|
{t('createLabelButton', { name: searchQuery.trim() })}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -279,20 +281,10 @@ const LabelsSelector: React.FC<LabelsSelectorProps> = ({ task, isDarkMode = fals
|
|||||||
|
|
||||||
{/* Footer */}
|
{/* Footer */}
|
||||||
<div className={`p-2 border-t ${isDarkMode ? 'border-gray-600' : 'border-gray-200'}`}>
|
<div className={`p-2 border-t ${isDarkMode ? 'border-gray-600' : 'border-gray-200'}`}>
|
||||||
<button
|
<div className={`flex items-center justify-center gap-1 px-2 py-1 text-xs ${isDarkMode ? 'text-gray-400' : 'text-gray-500'}`}>
|
||||||
className={`
|
|
||||||
w-full flex items-center justify-center gap-1 px-2 py-1 text-xs rounded
|
|
||||||
transition-colors
|
|
||||||
${isDarkMode ? 'text-blue-400 hover:bg-gray-700' : 'text-blue-600 hover:bg-blue-50'}
|
|
||||||
`}
|
|
||||||
onClick={() => {
|
|
||||||
// TODO: Implement manage labels functionality
|
|
||||||
console.log('Manage labels clicked');
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<TagOutlined />
|
<TagOutlined />
|
||||||
Manage labels
|
{t('manageLabelsPath')}
|
||||||
</button>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>,
|
</div>,
|
||||||
document.body
|
document.body
|
||||||
|
|||||||
Reference in New Issue
Block a user