Skip to content

Update Nepal holidays: add Kannada language support#3560

Merged
arkid15r merged 10 commits into
vacanza:devfrom
Poornesh-codes:l10n/kn-nepal
May 16, 2026
Merged

Update Nepal holidays: add Kannada language support#3560
arkid15r merged 10 commits into
vacanza:devfrom
Poornesh-codes:l10n/kn-nepal

Conversation

@Poornesh-codes

@Poornesh-codes Poornesh-codes commented May 3, 2026

Copy link
Copy Markdown
Contributor

Proposed change

Adds Kannada (kn) localization for Nepal (NP) holidays.
All 36 holiday names translated into Kannada script.

Part of #2344.

Your PR description goes here.

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

@coderabbitai

coderabbitai Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3d62ceee-adf8-425c-ac5a-1124e09e0b73

📥 Commits

Reviewing files that changed from the base of the PR and between 46cc878 and dece847.

📒 Files selected for processing (4)
  • README.md
  • holidays/countries/nepal.py
  • holidays/locale/kn/LC_MESSAGES/NP.po
  • tests/countries/test_nepal.py

Summary by CodeRabbit

  • New Features
    • Added Kannada language localization for Nepal holidays. Users can now view holiday names and observances in Kannada, including national celebrations and festivals.

Walkthrough

Adds Kannada (kn) localization for Nepal: new PO file holidays/locale/kn/LC_MESSAGES/NP.po, registers "kn" in Nepal.supported_languages (("en_US", "kn", "ne")), updates README, and adds TestNepal.test_l10n_kn to verify Kannada holiday names.

Changes

Nepal Kannada Localization

Layer / File(s) Summary
Data / Translations
holidays/locale/kn/LC_MESSAGES/NP.po
New PO file with header metadata (charset, Project-Id-Version, PO-Revision-Date 2026-05-03, translator/team) and Kannada msgstr entries for Nepal holidays and observances.
Provider Metadata
holidays/countries/nepal.py
Adds "kn" to Nepal.supported_languages (now ("en_US", "kn", "ne")).
Tests
tests/countries/test_nepal.py
Adds TestNepal.test_l10n_kn asserting Kannada-localized holiday names for the existing 2024 date fixtures.
Documentation
README.md
Updates "Available Countries" table row for Nepal to include kn among supported languages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • KJhellico
  • PPsyrius
  • arkid15r
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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 clearly and concisely summarizes the main change: adding Kannada language support to Nepal holidays. It directly matches the changeset's primary objective.
Description check ✅ Passed The description is directly related to the changeset, explaining that Kannada localization for Nepal holidays is being added and referencing the linked issue #2344.
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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@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: 3

🤖 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/NP.po`:
- Around line 1-29: The NP.po file's headers/msgids may be out of sync with
source; re-generate and validate the Kannada Nepal localization rather than
manually editing the .po: run the project's localization build (e.g., make l10n)
and then run msgfmt --check on holidays/locale/kn/LC_MESSAGES/NP.po to catch
msgid mismatches (verify the empty msgid/msgstr header block and
X-Source-Language: ne match source), and if translator comments (#.) are wrong,
update the original Python source strings (not the .po) and re-run the generator
so the comments and msgids are produced correctly.
- Around line 155-158: The PO entry's msgid "भाईटीका" does not exactly match the
string used in the code (tr("भाइटीका")), so update the msgid to "भाइटीका" to
match the code's tr(...) call exactly; locate the msgid in the NP.po file and
replace the current msgid value with the single-आई form "भाइटीका" so the
translation is found at runtime.
- Around line 63-66: The PO file msgid for Duwadashi is misspelled and won't
match the source lookup; update the msgid in
holidays/locale/kn/LC_MESSAGES/NP.po from "द्वादशी (दशैं)" to exactly match the
source call tr("दुवादशी (दशैं)"), and optionally adjust the Kannada translation
msgstr ("ದ್ವಾದಶಿ (ದಸರಾ)") to a more accurate transliteration of "दुवादशी" if
desired so the msgid and tr(...) string in countries/nepal.py match exactly.
🪄 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: 231ada11-82cd-482b-a85e-e20085873d9f

📥 Commits

Reviewing files that changed from the base of the PR and between f6aa288 and 6659676.

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

Comment thread holidays/locale/kn/LC_MESSAGES/NP.po
Comment thread holidays/locale/kn/LC_MESSAGES/NP.po
Comment thread holidays/locale/kn/LC_MESSAGES/NP.po

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 1 file

Confidence score: 3/5

  • There is a concrete runtime impact in holidays/locale/kn/LC_MESSAGES/NP.po: misspelled/mismatched msgid keys will not resolve, so the affected Kannada translations won’t be applied.
  • The issues are medium severity (6/10) with high confidence (9/10), which suggests a real regression risk for localized text behavior even though the scope is limited to one locale file.
  • Pay close attention to holidays/locale/kn/LC_MESSAGES/NP.po - align the msgid entries with the NP source catalog so translation lookups succeed.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="holidays/locale/kn/LC_MESSAGES/NP.po">

<violation number="1" location="holidays/locale/kn/LC_MESSAGES/NP.po:64">
P2: This `msgid` does not match the project’s NP source string, so the translation key won’t be resolved at runtime.

(Based on your team's feedback about keeping the correct generated string set in `.po` files.) [FEEDBACK_USED]</violation>

<violation number="2" location="holidays/locale/kn/LC_MESSAGES/NP.po:156">
P2: This `msgid` key is misspelled relative to the source catalog, so this translation entry won’t be used.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread holidays/locale/kn/LC_MESSAGES/NP.po Outdated
Comment thread holidays/locale/kn/LC_MESSAGES/NP.po Outdated
@Poornesh-codes

Copy link
Copy Markdown
Contributor Author

This PR adds Kannada (kn) localization for Nepal holidays, addressing the untranslated .po files mentioned in this issue.

@KJhellico KJhellico changed the title Update Nepal holidays: add Kannada (kn) l10n Update Nepal holidays: add Kannada language support May 3, 2026
@KJhellico

KJhellico commented May 3, 2026

Copy link
Copy Markdown
Collaborator

@Poornesh-codes, this is a good start! Now you also need add new language to supported_languages in Nepal class,, Nepal entry in README, and add l10n test method to test_nepal.py.

@github-actions github-actions Bot added the test label May 3, 2026

@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: 3

🤖 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/countries/nepal.py`:
- Line 57: Update the supported_languages tuple in nepal.py so entries are
alphabetically ordered and properly spaced: swap "kn" and "ne" to make the tuple
("en_US", "kn", "ne") and ensure there's a space after the comma separating
entries; edit the supported_languages definition to reflect this change.

In `@README.md`:
- Line 1245: The language list in the table cell containing "en_US,
<strong>ne</strong>, kn" is out of alphabetical order; update that TD so the
languages are alphabetized with the bold default kept in place (i.e., change the
order to "en_US, kn, <strong>ne</strong>" or equivalent), ensuring the <strong>
tag remains on the default language token and only the sequence of tokens is
reordered.

In `@tests/countries/test_nepal.py`:
- Line 690: Remove the four trailing spaces on the blank line immediately
following the closing parenthesis in the test (i.e., delete the stray whitespace
on the blank line after the previous line's “)”), save the file so the blank
line contains no trailing whitespace, and run ruff/formatting to confirm the
trailing-whitespace lint is fixed.
🪄 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: fdf9d119-6be7-4cff-83a8-10b7761c3e83

📥 Commits

Reviewing files that changed from the base of the PR and between d8545d7 and cf9a156.

📒 Files selected for processing (3)
  • README.md
  • holidays/countries/nepal.py
  • tests/countries/test_nepal.py

Comment thread holidays/countries/nepal.py Outdated
Comment thread README.md Outdated
Comment thread tests/countries/test_nepal.py Outdated

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

♻️ Duplicate comments (1)
README.md (1)

1245-1245: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep Nepal language codes alphabetized in the README row.

Line 1245 should list kn before ne for consistency with the table’s ordering pattern.

Suggested fix
-<td>en_US, <strong>ne</strong>, kn</td>
+<td>en_US, kn, <strong>ne</strong></td>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 1245, The table row containing the token "en_US, ne, kn"
is out of alphabetical order; edit the HTML table cell (<td>...) that currently
reads "en_US, ne, kn" and reorder the language codes to "en_US, kn, ne" while
keeping the existing emphasis markup (e.g., the <strong> wrapper around ne)
intact so the row reads "en_US, kn, <strong>ne</strong>".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@README.md`:
- Line 1245: The table row containing the token "en_US, ne, kn" is out of
alphabetical order; edit the HTML table cell (<td>...) that currently reads
"en_US, ne, kn" and reorder the language codes to "en_US, kn, ne" while keeping
the existing emphasis markup (e.g., the <strong> wrapper around ne) intact so
the row reads "en_US, kn, <strong>ne</strong>".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 049caf4a-4df3-40ce-8b48-c4801b5301c1

📥 Commits

Reviewing files that changed from the base of the PR and between cf9a156 and 46cc878.

📒 Files selected for processing (1)
  • README.md

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tests/countries/test_nepal.py">

<violation number="1" location="tests/countries/test_nepal.py:652">
P2: Remove the whitespace-only line at the end of the test block; it violates the repo’s trailing-whitespace linting checks.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread tests/countries/test_nepal.py
Comment thread holidays/locale/kn/LC_MESSAGES/NP.po Outdated

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

You might want to add your own name to the CONTRIBUTORS list as well (make sure the list is sorted alphabetically)

Aside from 2 issues, the rest are LGTM

Comment thread holidays/locale/kn/LC_MESSAGES/NP.po Outdated
Comment thread tests/countries/test_nepal.py Outdated
@shaonahamed0

Copy link
Copy Markdown
Contributor

I have a question regarding new language .po / l10n support.
Does the .po file need to be created manually, like copying from other language support files? Or is there any script available for this?

I implemented it manually by copy-pasting from another language. If there is any script for this, please let me know. I will use it in future cases.

@PPsyrius

PPsyrius commented May 10, 2026

Copy link
Copy Markdown
Collaborator

I have a question regarding new language .po / l10n support.
Does the .po file need to be created manually, like copying from other language support files? Or is there any script available for this?

I implemented it manually by copy-pasting from another language. If there is any script for this, please let me know. I will use it in future cases.

Now that #3204 and #3553 got merged, we can simply add the new language in readme and their respective country/market holiday files - then run make l10n to automatically populate/update the .po files

If you have added your git credentials locally, it should automatically update that field with correct name and email for you as well

@PPsyrius PPsyrius enabled auto-merge May 10, 2026 03:20
@PPsyrius PPsyrius disabled auto-merge May 10, 2026 03:20
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8086e60) to head (dece847).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3560   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          314       314           
  Lines        18775     18775           
  Branches      2405      2405           
=========================================
  Hits         18775     18775           

☔ 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.

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

@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 🇳🇵

@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 adding this @Poornesh-codes

@arkid15r arkid15r added this pull request to the merge queue May 15, 2026
Merged via the queue into vacanza:dev with commit f1ed635 May 16, 2026
33 checks passed
@KJhellico KJhellico mentioned this pull request May 18, 2026
@Poornesh-codes Poornesh-codes deleted the l10n/kn-nepal branch May 20, 2026 13:23
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.

5 participants