Skip to content

Update National Stock Exchange of India holidays: add Gujarati language support#3143

Merged
arkid15r merged 8 commits intovacanza:devfrom
pareshjoshij:add-gu-xnse-locale
Dec 17, 2025
Merged

Update National Stock Exchange of India holidays: add Gujarati language support#3143
arkid15r merged 8 commits intovacanza:devfrom
pareshjoshij:add-gu-xnse-locale

Conversation

@pareshjoshij
Copy link
Copy Markdown
Contributor

Proposed change

Added Gujarati (gu) language support for the National Stock Exchange of India (XNSE).

Changes included:

  • Added gu to the supported_languages list in holidays/financial/national_stock_exchange_of_india.py.
  • Created localization file: holidays/locale/gu/LC_MESSAGES/XNSE.po with full translations for the stock exchange holidays.
  • Added unit tests for Gujarati localization in tests/financial/test_national_stock_exchange_of_india.py covering the year 2023.
  • Updated README.md to list Gujarati as a supported language for XNSE.

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

Copilot AI review requested due to automatic review settings December 17, 2025 09:25
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 17, 2025

Summary by CodeRabbit

  • New Features

    • Added Gujarati language support for National Stock Exchange of India holiday names.
  • Documentation

    • Updated supported languages to include Gujarati for the National Stock Exchange of India.
  • Localization

    • Added Gujarati translations for major NSE holiday names.
  • Tests

    • Added localization tests validating Gujarati holiday names for the National Stock Exchange of India.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds Gujarati (gu) localization for the National Stock Exchange of India (XNSE): updates supported languages, adds Gujarati PO translations, updates README, and adds a Gujarati unit test.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added Gujarati ("gu") to XNSE supported languages in the Available Financial Markets table.
Core implementation
holidays/financial/national_stock_exchange_of_india.py
Added "gu" to NationalStockExchangeOfIndia.supported_languages.
Localization resource
holidays/locale/gu/LC_MESSAGES/XNSE.po
New Gujarati PO file with translations for XNSE holiday names and updated PO header metadata.
Tests
tests/financial/test_national_stock_exchange_of_india.py
Added test_l10n_gu() to validate Gujarati holiday names for 2023.
CI / tooling config
.coderabbit.yaml
Flipped reviews.request_changes_workflow from false to true.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Spot-checks that may need attention:
    • PO msgstr entries vs. test expected strings for exact matches.
    • supported_languages ordering/formatting consistency.
    • Confirm .coderabbit.yaml change is intentional for review workflow.

Possibly related PRs

Suggested reviewers

  • KJhellico

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding Gujarati language support to the National Stock Exchange of India holidays implementation.
Description check ✅ Passed The description clearly relates to the changeset, detailing the specific changes made across multiple files and providing context for the Gujarati localization addition.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af46c62 and 8853645.

📒 Files selected for processing (2)
  • .coderabbit.yaml (1 hunks)
  • tests/financial/test_national_stock_exchange_of_india.py (1 hunks)
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:110-112
Timestamp: 2025-09-07T19:28:19.153Z
Learning: For National Stock Exchange of India (NSE) holidays implementation in holidays/financial/national_stock_exchange_of_india.py, "Mahatma Gandhi Jayanti" is the official name used in NSE source documentation for Gandhi Jayanti (October 2nd), even though snapshots and localization files may use the shorter "Gandhi Jayanti" form. Source accuracy takes precedence over standardization.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:52:58.539Z
Learning: In the NSE holidays implementation, assertLocalizedHolidays should only include holidays that are actually observed (trading holidays), not holidays that fall on weekends and are excluded by the observed_rule. For example, Eid al-Fitr 2023 falls on Saturday and is correctly excluded from localization tests.
📚 Learning: 2025-08-30T12:52:58.539Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:52:58.539Z
Learning: In the NSE holidays implementation, assertLocalizedHolidays should only include holidays that are actually observed (trading holidays), not holidays that fall on weekends and are excluded by the observed_rule. For example, Eid al-Fitr 2023 falls on Saturday and is correctly excluded from localization tests.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-09-07T19:28:19.153Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:110-112
Timestamp: 2025-09-07T19:28:19.153Z
Learning: For National Stock Exchange of India (NSE) holidays implementation in holidays/financial/national_stock_exchange_of_india.py, "Mahatma Gandhi Jayanti" is the official name used in NSE source documentation for Gandhi Jayanti (October 2nd), even though snapshots and localization files may use the shorter "Gandhi Jayanti" form. Source accuracy takes precedence over standardization.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-08-26T20:10:05.288Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-09-28T05:42:12.777Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:221-223
Timestamp: 2025-09-28T05:42:12.777Z
Learning: In tests/countries/test_indonesia.py, the manual set inclusion checks using get_named and years_found for Lunar New Year (test_lunar_new_year) and Vesak Day (test_vesak_day) are intentional and should remain until both holidays get their own `{insert}_no_estimated` flags implemented, rather than using standard harness assertions like assertHolidayName/assertNoHolidayName.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-02T18:38:35.164Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-09-04T08:54:35.319Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_albania.py:40-42
Timestamp: 2025-09-04T08:54:35.319Z
Learning: In the vacanza/holidays project test files, extract holiday name strings to local variables only when they are reused multiple times within the same test method (e.g., used in both assertHolidayName and assertNoHolidayName calls). When a holiday name is used only once, keep it inline rather than extracting it to a variable for the sake of consistency.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-08-30T12:49:19.688Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:49:19.688Z
Learning: The assertLocalizedHolidays method in the vacanza/holidays project requires a complete list of all holidays for the specific year being tested, not just a subset. When testing localization, all holidays from that year must be included in the assertion.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-11-28T02:24:17.418Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3088
File: tests/countries/test_gabon.py:88-110
Timestamp: 2025-11-28T02:24:17.418Z
Learning: For Gabon's holiday implementation (tests/countries/test_gabon.py), all Islamic holiday dates are currently estimates. Therefore, the correct test pattern is to use assertIslamicNoEstimatedHolidayName for both specific known dates and the full range (e.g., test_eid_al_fitr and test_eid_al_adha), rather than using assertHolidayName for specific dates followed by assertIslamicNoEstimatedHolidayName for the range.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_argentina.py:375-375
Timestamp: 2025-09-03T16:49:35.246Z
Learning: In the holidays library, national holiday tests use self.full_range (or similar comprehensive year ranges) even when explicit test dates only show modern observance. This is intentional for correctness and comprehensive coverage, unlike subdivision-specific holidays which have explicit year boundaries based on known start dates.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
🧬 Code graph analysis (1)
tests/financial/test_national_stock_exchange_of_india.py (1)
tests/common.py (1)
  • assertLocalizedHolidays (565-576)
🔇 Additional comments (2)
tests/financial/test_national_stock_exchange_of_india.py (1)

492-511: Solid implementation—test structure is correct.

The Gujarati localization test properly validates all 15 observed holidays for 2023. The implementation follows the established pattern from the Hindi test, includes the complete holiday list, and uses positional parameters correctly.

.coderabbit.yaml (1)

23-23: Configuration change looks good.

Enabling request_changes_workflow will allow CodeRabbit to auto-approve PRs once comments are resolved and checks pass. Valid workflow enhancement.


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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Gujarati (gu) language support for the National Stock Exchange of India (XNSE) holidays. The implementation follows existing localization patterns consistently.

Key changes:

  • Added Gujarati to the supported_languages tuple in alphabetical order
  • Created complete Gujarati translation file with all holiday names translated
  • Added comprehensive test coverage for Gujarati localization using 2023 data

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
holidays/financial/national_stock_exchange_of_india.py Added "gu" to the supported_languages tuple in the correct alphabetical position
holidays/locale/gu/LC_MESSAGES/XNSE.po New localization file containing Gujarati translations for all XNSE holidays
tests/financial/test_national_stock_exchange_of_india.py Added test_l10n_gu method with test cases covering all 2023 holidays in Gujarati
README.md Updated the XNSE language support documentation to include Gujarati

The implementation is clean, consistent with existing patterns, and includes appropriate test coverage. No issues were identified during the review.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2ab615b and 1640f83.

📒 Files selected for processing (4)
  • README.md (1 hunks)
  • holidays/financial/national_stock_exchange_of_india.py (1 hunks)
  • holidays/locale/gu/LC_MESSAGES/XNSE.po (1 hunks)
  • tests/financial/test_national_stock_exchange_of_india.py (1 hunks)
🧰 Additional context used
🧠 Learnings (38)
📓 Common learnings
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:110-112
Timestamp: 2025-09-07T19:28:19.153Z
Learning: For National Stock Exchange of India (NSE) holidays implementation in holidays/financial/national_stock_exchange_of_india.py, "Mahatma Gandhi Jayanti" is the official name used in NSE source documentation for Gandhi Jayanti (October 2nd), even though snapshots and localization files may use the shorter "Gandhi Jayanti" form. Source accuracy takes precedence over standardization.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:52:58.539Z
Learning: In the NSE holidays implementation, assertLocalizedHolidays should only include holidays that are actually observed (trading holidays), not holidays that fall on weekends and are excluded by the observed_rule. For example, Eid al-Fitr 2023 falls on Saturday and is correctly excluded from localization tests.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2362
File: holidays/ical.py:53-80
Timestamp: 2025-03-26T08:55:08.917Z
Learning: The holidays library intentionally limits language code support to ISO 639-1 and ISO 639-2 standards (2-3 letter language codes with optional region) to maintain consistency with other modules like `common_holidays` and `financial_holidays`, rather than implementing full RFC 5646 compliance.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.
📚 Learning: 2025-08-26T20:10:05.288Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
  • README.md
  • holidays/locale/gu/LC_MESSAGES/XNSE.po
  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-09-07T19:28:19.153Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:110-112
Timestamp: 2025-09-07T19:28:19.153Z
Learning: For National Stock Exchange of India (NSE) holidays implementation in holidays/financial/national_stock_exchange_of_india.py, "Mahatma Gandhi Jayanti" is the official name used in NSE source documentation for Gandhi Jayanti (October 2nd), even though snapshots and localization files may use the shorter "Gandhi Jayanti" form. Source accuracy takes precedence over standardization.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
  • README.md
  • holidays/locale/gu/LC_MESSAGES/XNSE.po
  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support DO use tr() wrappers around holiday names when calling _add_* methods. This is the correct pattern for l10n-enabled country implementations, contrary to previous learning about translation being handled internally by _add_* methods.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-03-26T08:55:08.917Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2362
File: holidays/ical.py:53-80
Timestamp: 2025-03-26T08:55:08.917Z
Learning: The holidays library intentionally limits language code support to ISO 639-1 and ISO 639-2 standards (2-3 letter language codes with optional region) to maintain consistency with other modules like `common_holidays` and `financial_holidays`, rather than implementing full RFC 5646 compliance.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
📚 Learning: 2025-04-02T04:54:07.204Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2402
File: holidays/countries/trinidad_and_tobago.py:25-25
Timestamp: 2025-04-02T04:54:07.204Z
Learning: For English-speaking countries in the holidays library (like Trinidad and Tobago), the `default_language` and `supported_languages` parameters are optional. If languages are added for such countries, ensure that `en_US` is included in the list alongside the regional code variant (e.g., `en_TT` for Trinidad and Tobago).

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
📚 Learning: 2025-07-10T15:55:34.523Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2706
File: holidays/countries/cayman_islands.py:50-55
Timestamp: 2025-07-10T15:55:34.523Z
Learning: The `islamic_show_estimated` parameter in country class constructors is only needed for countries that implement Islamic holidays (inherit from IslamicHolidays or _CustomIslamicHolidays groups). Countries with only Christian and secular holidays do not need this parameter.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
📚 Learning: 2025-08-22T19:06:04.303Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2850
File: holidays/countries/christmas_island.py:75-80
Timestamp: 2025-08-22T19:06:04.303Z
Learning: Christmas Island's docstring for the `islamic_show_estimated` parameter follows the exact same format used consistently across all countries with Islamic holidays in the codebase: "Whether to add 'estimated' label to Islamic holidays name if holiday date is estimated." This is the standard, established pattern and should not be changed.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
📚 Learning: 2025-08-25T04:28:02.061Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.061Z
Learning: In the holidays library, Islamic holiday tests use `self.no_estimated_holidays = Country(years=years, islamic_show_estimated=False)` as the library-wide standard approach to simplify test cases. This pattern is intentional and preferred over testing estimated labels.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.657Z
Learning: The default estimated_label change from "%s (estimated)" to "%s" in holidays/groups/eastern.py is intentional to remove English-only fallback text from localized holiday names. Countries that need estimated labels should define them properly with localization support rather than relying on the English fallback.

Applied to files:

  • holidays/financial/national_stock_exchange_of_india.py
📚 Learning: 2025-09-06T20:47:29.638Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:153-155
Timestamp: 2025-09-06T20:47:29.638Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, Buddha Purnima was officially observed as a trading holiday from 2006-2009 according to official NSE circulars, as confirmed by maintainer review of comprehensive official sources.

Applied to files:

  • README.md
📚 Learning: 2025-08-27T07:08:10.853Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2834
File: snapshots/financial/XNSE.json:4-4
Timestamp: 2025-08-27T07:08:10.853Z
Learning: For National Stock Exchange of India (NSE) holidays, the official name for Dr. Ambedkar's holiday is "Dr. Baba Saheb Ambedkar Jayanti" (two words: "Baba Saheb") as per NSE source documentation, which differs from other Indian entities that may use "Dr. Babasaheb Ambedkar Jayanti" (single word). Source accuracy takes precedence over standardization across different holiday entities.

Applied to files:

  • README.md
📚 Learning: 2025-09-06T12:04:04.043Z
Learnt from: saheelsapovadia
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:176-180
Timestamp: 2025-09-06T12:04:04.043Z
Learning: In the NSE (National Stock Exchange of India) holidays implementation, Eid-e-Milad-Un-Nabi (Prophet's Birthday) was removed from NSE's holiday consideration after 2009. The holiday is correctly limited to years 2008-2009 only using a year filter, as NSE policy no longer recognizes this as a trading holiday in subsequent years, even when it falls on weekends.

Applied to files:

  • README.md
📚 Learning: 2025-09-26T13:58:49.363Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:148-151
Timestamp: 2025-09-26T13:58:49.363Z
Learning: In the holidays project, when translating holiday names in .po files, the msgstr should be a faithful translation of the original msgid (in the country's default language), not influenced by English commentary or common en_US names. For example, "Día de la Pascua Granada" (Spanish) correctly translates to "Dia de la Pasqua Granada" (Catalan), even though the English comment refers to it as "Whit Monday".

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-29T09:37:35.283Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2687
File: holidays/locale/en_US/LC_MESSAGES/CF.po:13-28
Timestamp: 2025-06-29T09:37:35.283Z
Learning: In the holidays project, .po files follow a standard formatting convention where there is always a blank line after the metadata header section (after the "X-Source-Language" line). This blank line separates the header from the actual translation content and should not be removed.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
Repo: vacanza/holidays PR: 2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-05-09T18:34:33.990Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:195-199
Timestamp: 2025-05-09T18:34:33.990Z
Learning: In the holidays library, localization (l10n) is handled through separate .po files for different languages rather than combining multiple translations in a single string. The code should use the default language with tr() function, and translations are provided in language-specific .po files.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-31T11:50:50.488Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-08-30T12:52:58.539Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:52:58.539Z
Learning: In the NSE holidays implementation, assertLocalizedHolidays should only include holidays that are actually observed (trading holidays), not holidays that fall on weekends and are excluded by the observed_rule. For example, Eid al-Fitr 2023 falls on Saturday and is correctly excluded from localization tests.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-09-28T05:42:12.777Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:221-223
Timestamp: 2025-09-28T05:42:12.777Z
Learning: In tests/countries/test_indonesia.py, the manual set inclusion checks using get_named and years_found for Lunar New Year (test_lunar_new_year) and Vesak Day (test_vesak_day) are intentional and should remain until both holidays get their own `{insert}_no_estimated` flags implemented, rather than using standard harness assertions like assertHolidayName/assertNoHolidayName.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-06-25T10:36:39.909Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2678
File: tests/countries/test_united_states_virgin_islands.py:59-84
Timestamp: 2025-06-25T10:36:39.909Z
Learning: In the holidays library, test methods typically do not have docstrings. Only special test methods that need specific explanation (like edge cases or unique behaviors) have docstrings. Regular test methods like test_l10n_default, test_l10n_th, test_government_holidays, etc. should not have docstrings added.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-04-02T18:38:35.164Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-11-28T02:24:17.418Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3088
File: tests/countries/test_gabon.py:88-110
Timestamp: 2025-11-28T02:24:17.418Z
Learning: For Gabon's holiday implementation (tests/countries/test_gabon.py), all Islamic holiday dates are currently estimates. Therefore, the correct test pattern is to use assertIslamicNoEstimatedHolidayName for both specific known dates and the full range (e.g., test_eid_al_fitr and test_eid_al_adha), rather than using assertHolidayName for specific dates followed by assertIslamicNoEstimatedHolidayName for the range.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_argentina.py:375-375
Timestamp: 2025-09-03T16:49:35.246Z
Learning: In the holidays library, national holiday tests use self.full_range (or similar comprehensive year ranges) even when explicit test dates only show modern observance. This is intentional for correctness and comprehensive coverage, unlike subdivision-specific holidays which have explicit year boundaries based on known start dates.

Applied to files:

  • tests/financial/test_national_stock_exchange_of_india.py
🧬 Code graph analysis (1)
tests/financial/test_national_stock_exchange_of_india.py (1)
tests/common.py (1)
  • assertLocalizedHolidays (565-576)
🔇 Additional comments (4)
holidays/financial/national_stock_exchange_of_india.py (1)

66-66: LGTM! Clean addition of Gujarati language support.

The addition of "gu" to supported_languages is correct and maintains alphabetical order. This properly enables Gujarati localization for NSE holidays.

README.md (1)

1945-1945: LGTM! Documentation correctly reflects the new language support.

The README update accurately documents Gujarati (gu) as a supported language for XNSE, matching the implementation in the code.

tests/financial/test_national_stock_exchange_of_india.py (1)

512-530: LGTM! Well-structured localization test.

The test follows the established pattern for localization testing and correctly includes only observed holidays for 2023 (excluding those that fell on weekends). The Gujarati translations are consistent with the new .po file.

holidays/locale/gu/LC_MESSAGES/XNSE.po (1)

1-128: LGTM! Well-structured localization file.

The Gujarati localization file follows the established patterns for the holidays library:

  • Header comment correctly identifies this as a non-default locale file
  • Metadata properly set with X-Source-Language: en_IN
  • Translator comments use en_US holiday names (e.g., "Gandhi Jayanti") while msgids use en_IN names (e.g., "Mahatma Gandhi Jayanti"), which is the correct pattern per project conventions
  • All translations are consistent with the test file
  • Comprehensive coverage of all NSE holidays

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1640f83 and 9ada211.

📒 Files selected for processing (1)
  • holidays/locale/gu/LC_MESSAGES/XNSE.po (1 hunks)
🧰 Additional context used
🧠 Learnings (19)
📓 Common learnings
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:110-112
Timestamp: 2025-09-07T19:28:19.153Z
Learning: For National Stock Exchange of India (NSE) holidays implementation in holidays/financial/national_stock_exchange_of_india.py, "Mahatma Gandhi Jayanti" is the official name used in NSE source documentation for Gandhi Jayanti (October 2nd), even though snapshots and localization files may use the shorter "Gandhi Jayanti" form. Source accuracy takes precedence over standardization.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:52:58.539Z
Learning: In the NSE holidays implementation, assertLocalizedHolidays should only include holidays that are actually observed (trading holidays), not holidays that fall on weekends and are excluded by the observed_rule. For example, Eid al-Fitr 2023 falls on Saturday and is correctly excluded from localization tests.
📚 Learning: 2025-09-07T19:28:19.153Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2888
File: holidays/financial/national_stock_exchange_of_india.py:110-112
Timestamp: 2025-09-07T19:28:19.153Z
Learning: For National Stock Exchange of India (NSE) holidays implementation in holidays/financial/national_stock_exchange_of_india.py, "Mahatma Gandhi Jayanti" is the official name used in NSE source documentation for Gandhi Jayanti (October 2nd), even though snapshots and localization files may use the shorter "Gandhi Jayanti" form. Source accuracy takes precedence over standardization.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-09-26T13:58:49.363Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:148-151
Timestamp: 2025-09-26T13:58:49.363Z
Learning: In the holidays project, when translating holiday names in .po files, the msgstr should be a faithful translation of the original msgid (in the country's default language), not influenced by English commentary or common en_US names. For example, "Día de la Pascua Granada" (Spanish) correctly translates to "Dia de la Pasqua Granada" (Catalan), even though the English comment refers to it as "Whit Monday".

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
Repo: vacanza/holidays PR: 2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-08-26T20:10:05.288Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-29T09:37:35.283Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2687
File: holidays/locale/en_US/LC_MESSAGES/CF.po:13-28
Timestamp: 2025-06-29T09:37:35.283Z
Learning: In the holidays project, .po files follow a standard formatting convention where there is always a blank line after the metadata header section (after the "X-Source-Language" line). This blank line separates the header from the actual translation content and should not be removed.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-08-25T22:19:01.342Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2854
File: holidays/locale/en_US/LC_MESSAGES/SD.po:38-42
Timestamp: 2025-08-25T22:19:01.342Z
Learning: In the holidays library, translator comments and translations should consistently use the "observed, estimated" order pattern. Guinea-Bissau (GW.po) was identified as having an inconsistent "estimated, observed" comment that needs to be fixed to match the established convention.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-10T05:08:07.939Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.939Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-06-10T05:07:29.372Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/locale/en_VC/LC_MESSAGES/VC.po:61-66
Timestamp: 2025-06-10T05:07:29.372Z
Learning: For missing translator comments in .po localization files in the holidays repository, direct authors to run `make l10n` or `make check` commands instead of suggesting manual fixes, as these commands automatically handle translator comment generation.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-09-26T13:44:12.652Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:97-100
Timestamp: 2025-09-26T13:44:12.652Z
Learning: When fixing localization issues in the holidays project, corrections should be made in both the Python source code comments and the en_US .po file msgstr entries, then all other language .po files should be regenerated to pick up the corrected en_US comments.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
📚 Learning: 2025-03-31T11:50:50.488Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.

Applied to files:

  • holidays/locale/gu/LC_MESSAGES/XNSE.po
🔇 Additional comments (1)
holidays/locale/gu/LC_MESSAGES/XNSE.po (1)

29-128: Translations and structure look solid.

The Gujarati translations are properly formatted, all translator comments are present, and the file follows project conventions. The estimated label translation is included as required for XNSE localization.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9f7fe58) to head (8853645).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3143   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          306       306           
  Lines        18231     18231           
  Branches      2323      2323           
=========================================
  Hits         18231     18231           

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

PPsyrius
PPsyrius previously approved these changes Dec 17, 2025
Copy link
Copy Markdown
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

LGTM 🇮🇳

KJhellico
KJhellico previously approved these changes Dec 17, 2025
Copy link
Copy Markdown
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

LGTM.

@arkid15r arkid15r dismissed stale reviews from KJhellico and PPsyrius via 8853645 December 17, 2025 18:15
@arkid15r arkid15r enabled auto-merge December 17, 2025 18:15
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

It seems I forgot to push recent coderabbit config change.
So it goes w/ this PR 🤷‍♂️

LGTM, thanks you @pareshjoshij

@arkid15r arkid15r added this pull request to the merge queue Dec 17, 2025
Merged via the queue into vacanza:dev with commit d7972bd Dec 17, 2025
33 checks passed
@pareshjoshij pareshjoshij deleted the add-gu-xnse-locale branch December 17, 2025 22:19
@arkid15r arkid15r mentioned this pull request Jan 5, 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.

5 participants