Skip to content

fix(i18n): use a correct plural key for provider-grid's more-providers label - #5477

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/provider-grid-pt-br-plural-w4
Jul 31, 2026
Merged

fix(i18n): use a correct plural key for provider-grid's more-providers label#5477
pedrofrxncx merged 1 commit into
mainfrom
fix/provider-grid-pt-br-plural-w4

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Follows the recent i18n refactor hardening pass in apps/web/src/i18n — found while auditing task-board/library/settings dictionaries for count-based interpolation bugs (assignee-picker and org-connect are already covered by open PRs #5170 / #5382, so this fix targets a different file).

The bug: settings.aiProviders.moreProviders used a single {plural} placeholder filled in JS with a hardcoded English suffix — plural: hiddenCount === 1 ? "" : "s". For the pt-br dictionary entry "{count} provedor{plural} adicional", passing "s" renders "provedors" — not a real Portuguese word — and also leaves the adjective "adicional" un-pluralized (should be "adicionais"). A Portuguese-speaking user with more than one hidden AI provider sees broken grammar in Settings → AI Providers.

The fix: replaced the single interpolated key with explicit moreProvidersSingular/moreProvidersPlural keys (mirroring the pattern already used elsewhere, e.g. content-browser.tsx's singular/plural ternaries), so each locale's dictionary owns its own correct singular and plural wording instead of assuming an English "append s" rule. pt-br now reads "{count} provedores adicionais" for the plural case.

To confirm: open Settings → AI Providers with more than one hidden/collapsed provider tile while the org language is set to Portuguese (Brazil) — the "show more" row should read "N provedores adicionais", not "N provedors adicional".

Checks run locally: bun run fmt (clean), bunx tsc --noEmit in apps/web (passes — the pt-br dictionary's satisfies Record<keyof typeof settingsEn, string> constraint also catches any key-parity drift at compile time). Full CI runs the broader suite.


Summary by cubic

Fixes pluralization for the "more providers" label in Settings → AI Providers by replacing a hardcoded English suffix with proper singular/plural i18n keys. Portuguese (Brazil) now shows correct grammar.

  • Bug Fixes
    • Added settings.aiProviders.moreProvidersSingular and settings.aiProviders.moreProvidersPlural to en and pt-br dictionaries.
    • Updated the provider grid to select the correct key based on hiddenCount and pass {count} only.

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

Review in cubic

…s label

The English-only {plural} interpolation appended a hardcoded "s" suffix,
producing the non-word "provedors" in Portuguese (and dropping adjective
agreement: "adicional" instead of "adicionais"). Split into explicit
singular/plural keys per locale instead.
@pedrofrxncx
pedrofrxncx merged commit 95be353 into main Jul 31, 2026
23 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/provider-grid-pt-br-plural-w4 branch July 31, 2026 01:59
decocms Bot pushed a commit that referenced this pull request Jul 31, 2026
PR: #5477 fix(i18n): use a correct plural key for provider-grid's more-providers label
Bump type: patch

- decocms (apps/api/package.json): 4.150.22 -> 4.150.23
- @decocms/native (apps/native/package.json): 4.150.22 -> 4.150.23

Deploy-Scope: web
pedrofrxncx added a commit that referenced this pull request Jul 31, 2026
…eys (#5479)

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