+
Skip to content

Conversation

KJhellico
Copy link
Collaborator

@KJhellico KJhellico commented Aug 26, 2025

Proposed change

Add estimated_label to all countries with Islamic holidays; add a test for its existence.
(Later, we need to do the same for the rest of the Eastern calendars).

Resolves #2842

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

Copy link
Contributor

coderabbitai bot commented Aug 26, 2025

Summary by CodeRabbit

  • New Features

    • Added estimated and observed+estimated labels for multiple countries (e.g., Argentina, Spain, Bosnia and Herzegovina, Nigeria, Cameroon, Chad, Gabon, Kyrgyzstan, Maldives, Mauritania, Somalia, Uganda).
    • Expanded translations for estimated/observed terms across Spanish, Bosnian, Ukrainian, and English locales.
  • Style

    • Simplified default labeling for Eastern calendar estimated holidays (no suffix by default).
  • Bug Fixes

    • Standardized dual-status labels to “(observed, estimated)” in country snapshots.
  • Tests

    • Added checks ensuring estimated labels are present for Islamic holiday sets.
  • Chores

    • Updated translation metadata.

Walkthrough

Adds estimated_label and observed_estimated_label attributes across many country holiday classes, changes the eastern calendar helper’s default estimated label, updates locale PO files for the new strings, normalizes snapshot labels, and adds a test enforcing estimated_label for Islamic holiday providers.

Changes

Cohort / File(s) Summary
Country classes — add both labels
holidays/countries/argentina.py, holidays/countries/burkina_faso.py, holidays/countries/cameroon.py, holidays/countries/chad.py, holidays/countries/nigeria.py, holidays/countries/spain.py, holidays/countries/bosnia_and_herzegovina.py
Added class attributes estimated_label and observed_estimated_label (localized via tr() where applicable). No logic changes.
Country classes — add estimated_label only
holidays/countries/gabon.py, holidays/countries/kyrgyzstan.py, holidays/countries/maldives.py, holidays/countries/mauritania.py, holidays/countries/somalia.py, holidays/countries/uganda.py
Added class attribute estimated_label. No logic changes.
Eastern calendar helper
holidays/groups/eastern.py
Changed default estimated_label from "%s (estimated)" to "%s". Label composition logic unchanged.
Locale PO files
holidays/locale/.../AR.po, holidays/locale/.../ES.po, holidays/locale/bs/LC_MESSAGES/BA.po, holidays/locale/en_US/LC_MESSAGES/BA.po, holidays/locale/sr/LC_MESSAGES/BA.po, holidays/locale/uk/LC_MESSAGES/BA.po
Added new msgids/msgstrs for estimated and observed+estimated formats and bumped PO metadata (Project-Id-Version/PO-Revision-Date).
Snapshots — normalize dual-status labels
snapshots/countries/CM_COMMON.json, snapshots/countries/NG_COMMON.json
Rewrote holiday value strings to canonical form "(observed, estimated)" where both statuses applied; keys/dates unchanged.
Tests
tests/common.py
Imported IslamicHolidays; added test_estimated_label requiring estimated_label for Islamic holiday providers; clarified messages and simplified an isinstance check.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

snapshot

Suggested reviewers

  • KJhellico

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a1d49d3 and c1d3c02.

📒 Files selected for processing (2)
  • snapshots/countries/CM_COMMON.json (17 hunks)
  • snapshots/countries/NG_COMMON.json (24 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.625Z
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.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.847Z
Learning: In the holidays library, maintainers have agreed to keep comments like "# %s (estimated)." above estimated_label declarations across country files, even though they duplicate the label content. This decision was made to maintain consistency and usefulness regardless of localization support status.
Learnt from: KJhellico
PR: vacanza/holidays#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
PR: vacanza/holidays#2860
File: holidays/countries/burkina_faso.py:27-30
Timestamp: 2025-08-26T21:24:41.827Z
Learning: Countries in the holidays library that don't have localization support yet should use plain English strings for labels (e.g., `estimated_label = "%s (estimated)"`), while only countries with existing .po translation files should use `tr()` wrapping. Check for the presence of .po files in holidays/locale to determine if a country has localization support.
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:13-13
Timestamp: 2025-08-21T04:51:16.449Z
Learning: In the holidays library, country classes with localization support consistently use `from gettext import gettext as tr` import and wrap class-level attributes like `estimated_label`, `observed_label`, and `observed_estimated_label` with `tr()` calls. This is the standard library-wide practice for l10n-enabled entities and is required for proper string extraction when generating .po files.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.

Applied to files:

  • snapshots/countries/NG_COMMON.json
  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-08-25T22:19:01.342Z
Learnt from: KJhellico
PR: vacanza/holidays#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:

  • snapshots/countries/NG_COMMON.json
  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-03-19T16:53:00.375Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.

Applied to files:

  • snapshots/countries/NG_COMMON.json
  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#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:

  • snapshots/countries/NG_COMMON.json
📚 Learning: 2025-04-13T19:10:31.502Z
Learnt from: KJhellico
PR: vacanza/holidays#2465
File: holidays/countries/suriname.py:219-251
Timestamp: 2025-04-13T19:10:31.502Z
Learning: The `_CustomIslamicHolidays` classes in this project contain only exact verified holiday dates from reliable sources, rather than calculated or estimated future dates. This is by design to ensure accuracy, particularly for religious holidays that may follow lunar calendars or depend on local observations.

Applied to files:

  • snapshots/countries/NG_COMMON.json
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.

Applied to files:

  • snapshots/countries/NG_COMMON.json
  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-08-21T06:52:25.511Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:140-155
Timestamp: 2025-08-21T06:52:25.511Z
Learning: In the holidays library Islamic calendar implementation, CONFIRMED_YEARS represents the full range of years that have been officially verified, while the individual EID_AL_FITR_DATES and EID_AL_ADHA_DATES dictionaries only contain entries for years where the official dates differ from the base Umm al-Qura algorithmic calculations. Years within CONFIRMED_YEARS but not in the explicit date dictionaries will use the base algorithm but be marked as "confirmed" rather than "estimated".

Applied to files:

  • snapshots/countries/NG_COMMON.json
📚 Learning: 2025-08-28T02:34:11.625Z
Learnt from: PPsyrius
PR: vacanza/holidays#2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.625Z
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:

  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-08-22T19:06:04.303Z
Learnt from: KJhellico
PR: vacanza/holidays#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:

  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-08-28T11:45:56.847Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.847Z
Learning: In the holidays library, maintainers have agreed to keep comments like "# %s (estimated)." above estimated_label declarations across country files, even though they duplicate the label content. This decision was made to maintain consistency and usefulness regardless of localization support status.

Applied to files:

  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-06-25T10:12:30.448Z
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.

Applied to files:

  • snapshots/countries/CM_COMMON.json
📚 Learning: 2025-04-03T13:03:16.558Z
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation, following the same pattern as in the Ivory Coast implementation.

Applied to files:

  • snapshots/countries/CM_COMMON.json
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test build on macos-latest
  • GitHub Check: Test build on ubuntu-latest
  • GitHub Check: Test build on windows-latest
🔇 Additional comments (4)
snapshots/countries/NG_COMMON.json (2)

473-473: Canonicalized qualifier order to “(observed, estimated)” — LGTM

The normalization matches the project convention and the recent l10n direction. Keys and semantics remain intact.

Also applies to: 477-477, 489-489, 492-492, 505-505, 523-523, 526-526, 535-535, 539-539, 589-589, 608-608, 610-610, 617-617, 623-623, 632-632, 653-653, 657-657, 667-668, 674-674, 736-736, 746-746, 749-749, 763-763, 868-868, 876-876, 879-879, 906-906, 911-911, 918-918, 987-987, 994-994, 997-998, 1033-1033, 1037-1037


1-1041: Snapshots validate clean—no legacy forms detected
Ran regex checks on snapshots/countries/NG_COMMON.json: zero occurrences of legacy “(estimated, observed)” or nested parentheses, and 55 occurrences of canonical “(observed, estimated)”.

snapshots/countries/CM_COMMON.json (2)

30-30: Uniform “(observed, estimated)” ordering — LGTM

Consistent with established snapshot formatting; multi-holiday lines preserve semicolon separation.

Also applies to: 35-35, 55-55, 141-141, 146-146, 206-206, 214-214, 239-239, 243-243, 301-301, 310-310, 395-395, 399-399, 774-774, 776-776, 781-781, 809-809, 869-869, 875-875, 909-909, 935-935, 967-967, 974-974, 998-998, 1003-1003, 1061-1061, 1070-1070, 1096-1096


1-1100: Snapshot provenance validated: snapshots/countries/CM_COMMON.json is auto-generated by scripts/generate_snapshots.py (via the snapshot Makefile target) and contains only canonical “(observed, estimated)” patterns.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (06aebe8) to head (c1d3c02).
⚠️ Report is 3 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2860   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          292       292           
  Lines        17330     17350   +20     
  Branches      2259      2259           
=========================================
+ Hits         17330     17350   +20     

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

Copy link
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: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
holidays/countries/mauritania.py (1)

33-36: Align docstring wording with the project-wide standard.

Use single quotes around 'estimated' to match the canonical phrasing used across countries.

-                Whether to add "estimated" label to Islamic holidays name
+                Whether to add 'estimated' label to Islamic holidays name
                 if holiday date is estimated.
holidays/countries/nigeria.py (1)

41-44: Docstring consistency nit.

Prefer single quotes around 'estimated' per house style.

-                Whether to add "estimated" label to Islamic holidays name
+                Whether to add 'estimated' label to Islamic holidays name
                 if holiday date is estimated.
holidays/countries/burkina_faso.py (1)

37-40: Docstring phrasing polish.

Switch to single quotes around 'estimated' to match the standard wording used across the codebase.

-                Whether to add "estimated" label to Islamic holidays name
+                Whether to add 'estimated' label to Islamic holidays name
                 if holiday date is estimated.
holidays/countries/cameroon.py (1)

45-48: Docstring nit for consistency.

Use single quotes around 'estimated'.

-                Whether to add "estimated" label to Islamic holidays name
+                Whether to add 'estimated' label to Islamic holidays name
                 if holiday date is estimated.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9b410bf and f4a504d.

📒 Files selected for processing (25)
  • holidays/countries/argentina.py (1 hunks)
  • holidays/countries/bosnia_and_herzegovina.py (1 hunks)
  • holidays/countries/burkina_faso.py (1 hunks)
  • holidays/countries/cameroon.py (1 hunks)
  • holidays/countries/chad.py (1 hunks)
  • holidays/countries/gabon.py (1 hunks)
  • holidays/countries/kyrgyzstan.py (1 hunks)
  • holidays/countries/maldives.py (1 hunks)
  • holidays/countries/mauritania.py (1 hunks)
  • holidays/countries/nigeria.py (1 hunks)
  • holidays/countries/somalia.py (1 hunks)
  • holidays/countries/spain.py (1 hunks)
  • holidays/countries/uganda.py (1 hunks)
  • holidays/groups/eastern.py (1 hunks)
  • holidays/locale/bs/LC_MESSAGES/BA.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/AR.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/BA.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/ES.po (2 hunks)
  • holidays/locale/es/LC_MESSAGES/AR.po (2 hunks)
  • holidays/locale/es/LC_MESSAGES/ES.po (2 hunks)
  • holidays/locale/sr/LC_MESSAGES/BA.po (2 hunks)
  • holidays/locale/uk/LC_MESSAGES/AR.po (2 hunks)
  • holidays/locale/uk/LC_MESSAGES/BA.po (2 hunks)
  • holidays/locale/uk/LC_MESSAGES/ES.po (2 hunks)
  • tests/common.py (3 hunks)
🧰 Additional context used
🧠 Learnings (43)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2850
File: holidays/countries/christmas_island.py:75-80
Timestamp: 2025-08-22T19:06:04.277Z
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.
Learnt from: PPsyrius
PR: vacanza/holidays#2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.030Z
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.
Learnt from: KJhellico
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.261Z
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: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:13-13
Timestamp: 2025-08-21T04:51:16.392Z
Learning: In the holidays library, country classes with localization support consistently use `from gettext import gettext as tr` import and wrap class-level attributes like `estimated_label`, `observed_label`, and `observed_estimated_label` with `tr()` calls. This is the standard library-wide practice for l10n-enabled entities and is required for proper string extraction when generating .po files.
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.711Z
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.
📚 Learning: 2025-08-26T20:10:05.261Z
Learnt from: KJhellico
PR: vacanza/holidays#2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.261Z
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/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/gabon.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/mauritania.py
  • holidays/countries/chad.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • holidays/countries/somalia.py
  • holidays/countries/argentina.py
  • holidays/countries/spain.py
  • holidays/countries/bosnia_and_herzegovina.py
  • holidays/groups/eastern.py
  • tests/common.py
📚 Learning: 2025-06-25T10:12:30.448Z
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.

Applied to files:

  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/gabon.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/mauritania.py
  • holidays/countries/chad.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • holidays/countries/somalia.py
  • holidays/countries/argentina.py
  • holidays/countries/spain.py
  • holidays/countries/bosnia_and_herzegovina.py
  • holidays/groups/eastern.py
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
PR: vacanza/holidays#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/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
PR: vacanza/holidays#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/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
PR: vacanza/holidays#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/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-06-25T10:09:29.029Z
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/locale/ar/LC_MESSAGES/EG.po:0-0
Timestamp: 2025-06-25T10:09:29.029Z
Learning: In the holidays library, msgstr fields can be left empty for source/default_language files when using Lingva, the localization tool used by the project.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#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/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
PR: vacanza/holidays#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/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-06-10T12:17:58.880Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: holidays/locale/en_VC/LC_MESSAGES/VC.po:1-14
Timestamp: 2025-06-10T12:17:58.880Z
Learning: In the holidays project, .po files should use the full multi-line header format including the project description, authors, website, and license information, rather than a single-line comment format.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
PR: vacanza/holidays#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/uk/LC_MESSAGES/AR.po
  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/uk/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-08-25T09:57:22.263Z
Learnt from: PPsyrius
PR: vacanza/holidays#2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.263Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.

Applied to files:

  • holidays/countries/uganda.py
📚 Learning: 2025-08-22T19:06:04.277Z
Learnt from: KJhellico
PR: vacanza/holidays#2850
File: holidays/countries/christmas_island.py:75-80
Timestamp: 2025-08-22T19:06:04.277Z
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/countries/uganda.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/mauritania.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • holidays/countries/somalia.py
  • holidays/countries/argentina.py
  • holidays/countries/bosnia_and_herzegovina.py
  • holidays/groups/eastern.py
  • tests/common.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/uganda.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/mauritania.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • holidays/countries/somalia.py
  • holidays/countries/argentina.py
  • tests/common.py
📚 Learning: 2025-08-25T22:19:01.304Z
Learnt from: KJhellico
PR: vacanza/holidays#2854
File: holidays/locale/en_US/LC_MESSAGES/SD.po:38-42
Timestamp: 2025-08-25T22:19:01.304Z
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/countries/burkina_faso.py
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/countries/bosnia_and_herzegovina.py
  • holidays/locale/bs/LC_MESSAGES/BA.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
PR: vacanza/holidays#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/uk/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-04-13T19:11:32.337Z
Learnt from: KJhellico
PR: vacanza/holidays#2465
File: holidays/locale/nl/LC_MESSAGES/SR.po:31-32
Timestamp: 2025-04-13T19:11:32.337Z
Learning: In the holidays library, when a language is set as the default language for a country (like Dutch/nl for Suriname), the `msgid` strings in the PO file are already in that language, and the corresponding `msgstr` fields are intentionally left empty. This is by design, as the system will fall back to using the `msgid` value when no translation is provided.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/BA.po
  • holidays/locale/sr/LC_MESSAGES/BA.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
📚 Learning: 2025-07-10T15:55:34.523Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/mauritania.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • tests/common.py
📚 Learning: 2025-08-25T04:28:02.030Z
Learnt from: PPsyrius
PR: vacanza/holidays#2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.030Z
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/countries/mauritania.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • holidays/groups/eastern.py
  • tests/common.py
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/ES.po
  • holidays/locale/en_US/LC_MESSAGES/BA.po
  • holidays/locale/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
PR: vacanza/holidays#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/sr/LC_MESSAGES/BA.po
  • holidays/locale/en_US/LC_MESSAGES/AR.po
📚 Learning: 2025-08-21T04:51:16.392Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:13-13
Timestamp: 2025-08-21T04:51:16.392Z
Learning: In the holidays library, country classes with localization support consistently use `from gettext import gettext as tr` import and wrap class-level attributes like `estimated_label`, `observed_label`, and `observed_estimated_label` with `tr()` calls. This is the standard library-wide practice for l10n-enabled entities and is required for proper string extraction when generating .po files.

Applied to files:

  • holidays/countries/argentina.py
  • holidays/countries/spain.py
  • holidays/countries/bosnia_and_herzegovina.py
📚 Learning: 2025-08-21T04:56:03.711Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.711Z
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/countries/argentina.py
  • holidays/countries/spain.py
  • holidays/countries/bosnia_and_herzegovina.py
📚 Learning: 2025-08-21T04:56:03.711Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.711Z
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/countries/argentina.py
  • holidays/countries/spain.py
  • holidays/countries/bosnia_and_herzegovina.py
📚 Learning: 2025-06-29T09:37:35.283Z
Learnt from: KJhellico
PR: vacanza/holidays#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/uk/LC_MESSAGES/ES.po
  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
PR: vacanza/holidays#2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library localization pattern, when a locale file matches a country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language locale files should have translations in the msgstr fields.

Applied to files:

  • holidays/locale/es/LC_MESSAGES/ES.po
  • holidays/locale/bs/LC_MESSAGES/BA.po
  • holidays/locale/es/LC_MESSAGES/AR.po
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
PR: vacanza/holidays#2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library, when a locale file matches the country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language files should have filled msgstr fields with translations.

Applied to files:

  • holidays/locale/es/LC_MESSAGES/AR.po
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.

Applied to files:

  • tests/common.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.

Applied to files:

  • tests/common.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.

Applied to files:

  • tests/common.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.

Applied to files:

  • tests/common.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/common.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.

Applied to files:

  • tests/common.py
📚 Learning: 2025-08-21T05:56:33.238Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:15-16
Timestamp: 2025-08-21T05:56:33.238Z
Learning: In the holidays library, when importing Gregorian month constants from holidays.calendars.gregorian, only import the months that are actually used in the date data. For example, if Islamic holiday dates only reference JUN, JUL, SEP, OCT, then only import those specific constants rather than importing additional unused months.

Applied to files:

  • tests/common.py
📚 Learning: 2025-03-30T08:08:31.656Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:84-85
Timestamp: 2025-03-30T08:08:31.656Z
Learning: Islamic holiday logic should be implemented in the holidays/groups/islamic.py file, with country-specific files only calling these methods with the appropriate translated names.

Applied to files:

  • tests/common.py
📚 Learning: 2025-04-13T19:10:31.502Z
Learnt from: KJhellico
PR: vacanza/holidays#2465
File: holidays/countries/suriname.py:219-251
Timestamp: 2025-04-13T19:10:31.502Z
Learning: The `_CustomIslamicHolidays` classes in this project contain only exact verified holiday dates from reliable sources, rather than calculated or estimated future dates. This is by design to ensure accuracy, particularly for religious holidays that may follow lunar calendars or depend on local observations.

Applied to files:

  • tests/common.py
📚 Learning: 2025-03-29T17:55:09.799Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:29-34
Timestamp: 2025-03-29T17:55:09.799Z
Learning: In the holidays library, classes with multiple inheritance from various holiday groups (like ChristianHolidays, HinduCalendarHolidays, etc.) should initialize each parent class separately rather than using `super().__init__(*args, **kwargs)` because the parent classes have different parameter requirements. HolidayBase should receive the `*args, **kwargs` while other holiday group classes typically don't accept parameters like `observed`.

Applied to files:

  • tests/common.py
📚 Learning: 2025-06-29T10:36:06.138Z
Learnt from: KJhellico
PR: vacanza/holidays#2671
File: holidays/countries/libya.py:51-108
Timestamp: 2025-06-29T10:36:06.138Z
Learning: There is no project-wide convention in the holidays library to organize holidays by calendar type (Islamic holidays first, then Gregorian holidays). Countries organize holidays in various ways - often chronologically, by importance, or by logical grouping - and Islamic holidays are frequently placed at the end of the _populate_public_holidays method rather than at the beginning.

Applied to files:

  • tests/common.py
📚 Learning: 2025-06-06T14:40:31.932Z
Learnt from: KJhellico
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.

Applied to files:

  • tests/common.py
📚 Learning: 2025-04-13T20:42:13.152Z
Learnt from: KJhellico
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:52-60
Timestamp: 2025-04-13T20:42:13.152Z
Learning: In the holidays library, country classes follow a consistent initialization pattern: first explicitly initializing each parent holiday group class with their specific parameters, then calling `super().__init__(*args, **kwargs)` at the end to properly initialize the base `HolidayBase` class.

Applied to files:

  • tests/common.py
📚 Learning: 2025-04-25T20:27:59.086Z
Learnt from: KJhellico
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:85-92
Timestamp: 2025-04-25T20:27:59.086Z
Learning: The `_populate_observed` method in holiday classes should maintain the same signature as the parent class `ObservedHolidayBase`, even if specific child class implementations don't use all parameters.

Applied to files:

  • tests/common.py
🧬 Code graph analysis (1)
tests/common.py (2)
holidays/groups/islamic.py (1)
  • IslamicHolidays (20-443)
holidays/observed_holiday_base.py (1)
  • ObservedHolidayBase (102-246)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test build on macos-latest
  • GitHub Check: Test build on ubuntu-latest
  • GitHub Check: Test build on windows-latest
🔇 Additional comments (32)
holidays/locale/sr/LC_MESSAGES/BA.po (3)

17-19: Header metadata bump looks correct.

Project-Id-Version and PO-Revision-Date updates align with the l10n workflow. Blank line after headers is preserved.


30-34: Add estimated label — correct source/target pairing and c-format.

msgid is in Bosnian (default language for BA), msgstr in Serbian (Cyrillic). Placeholder count matches. Good.


35-39: Add observed, estimated label — order and translation are consistent.

The “observed, estimated” ordering matches project convention; terminology mirrors existing “preneseno” keys.

holidays/locale/uk/LC_MESSAGES/ES.po (3)

17-19: Header updates OK.

Version/date refresh looks fine; X-Source-Language remains es, which is correct for ES.


30-34: Add estimated label — natural UA phrasing.

“%s (приблизна дата)” reads well and matches other UA locales added in this PR.


35-39: Observed, estimated for Spain — correct idiom.

Using “Lunes siguiente a %s (estimado)” mirrors Spain’s “observed” convention (Monday following %s) with the estimated suffix; UA translation is accurate.

holidays/locale/bs/LC_MESSAGES/BA.po (3)

17-19: Header metadata bump looks good.

Correctly updated version and revision date; header structure intact.


30-34: Add estimated label — leave msgstr empty for default language.

bs is the default language for BA; empty msgstr is the right pattern.


35-39: Add observed, estimated label — empty msgstr is correct.

Follows the same default-language convention; ordering matches project standard.

holidays/locale/uk/LC_MESSAGES/AR.po (3)

17-21: Header updates approved.

Version/date and translator metadata refreshed appropriately; source language es is correct for AR.


30-34: Add estimated label — consistent UA translation.

Matches the “приблизна дата” pattern used elsewhere in this PR.


35-39: Add observed, estimated — consistent with existing ‘observed’ UA term.

Combines existing “%s (вихідний)” convention with the estimated suffix; ordering is per guidelines.

holidays/locale/es/LC_MESSAGES/ES.po (3)

17-19: Header metadata refresh is fine.

Updates align with current cycle; header layout preserved.


30-34: Add estimated label — keep msgstr empty (default language).

es is the default for ES; empty msgstr is correct and will fall back to msgid.


35-39: Add observed, estimated variant — matches Spain’s phrasing.

“Lunes siguiente a %s (estimado)” is the right observed+estimated form; empty msgstr is appropriate here.

holidays/locale/uk/LC_MESSAGES/BA.po (2)

17-19: Header metadata bump looks good.

Project-Id-Version and PO-Revision-Date updates align with the l10n workflow. No action needed.


30-39: Verification complete: placeholders and comments are correct

  • holidays/locale/uk/LC_MESSAGES/BA.po lines 30–39: each msgid and msgstr contains exactly one “%s” placeholder, preserving c-format safety.
  • Translator comments use the “observed, estimated” order and include trailing periods per project conventions.
holidays/locale/en_US/LC_MESSAGES/BA.po (2)

17-19: Header metadata refresh acknowledged.

Version and revision date updates are consistent with recent l10n changes.


30-39: Please verify BA locale files with msgfmt

It looks like msgfmt isn’t available in this environment, so the automated sanity check couldn’t run. To ensure there are no formatting issues in your Bosnian locale files, please install GNU gettext (which provides msgfmt) and run:

for f in holidays/locale/*/LC_MESSAGES/BA.po; do
  echo "Checking $f"
  msgfmt --check-format -o /dev/null "$f"
done

Confirm that this completes without errors on your local machine.

holidays/locale/en_US/LC_MESSAGES/AR.po (2)

17-21: Header updates OK.

Version bump, revision date, and translator metadata look fine per project norms.


30-39: ✅ Placeholder counts and “observed, estimated” ordering verified
holidays/locale/en_US/LC_MESSAGES/AR.po (lines 30–39)
Looks good to merge.

tests/common.py (3)

23-23: Import of IslamicHolidays for gating is appropriate.

Keeps the new test decoupled from country specifics.


381-383: Clearer failure message for observed_estimated_label.

Backticks improve readability; logic unchanged.


389-391: Type check for observed_label is precise.

isinstance against ObservedHolidayBase is the right constraint.

holidays/locale/en_US/LC_MESSAGES/ES.po (2)

17-19: Header metadata update is fine.

Aligned with other locale bumps in this PR.


30-39: Approve Spanish observed + estimated variant; manual PO file formatting verification required.

File: holidays/locale/en_US/LC_MESSAGES/ES.po
Lines: 30–39

#. %s (estimated).
#, c-format
msgid "%s (estimado)"
msgstr "%s (estimated)"

#. %s (observed, estimated).
#, c-format
msgid "Lunes siguiente a %s (estimado)"
msgstr "Monday following %s (estimated)"

Comment:
Spanish “observed+estimated” form is correctly rendered as the English “Monday following %s (estimated)”, matching the established “observed, estimated” order.

holidays/countries/kyrgyzstan.py (1)

26-26: I'm inspecting the Kyrgyzstan module for existing gettext imports and label definitions. Please hold on while I gather the details.

holidays/locale/es/LC_MESSAGES/AR.po (2)

17-21: Metadata updates look fine.

Header bumps (version, revision date, translator) are acceptable as part of l10n work. No action needed.


30-39: New label entries are correct for AR default-locale semantics.

  • msgid in Spanish, empty msgstr: aligns with AR being the default language.
  • Comment text keeps the canonical “observed, estimated” order. Good.
holidays/countries/chad.py (1)

35-36: Labels added correctly; consistent with module’s non-l10n style.

Chad doesn’t use gettext in this module (observed_label is also a plain string), so adding plain-string estimated_label/observed_estimated_label is consistent. No changes needed.

holidays/countries/argentina.py (1)

150-153: Good i18n: labels wrapped with tr() and match established phrasing.

The new estimated_label and observed_estimated_label follow the library convention and Spanish phrasing (“observado, estimado”) order. Looks solid.

holidays/countries/bosnia_and_herzegovina.py (1)

58-61: Good i18n and ordering.

Labels are translated, tr()-wrapped, and follow the “observed, estimated” ordering convention. Nice.

Copy link
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: 5

♻️ Duplicate comments (4)
holidays/countries/mauritania.py (1)

27-28: Echoing prior suggestion: localize label if MR has PO catalogs.

Align with l10n convention only when MR PO exists; otherwise keep plain text.

-from holidays.groups import InternationalHolidays, IslamicHolidays
+from holidays.groups import InternationalHolidays, IslamicHolidays
+from gettext import gettext as tr
@@
-    estimated_label = "%s (estimated)"
+    estimated_label = tr("%s (estimated)")

Check:

#!/bin/bash
fd -a 'MR.po' holidays/locale || true
fd -a 'MRT.po' holidays/locale || true
holidays/countries/gabon.py (1)

30-31: Localize estimated_label if GA has PO; otherwise leave as-is.

Matches project rule: use tr() only for l10n-enabled providers.

-from holidays.holiday_base import HolidayBase
+from holidays.holiday_base import HolidayBase
+from gettext import gettext as tr
@@
-    estimated_label = "%s (estimated)"
+    estimated_label = tr("%s (estimated)")

Verify:

#!/bin/bash
fd -a 'GA.po' holidays/locale || true
fd -a 'GAB.po' holidays/locale || true
holidays/countries/maldives.py (1)

28-29: Follow l10n convention conditionally (only if MV PO exists).

If MV has PO files, wrap with tr(); otherwise the plain string is correct.

-from holidays.holiday_base import HolidayBase
+from holidays.holiday_base import HolidayBase
+from gettext import gettext as tr
@@
-    estimated_label = "%s (estimated)"
+    estimated_label = tr("%s (estimated)")

Check:

#!/bin/bash
fd -a 'MV.po' holidays/locale || true
fd -a 'MDV.po' holidays/locale || true
holidays/countries/somalia.py (1)

26-27: Consistently localize only when SO PO catalogs exist.

Apply tr() if SO/SOM have PO; else keep plain string per guideline.

-from holidays.holiday_base import HolidayBase
+from holidays.holiday_base import HolidayBase
+from gettext import gettext as tr
@@
-    estimated_label = "%s (estimated)"
+    estimated_label = tr("%s (estimated)")

Verify:

#!/bin/bash
fd -a 'SO.po' holidays/locale || true
fd -a 'SOM.po' holidays/locale || true
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5123d1c and fb54f96.

📒 Files selected for processing (10)
  • holidays/countries/burkina_faso.py (1 hunks)
  • holidays/countries/cameroon.py (1 hunks)
  • holidays/countries/chad.py (1 hunks)
  • holidays/countries/gabon.py (1 hunks)
  • holidays/countries/kyrgyzstan.py (1 hunks)
  • holidays/countries/maldives.py (1 hunks)
  • holidays/countries/mauritania.py (1 hunks)
  • holidays/countries/nigeria.py (1 hunks)
  • holidays/countries/somalia.py (1 hunks)
  • holidays/countries/uganda.py (1 hunks)
🧰 Additional context used
🧠 Learnings (23)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.625Z
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.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#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
PR: vacanza/holidays#2860
File: holidays/countries/burkina_faso.py:27-30
Timestamp: 2025-08-26T21:24:41.827Z
Learning: Countries in the holidays library that don't have localization support yet should use plain English strings for labels (e.g., `estimated_label = "%s (estimated)"`), while only countries with existing .po translation files should use `tr()` wrapping. Check for the presence of .po files in holidays/locale to determine if a country has localization support.
Learnt from: KJhellico
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.
Learnt from: KJhellico
PR: vacanza/holidays#2465
File: holidays/countries/suriname.py:219-251
Timestamp: 2025-04-13T19:10:31.502Z
Learning: The `_CustomIslamicHolidays` classes in this project contain only exact verified holiday dates from reliable sources, rather than calculated or estimated future dates. This is by design to ensure accuracy, particularly for religious holidays that may follow lunar calendars or depend on local observations.
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:13-13
Timestamp: 2025-08-21T04:51:16.449Z
Learning: In the holidays library, country classes with localization support consistently use `from gettext import gettext as tr` import and wrap class-level attributes like `estimated_label`, `observed_label`, and `observed_estimated_label` with `tr()` calls. This is the standard library-wide practice for l10n-enabled entities and is required for proper string extraction when generating .po files.
📚 Learning: 2025-08-28T02:34:11.625Z
Learnt from: PPsyrius
PR: vacanza/holidays#2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.625Z
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/countries/somalia.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
  • holidays/countries/gabon.py
  • holidays/countries/chad.py
📚 Learning: 2025-08-22T19:06:04.303Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/somalia.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/maldives.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
📚 Learning: 2025-06-25T10:12:30.448Z
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.

Applied to files:

  • holidays/countries/somalia.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
  • holidays/countries/gabon.py
  • holidays/countries/chad.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/somalia.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/mauritania.py
📚 Learning: 2025-08-26T20:10:05.288Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/somalia.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
  • holidays/countries/gabon.py
  • holidays/countries/chad.py
📚 Learning: 2025-08-25T04:28:02.061Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/somalia.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • holidays/countries/mauritania.py
📚 Learning: 2025-08-21T04:51:16.449Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:13-13
Timestamp: 2025-08-21T04:51:16.449Z
Learning: In the holidays library, country classes with localization support consistently use `from gettext import gettext as tr` import and wrap class-level attributes like `estimated_label`, `observed_label`, and `observed_estimated_label` with `tr()` calls. This is the standard library-wide practice for l10n-enabled entities and is required for proper string extraction when generating .po files.

Applied to files:

  • holidays/countries/somalia.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
  • holidays/countries/gabon.py
📚 Learning: 2025-08-26T21:24:41.827Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/burkina_faso.py:27-30
Timestamp: 2025-08-26T21:24:41.827Z
Learning: Countries in the holidays library that don't have localization support yet should use plain English strings for labels (e.g., `estimated_label = "%s (estimated)"`), while only countries with existing .po translation files should use `tr()` wrapping. Check for the presence of .po files in holidays/locale to determine if a country has localization support.

Applied to files:

  • holidays/countries/somalia.py
  • holidays/countries/kyrgyzstan.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
  • holidays/countries/gabon.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/somalia.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
  • holidays/countries/gabon.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/somalia.py
  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
  • holidays/countries/gabon.py
📚 Learning: 2025-06-16T14:08:09.492Z
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: holidays/countries/bhutan.py:13-16
Timestamp: 2025-06-16T14:08:09.492Z
Learning: In the holidays library, translation is performed in the `_add_holiday` methods, not at the string level. Holiday strings passed to `_add_holiday_*` methods are processed through the translation machinery within those methods, so using `tr()` or `self.tr()` wrappers is unnecessary.

Applied to files:

  • holidays/countries/somalia.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/uganda.py
  • holidays/countries/gabon.py
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/somalia.py
  • holidays/countries/nigeria.py
  • holidays/countries/maldives.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
  • holidays/countries/mauritania.py
📚 Learning: 2025-07-10T15:55:34.523Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/kyrgyzstan.py
  • holidays/countries/maldives.py
  • holidays/countries/mauritania.py
📚 Learning: 2025-08-25T22:19:01.342Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/burkina_faso.py
  • holidays/countries/cameroon.py
📚 Learning: 2025-04-23T09:59:19.886Z
Learnt from: PPsyrius
PR: vacanza/holidays#2490
File: holidays/countries/ethiopia.py:45-45
Timestamp: 2025-04-23T09:59:19.886Z
Learning: For the Ethiopia holidays class, it's appropriate to add a return type hint only to the `_is_leap_year` method to match the base class implementation in `holidays/holiday_base.py`, while keeping other methods without type hints to maintain consistency with other country implementations.

Applied to files:

  • holidays/countries/burkina_faso.py
📚 Learning: 2025-05-10T04:32:15.760Z
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").

Applied to files:

  • holidays/countries/burkina_faso.py
  • holidays/countries/nigeria.py
  • holidays/countries/cameroon.py
  • holidays/countries/uganda.py
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.

Applied to files:

  • holidays/countries/burkina_faso.py
📚 Learning: 2025-05-06T15:29:31.893Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/countries/andorra.py:13-14
Timestamp: 2025-05-06T15:29:31.893Z
Learning: In this codebase, `tr` imported as `from gettext import gettext as tr` is used as a message marker for extracting translatable strings when generating .po files, not just for runtime translation.

Applied to files:

  • holidays/countries/burkina_faso.py
  • holidays/countries/gabon.py
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
PR: vacanza/holidays#2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library localization pattern, when a locale file matches a country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language locale files should have translations in the msgstr fields.

Applied to files:

  • holidays/countries/burkina_faso.py
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
PR: vacanza/holidays#2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library, when a locale file matches the country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language files should have filled msgstr fields with translations.

Applied to files:

  • holidays/countries/burkina_faso.py
📚 Learning: 2025-08-19T20:04:26.215Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:28-31
Timestamp: 2025-08-19T20:04:26.215Z
Learning: In the holidays library, message comments (comments describing message format templates like "%s (estimated)." and "%s (observed, estimated).") always end with a period, even when the corresponding string values do not include the period.

Applied to files:

  • holidays/countries/burkina_faso.py
📚 Learning: 2025-08-25T09:57:22.291Z
Learnt from: PPsyrius
PR: vacanza/holidays#2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.291Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.

Applied to files:

  • holidays/countries/uganda.py
🔇 Additional comments (6)
holidays/countries/kyrgyzstan.py (1)

26-28: No i18n changes needed
Kyrgyzstan has no .po catalog (no KG/KGZ under holidays/locale), so keeping estimated_label = "%s (estimated)" as a plain string is correct.

holidays/countries/uganda.py (1)

32-33: LGTM: estimated_label added correctly (no l10n).

Matches the project rule post-eastern default change; comment punctuation and template format are consistent. No tr() needed here.

holidays/countries/chad.py (1)

35-38: LGTM: estimated and observed+estimated labels added.

Consistent templates and comment punctuation; appropriate since class uses ObservedHolidayBase.

holidays/countries/nigeria.py (1)

33-36: LGTM: label templates added with correct ordering.

Plain strings are appropriate (no l10n here); aligns with tests expecting estimated_label on Islamic providers.

holidays/countries/cameroon.py (1)

36-39: LGTM: label templates added and consistent with observed label.

Correct “observed, estimated” order and trailing-dot comments.

holidays/countries/burkina_faso.py (1)

27-30: LGTM: estimated and observed+estimated labels declared.

Matches established duplication pattern; no tr() since country lacks l10n.

PPsyrius
PPsyrius previously approved these changes Aug 28, 2025
Copy link
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 🛠️

@arkid15r arkid15r enabled auto-merge August 28, 2025 15:39
Copy link

@PPsyrius PPsyrius mentioned this pull request Aug 28, 2025
4 tasks
Copy link
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.

LGTM 👍

@arkid15r arkid15r added this pull request to the merge queue Aug 28, 2025
Merged via the queue into vacanza:dev with commit 23dc230 Aug 28, 2025
36 checks passed
@KJhellico KJhellico deleted the add-estimated-label branch August 28, 2025 16:08
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.

Checklist: Remove Duplicate Labels

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载