Skip to content

Update India holidays: add Kannada language support#3428

Merged
arkid15r merged 10 commits into
vacanza:devfrom
Kartheekmurala:kn-lang
Mar 27, 2026
Merged

Update India holidays: add Kannada language support#3428
arkid15r merged 10 commits into
vacanza:devfrom
Kartheekmurala:kn-lang

Conversation

@Kartheekmurala

Copy link
Copy Markdown
Contributor

Proposed change

Add Kannada (kn) localization support for India holidays.

Changes

  • Added holidays/locale/kn/LC_MESSAGES/IN.po with Kannada translations for India holidays.
  • Updated tests/countries/test_india.py with test_l10n_kn to validate localized holiday names.
  • Updated README.md to include kn in supported languages for India.
  • Updated holidays/countries/india.py to include kn in supported_languages.

Type of change

  • Supported country/market holidays update (calendar discrepancy fix, localization)

Checklist

  • I've read and followed the contributing guidelines.
  • I've run make check locally; all checks and tests passed.

@coderabbitai

coderabbitai Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

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

Adds Kannada (kn) locale support for India: README update, India.supported_languages extended, new Kannada gettext catalog, and a new Kannada localization test for India.

Changes

Cohort / File(s) Summary
Documentation
README.md
Updated India supported-languages table row to include kn.
Core implementation
holidays/countries/india.py
Added "kn" to India.supported_languages.
Localization
holidays/locale/kn/LC_MESSAGES/IN.po
Added Kannada gettext catalog with translations for India holidays (including regional entries).
Tests
tests/countries/test_india.py
Added test_l10n_kn asserting Kannada locale holiday name mappings for 2018.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
  • KJhellico
  • PPsyrius
🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding Kannada language support to India holidays. It directly aligns with all modifications across the codebase.
Description check ✅ Passed The description accurately outlines the changes made: adding Kannada localization files, updating tests, and modifying documentation. It relates directly to the changeset.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@Kartheekmurala

Copy link
Copy Markdown
Contributor Author

Hi @arkid15r @KJhellico @PPsyrius 👋

I’ve submitted this PR adding Kannada (kn) localization support for India holidays, along with the necessary tests and documentation updates.

Could you please take a moment to review it when you have time? I’d really appreciate your feedback and any suggestions for improvement.

Thank you for your time and for maintaining this project! 🙂

@codecov

codecov Bot commented Mar 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0c5fc5c) to head (c11eac1).
⚠️ Report is 6 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3428   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          310       310           
  Lines        18584     18584           
  Branches      2380      2380           
=========================================
  Hits         18584     18584           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread holidays/locale/kn/LC_MESSAGES/IN.po Outdated
Comment thread holidays/locale/kn/LC_MESSAGES/IN.po Outdated
Comment thread holidays/locale/kn/LC_MESSAGES/IN.po Outdated
@KJhellico KJhellico changed the title Added kannada language support : India Update India holidays: add Kannada language support Mar 26, 2026
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Kartheekmurala <150778363+Kartheekmurala@users.noreply.github.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

♻️ Duplicate comments (1)
holidays/locale/kn/LC_MESSAGES/IN.po (1)

139-479: ⚠️ Potential issue | 🟠 Major

Remove orphan msgids that are not emitted by India/Karnataka code paths.

This catalog includes many entries that don’t map to current tr() strings in holidays/countries/india.py (per the provided snippets). Keep only msgids that exist in the generated template for India, otherwise these translations are dead and drift-prone.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@holidays/locale/kn/LC_MESSAGES/IN.po` around lines 139 - 479, The IN.po file
contains many msgid entries not produced by the current India/Karnataka code
paths; remove orphan translations that are not emitted by the tr() calls in
holidays/countries/india.py so the catalog matches the generated template.
Inspect the runtime/template of tr() strings in holidays/countries/india.py (and
any Karnataka-specific branches), prune any msgid/msgstr pairs from IN.po that
do not appear in that generated template, and keep only msgids currently
produced by the India/Karnataka code paths to avoid stale translations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@holidays/locale/kn/LC_MESSAGES/IN.po`:
- Around line 449-451: Update the translator comment lines for the holiday
entries so they end with a period: change the comment before the "Kail Muhuruth"
msgid (currently "#. Kail Muhuruth") to "#. Kail Muhuruth." and likewise add a
trailing period to the comment before the "Buddha Purnima" msgid; ensure you
only modify the translator comment lines (those starting with "#.") adjacent to
the msgid "Kail Muhuruth" and the msgid "Buddha Purnima" to match repository
style.

---

Duplicate comments:
In `@holidays/locale/kn/LC_MESSAGES/IN.po`:
- Around line 139-479: The IN.po file contains many msgid entries not produced
by the current India/Karnataka code paths; remove orphan translations that are
not emitted by the tr() calls in holidays/countries/india.py so the catalog
matches the generated template. Inspect the runtime/template of tr() strings in
holidays/countries/india.py (and any Karnataka-specific branches), prune any
msgid/msgstr pairs from IN.po that do not appear in that generated template, and
keep only msgids currently produced by the India/Karnataka code paths to avoid
stale translations.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f5257c09-da4c-442e-85fa-c0ef6d308199

📥 Commits

Reviewing files that changed from the base of the PR and between 1310631 and 7e33afb.

📒 Files selected for processing (1)
  • holidays/locale/kn/LC_MESSAGES/IN.po

Comment thread holidays/locale/kn/LC_MESSAGES/IN.po Outdated
Comment thread holidays/locale/kn/LC_MESSAGES/IN.po Outdated
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Kartheekmurala <150778363+Kartheekmurala@users.noreply.github.com>
@Kartheekmurala

Copy link
Copy Markdown
Contributor Author

@KJhellico Is there any further modifications required could you please specify ?

@KJhellico

Copy link
Copy Markdown
Collaborator

Looks good.
Here are some comments from AI regarding the translation. Can you comment on them?

Holiday Current Translation Suggested Improvement Notes
Foundation Day ಅವತರಣ ದಿನೋತ್ಸವ ಸ್ಥಾಪನಾ ದಿನ Avataraṇa (descent) is poetic; Sthāpanā Dina is the standard administrative term for "Foundation Day".
Inauguration Day ಪ್ರಾರಂಭ ದಿನೋತ್ಸವ ಉದ್ಘಾಟನಾ ದಿನ Prārambha means "start"; Udghāṭanā is the precise technical term for "Inauguration".
Magh Bihu ಮಾಘ್ ಬಿಹು / ಪೊಂಗಲ್ ಮಾಘ್ ಬಿಹು Suggest removing "/ Pongal" as it's a different festival (though on the same date).
Muharram ಮೊಹರಂ ಕಡೆ ದಿನ ಮೊಹರಂ Kaḍe dina means "last day"; using just Moharam is more standard for the holiday name.
Makar Sankranti ಉತ್ತರಾಯಣ ಪುಣ್ಯಕಾಲ, ಮಕರ ಸಂಕ್ರಾಂತಿ ಮಕರ ಸಂಕ್ರಾಂತಿ The current version is too long for UI; Makara Saṅkrānti is concise and sufficient.
Prophet's Birthday ಈದ್ - ಮಿಲಾದ್ ಈದ್-ಮಿಲಾದ್ Removed spaces around the hyphen for consistency with your other entries like Id-ul-Fitr.
Nagaland State Inauguration Day ಪ್ರಾರಂಭ ದಿನೋತ್ಸವ ಸ್ಥಾಪನಾ ದಿನೋತ್ಸವ Matches the "Foundation Day" logic for consistency across state holidays.

@Kartheekmurala

Copy link
Copy Markdown
Contributor Author

Looks good.
Here are some comments from AI regarding the translation. Can you comment on them?

The AI’s suggestions are mostly correct and align well with standard Kannada usage. Terms like ಸ್ಥಾಪನಾ ದಿನ and ಉದ್ಘಾಟನಾ ದಿನ are more accurate and official than the current translations. Simplifications such as ಮಕರ ಸಂಕ್ರಾಂತಿ and formatting fixes like ಈದ್-ಮಿಲಾದ್ improve clarity and consistency.

Some suggestions need slight context awareness. For example, ಮೊಹರಂ is generally correct, but ಕಡೆ ದಿನ may apply when specifically referring to Ashura. Also, for state-related names, ನಾಗಾಲ್ಯಾಂಡ್ ರಾಜ್ಯ ಸ್ಥಾಪನಾ ದಿನ is more natural than the suggested version.

Overall, the feedback is strong, with only minor refinements needed for context and phrasing.
@KJhellico can i update and fix them

@Kartheekmurala

Copy link
Copy Markdown
Contributor Author

@KJhellico Sir I have applied the suggestions that have been given could you please verify once and tell me the changes needed

thank you !

@KJhellico

Copy link
Copy Markdown
Collaborator

Ok, I see about Muharram. But why Nagaland state day name differs from most others?

@Kartheekmurala

Kartheekmurala commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

Ok, I see about Muharram. But why Nagaland state day name differs from most others?

@KJhellico Thanks for the question!

For Muharram, I used “ಮೊಹರಂ” since it’s the commonly used general name, while “ಕಡೆ ದಿನ” refers specifically to Ashura (the last day). I felt the shorter form is more appropriate for a general holiday label, but I can adjust if needed.

For Nagaland, the original label is “Nagaland State Inauguration Day”, which differs slightly from most other states that use “Foundation Day”. While “ಉದ್ಘಾಟನಾ ದಿನ” would be a literal translation of “Inauguration”, in practice state holidays in India are generally referred to as “ಸ್ಥಾಪನಾ ದಿನ”.

So I used “ನಾಗಾಲ್ಯಾಂಡ್ ರಾಜ್ಯ ಸ್ಥಾಪನಾ ದಿನ” to maintain consistency across all state holidays and align with common administrative usage. However, I’m happy to adjust this if you prefer keeping it closer to the original wording.

@KJhellico

Copy link
Copy Markdown
Collaborator

So, it makes sense to keep Ashura and state holiday as they are, and use AI version for the rest. Right?

@Kartheekmurala

Copy link
Copy Markdown
Contributor Author

So, it makes sense to keep Ashura and state holiday as they are, and use AI version for the rest. Right?

Hii @KJhellico ! Just following up on this — please let me know if any further changes are needed. Thanks!

@sonarqubecloud

Copy link
Copy Markdown

@PPsyrius PPsyrius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 🇮🇳

@KJhellico KJhellico left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

@Kartheekmurala

Copy link
Copy Markdown
Contributor Author

@KJhellico @PPsyrius
thank you for your feedback!

@arkid15r arkid15r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for teh contribution @Kartheekmurala 👍

@arkid15r arkid15r added this pull request to the merge queue Mar 27, 2026
@Kartheekmurala

Copy link
Copy Markdown
Contributor Author

@KJhellico @arkid15r @PPsyrius
Thank you for your appreciation!
I’ve prepared a draft proposal and would really appreciate any feedback or suggestions if you have time. I’ll share the link below.

https://docs.google.com/document/d/1GJsWEhrJ-V7hL2EQjHb9iOpd7chY6RWw0xTKYXGHEW8/edit?usp=drivesdk

Merged via the queue into vacanza:dev with commit 144bd80 Mar 27, 2026
32 checks passed
arkid15r pushed a commit to arkid15r/python-holidays that referenced this pull request Mar 28, 2026
Signed-off-by: Kartheekmurala <150778363+Kartheekmurala@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
@KJhellico KJhellico mentioned this pull request Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants