Skip to content

fix(settings): split secrets-count i18n string into singular/plural keys - #5479

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/secrets-count-plural-w4
Jul 31, 2026
Merged

fix(settings): split secrets-count i18n string into singular/plural keys#5479
pedrofrxncx merged 1 commit into
mainfrom
fix/secrets-count-plural-w4

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Follows #5477 hardening — the just-merged fix replaced provider-grid.tsx's {count} more provider{plural} English-suffix pattern because it breaks pt-br grammar; settings.secrets.secretsCount in secrets.tsx has the identical bug that PR missed.

Why a maintainer wants it: pt-br's template was "{count} segredo{plural} armazenado" — appending {plural} only pluralizes the English word "secret"/"segredo", it never pluralizes "armazenado" (Portuguese past participle), so with 2+ secrets the UI reads the grammatically broken "2 segredos armazenado" instead of "2 segredos armazenados".

Fix: split secretsCount into secretsCountSingular/secretsCountPlural keys (en + pt-br), matching the exact pattern #5477 used for moreProviders, and switch secrets.tsx's call site to pick the key by count instead of interpolating {plural}.

Verify: bunx tsc --noEmit in apps/web (confirms satisfies Record<keyof typeof settingsEn, string> still holds for pt-br) — ran locally, green. bun run fmt ran clean. No behavior/logic change beyond the string keys, so no new test needed; full CI (bun run check/lint) validates the rest.

Reviewer check: open Settings → Secrets with 2+ secrets under a pt-br locale and confirm the count line reads "segredos armazenados" (plural on both words).


Summary by cubic

Fixes Secrets count pluralization by splitting settings.secrets.secretsCount into settings.secrets.secretsCountSingular and settings.secrets.secretsCountPlural, and updating the call site to choose by count. This removes the {plural} suffix hack, fixing pt-br grammar (“segredos armazenados”) while keeping en correct.

Written for commit 8a04b26. Summary will update on new commits.

Review in cubic

The single "{count} secret{plural} stored" template only appends an English
"s" to the count word, so pt-br's "{count} segredo{plural} armazenado" never
pluralizes "armazenado" (should be "armazenados") when count > 1 — same bug
class just fixed in provider-grid.tsx (#5477). Split into
secretsCountSingular/secretsCountPlural per-locale keys instead.
@pedrofrxncx
pedrofrxncx merged commit 6bf01d2 into main Jul 31, 2026
23 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/secrets-count-plural-w4 branch July 31, 2026 02:49
pedrofrxncx added a commit that referenced this pull request Jul 31, 2026
…5487)

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.
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