Skip to content

feat(locale): add Turkmen parity - #1781

Merged
clairernovotny merged 6 commits into
mainfrom
feat-tk
May 16, 2026
Merged

feat(locale): add Turkmen parity#1781
clairernovotny merged 6 commits into
mainfrom
feat-tk

Conversation

@clairernovotny

Copy link
Copy Markdown
Member

Summary

  • Add full Turkmen (tk) locale YAML parity across list, formatter/phrases, number words/parsing, ordinals, date/date-only, clock, compass, and calendar month surfaces.
  • Add Turkmen locale exact-output tests and matrix/sweep coverage.
  • Keep locale parity artifact local at artifacts/2026-05-16-tk-parity-map.md (not committed).

Validation

  • dotnet test tests/Humanizer.SourceGenerators.Tests/Humanizer.SourceGenerators.Tests.csproj --framework net10.0
  • dotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net10.0
  • dotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net8.0
  • dotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net11.0
  • dotnet pack src/Humanizer/Humanizer.csproj -c Release -o artifacts/locale-parity-validation
  • dotnet format Humanizer.slnx --verify-no-changes --verbosity minimal

Copilot AI review requested due to automatic review settings May 16, 2026 19:51
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added a complete Turkmen (tk) locale YAML, a parity test suite validating Turkmen outputs, and inserted Turkmen rows into existing localization TheoryData across ordinals, numbers, durations, phrases, clock notation, compass labels, and byte-size formats.

Changes

Turkmen Locale Support

Layer / File(s) Summary
Turkmen locale definition
src/Humanizer/Locales/tk.yml
Complete YAML locale configuration defining relative dates (past/future from milliseconds through years), duration templates, number-to-words with harmony rules (units, tens, scales), ordinal suffix generation, date/time/clock patterns, compass directions (full and abbreviated), and calendar month names.
Turkmen locale parity test suite
tests/Humanizer.Tests/Localisation/tk/TurkmenLocaleParityTests.cs
Comprehensive test class with shared Turkmen culture constants and parameterized tests validating conjunction-style list joining, relative date phrasing, timespan humanization (single and multi-unit), number-to-words/ordinals conversion, word-to-number parsing, ordinal suffix generation, date-to-ordinal-word patterns, clock notation (exact and rounded), byte-size naming/formatting, and compass heading labels.
Locale test data coverage matrices
tests/Humanizer.Tests/Localisation/LocaleCoverageData.cs, LocaleFormatterExactTheoryData.cs, LocaleNumberTheoryData.cs, LocaleNumberMagnitudeTheoryData.cs, LocaleNumberOverloadTheoryData.cs, LocaleOrdinalizerMatrixData.cs, LocalePhraseTheoryData.cs
Extended TheoryData datasets across multiple test files with Turkmen entries for date ordinal word patterns, clock notation formatting (exact and rounded), relative date phrases, collection formatter conjunctions, cardinal/ordinal number conversions and parsing, magnitude/high-range cases, grammatical gender and word-form variations, ordinalizer matrix permutations, timespan humanization phrases including precision/edge cases, and byte-size/full-word representations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Humanizr/Humanizer#1753: Adds locale entries to the same localization test matrices (structurally similar test-data updates for another locale).
  • Humanizr/Humanizer#1770: Extends the same TheoryData datasets with locale-specific expected rows for a different culture.
  • Humanizr/Humanizer#1782: Updates localization test fixtures by adding locale-specific expected rows for formatting/parsing features.

Poem

🐰 A Turkmen tune hops into place,
YAML blossoms, tests join the race,
Dates and ordinals neatly sing,
Clocks and bytes and compass bring,
The rabbit stamps a happy trace!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(locale): add Turkmen parity' accurately summarizes the main change: adding full Turkmen locale support across multiple surfaces.
Description check ✅ Passed The description provides clear context about adding Turkmen locale parity, validation steps, and test coverage across multiple surfaces, all directly related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-tk

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8daed91365

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Humanizer/Locales/tk.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Turkmen (tk) locale support via YAML-backed localization data and expands locale parity/matrix tests to cover Turkmen formatting, numbers, ordinals, dates, clock, compass, and collection behavior.

Changes:

  • Added src/Humanizer/Locales/tk.yml with Turkmen locale surfaces.
  • Added Turkmen-specific parity tests.
  • Added tk rows across shared locale theory/matrix data.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Humanizer/Locales/tk.yml Defines Turkmen locale data for formatter, phrases, numbers, parsing, ordinals, clock, compass, and calendar months.
tests/Humanizer.Tests/Localisation/tk/TurkmenLocaleParityTests.cs Adds exact-output Turkmen locale parity tests.
tests/Humanizer.Tests/Localisation/LocalePhraseTheoryData.cs Adds Turkmen phrase/time span rows.
tests/Humanizer.Tests/Localisation/LocaleOrdinalizerMatrixData.cs Adds Turkmen ordinalizer matrix rows.
tests/Humanizer.Tests/Localisation/LocaleNumberTheoryData.cs Adds Turkmen number, ordinal, tuple, and parsing theory rows.
tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs Adds Turkmen long-number overload rows.
tests/Humanizer.Tests/Localisation/LocaleNumberMagnitudeTheoryData.cs Adds Turkmen magnitude/high-range number rows.
tests/Humanizer.Tests/Localisation/LocaleFormatterExactTheoryData.cs Adds Turkmen exact formatter, byte size, list, and heading rows.
tests/Humanizer.Tests/Localisation/LocaleCoverageData.cs Adds Turkmen rows required by shared locale coverage tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Humanizer/Locales/tk.yml
Comment thread tests/Humanizer.Tests/Localisation/tk/TurkmenLocaleParityTests.cs
Copilot AI review requested due to automatic review settings May 16, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread src/Humanizer/Locales/tk.yml
Comment thread src/Humanizer/Locales/tk.yml
Comment thread tests/Humanizer.Tests/Localisation/tk/TurkmenLocaleParityTests.cs
Copilot AI review requested due to automatic review settings May 16, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread src/Humanizer/Locales/tk.yml
Comment thread src/Humanizer/Locales/tk.yml
Copilot AI review requested due to automatic review settings May 16, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread src/Humanizer/Locales/tk.yml
Comment thread src/Humanizer/Locales/tk.yml
@clairernovotny
clairernovotny merged commit 3fefb37 into main May 16, 2026
8 checks passed
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