Update Nepal holidays: fix some holiday names#3545
Conversation
WalkthroughUpdated Nepali holiday display strings (orthography/spacing) across the Nepal country module, unit tests, and Nepali/English PO msgid keys and metadata; no date calculations or control flow were changed. Changes
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)
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: 1
🤖 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/ne/LC_MESSAGES/NP.po`:
- Around line 32-185: The NP.po file incorrectly inverted msgid/msgstr (English
now in msgid) which breaks Nepali lookups; revert NP.po so msgid contains the
Nepali strings and msgstr entries are empty, then make spelling/transliteration
fixes (e.g., इद उल अजहा) in the Python source rather than the .po: update
literals passed to tr(...) in holidays/countries/nepal.py and in classes
NepalHinduHolidays, NepalIslamicHolidays, NepalStaticHolidays, run make l10n to
regenerate locale files (including en_US/LC_MESSAGES/NP.po) and then update the
English msgstrs there if needed.
🪄 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: 48292f58-b605-4501-85a0-cef570b4f2e8
📒 Files selected for processing (1)
holidays/locale/ne/LC_MESSAGES/NP.po
|
Thank you @coderabbitai for the catch! I didn't realize that for the Nepal entity, the msgid must remain in the native language (Nepali) due to the X-Source-Language: ne configuration. I have reverted the inversion in the .po file and applied the spelling corrections (like 'लक्ष्मी पूजा' and 'इद उल अजहा') directly in holidays/countries/nepal.py. This ensures the source of truth is accurate and the lookups remain functional. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainLet me quickly verify the current state of the changes. 🏁 Script executed: Length of output: 2653
However, there's still a naming issue in # Line 293-294
# Eid al-Fitr.
self._add_eid_al_fitr_day(tr("इद उल अजहा")) # ❌ "इद उल अजहा" = Eid al-Adha
# Line 296-297
# Eid al-Adha.
self._add_eid_al_adha_day(tr("बकरीद")) # ✓ "बकरीद" is correct for Eid al-Adha
🧠 Learnings used |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
holidays/countries/nepal.py (1)
247-271:⚠️ Potential issue | 🟠 MajorUpdate test snapshots to match the corrected spellings.
The spacing/spelling corrections on lines 247, 250, and 271 (
फागु पूर्णिमा,फागु पूर्णिमा (तराई),लक्ष्मी पूजा) will breaktests/countries/test_nepal.py, which still uses the old forms (e.g."फागुपुर्णिमा"at lines 206/549 and"लक्ष्मी पुजा"at lines 413/568). Please update the test file and runmake l10nto regenerate the.pofiles so translator comments stay in sync.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holidays/countries/nepal.py` around lines 247 - 271, Update the failing tests and localization artifacts to use the corrected Nepali spellings added in the holiday definitions: replace occurrences of "फागुपुर्णिमा" with "फागु पूर्णिमा", "फागुपुर्णिमा (तराई)" with "फागु पूर्णिमा (तराई)", and "लक्ष्मी पुजा" with "लक्ष्मी पूजा" in the test that asserts values created by the holiday registration calls (_add_nepal_holi, _add_holi, _add_diwali_india), then run make l10n to regenerate .po files so translator comments and snapshots stay in sync.
🤖 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`:
- Around line 293-294: The Eid al-Fitr entry is mislabeled: the call to
_add_eid_al_fitr_day uses the Hindi string "इद उल अजहा" (Eid al-Adha) instead of
the correct Eid al-Fitr label; update the string passed to _add_eid_al_fitr_day
(and the tr(...) argument) to the correct Fitr wording (e.g., "इद उल फित्र") so
Eid al-Fitr and _add_eid_al_fitr_day have the proper name and do not duplicate
the Adha label already used elsewhere (e.g., where "बकरीद" is used).
---
Outside diff comments:
In `@holidays/countries/nepal.py`:
- Around line 247-271: Update the failing tests and localization artifacts to
use the corrected Nepali spellings added in the holiday definitions: replace
occurrences of "फागुपुर्णिमा" with "फागु पूर्णिमा", "फागुपुर्णिमा (तराई)" with
"फागु पूर्णिमा (तराई)", and "लक्ष्मी पुजा" with "लक्ष्मी पूजा" in the test that
asserts values created by the holiday registration calls (_add_nepal_holi,
_add_holi, _add_diwali_india), then run make l10n to regenerate .po files so
translator comments and snapshots stay in sync.
🪄 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: 8523684c-85ed-4c3a-ae26-e42bc48c17b1
📒 Files selected for processing (1)
holidays/countries/nepal.py
|
Thank you for the feedback! As a Contributor from Nepal, I appreciate the clarification on using Nepali as the default msgid. I have reverted the .po file and instead applied the spelling and transliteration corrections directly to the Python source in holidays/countries/nepal.py. This ensures the native strings are officially correct at the source. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
holidays/countries/nepal.py (1)
247-271:⚠️ Potential issue | 🟡 MinorRun
make l10nto regenerate the .po files with the updated Nepali spellings.The old spellings (
फागुपुर्णिमा,फागुपूर्णिमा (तराई),लक्ष्मी पुजा) are still in the .po files. After regenerating with your source changes, the msgid keys will update to match the new spellings.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holidays/countries/nepal.py` around lines 247 - 271, The Nepali message IDs were changed in the source (calls like _add_nepal_holi, _add_holi, _add_buddha_purnima, _add_maha_saptami, _add_maha_ashtami, _add_maha_navami, _add_dussehra, _add_papankusha_ekadashi, _add_diwali_india) but the .po files still contain old spellings; run the localization regeneration to update translations by executing the project localization task (make l10n) so the .po files are rebuilt with the new Nepali msgid keys.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@holidays/countries/nepal.py`:
- Around line 247-271: The Nepali message IDs were changed in the source (calls
like _add_nepal_holi, _add_holi, _add_buddha_purnima, _add_maha_saptami,
_add_maha_ashtami, _add_maha_navami, _add_dussehra, _add_papankusha_ekadashi,
_add_diwali_india) but the .po files still contain old spellings; run the
localization regeneration to update translations by executing the project
localization task (make l10n) so the .po files are rebuilt with the new Nepali
msgid keys.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ef3518eb-1b6d-4457-b59e-f251f23d6078
📒 Files selected for processing (2)
holidays/countries/nepal.pytests/countries/test_nepal.py
|
You need to update .po files ( |
|
I had some environment issues running the l10n scripts locally on my machine, so I have manually updated the NP.po file to ensure the msgid keys perfectly match the updated translatable strings in nepal.py. I've also updated the test snapshots in tests/countries/test_nepal.py to match. As a Contributor from Nepal, I've verified that these updated strings (पूजा, पूर्णिमा) are now consistent across the entire codebase. |
You would be better to solve this issue so that you can work with the project more easily and effectively. What exactly isn't working for you? (there is more than one NP.po file, and you also need to update the metadata in the header) |
|
@KJhellico Thank you for the guidance and for offering to help with the environment setup. It is quite late here in Nepal, so I will take a fresh look at this first thing tomorrow morning. |
|
@KJhellico Good morning! I have successfully synchronized the Nepal localization tree and resolved the environment issues on my Windows machine. Key Updates: Environment Mastery: Identified the missing lingva dependency and configured the PYTHONPATH correctly. I have now successfully run scripts/l10n/generate_po_files.py --country NP. Zero-Diff Manual Work: Interestingly, the script generated a "clean" status, confirming that my manual synchronization of the ne and en_US files was already 100% accurate to the project's standards. Metadata & Validation: Updated all headers and verified that all 46 tests in test_nepal.py pass. Thank you for the guidance. I’m proud to have this module perfectly aligned with the v0.95 infrastructure! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3545 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 313 313
Lines 18693 18700 +7
Branches 2389 2389
=========================================
+ Hits 18693 18700 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PPsyrius
left a comment
There was a problem hiding this comment.
Last minor fixes - these version numbers need to be incremented as well
I trust your translation since you're the native speaker here
|
Thank you for the reviews, @KJhellico and @PPsyrius! |
|
Aligned holiday names with the official 2083 BS Gazette. I found that several names had inconsistent spacing or outdated spellings in the source code which caused localization mismatches. I have now synchronized these across the logic and translation files. All tests are green. |
There was a problem hiding this comment.
♻️ Duplicate comments (2)
holidays/locale/ne/LC_MESSAGES/NP.po (1)
17-17:⚠️ Potential issue | 🟡 MinorBump the PO project version.
This header still says
Holidays 0.95; align it with the current project metadata expected for this PR.Proposed fix
-"Project-Id-Version: Holidays 0.95\n" +"Project-Id-Version: Holidays 0.96\n"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holidays/locale/ne/LC_MESSAGES/NP.po` at line 17, Update the PO header "Project-Id-Version: Holidays 0.95\n" to match the current project version used in this PR (replace "Holidays 0.95" with the current Project-Id-Version string); ensure the header line in NP.po exactly reflects the repository's current metadata so the PO file version is consistent with the project.holidays/locale/en_US/LC_MESSAGES/NP.po (1)
17-17:⚠️ Potential issue | 🟡 MinorBump the PO project version.
This header still says
Holidays 0.95; keep it in sync with the current project metadata.Proposed fix
-"Project-Id-Version: Holidays 0.95\n" +"Project-Id-Version: Holidays 0.96\n"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holidays/locale/en_US/LC_MESSAGES/NP.po` at line 17, Update the PO file header entry "Project-Id-Version: Holidays 0.95\n" in NP.po to the current project version string used in the repository metadata (replace "Holidays 0.95" with the up-to-date project version), ensuring the Project-Id-Version header in NP.po matches the project's current version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@holidays/locale/en_US/LC_MESSAGES/NP.po`:
- Line 17: Update the PO file header entry "Project-Id-Version: Holidays 0.95\n"
in NP.po to the current project version string used in the repository metadata
(replace "Holidays 0.95" with the up-to-date project version), ensuring the
Project-Id-Version header in NP.po matches the project's current version.
In `@holidays/locale/ne/LC_MESSAGES/NP.po`:
- Line 17: Update the PO header "Project-Id-Version: Holidays 0.95\n" to match
the current project version used in this PR (replace "Holidays 0.95" with the
current Project-Id-Version string); ensure the header line in NP.po exactly
reflects the repository's current metadata so the PO file version is consistent
with the project.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 830edfd6-87a9-434f-8292-d224b9578b85
📒 Files selected for processing (4)
holidays/countries/nepal.pyholidays/locale/en_US/LC_MESSAGES/NP.poholidays/locale/ne/LC_MESSAGES/NP.potests/countries/test_nepal.py
847c43f to
bc6ea4b
Compare
|
I have force-pushed the final updates. |
|
@Ritik-tech731, please don't changhe commit history in published PR unless strictly necessary. |
|
"Understood, @KJhellico. I will avoid force-pushing moving forward. I am pushing a standard commit now to address the 0.96 version bump and the Islamic holiday name alignment based on the 2083 Gazette. Thank you for the guidance! |
There was a problem hiding this comment.
♻️ Duplicate comments (2)
holidays/locale/ne/LC_MESSAGES/NP.po (1)
17-17:⚠️ Potential issue | 🟡 MinorBump
Project-Id-Versionto0.96.The PR description and prior review feedback call for
Holidays 0.96, but this line still reads0.95. Please align the header to match the intended release metadata (and make sure the matchingen_US/LC_MESSAGES/NP.poheader is updated the same way).🔧 Proposed fix
-"Project-Id-Version: Holidays 0.95\n" +"Project-Id-Version: Holidays 0.96\n"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holidays/locale/ne/LC_MESSAGES/NP.po` at line 17, Update the PO file header value "Project-Id-Version: Holidays 0.95\n" to "Project-Id-Version: Holidays 0.96\n" so the package metadata matches the PR; also make the identical change in the corresponding en_US/LC_MESSAGES/NP.po header to keep both locale files consistent (search for the "Project-Id-Version" header in NP.po and en_US/NP.po to locate the lines).holidays/locale/en_US/LC_MESSAGES/NP.po (1)
17-17:⚠️ Potential issue | 🟡 MinorBump the PO project version to
0.96.Line 17 still says
Holidays 0.95, while this PR’s stated metadata update and prior review expectHolidays 0.96.Proposed fix
-"Project-Id-Version: Holidays 0.95\n" +"Project-Id-Version: Holidays 0.96\n"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holidays/locale/en_US/LC_MESSAGES/NP.po` at line 17, Update the PO project version string: locate the "Project-Id-Version: Holidays 0.95\n" entry in the PO header and change it to "Project-Id-Version: Holidays 0.96\n" so the file header matches the PR metadata and prior review.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@holidays/locale/en_US/LC_MESSAGES/NP.po`:
- Line 17: Update the PO project version string: locate the "Project-Id-Version:
Holidays 0.95\n" entry in the PO header and change it to "Project-Id-Version:
Holidays 0.96\n" so the file header matches the PR metadata and prior review.
In `@holidays/locale/ne/LC_MESSAGES/NP.po`:
- Line 17: Update the PO file header value "Project-Id-Version: Holidays 0.95\n"
to "Project-Id-Version: Holidays 0.96\n" so the package metadata matches the PR;
also make the identical change in the corresponding en_US/LC_MESSAGES/NP.po
header to keep both locale files consistent (search for the "Project-Id-Version"
header in NP.po and en_US/NP.po to locate the lines).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8d1f6104-8669-479e-a333-8e6f29f51f4f
📒 Files selected for processing (2)
holidays/locale/en_US/LC_MESSAGES/NP.poholidays/locale/ne/LC_MESSAGES/NP.po
|
arkid15r
left a comment
There was a problem hiding this comment.
@Ritik-tech731 thanks for fixing that 👍
|
Awesome! Thanks for the support and for merging this @KJhellico @arkid15r @PPsyrius . It was a great learning experience aligning the Nepali translations with the official Gazette and navigating the PR process. Looking forward to more contributions! |
While reviewing the Nepali localization as part of my GSoC 2026 proposal, I found that the ne locale was mostly empty and used incorrect formatting (translations in the msgid field).
Changes in this PR:
Moved all translations to the correct msgstr fields.
Reverted msgid fields to their original English keys to fix library lookups.
Corrected Nepali spellings for major festivals like Dashain, Tihar, and Laxmi Puja.
Removed 'fuzzy' markers to ensure translations are active.
This contribution directly supports my proposal's goal of improving library localization.