Update Nepal holidays: add Kannada language support#3560
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
Summary by CodeRabbit
WalkthroughAdds Kannada (kn) localization for Nepal: new PO file ChangesNepal Kannada Localization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 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)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
holidays/locale/kn/LC_MESSAGES/NP.po
There was a problem hiding this comment.
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/mismatchedmsgidkeys 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 themsgidentries 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.
|
This PR adds Kannada (kn) localization for Nepal holidays, addressing the untranslated .po files mentioned in this issue. |
|
@Poornesh-codes, this is a good start! Now you also need add new language to |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
README.mdholidays/countries/nepal.pytests/countries/test_nepal.py
There was a problem hiding this comment.
♻️ Duplicate comments (1)
README.md (1)
1245-1245:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winKeep Nepal language codes alphabetized in the README row.
Line 1245 should list
knbeforenefor 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
📒 Files selected for processing (1)
README.md
There was a problem hiding this comment.
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.
PPsyrius
left a comment
There was a problem hiding this comment.
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
|
I have a question regarding new language .po / l10n support. 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 If you have added your git credentials locally, it should automatically update that field with correct name and email for you as well |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
arkid15r
left a comment
There was a problem hiding this comment.
Thanks for adding this @Poornesh-codes
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
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.