fix(settings): split secrets-count i18n string into singular/plural keys - #5479
Merged
Conversation
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
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.
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.secretsCountin 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
secretsCountintosecretsCountSingular/secretsCountPluralkeys (en + pt-br), matching the exact pattern #5477 used formoreProviders, and switchsecrets.tsx's call site to pick the key by count instead of interpolating{plural}.Verify:
bunx tsc --noEmitinapps/web(confirmssatisfies Record<keyof typeof settingsEn, string>still holds for pt-br) — ran locally, green.bun run fmtran 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.secretsCountintosettings.secrets.secretsCountSingularandsettings.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.