Skip to content

I18n: Properly support pluralization#1641

Merged
benjaminshafii merged 2 commits intodifferent-ai:devfrom
johnnyshields:i18n-plurals
May 4, 2026
Merged

I18n: Properly support pluralization#1641
benjaminshafii merged 2 commits intodifferent-ai:devfrom
johnnyshields:i18n-plurals

Conversation

@johnnyshields
Copy link
Copy Markdown
Contributor

@johnnyshields johnnyshields commented May 4, 2026

This PR is based on #1639 and #1640

This PR adds support for pluralization following I18next conventions:

  • Use the {count} interpolation key AND
  • the suffixes _one, _other, etc. in the key name

It also adds an audit check to the CI that plurals are used properly.

Pluralization logic is provided by Javascript's Intl.PluralRules API, which itself is based on CLDR data.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 May 4, 2026 9:09pm

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 4, 2026

@johnnyshields is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@johnnyshields johnnyshields changed the title I18n: Properly supoort pluralization I18n: Properly support pluralization May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

The following comment was made by an LLM, it may be inaccurate:

…rted via the {count} interpolation key plus the suffixes _one, _other, etc. following the same conventions as I18next (without actually using I18next)
@benjaminshafii benjaminshafii merged commit 1b0c439 into different-ai:dev May 4, 2026
9 of 14 checks passed
@johnnyshields johnnyshields deleted the i18n-plurals branch May 5, 2026 03:25
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.

2 participants