-
-
Notifications
You must be signed in to change notification settings - Fork 554
Add estimated_label
to all countries with Islamic holidays
#2860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary by CodeRabbit
WalkthroughAdds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
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 detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (13)📓 Common learnings
📚 Learning: 2025-04-03T05:59:57.480Z
Applied to files:
📚 Learning: 2025-08-25T22:19:01.342Z
Applied to files:
📚 Learning: 2025-03-19T16:53:00.375Z
Applied to files:
📚 Learning: 2025-04-04T10:52:41.546Z
Applied to files:
📚 Learning: 2025-04-13T19:10:31.502Z
Applied to files:
📚 Learning: 2025-03-19T16:54:58.657Z
Applied to files:
📚 Learning: 2025-08-21T06:52:25.511Z
Applied to files:
📚 Learning: 2025-08-28T02:34:11.625Z
Applied to files:
📚 Learning: 2025-08-22T19:06:04.303Z
Applied to files:
📚 Learning: 2025-08-28T11:45:56.847Z
Applied to files:
📚 Learning: 2025-06-25T10:12:30.448Z
Applied to files:
📚 Learning: 2025-04-03T13:03:16.558Z
Applied to files:
⏰ 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)
🔇 Additional comments (4)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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.
📒 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 msgfmtIt 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 providesmsgfmt
) and run:for f in holidays/locale/*/LC_MESSAGES/BA.po; do echo "Checking $f" msgfmt --check-format -o /dev/null "$f" doneConfirm 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.
There was a problem hiding this 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 || trueholidays/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 || trueholidays/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 || trueholidays/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.
📒 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 keepingestimated_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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🛠️
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
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
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.