-
-
Notifications
You must be signed in to change notification settings - Fork 558
Update Bosnia and Herzegovina holidays #2869
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 estimated and observed-estimated labels to BosniaAndHerzegovina, updates observed label wording. Updates Bosnian, English (US), Serbian, and Ukrainian PO translations to match. Refactors and broadens tests to iterate across all subdivisions, updating expectations to the new labels and observed wording. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ 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 #2869 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 292 292
Lines 17349 17349
Branches 2259 2259
=========================================
Hits 17349 17349 ☔ 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: 3
📜 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 (6)
holidays/countries/bosnia_and_herzegovina.py
(1 hunks)holidays/locale/bs/LC_MESSAGES/BA.po
(2 hunks)holidays/locale/en_US/LC_MESSAGES/BA.po
(2 hunks)holidays/locale/sr/LC_MESSAGES/BA.po
(2 hunks)holidays/locale/uk/LC_MESSAGES/BA.po
(2 hunks)tests/countries/test_bosnia_and_herzegovina.py
(7 hunks)
🧰 Additional context used
🧠 Learnings (41)
📓 Common learnings
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.
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.
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.
📚 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/bosnia_and_herzegovina.py
holidays/locale/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.po
📚 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/bosnia_and_herzegovina.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/bosnia_and_herzegovina.py
holidays/locale/uk/LC_MESSAGES/BA.po
📚 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:
holidays/countries/bosnia_and_herzegovina.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/bosnia_and_herzegovina.py
holidays/locale/uk/LC_MESSAGES/BA.po
📚 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/bosnia_and_herzegovina.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/bosnia_and_herzegovina.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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.po
holidays/locale/uk/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
📚 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/bs/LC_MESSAGES/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/bs/LC_MESSAGES/BA.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/BA.po
holidays/locale/sr/LC_MESSAGES/BA.po
holidays/locale/en_US/LC_MESSAGES/BA.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/BA.po
📚 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/countries/test_bosnia_and_herzegovina.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/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-07-02T18:17:53.342Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:17:53.342Z
Learning: In the Saint Vincent and the Grenadines holidays implementation, New Year's Day is added without observed rules using `_add_new_years_day()` and should not include observed rule testing in its test method. Only holidays explicitly wrapped with `_add_observed()` have observed behavior.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-06-18T10:07:58.780Z
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/french_southern_territories.py:41-44
Timestamp: 2025-06-18T10:07:58.780Z
Learning: Territorial holiday classes that inherit from parent countries (like HolidaysAX from Finland, HolidaysSJ from Norway, HolidaysTF from France) follow a standard pattern of silently overriding self.subdiv in their _populate_public_holidays() method without validation, as this ensures they always use the correct subdivision code for their territory regardless of user input.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.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/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-06-16T12:28:31.641Z
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 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/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 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:
tests/countries/test_bosnia_and_herzegovina.py
📚 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 covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Applied to files:
tests/countries/test_bosnia_and_herzegovina.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:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-05-09T18:36:09.607Z
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-08-18T13:06:16.919Z
Learnt from: KJhellico
PR: vacanza/holidays#2783
File: tests/countries/test_eritrea.py:130-147
Timestamp: 2025-08-18T13:06:16.919Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all categories (PUBLIC, GOVERNMENT, etc.), not just the holidays from the default category. This is a framework requirement for comprehensive localization testing.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-04-02T18:38:35.164Z
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 Learning: 2025-07-02T10:22:33.053Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: tests/countries/test_bonaire_sint_eustatius_and_saba.py:225-306
Timestamp: 2025-07-02T10:22:33.053Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all subdivisions, not just subdivision-specific holidays. This is a framework requirement for proper localization testing.
Applied to files:
tests/countries/test_bosnia_and_herzegovina.py
📚 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/en_US/LC_MESSAGES/BA.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/en_US/LC_MESSAGES/BA.po
🧬 Code graph analysis (1)
tests/countries/test_bosnia_and_herzegovina.py (3)
tests/common.py (6)
setUpClass
(33-54)assertAliases
(122-131)assertHolidayName
(196-200)assertNoNonObservedHoliday
(249-251)assertNoHolidayName
(274-276)assertNoHoliday
(245-247)tests/countries/test_canada.py (1)
setUpClass
(22-44)holidays/countries/bosnia_and_herzegovina.py (3)
BosniaAndHerzegovina
(39-251)BA
(254-255)BIH
(258-259)
⏰ 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). (1)
- GitHub Check: Test Python 3.13 on macos-latest
🔇 Additional comments (33)
holidays/locale/bs/LC_MESSAGES/BA.po (3)
17-19
: Header metadata bump is fine.Version and revision date updates are consistent with ongoing l10n work.
30-39
: Adds estimated and observed-estimated msgids (correct).New entries present with proper c-format and the “observed, estimated” translator comment order.
42-42
: Observed wording updated to “slobodan dan”.Matches code change and convention. Leaving msgstr empty is correct for default language.
holidays/locale/sr/LC_MESSAGES/BA.po (4)
17-19
: Header metadata bump is fine.
30-34
: Adds estimated label translation (sr Cyrillic).Accurate and c-format preserved.
35-39
: Adds observed-estimated translation.Ordering and wording look good.
42-44
: Observed translation aligns with new Bosnian msgid.Looks correct.
holidays/locale/en_US/LC_MESSAGES/BA.po (4)
17-19
: Header metadata bump is fine.
30-34
: Adds estimated translation to en_US.Straightforward, c-format intact.
35-39
: Adds observed-estimated translation (order preserved).
42-42
: Observed msgid switched to “slobodan dan”.Translation remains “observed”, as expected.
holidays/locale/uk/LC_MESSAGES/BA.po (4)
17-19
: Header metadata bump is fine.
30-34
: Adds estimated translation (uk).Terminology “приблизна дата” looks correct; c-format intact.
35-39
: Adds observed-estimated translation with correct ordering.
42-44
: Observed translation aligns with new Bosnian msgid.Looks good.
tests/countries/test_bosnia_and_herzegovina.py (18)
36-43
: New Year’s Day coverage is thorough and correct.Name/observed-label expectations and per-subdivision observed maps match the rules in the country module.
Also applies to: 45-73
79-85
: Orthodox Christmas Eve subdivision split looks right.BIH/SRP only; BRC excluded. Matches implementation.
88-88
: Orthodox Christmas observed only for BRC: good assertions and negative cases.The positive and negative checks align with BRC-only observation; the base-scope no-holiday assertion is a nice guard.
Also applies to: 90-103
107-113
: Orthodox New Year restricted to SRP: correct.
118-125
: Independence Day restricted to BIH: correct.
129-149
: Brčko District Day logic and observed dates look correct.Observed dates fall on the next working day as expected; negative checks for other subdivs/base are good.
153-165
: Catholic Easter split (no BRC for Fri/Sun, all for Mon) is accurate.Nice clarity with explicit negatives for BRC where applicable.
Also applies to: 167-179, 189-190
200-202
: Orthodox Easter coverage looks right.All-subdiv for Good Friday; BIH/SRP only for Sunday/Monday; negatives for BRC are correct.
Also applies to: 204-204, 207-207, 211-216, 218-218, 225-229
266-272
: Victory Day excluded from BRC: correct.
276-276
: Eid al-Fitr: 1st/2nd day handling per subdiv is correct.BIH/SRP include both days; BRC only day 1. Negatives are well placed.
Also applies to: 282-282, 288-297
300-300
: Eid al-Adha: mirrors al-Fitr logic correctly.Also applies to: 308-308, 315-323
328-335
: Dayton Agreement Day in SRP only: correct.
340-346
: Statehood Day in BIH only: correct.
347-356
: Catholic Christmas Eve excluded from BRC: correct.
360-375
: Catholic Christmas observed (BRC-only) checks are solid with explicit negatives elsewhere.
425-425
: 2021 snapshots look consistent with rules and combined-label formatting.The combined holiday string ordering is consistent with project norms.
Also applies to: 446-446
462-462
: Default locale l10n list: observed wording updated to “slobodan dan” looks correct.Coverage includes BRC-only observed Christmas and cross-subdiv Labor Day observed overlap.
Also applies to: 477-477, 485-485
522-522
: Serbian l10n: observed wording “слободан дан” applied consistently.Also applies to: 536-536, 544-544
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 🇧🇦
# Conflicts: # holidays/countries/bosnia_and_herzegovina.py # 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
|
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.
👍
Proposed change
Update Bosnia and Herzegovina holidays:
observed_label
translationestimated_label
andobserved_estimated_label
Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.