Skip to content

fix(orgs): use singular/plural i18n keys in the bulk-delete dialog - #5487

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/bulk-delete-dialog-plural-w1
Jul 31, 2026
Merged

fix(orgs): use singular/plural i18n keys in the bulk-delete dialog#5487
pedrofrxncx merged 1 commit into
mainfrom
fix/bulk-delete-dialog-plural-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

This tick's two merges (settings env-alias fallback #5483, chat latency prop removal #5482) turned out fully clean on re-inspection — resolve-config.ts's alias pairs all now use the safe resolveAliasedEnv helper, and common.tsx/generic.tsx have no leftover dead latency references. Widening the hunt to the same i18n plural-interpolation bug class fixed twice very recently in this area (#5477 provider-grid.tsx, #5479 secrets.tsx) turned up one more live instance.

orgs.bulkDeleteDialog.deleteButton/deleteDescription/deleteTitle build their pt-br strings as "conexão{plural}", where the caller (bulk-delete-dialog.tsx) always passes a hardcoded English plural: count !== 1 ? "s" : "". For count > 1 this renders "conexãos" instead of the correct pt-br plural "conexões" — an actual, visible grammar bug for any pt-br user bulk-deleting more than one connection.

Fix: replaced the three {plural}-templated keys with explicit Singular/Plural key pairs per locale (matching the pattern used in the #5479 fix), and updated the caller to select the key based on count === 1 instead of interpolating a suffix.

Failure scenario: a pt-br user selects 2+ connections and opens the bulk-delete dialog — before this fix, the dialog title/button/description read "Excluir 2 conexãos" (not a word) instead of "Excluir 2 conexões".

Reviewer check: cd apps/web && bunx tsc --noEmit (passes — pt-br/orgs.ts satisfies Record<keyof typeof en, string>, so a missing key would be a compile error), and manually open the org connections list, select 2+ connections, and trigger bulk delete with language set to pt-br.

Locally ran: bun run fmt, cd apps/web && bunx tsc --noEmit, bunx oxlint on the three changed files (all clean). No dedicated test exists for this component's i18n and none of the other required checks apply (no test file for this component); full CI covers the rest.


Summary by cubic

Fixes pluralization in the org connections bulk-delete dialog by replacing suffix interpolation with singular/plural i18n keys. This corrects pt-br text (e.g., “conexões”) and avoids similar plural errors.

  • Bug Fixes
    • Added ...Singular/...Plural keys for delete button, title, and description in en/orgs.ts and pt-br/orgs.ts.
    • Updated orgs/bulk-delete-dialog.tsx to select keys based on count === 1 and pass { count } only.
    • Removed the hardcoded English "s" suffix to produce correct pt-br grammar for counts > 1.

Written for commit 022f018. Summary will update on new commits.

Review in cubic

The English-only {plural} interpolation appended a hardcoded "s" suffix to
"connection", producing the non-word "conexãos" in pt-br (should be
"conexões") — the same bug class just fixed in provider-grid.tsx (#5477)
and secrets.tsx (#5479). Split deleteButton/deleteDescription/deleteTitle
into explicit Singular/Plural keys per locale instead.
@pedrofrxncx
pedrofrxncx enabled auto-merge (squash) July 31, 2026 03:45
@pedrofrxncx
pedrofrxncx merged commit 1804a98 into main Jul 31, 2026
23 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/bulk-delete-dialog-plural-w1 branch July 31, 2026 03:46
decocms Bot pushed a commit that referenced this pull request Jul 31, 2026
PR: #5487 fix(orgs): use singular/plural i18n keys in the bulk-delete dialog
Bump type: patch

- decocms (apps/api/package.json): 4.150.27 -> 4.150.28
- @decocms/native (apps/native/package.json): 4.150.27 -> 4.150.28

Deploy-Scope: web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant