Skip to content

Commit

Permalink
fix(INTERNAL-1191): fix translations in filters panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrin-kudryash committed Oct 29, 2024
1 parent 08dd991 commit 07d482b
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 42 deletions.
102 changes: 67 additions & 35 deletions cypress/fixtures/langs.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
"ru": "Заголовок критерия",
"en": ""
},
"Place link here": {
"ru": "Ссылка на задачу или ее название или ключ",
"en": "Insert task link or type title or jira task key"
},
"Simple": {
"ru": "Критерий",
"en": "Todo"
Expand All @@ -124,6 +128,10 @@
"ru": "Цель",
"en": ""
},
"Jira task": {
"ru": "Задача из Jira",
"en": "Jira task"
},
"Add weight": {
"ru": "Добавить вес",
"en": ""
Expand Down Expand Up @@ -338,9 +346,9 @@
"ru": "Автор",
"en": "Issuer"
},
"Owner": {
"Assignee": {
"ru": "Ответственный",
"en": "Owner"
"en": ""
},
"Participant": {
"ru": "Участник",
Expand All @@ -354,9 +362,13 @@
"ru": "Группировка",
"en": "Grouping"
},
"Sort": {
"ru": "Сортировка",
"en": "Sort"
"Goals sort": {
"ru": "Сортировка целей",
"en": "Goals sort"
},
"Projects sort": {
"ru": "Сортировка проектов",
"en": "Projects sort"
},
"Visibility": {
"ru": "Видимость",
Expand All @@ -365,6 +377,10 @@
"Criteria": {
"ru": "Критерии",
"en": "Criteria"
},
"Empty Projects": {
"ru": "Пустые Проекты",
"en": "Empty Projects"
}
},
"FlowDropdown": {
Expand Down Expand Up @@ -478,6 +494,10 @@
"ru": "Создать, как цель",
"en": "Create as goal"
},
"Check the task status": {
"ru": "Проверить статус задачи",
"en": "Check the task status"
},
"Delete": {
"ru": "Удалить",
"en": "Delete"
Expand Down Expand Up @@ -776,14 +796,14 @@
"ru": "партнерский проект",
"en": ""
},
"goal as criteria": {
"ru": "цель",
"en": "goal"
},
"marked criteria": {
"ru": "отметил(а) критерий",
"en": ""
},
"goal as criteria": {
"ru": "цель",
"en": "goal"
},
"goal complete": {
"ru": "выполнил(а) цель",
"en": "completed goal"
Expand All @@ -792,6 +812,18 @@
"ru": "вернул(а) цель в работу",
"en": "returns goal to work"
},
"task as criteria": {
"ru": "задачу",
"en": "task"
},
"task complete": {
"ru": "выполнил(а) задачу",
"en": "completed task"
},
"task in progress": {
"ru": "вернул(а) задачу в работу",
"en": "returns task to work"
},
"as criteria": {
"ru": "как критерий",
"en": ""
Expand Down Expand Up @@ -861,7 +893,7 @@
},
"Loader": {
"Loading ...": {
"ru": "",
"ru": "Загрузка...",
"en": ""
}
},
Expand Down Expand Up @@ -1061,18 +1093,6 @@
"en": "Create"
}
},
"ProjectGoalList": {
"Loading ...": {
"ru": "Загрузка...",
"en": "Loading ..."
}
},
"ProjectListItemConnected": {
"Loading ...": {
"ru": "Загрузка ...",
"en": "Loading ..."
}
},
"ProjectPage": {
"title": {
"ru": "Taskany — {project}",
Expand Down Expand Up @@ -1302,10 +1322,26 @@
"ru": "Название",
"en": "Title"
},
"Owner": {
"ru": "Ответственный",
"en": "Owner"
},
"UpdatedAt": {
"ru": "Обновлено",
"en": "Updated"
},
"CreatedAt": {
"ru": "Создано",
"en": "Created"
},
"State": {
"ru": "Статус",
"en": "State"
},
"Activity": {
"ru": "Автор",
"en": "Activity"
},
"Priority": {
"ru": "Приоритет",
"en": "Priority"
Expand All @@ -1314,21 +1350,17 @@
"ru": "Проект",
"en": "Project"
},
"Activity": {
"ru": "Автор",
"en": "Activity"
},
"Owner": {
"ru": "Ответственный",
"en": "Owner"
"Stargizers": {
"ru": "В избранном",
"en": "Stargizers"
},
"UpdatedAt": {
"ru": "Обновлено",
"en": "Updated"
"Watchers": {
"ru": "Отслеживается",
"en": "Watchers"
},
"CreatedAt": {
"ru": "Создано",
"en": "Created"
"Goals": {
"ru": "Цели",
"en": "Goals"
}
},
"StarButton": {
Expand Down
5 changes: 3 additions & 2 deletions src/components/FiltersPanel/FiltersPanel.i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"Priority": "Priority",
"State": "State",
"Owner": "Owner",
"Project": "Project",
"Tag": "Tag",
"Estimate": "Estimate",
Expand All @@ -16,5 +15,7 @@
"Grouping": "Grouping",
"Visibility": "Visibility",
"Criteria": "Criteria",
"Empty Projects": "Empty Projects"
"Empty Projects": "Empty Projects",
"Assignee": "",
"Owner": ""
}
4 changes: 2 additions & 2 deletions src/components/FiltersPanel/FiltersPanel.i18n/ru.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"Priority": "Приоритет",
"State": "Статус",
"Owner": "Ответственный",
"Project": "Проект",
"Tag": "Тег",
"Estimate": "Срок",
Expand All @@ -16,5 +15,6 @@
"Grouping": "Группировка",
"Visibility": "Видимость",
"Criteria": "Критерии",
"Empty Projects": "Пустые Проекты"
"Empty Projects": "Пустые Проекты",
"Assignee": "Ответственный"
}
10 changes: 7 additions & 3 deletions src/components/FiltersPanel/FiltersPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { AppliedUsersFilter } from '../AppliedUsersFilter/AppliedUsersFilter';
import { PageUserMenu } from '../PageUserMenu';
import { AppliedTagFilter } from '../AppliedTagFilter/AppliedTagFilter';
import { SortList } from '../SortList/SortList';
import { useLocale } from '../../hooks/useLocale';

import { tr } from './FiltersPanel.i18n';

Expand Down Expand Up @@ -75,6 +76,7 @@ export const FiltersPanel: FC<{
}) => {
const { toggleFilterStar } = useFilterResource();
const { user } = usePageContext();
const locale = useLocale();

const {
currentPreset,
Expand Down Expand Up @@ -188,15 +190,17 @@ export const FiltersPanel: FC<{
{ id: 'project', title: tr('Project') },
{ id: 'tag', title: tr('Tag') },
{ id: 'issuer', title: tr('Issuer') },
{ id: 'owner', title: tr('Owner') },
{ id: 'owner', title: tr('Assignee') },
{ id: 'participant', title: tr('Participant') },
];
}, []);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [locale]);

const restFilterItems = useMemo(() => {
if (filterQuery && filterQuery.stateType) {
filterQuery.state = [];
}

return filterItems.filter(({ id }) => !filterQuery?.[id]);
}, [filterQuery, filterItems]);

Expand Down Expand Up @@ -369,7 +373,7 @@ export const FiltersPanel: FC<{
))}
{nullable(Boolean(filterQuery?.owner), () => (
<AppliedUsersFilter
label={tr('Owner')}
label={tr('Assignee')}
value={filterQuery?.owner}
onChange={handleChange('owner')}
onClose={onApplyClick}
Expand Down

0 comments on commit 07d482b

Please sign in to comment.