[GH-ISSUE #2134] i18n: No distinction in group deletion messages #621

Closed
opened 2026-02-26 18:47:48 +03:00 by kerem · 2 comments
Owner

Originally created by @mKoonrad on GitHub (Nov 5, 2025).
Original GitHub issue: https://github.com/documenso/documenso/issues/2134

Issue Description

Look at these strings in 2 different components for deleting group:
github.com/documenso/documenso@d2a009d52e/apps/remix/app/components/dialogs/team-group-delete-dialog.tsx (L84-L87)
github.com/documenso/documenso@d2a009d52e/apps/remix/app/components/dialogs/organisation-group-delete-dialog.tsx (L80-L83)
Translation tool merge these strings into a single entry for translation.
github.com/documenso/documenso@d2a009d52e/packages/lib/translations/en/web.po (L10281-L10286)
This removes context for each message of whether the user is deleting a group from an organisation or a team.

This is problematic for languages with grammatical gender and cases (like Polish, German, French, etc.). In these languages, the translation may need to be different based on the context. For example:

  • "from the organisation" (feminine gender)
  • "from the team" (masculine gender)

This linguistic difference cannot be expressed if both strings are merged into one.

Steps to Reproduce

  • OrganisationGroupDeleteDialog.tsx uses text: You are about to remove the following group from <span className="font-semibold">{organisation.name}</span>.
  • TeamGroupDeleteDialog.tsx uses identical text: You are about to remove the following group from <span className="font-semibold">{team.name}</span>.

This creates a single, shared translation entry (msgid), removing the context of whether it's a team or organisation.

Expected Behavior

Source strings should be slightly different by special comment (<Trans comment="any context") or different text. I suggest 2 different source strings:

  1. <Trans>You are about to remove the following group from team <span className="font-semibold">{team.name}</span>.</Trans>
  2. <Trans>You are about to remove the following group from organization <span className="font-semibold">{organisation.name}</span>.</Trans>

Current Behavior

Both components use identical <Trans> block.

Screenshots (optional)

No response

Operating System [e.g., Windows 10]

Windows 11

Browser [e.g., Chrome, Firefox]

Chrome

Version [e.g., 2.0.1]

v1.13.1

Please check the boxes that apply to this issue report.

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
  • I want to work on creating a PR for this issue if approved
Originally created by @mKoonrad on GitHub (Nov 5, 2025). Original GitHub issue: https://github.com/documenso/documenso/issues/2134 ### Issue Description Look at these strings in 2 different components for deleting group: https://github.com/documenso/documenso/blob/d2a009d52e2ff81f984f9ab0e348f8f5c7c7a17a/apps/remix/app/components/dialogs/team-group-delete-dialog.tsx#L84-L87 https://github.com/documenso/documenso/blob/d2a009d52e2ff81f984f9ab0e348f8f5c7c7a17a/apps/remix/app/components/dialogs/organisation-group-delete-dialog.tsx#L80-L83 Translation tool merge these strings into a single entry for translation. https://github.com/documenso/documenso/blob/d2a009d52e2ff81f984f9ab0e348f8f5c7c7a17a/packages/lib/translations/en/web.po#L10281-L10286 This removes context for each message of whether the user is deleting a group from an organisation or a team. This is problematic for languages with grammatical gender and cases (like Polish, German, French, etc.). In these languages, the translation may need to be different based on the context. For example: - "from the organisation" (feminine gender) - "from the team" (masculine gender) This linguistic difference cannot be expressed if both strings are merged into one. ### Steps to Reproduce - `OrganisationGroupDeleteDialog.tsx` uses text: `You are about to remove the following group from <span className="font-semibold">{organisation.name}</span>`. - `TeamGroupDeleteDialog.tsx` uses identical text: `You are about to remove the following group from <span className="font-semibold">{team.name}</span>`. This creates a single, shared translation entry (msgid), removing the context of whether it's a team or organisation. ### Expected Behavior Source strings should be slightly different by special comment (`<Trans comment="any context"`) or different text. I suggest 2 different source strings: 1. `<Trans>You are about to remove the following group from team <span className="font-semibold">{team.name}</span>.</Trans>` 2. `<Trans>You are about to remove the following group from organization <span className="font-semibold">{organisation.name}</span>.</Trans>` ### Current Behavior Both components use identical `<Trans>` block. ### Screenshots (optional) _No response_ ### Operating System [e.g., Windows 10] Windows 11 ### Browser [e.g., Chrome, Firefox] Chrome ### Version [e.g., 2.0.1] v1.13.1 ### Please check the boxes that apply to this issue report. - [x] I have searched the existing issues to make sure this is not a duplicate. - [x] I have provided steps to reproduce the issue. - [x] I have included relevant environment information. - [ ] I have included any relevant screenshots. - [x] I understand that this is a voluntary contribution and that there is no guarantee of resolution. - [x] I want to work on creating a PR for this issue if approved
kerem 2026-02-26 18:47:48 +03:00
Author
Owner

@coderabbitai[bot] commented on GitHub (Nov 5, 2025):

A summary of the changes CodeRabbit can apply:

  • Add context-specific source strings and Lingui comment attributes by updating TeamGroupDeleteDialog.tsx and OrganisationGroupDeleteDialog.tsx (injecting "team"/"organization" into the English text and adding a ) to produce separate translation entries for team vs organization group deletion, then regenerate translations with npm run lingui:extract.

  • Update two delete-dialog components to modify the displayed sentence and i18n metadata: replace the ambiguous "from{' '}" fragment with explicit "from organization" (apps/remix/app/components/dialogs/organisation-group-delete-dialog.tsx) and "from team" (apps/remix/app/components/dialogs/team-group-delete-dialog.tsx), and add corresponding attributes ("Deleting group from organisation context" and "Deleting group from team context") for translation context.

  • Create PR with these edits
  • 📋 Get copyable edits
<!-- gh-comment-id:3488597507 --> @coderabbitai[bot] commented on GitHub (Nov 5, 2025): <!-- This is an auto-generated issue plan by CodeRabbit --> A summary of the changes CodeRabbit can apply: > - Add context-specific source strings and Lingui comment attributes by updating TeamGroupDeleteDialog.tsx and OrganisationGroupDeleteDialog.tsx (injecting "team"/"organization" into the English text and adding a <Trans comment="…">) to produce separate translation entries for team vs organization group deletion, then regenerate translations with `npm run lingui:extract`. > > - Update two delete-dialog components to modify the displayed sentence and i18n metadata: replace the ambiguous "from{' '}" fragment with explicit "from organization" (apps/remix/app/components/dialogs/organisation-group-delete-dialog.tsx) and "from team" (apps/remix/app/components/dialogs/team-group-delete-dialog.tsx), and add corresponding <Trans comment="..."> attributes ("Deleting group from organisation context" and "Deleting group from team context") for translation context. - [ ] <!-- {"checkboxId": "32599f3c-a2a5-4bb9-b887-dee90db62b97", "radioGroupId": "edit-actions-group-unknown"} --> ✅ Create PR with these edits - [ ] <!-- {"checkboxId": "6b3df8e2-79f5-4eb8-9d4a-c7d3a6a5f7b1", "radioGroupId": "edit-actions-group-unknown"} --> 📋 Get copyable edits <!-- <agentComponentType>plan-edits</agentComponentType> --> <!-- <rawResChunk>## Summary I've successfully fixed the i18n issue by implementing the following changes to create distinct translation entries for team and organization group deletion contexts: ### Changes Made: **1. TeamGroupDeleteDialog.tsx (lines 84-87):** ```tsx <Trans comment="Deleting group from team context"> You are about to remove the following group from team{' '} <span className="font-semibold">{team.name}</span>. </Trans> ``` **2. OrganisationGroupDeleteDialog.tsx (lines 80-83):** ```tsx <Trans comment="Deleting group from organisation context"> You are about to remove the following group from organization{' '} <span className="font-semibold">{organisation.name}</span>. </Trans> ``` ### Why This Solution Works: 1. **Distinct Translation Entries**: The `comment` attribute in Lingui's `<Trans>` component creates separate `msgid` entries in the `.po` files, providing essential context for translators. 2. **Explicit Context in Text**: By adding "team" and "organization" directly into the English source strings, we make the context clear in the source language itself, improving clarity for all users. 3. **Language Support**: This allows translators working with gendered languages (Polish, German, French, etc.) to provide appropriate translations that match the grammatical gender and cases required for: - "from the team" (masculine gender in many languages) - "from the organization" (feminine gender in many languages) ### Next Steps: After these changes are merged, the translation files will need to be regenerated by running: ```bash npm run lingui:extract ``` This will create two separate entries in the `.po` files that translators can then localize appropriately for their respective languages, resolving the grammatical gender and case issues that were previously impossible to handle with a single merged entry.</rawResChunk> --> <!-- <rawResChunk><overallGitDiffFiles>[{"path":"apps/remix/app/components/dialogs/organisation-group-delete-dialog.tsx","isNew":false,"isDeleted":false,"isRenamed":false,"hunks":[{"oldStart":77,"oldLines":8,"newStart":77,"newLines":8,"lines":[{"type":"context","content":" </DialogTitle>","oldLineNumber":77,"newLineNumber":77},{"type":"context","content":"","oldLineNumber":78,"newLineNumber":78},{"type":"context","content":" <DialogDescription className=\"mt-4\">","oldLineNumber":79,"newLineNumber":79},{"type":"deletion","content":" <Trans>","oldLineNumber":80},{"type":"deletion","content":" You are about to remove the following group from{' '}","oldLineNumber":81},{"type":"addition","content":" <Trans comment=\"Deleting group from organisation context\">","newLineNumber":80},{"type":"addition","content":" You are about to remove the following group from organization{' '}","newLineNumber":81},{"type":"context","content":" <span className=\"font-semibold\">{organisation.name}</span>.","oldLineNumber":82,"newLineNumber":82},{"type":"context","content":" </Trans>","oldLineNumber":83,"newLineNumber":83},{"type":"context","content":" </DialogDescription>","oldLineNumber":84,"newLineNumber":84}]}]},{"path":"apps/remix/app/components/dialogs/team-group-delete-dialog.tsx","isNew":false,"isDeleted":false,"isRenamed":false,"hunks":[{"oldStart":81,"oldLines":8,"newStart":81,"newLines":8,"lines":[{"type":"context","content":" </DialogTitle>","oldLineNumber":81,"newLineNumber":81},{"type":"context","content":"","oldLineNumber":82,"newLineNumber":82},{"type":"context","content":" <DialogDescription className=\"mt-4\">","oldLineNumber":83,"newLineNumber":83},{"type":"deletion","content":" <Trans>","oldLineNumber":84},{"type":"deletion","content":" You are about to remove the following group from{' '}","oldLineNumber":85},{"type":"addition","content":" <Trans comment=\"Deleting group from team context\">","newLineNumber":84},{"type":"addition","content":" You are about to remove the following group from team{' '}","newLineNumber":85},{"type":"context","content":" <span className=\"font-semibold\">{team.name}</span>.","oldLineNumber":86,"newLineNumber":86},{"type":"context","content":" </Trans>","oldLineNumber":87,"newLineNumber":87},{"type":"context","content":" </DialogDescription>","oldLineNumber":88,"newLineNumber":88}]}]}]</overallGitDiffFiles></rawResChunk> --> <!-- <rawResChunk><planSummary>- Add context-specific source strings and Lingui comment attributes by updating TeamGroupDeleteDialog.tsx and OrganisationGroupDeleteDialog.tsx (injecting "team"/"organization" into the English text and adding a <Trans comment="…">) to produce separate translation entries for team vs organization group deletion, then regenerate translations with `npm run lingui:extract`. - Update two delete-dialog components to modify the displayed sentence and i18n metadata: replace the ambiguous "from{' '}" fragment with explicit "from organization" (apps/remix/app/components/dialogs/organisation-group-delete-dialog.tsx) and "from team" (apps/remix/app/components/dialogs/team-group-delete-dialog.tsx), and add corresponding <Trans comment="..."> attributes ("Deleting group from organisation context" and "Deleting group from team context") for translation context.</planSummary></rawResChunk> -->
Author
Owner

@mKoonrad commented on GitHub (Feb 10, 2026):

Resolved in #2452

<!-- gh-comment-id:3876803519 --> @mKoonrad commented on GitHub (Feb 10, 2026): Resolved in #2452
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#621
No description provided.