Skip to content

Add CLDR plural categories with a legacy translation path - #500

Draft
DirkDoes wants to merge 1 commit into
task/typed-settingsfrom
task/localization-plurals
Draft

DirkDoes wants to merge 1 commit into
task/typed-settingsfrom
task/localization-plurals

Conversation

@DirkDoes

@DirkDoes DirkDoes commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Purpose of this PR:

Keep global t() and add count-based category lookup for zero/one/two/few/many/other using CLDR cardinal rules for the selectable languages. Named count arguments and positional counts are supported; fallback recomputes the English plural category.

Add t_legacy() for exact numeric/.n variants and move the current numeric-key callers, including tTime(), to it. Imported production YAML is unchanged. Test-only embedded translations exercise the new categories.

Based on #499. Merge after the lower settings layers; works without live localization.

How to Test:

dotnet test WheelWizard.sln

580 tests passed (561 unit, 19 headless UI), including decimal counts, language-specific rules, English fallback, named/positional calls, and legacy behavior.

What Has Been Changed:

See the focused implementation above. The existing settings JSON contract and imported translation sheets are preserved.

Related Issue Link:

No linked issue. Part of native GitHub stack #503.

Checklist before merging

  • You have created relevant tests

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DirkDoes
DirkDoes added this pull request to stack #503 September 28, 2026 21:03
@DirkDoes DirkDoes changed the title Add cardinal plural categories and preserve legacy translations Add CLDR plural categories with a legacy translation path Sep 28, 2026

This branch has not been deployed

No deployments
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