Add Kannada locale parity#1749
Conversation
|
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 Kannada ( ChangesKannada Localization Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@tests/Humanizer.Tests/Localisation/kn/KannadaNumberToWordsTests.cs`:
- Line 29: The test contains contiguous 13-digit numeric literals (e.g.,
4325010007018) that trigger PAN scanners; update the InlineData attributes in
KannadaNumberToWordsTests (the InlineData entries on the failing lines) to use
C# digit separators (underscores) to represent the same numeric value (for
example 4_325_010_007_018) so the literal is unchanged but not contiguous; apply
the same change to both occurrences referenced in the comment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ac4c7798-b836-4699-9915-6d7fbfeae814
📒 Files selected for processing (11)
docs/localization.mdsrc/Humanizer/Locales/kn.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/kn/KannadaNonNumberSurfaceTests.cstests/Humanizer.Tests/Localisation/kn/KannadaNumberToWordsTests.cs
There was a problem hiding this comment.
Pull request overview
Adds Kannada (kn) as a new generated locale for Humanizer, providing localized number-to-words/ordinal/parse data, relative-date/duration phrases, data-unit and time-unit labels, clock notation, compass headings, and calendar months. The PR wires Kannada into the shared cross-locale theory matrices and adds locale-specific exact-output tests.
Changes:
- New
src/Humanizer/Locales/kn.ymlcontaining the full Kannada profile (cardinals 0–999 dense table, Indian-scale forms, ordinal map, parse maps, clock/compass/calendar surfaces). - New
tests/Humanizer.Tests/Localisation/kn/tests covering number-to-words round trips, ordinals, time/data unit labels, clock notation, compass headings, and date formatting. - Adds
knrows to all sharedLocaleCoverageData/LocalePhraseTheoryData/LocaleNumberTheoryData/LocaleNumberOverloadTheoryData/LocaleNumberMagnitudeTheoryData/LocaleOrdinalizerMatrixData/LocaleFormatterExactTheoryDatamatrices, and updatesdocs/localization.mdto list Kannada.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Humanizer/Locales/kn.yml | New 4499-line Kannada locale profile (phrases, numbers, scales, ordinals, parse maps, clock, compass, calendar). |
| tests/Humanizer.Tests/Localisation/kn/KannadaNumberToWordsTests.cs | New exact-output tests for cardinal/ordinal words and round-trip parsing (including long.MinValue). |
| tests/Humanizer.Tests/Localisation/kn/KannadaNonNumberSurfaceTests.cs | New tests for collections, relative dates, durations, time/data unit labels, dates, clock, compass, and ordinalizer. |
| tests/Humanizer.Tests/Localisation/LocaleCoverageData.cs | Adds kn rows to coverage matrices for dates, clock, formatter, collection, ordinal, cardinal, and words-to-number. |
| tests/Humanizer.Tests/Localisation/LocalePhraseTheoryData.cs | Adds kn rows for DateHumanize, NullDateHumanize, and TimeSpanHumanize cases. |
| tests/Humanizer.Tests/Localisation/LocaleNumberTheoryData.cs | Adds kn rows for cardinals, ordinals, word-form/gender variants, tuples, and words-to-number. |
| tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs | Adds kn rows for long overloads (AddAnd/WordForm/Gender/WordFormGender). |
| tests/Humanizer.Tests/Localisation/LocaleNumberMagnitudeTheoryData.cs | Adds kn rows for magnitude and extended magnitude cardinal cases. |
| tests/Humanizer.Tests/Localisation/LocaleOrdinalizerMatrixData.cs | Adds kn rows across all ordinalizer matrices (numeric, string, gender, word-form, negative). |
| tests/Humanizer.Tests/Localisation/LocaleFormatterExactTheoryData.cs | Adds kn rows for date-day plural, multi-part timespan, time-unit symbols, byte size, collection humanize, and headings. |
| docs/localization.md | Lists Kannada (kn) in the supported languages line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37dd13dec4
ℹ️ 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".
# Conflicts: # docs/localization.md
# Conflicts: # docs/localization.md # tests/Humanizer.Tests/Localisation/LocaleCoverageData.cs # tests/Humanizer.Tests/Localisation/LocaleFormatterExactTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleNumberMagnitudeTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleNumberTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleOrdinalizerMatrixData.cs # tests/Humanizer.Tests/Localisation/LocalePhraseTheoryData.cs
# Conflicts: # docs/localization.md
# Conflicts: # docs/localization.md # tests/Humanizer.Tests/Localisation/LocaleFormatterExactTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleNumberMagnitudeTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleNumberOverloadTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleNumberTheoryData.cs # tests/Humanizer.Tests/Localisation/LocaleOrdinalizerMatrixData.cs # tests/Humanizer.Tests/Localisation/LocalePhraseTheoryData.cs
# Conflicts: # docs/localization.md
Summary
kn) generated locale data across canonical Humanizer surfaces.kn).Notes
Validation
dotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net10.0 -- --filter-namespace Humanizer.Tests.Localisation.kndotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net10.0 -- --filter-class Humanizer.Tests.Localisation.LocaleTheoryMatrixCompletenessTests --stop-on-fail offdotnet test tests/Humanizer.SourceGenerators.Tests/Humanizer.SourceGenerators.Tests.csproj --framework net11.0dotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net10.0dotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net8.0dotnet test tests/Humanizer.Tests/Humanizer.Tests.csproj --framework net11.0dotnet pack src/Humanizer/Humanizer.csproj -c Release -o artifacts/locale-parity-validation -m:1dotnet format tests/Humanizer.Tests/Humanizer.Tests.csproj --verify-no-changes --verbosity minimal --no-restoregit diff --checkCaveats
tests/Humanizer.SourceGenerators.Testscurrently targetsnet11.0, so the requested--framework net10.0variant is not a valid TFM for that project in this checkout.-m:1pack and solution-level format attempts hit MSBuild child-node crashes; single-node pack and scoped format validation succeeded.