diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json
index 4014f9ccdb..486893f3b6 100644
--- a/services/web/frontend/extracted-translations.json
+++ b/services/web/frontend/extracted-translations.json
@@ -1293,6 +1293,7 @@
"no_messages_yet": "",
"no_new_commits_in_github": "",
"no_one_has_commented_or_left_any_suggestions_yet": "",
+ "no_one_invited_yet": "",
"no_one_sharing_link_is_disabled": "",
"no_other_projects_found": "",
"no_pdf_error_explanation": "",
diff --git a/services/web/frontend/js/features/share-project-modal/components/project-access.tsx b/services/web/frontend/js/features/share-project-modal/components/project-access.tsx
index 847663bbf6..611954cb6b 100644
--- a/services/web/frontend/js/features/share-project-modal/components/project-access.tsx
+++ b/services/web/frontend/js/features/share-project-modal/components/project-access.tsx
@@ -167,7 +167,9 @@ function ProjectAccess({
- {t('x_people_invited', { count: invitedPeopleCount })}
+ {invitedPeopleCount > 1
+ ? t('x_people_invited', { count: invitedPeopleCount })
+ : t('no_one_invited_yet')}
', function () {
await screen.findByText('Anyone in your group with the link')
})
+ describe('invited people count', function () {
+ beforeEach(function () {
+ fetchMock.get(
+ `/project/${shareModalProjectDefaults._id}/sharing-link`,
+ 404
+ )
+ })
+
+ it('shows "No one invited yet" when the owner is the only person', async function () {
+ renderWithEditorContext(
+ ,
+ createContextProps({ publicAccessLevel: 'private' })
+ )
+
+ await screen.findByText('No one invited yet')
+ expect(screen.queryByText('1 person invited')).to.be.null
+ })
+
+ it('shows the invited people count, including the owner, when there are collaborators', async function () {
+ const members: ProjectMember[] = [
+ {
+ _id: 'member-author' as UserId,
+ email: 'member-author@example.com',
+ privileges: 'readAndWrite',
+ first_name: 'Member',
+ last_name: 'Author',
+ },
+ {
+ _id: 'member-viewer' as UserId,
+ email: 'member-viewer@example.com',
+ privileges: 'readOnly',
+ first_name: 'Member',
+ last_name: 'Viewer',
+ },
+ ]
+
+ renderWithEditorContext(
+ ,
+ createContextProps({ publicAccessLevel: 'private', members })
+ )
+
+ await screen.findByText('3 people invited')
+ expect(screen.queryByText('No one invited yet')).to.be.null
+ })
+ })
+
describe('copy link button', function () {
let clipboardWriteTextStub: sinon.SinonStub