diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 26fae4461b..75a4223469 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -1475,6 +1475,7 @@ "turn_on_link_sharing": "", "unarchive": "", "uncategorized": "", + "uncategorized_projects": "", "unconfirmed": "", "undelete": "", "undeleting": "", diff --git a/services/web/frontend/js/features/project-list/components/dropdown/projects-dropdown.tsx b/services/web/frontend/js/features/project-list/components/dropdown/projects-dropdown.tsx index 44eabff699..6da86e69cb 100644 --- a/services/web/frontend/js/features/project-list/components/dropdown/projects-dropdown.tsx +++ b/services/web/frontend/js/features/project-list/components/dropdown/projects-dropdown.tsx @@ -61,7 +61,7 @@ function ProjectsDropdown() { } if (selectedTagId === UNCATEGORIZED_KEY) { - setTitle(t('uncategorized')) + setTitle(t('uncategorized_projects')) } else { const tag = tags.find(({ _id: id }) => id === selectedTagId) diff --git a/services/web/frontend/js/features/project-list/components/project-list-root.tsx b/services/web/frontend/js/features/project-list/components/project-list-root.tsx index 6648413670..9e5355a70f 100644 --- a/services/web/frontend/js/features/project-list/components/project-list-root.tsx +++ b/services/web/frontend/js/features/project-list/components/project-list-root.tsx @@ -103,6 +103,7 @@ function ProjectListPageContent() {
diff --git a/services/web/frontend/js/features/project-list/components/title/project-list-title.tsx b/services/web/frontend/js/features/project-list/components/title/project-list-title.tsx index 5facf67ce0..a553f0b681 100644 --- a/services/web/frontend/js/features/project-list/components/title/project-list-title.tsx +++ b/services/web/frontend/js/features/project-list/components/title/project-list-title.tsx @@ -1,21 +1,25 @@ import { useTranslation } from 'react-i18next' import classnames from 'classnames' import { Tag } from '../../../../../../app/src/Features/Tags/types' -import { Filter } from '../../context/project-list-context' +import { Filter, UNCATEGORIZED_KEY } from '../../context/project-list-context' function ProjectListTitle({ filter, selectedTag, + selectedTagId, className, }: { filter: Filter selectedTag: Tag | undefined + selectedTagId: string | undefined className?: string }) { const { t } = useTranslation() let message = t('projects') if (selectedTag) { message = `${selectedTag.name}` + } else if (selectedTagId === UNCATEGORIZED_KEY) { + message = t('uncategorized_projects') } else { switch (filter) { case 'all': diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 933b99e1ab..36ed1d798d 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -2085,6 +2085,7 @@ "unable_to_extract_the_supplied_zip_file": "Opening this content on Overleaf failed because the zip file could not be extracted. Please ensure that it is a valid zip file. If this keeps happening for links on a particular site, please report this to them.", "unarchive": "Restore", "uncategorized": "Uncategorized", + "uncategorized_projects": "Uncategorized Projects", "unconfirmed": "Unconfirmed", "undelete": "Undelete", "undeleting": "Undeleting", diff --git a/services/web/test/frontend/features/project-list/components/project-list-title.tsx b/services/web/test/frontend/features/project-list/components/project-list-title.tsx index 18d845174a..8e34c6ca0e 100644 --- a/services/web/test/frontend/features/project-list/components/project-list-title.tsx +++ b/services/web/test/frontend/features/project-list/components/project-list-title.tsx @@ -8,6 +8,7 @@ describe('', function () { filter: Filter selectedTag: Tag | undefined expectedText: string + selectedTagId: string | undefined } const testCases: Array = [ @@ -16,37 +17,50 @@ describe('', function () { filter: 'all', selectedTag: undefined, expectedText: 'all projects', + selectedTagId: undefined, }, { filter: 'owned', selectedTag: undefined, expectedText: 'your projects', + selectedTagId: undefined, }, { filter: 'shared', selectedTag: undefined, expectedText: 'shared with you', + selectedTagId: undefined, }, { filter: 'archived', selectedTag: undefined, expectedText: 'archived projects', + selectedTagId: undefined, }, { filter: 'trashed', selectedTag: undefined, expectedText: 'trashed projects', + selectedTagId: undefined, }, // Tags + { + filter: 'all', + selectedTag: undefined, + expectedText: 'uncategorized', + selectedTagId: 'uncategorized', + }, { filter: 'all', selectedTag: { _id: '', user_id: '', name: 'sometag' }, expectedText: 'sometag', + selectedTagId: '', }, { filter: 'shared', selectedTag: { _id: '', user_id: '', name: 'othertag' }, expectedText: 'othertag', + selectedTagId: '', }, ] @@ -56,6 +70,7 @@ describe('', function () { ) screen.getByText(new RegExp(testCase.expectedText, 'i'))