Add Basque locale parity - #1778
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds full Basque ( ChangesBasque locale support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs (1)
7-8: ⚡ Quick winRemove redundant blank lines after Basque test entries.
The blank lines added after each
"eu"test case entry (lines 8, 262, 515, 768) don't follow the existing pattern in this file, where consecutive entries within the same locale group are not separated by blank lines. As per coding guidelines, trim redundant blank lines.♻️ Proposed fix
Remove the blank lines at lines 8, 262, 515, and 768:
public static TheoryData<string, long, string> AddAndCases => new() { { "eu", 1000001L, "milioi bat" }, - { "et", 1001001L, "miljon tuhat üks" },Apply the same change to lines 262, 515, and 768 in the
WordFormCases,GenderCases, andWordFormGenderCasesproperties respectively.Also applies to: 261-262, 514-515, 767-768
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs` around lines 7 - 8, Remove the redundant blank lines inserted after the Basque ("eu") test entries—specifically the entry { "eu", 1000001L, "milioi bat" }—so the locale group remains contiguous; update the three properties WordFormCases, GenderCases, and WordFormGenderCases to delete the extra blank lines following the "eu" entries (the ones currently after the Basque lines in each property) so they match the existing pattern of consecutive locale entries without blank lines.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs`:
- Around line 7-8: Remove the redundant blank lines inserted after the Basque
("eu") test entries—specifically the entry { "eu", 1000001L, "milioi bat" }—so
the locale group remains contiguous; update the three properties WordFormCases,
GenderCases, and WordFormGenderCases to delete the extra blank lines following
the "eu" entries (the ones currently after the Basque lines in each property) so
they match the existing pattern of consecutive locale entries without blank
lines.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: df9c3c76-533c-4b39-90c7-e4c56059732b
📒 Files selected for processing (9)
src/Humanizer/Locales/eu.ymltests/Humanizer.Tests/Localisation/LocaleCoverageData.cstests/Humanizer.Tests/Localisation/LocaleFormatterExactTheoryData.cstests/Humanizer.Tests/Localisation/LocaleNumberMagnitudeTheoryData.cstests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cstests/Humanizer.Tests/Localisation/LocaleNumberTheoryData.cstests/Humanizer.Tests/Localisation/LocaleOrdinalizerMatrixData.cstests/Humanizer.Tests/Localisation/LocalePhraseTheoryData.cstests/Humanizer.Tests/Localisation/eu/BasqueLocaleParityTests.cs
There was a problem hiding this comment.
Pull request overview
Adds Basque (eu) locale support across generated locale YAML surfaces and locale parity/matrix tests.
Changes:
- Adds
src/Humanizer/Locales/eu.ymlwith Basque formatter, numbers, parsing, ordinals, clock, compass, and calendar data. - Adds Basque-specific parity tests.
- Extends shared locale theory/matrix coverage with
eurows.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 22 comments.
Show a summary per file
| File | Description |
|---|---|
src/Humanizer/Locales/eu.yml |
Defines Basque locale data for generated runtime surfaces. |
tests/Humanizer.Tests/Localisation/eu/BasqueLocaleParityTests.cs |
Adds focused Basque locale parity tests. |
tests/Humanizer.Tests/Localisation/LocalePhraseTheoryData.cs |
Adds Basque phrase expectations. |
tests/Humanizer.Tests/Localisation/LocaleOrdinalizerMatrixData.cs |
Adds Basque ordinalizer matrix rows. |
tests/Humanizer.Tests/Localisation/LocaleNumberTheoryData.cs |
Adds Basque number, ordinal, and parsing rows. |
tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs |
Adds Basque long overload rows. |
tests/Humanizer.Tests/Localisation/LocaleNumberMagnitudeTheoryData.cs |
Adds Basque magnitude rows. |
tests/Humanizer.Tests/Localisation/LocaleFormatterExactTheoryData.cs |
Adds Basque exact formatter rows. |
tests/Humanizer.Tests/Localisation/LocaleCoverageData.cs |
Adds Basque rows for locale coverage completeness. |
Comments suppressed due to low confidence (1)
src/Humanizer/Locales/eu.yml:109
- This exact “two days from now” phrase is unreachable with the current formatter profile. ProfiledFormatter only selects a
templatenamed “two” whensurfaces.formatter.exactDateFormscontains a number-2 rule for that unit/tense; eu.yml does not define one, soDateHumanize(Day, Future, 2)will always return the generic counted phrase instead of “etzi”.
template:
name: 'two'
value: 'etzi'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| joinWord: ' ' | ||
| scaleCountJoinWord: ' ' |
| ordinalGenderVariant: 'none' | ||
| negativePrefixes: | ||
| - 'minus ' | ||
| ignoredTokens: [] |
| { "eu", 101, "ehun bat" }, | ||
| { "eu", 121, "ehun hogeita bat" }, | ||
| { "eu", 200, "berrehun" }, | ||
| { "eu", 999, "bederatziehun laurogeita hemeretzi" }, |
| { | ||
| public static TheoryData<string, long, string> MagnitudeCardinalCases => new() | ||
| { | ||
| { "eu", 1001L, "mila bat" }, |
| { "eu", 999, "bederatziehun laurogeita hemeretzi" }, | ||
| { "eu", 1000, "mila" }, | ||
| { "eu", 1001, "mila bat" }, | ||
| { "eu", 3500, "hiru mila bostehun" }, |
| { "eu", 2, TimeUnit.Day, Tense.Past, "duela 2 egun" }, | ||
| { "eu", 2, TimeUnit.Day, Tense.Future, "2 egun barru" }, |
| { "lo", new("2 ມື້ ກ່ອນ", "3 ມື້ ກ່ອນ", "4 ມື້ ກ່ອນ", "5 ມື້ ກ່ອນ", "11 ມື້ ກ່ອນ", "21 ມື້ ກ່ອນ", "ໃນອີກ 2 ມື້", "ໃນອີກ 3 ມື້", "ໃນອີກ 4 ມື້", "ໃນອີກ 5 ມື້", "ໃນອີກ 11 ມື້", "ໃນອີກ 21 ມື້") }, | ||
| { "mn", new("2 хоногийн өмнө", "3 хоногийн өмнө", "4 хоногийн өмнө", "5 хоногийн өмнө", "11 хоногийн өмнө", "21 хоногийн өмнө", "2 хоногийн дараа", "3 хоногийн дараа", "4 хоногийн дараа", "5 хоногийн дараа", "11 хоногийн дараа", "21 хоногийн дараа") }, | ||
| { "ky", new("2 күн мурун", "3 күн мурун", "4 күн мурун", "5 күн мурун", "11 күн мурун", "21 күн мурун", "2 күндөн кийин", "3 күндөн кийин", "4 күндөн кийин", "5 күндөн кийин", "11 күндөн кийин", "21 күндөн кийин") }, | ||
| { "eu", new("duela 2 egun", "duela 3 egun", "duela 4 egun", "duela 5 egun", "duela 11 egun", "duela 21 egun", "2 egun barru", "3 egun barru", "4 egun barru", "5 egun barru", "11 egun barru", "21 egun barru") }, |
| Assert.Equal("orain", formatter.DateHumanize_Now()); | ||
| Assert.Equal("inoiz ez", formatter.DateHumanize_Never()); | ||
| Assert.Equal("atzo", formatter.DateHumanize(TimeUnit.Day, Tense.Past, 1)); | ||
| Assert.Equal("2 egun barru", formatter.DateHumanize(TimeUnit.Day, Tense.Future, 2)); |
Summary\n- add Basque (eu) locale YAML covering formatter, phrases, numbers, parsing, ordinals, clock, compass, and calendar surfaces\n- add Basque locale parity tests and matrix coverage\n\n## Tests\n- dotnet test --project tests/Humanizer.SourceGenerators.Tests/Humanizer.SourceGenerators.Tests.csproj --framework net10.0\n- dotnet test --project tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net10.0\n- dotnet test --project tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net8.0\n- dotnet test --project tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net11.0\n- dotnet pack src/Humanizer/Humanizer.csproj -c Release -o artifacts/locale-parity-validation\n\nParity map: artifacts/2026-05-16-eu-parity-map.md (local, gitignored)