Update Ethiopia holidays: official source namings, WORKDAY category#2490
Update Ethiopia holidays: official source namings, WORKDAY category#2490arkid15r merged 2 commits intovacanza:devfrom
WORKDAY category#2490Conversation
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughThis update revises and expands support for Ethiopian holidays across code, documentation, tests, and localization. The Ethiopia holiday class now includes more descriptive holiday names, additional legal references, and new holidays such as Ethiopian Martyrs' Day and Nations, Nationalities and Peoples Day. The supported languages list is extended to include "en_ET", with a corresponding new localization file. Holiday categories now include both PUBLIC and WORKDAY. Tests are updated for the new holiday range and categories, and all relevant translation files are synchronized with the new holiday names and additions. Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (3)📓 Common learningsholidays/countries/ethiopia.py (1)tests/countries/test_ethiopia.py (1)⏰ Context from checks skipped due to timeout of 300000ms (1)
🔇 Additional comments (16)
✨ Finishing Touches
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:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2490 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 214 214
Lines 13527 13533 +6
Branches 1928 1929 +1
=========================================
+ Hits 13527 13533 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
README.md(1 hunks)holidays/countries/ethiopia.py(6 hunks)holidays/locale/am/LC_MESSAGES/ET.po(2 hunks)holidays/locale/ar/LC_MESSAGES/ET.po(1 hunks)holidays/locale/en_ET/LC_MESSAGES/ET.po(1 hunks)holidays/locale/en_US/LC_MESSAGES/ET.po(1 hunks)snapshots/countries/ET_COMMON.json(1 hunks)tests/countries/test_ethiopia.py(3 hunks)
🧰 Additional context used
🧠 Learnings (2)
holidays/locale/en_ET/LC_MESSAGES/ET.po (1)
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.
tests/countries/test_ethiopia.py (1)
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.
🧬 Code Graph Analysis (1)
tests/countries/test_ethiopia.py (2)
holidays/countries/ethiopia.py (2)
Ethiopia(24-130)ET(133-134)tests/common.py (7)
CommonCountryTests(356-374)TestCase(28-338)assertAliases(121-130)assertNoHolidays(292-294)assertHolidayName(195-199)assertNoHolidayName(273-275)assertLocalizedHolidays(327-338)
🔇 Additional comments (27)
README.md (1)
504-505: Updated country information for Ethiopia looks good.The changes accurately reflect the expanded language support (adding en_ET) and holiday category (WORKDAY) mentioned in the PR objectives. This keeps the README in sync with the actual code implementation.
holidays/locale/en_ET/LC_MESSAGES/ET.po (3)
13-29: Well-structured file header with appropriate metadata.The file header contains all the necessary metadata for the new en_ET locale including proper versioning, creation dates, and translator information. Good approach establishing this as a separate locale file for Ethiopian English.
30-33: Proper handling of estimated date format.Correctly preserves the format string placeholder for estimated dates while translating the supplementary text.
35-93: Holiday translations appear accurate and consistent.The translations from Amharic to English (Ethiopian variant) are well-structured and maintain consistent naming patterns for the standard holidays. These match the official source naming patterns mentioned in the PR description.
holidays/locale/am/LC_MESSAGES/ET.po (3)
17-27: Updated metadata for Amharic locale file.Properly updated version information and translator details to match the current release.
35-92: Enhanced holiday name formalizations in Amharic.The changes add more descriptive and formal names to the holiday entries, often adding "በዓል" (meaning festival/holiday) to maintain consistency. These updates match the official naming approach described in the PR.
94-100: New holiday entries added for completeness.Added entries for Ethiopian Martyrs' Day ("የሰማዕታት ቀን") and Nations, Nationalities and Peoples Day ("የብሔር ብሔረሰቦች ቀን") as specified in the PR objectives.
holidays/locale/en_US/LC_MESSAGES/ET.po (3)
17-27: Updated metadata for en_US locale file.Properly updated version information and translator details to match the current release.
39-93: Refined English holiday name translations.The changes refine English translations to better match the corresponding Amharic terms, such as changing "Epiphany Day" to "Epiphany" and updating "Workers' Day" to "International Workers' Day". These changes improve consistency and accuracy.
94-100: Added translations for new holidays.Successfully added translations for Ethiopian Martyrs' Day and Nations, Nationalities and Peoples Day, completing the localization for the newly added holidays.
holidays/locale/ar/LC_MESSAGES/ET.po (4)
17-27: Updated metadata looks good.The version and timestamp updates accurately reflect the PR's changes. Good job keeping the metadata in sync.
35-40: Christmas and Epiphany Arabic translations improved.The more descriptive Amharic strings now have better Arabic translations that include cultural context.
54-60: Good addition of formalized holiday names.The International Workers' Day and Ethiopian Patriots' Victory Day translations are appropriate and consistent with the full official names.
94-100: New workday holiday translations added correctly.The Ethiopian Martyrs' Day and Nations, Nationalities and Peoples Day translations have been properly added to match the WORKDAY category additions in the main module.
snapshots/countries/ET_COMMON.json (4)
3-5: Correct holidays standardization and addition.The renamed "Epiphany" and new "Ethiopian Martyrs' Day" entries correctly follow the naming standards established in the Ethiopia module.
8-11: Renamed holidays match module changes.The standardized "International Workers' Day" and "Ethiopian Patriots' Victory Day" names are consistent with the Ethiopia module updates.
426-426: Nations, Nationalities and Peoples Day correctly starts from 2006.The first occurrence of this holiday in 2006 aligns with the condition in the Ethiopia module.
690-694: 2024 Islamic holiday dates added correctly.The updated Eid al-Adha and Prophet's Birthday dates for 2024 match the constants added to the EthiopiaIslamicHolidays class.
holidays/countries/ethiopia.py (5)
17-20: Appropriate imports for new functionality.Added missing calendar month constant and the PUBLIC/WORKDAY category constants needed for the expanded functionality.
40-43: Good standardization of data sources and supported features.
- Setting start_year to 1976 based on the Negarit Gazeta Proclamation
- Adding WORKDAY category alongside PUBLIC
- Including en_ET as a supported language
These changes properly align with the official sources mentioned in the documentation.
82-84: Historically accurate holiday condition.Adding the year >= 1996 condition for Adwa Victory Day correctly reflects its official recognition date.
124-130: Well-structured workday holidays method.The new _populate_workday_holidays method cleanly implements the two workday-specific holidays with appropriate year conditions.
149-171: Updated Islamic holiday dates.The additions for 2024-2025 Islamic holidays keep the calendar current and accurate.
tests/countries/test_ethiopia.py (4)
23-26: Good test setup with specialized instances.The setup now includes:
- Updated year range matching the module's start_year
- A separate instance for testing non-estimated Islamic holidays
- A dedicated instance for testing WORKDAY category holidays
This approach provides thorough test coverage for all functionality.
46-49: Proper year-specific holiday testing.The Adwa Victory Day test correctly verifies that the holiday exists from 1996 onward and doesn't exist before then.
168-181: Comprehensive tests for new workday holidays.The tests for Ethiopian Martyrs' Day and Nations, Nationalities and Peoples Day properly verify:
- They exist in the workday_holidays instance
- They have the correct dates and year ranges
- They don't appear in the default PUBLIC category
This provides complete coverage of the new WORKDAY category holidays.
222-243: Well-implemented en_ET localization test.The new test for the en_ET locale properly verifies all the holiday translations, including the longer multi-line string for Nations, Nationalities and Peoples Day.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
README.md(1 hunks)holidays/countries/ethiopia.py(6 hunks)holidays/locale/am/LC_MESSAGES/ET.po(2 hunks)holidays/locale/ar/LC_MESSAGES/ET.po(1 hunks)holidays/locale/en_ET/LC_MESSAGES/ET.po(1 hunks)holidays/locale/en_US/LC_MESSAGES/ET.po(1 hunks)snapshots/countries/ET_COMMON.json(1 hunks)tests/countries/test_ethiopia.py(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
tests/countries/test_ethiopia.py (1)
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.
⏰ Context from checks skipped due to timeout of 300000ms (1)
- GitHub Check: Test build on windows-latest
🔇 Additional comments (38)
holidays/locale/en_US/LC_MESSAGES/ET.po (5)
17-27: Updated metadata correctly.The file has been updated with the correct version number and latest revision date, maintaining consistency with the project's versioning and documentation standards.
35-41: Improved holiday name consistency.Holiday names have been updated with more descriptive Amharic versions, and the English translations have been standardized. The change from "Epiphany Day" to just "Epiphany" matches common international usage.
54-60: More accurate holiday name translations.The change to "International Workers' Day" and "Ethiopian Patriots' Victory Day" provides more precise translations that better reflect the official names of these holidays in Ethiopia.
74-76: Clarified historical holiday name."Popular Revolution Commemoration Day" is a more accurate translation than the previous simpler name, providing better historical context for this holiday.
94-100: Successfully added new holidays.Ethiopian Martyrs' Day and Nations, Nationalities and Peoples Day have been correctly added with appropriate translations, matching the holiday additions in the Ethiopia class.
holidays/countries/ethiopia.py (10)
17-20: LGTM: Import updates support new holiday categories.Added the MAR month constant and PUBLIC/WORKDAY constants to support the expanded holiday types and date ranges.
27-34: Updated references with official sources.References have been enhanced with links to official proclamations and additional resources, providing better documentation for the holiday implementations.
40-43: Start year adjustment aligns with official documentation.Setting the start year to 1976 based on the Negarit Gazeta Proclamation No. 16/1975 is historically accurate and ensures that the holiday data begins with officially documented dates.
43-43: Added support for multiple languages including Ethiopian English.The addition of "en_ET" to supported languages matches the new locale file and provides better support for Ethiopian-specific English translations.
45-45: Added return type annotation for better type safety.Adding the
-> boolreturn type annotation to_is_leap_yearimproves code clarity and enables better type checking.
76-122: Holiday names updated to official translations.All holiday names have been updated with more descriptive Amharic versions that better match official naming conventions. The transition from "Workers' Day" to "International Workers' Day" and similar updates improve accuracy.
124-130: Successfully implemented workday holidays category.The new
_populate_workday_holidaysmethod correctly implements the WORKDAY category with Ethiopian Martyrs' Day and conditional addition of Nations, Nationalities and Peoples Day from 2006 onward.
149-149: Updated Islamic holiday dates for 2024.EID_AL_ADHA_DATES has been updated with the 2024 date, ensuring the calendar remains current.
160-160: Added 2025 date for Eid al-Fitr.EID_AL_FITR_DATES dictionary has been updated with the 2025 date, providing forward compatibility.
170-170: Added 2024 date for Mawlid.MAWLID_DATES has been updated with the 2024 date, ensuring the calendar covers upcoming holidays.
holidays/locale/en_ET/LC_MESSAGES/ET.po (5)
1-29: Successfully added Ethiopian English locale.The new en_ET locale file has been properly set up with complete metadata, including appropriate headers and generator information. The X-Source-Language tag correctly identifies Amharic as the source language.
35-54: Appropriate Ethiopian English translations.The translations correctly use Ethiopia-specific terminology, such as "Christmas Holiday" instead of "Christmas Day" and "Easter" instead of "Easter Sunday", reflecting local usage.
67-70: Added culturally specific translation.The Ethiopian New Year translation includes the indigenous name "Enkutatash" in parentheses, providing cultural context while maintaining clarity.
71-74: Used local terminology for Meskel.Using "Meskel Holiday" instead of "Finding of True Cross" reflects Ethiopian English usage and makes the holiday more recognizable to locals.
91-94: Simplified Prophet's Birthday to Mawlid.Using the term "Mawlid" instead of "Prophet's Birthday" aligns with local Ethiopian English usage for this Islamic holiday.
holidays/locale/ar/LC_MESSAGES/ET.po (5)
17-27: Updated Arabic locale metadata.The file has been correctly updated with the latest version number and revision date to maintain consistency with other locale files.
35-41: Enhanced Arabic translations with cultural context.The updated translations now include original holiday names in parentheses (like "جنا" for Christmas and "طمقت" for Epiphany), providing better cultural context and recognition.
54-60: Standardized international holiday names."International Workers' Day" and "Ethiopian Patriots' Victory Day" have been appropriately translated to their standard Arabic equivalents, maintaining consistency with international naming conventions.
67-72: Added indigenous terms to translations.Including the indigenous terms "إنكوتاتاش" (Enkutatash) for New Year and "مسقل" (Meskel) for the Finding of True Cross improves cultural authenticity of the translations.
94-100: Added translations for new holidays.The Arabic translations for Ethiopian Martyrs' Day and Nations, Nationalities and Peoples Day have been successfully added, completing the localization for all holidays.
README.md (1)
504-505: Good addition of en_ET locale and WORKDAY categoryThe update to include "en_ET" in the supported languages list and adding "WORKDAY" to supported categories for Ethiopia aligns with the broader implementation changes in the PR.
holidays/locale/am/LC_MESSAGES/ET.po (3)
17-19: Metadata updates look goodThe version upgrade from 0.44 to 0.72 and update to the revision date reflects the changes made in this PR.
35-44: Culturally accurate holiday namesThe renaming of holidays to include "በዓል" (holiday/festival) provides more culturally accurate and complete names in Amharic.
94-96: New holiday additions complete the implementationThe addition of the two new holidays ("የሰማዕታት ቀን" and "የብሔር ብሔረሰቦች ቀን") ensures consistency with the broader changes in the Ethiopia holiday class.
snapshots/countries/ET_COMMON.json (4)
4-5: Ethiopian Martyrs' Day correctly set as a recurring holidayThe Ethiopian Martyrs' Day has been properly added as a recurring holiday on February 20th starting from 1976.
8-9: Renamed to International Workers' Day for accuracyRenaming "Workers' Day" to "International Workers' Day" provides a more accurate and official naming convention.
425-426: Nations, Nationalities and Peoples Day correctly implementedThe new holiday "Nations, Nationalities and Peoples Day" has been properly added starting from 2006, which aligns with its official introduction.
690-694: Updated Islamic holidays for 2024The Islamic holidays (Eid al-Adha, Mawlid) have been updated for 2024, ensuring accuracy for upcoming years.
tests/countries/test_ethiopia.py (5)
15-16: Good import of category constantsAdding the import of PUBLIC and WORKDAY constants is necessary for the updated category tests.
23-26: Well-structured test setup with category filteringCreating separate instances for no-estimated holidays and workday-only holidays improves test clarity and coverage.
168-173: Proper testing of category-specific holidayThe test for Ethiopian Martyrs' Day correctly verifies it appears only in the WORKDAY category and not in the default category set.
175-181: Good temporal boundary testingThe test for Nations, Nationalities and Peoples Day correctly verifies it appears only from 2006 onward in the WORKDAY category and not in the default category set.
222-243: Comprehensive testing of new localeThe test for the en_ET locale thoroughly checks all holiday translations, including the more detailed name for National Unity Day.
WORKDAY category.WORKDAY category
|



Proposed change
_is_leap_year(self)to matchholidays/holiday_base.pyones as mentioned in Update_ThaiLunisolarandThaiCalendarHolidaysdocumentation #2439 .WORKDAYholiday categories from the official sources.en_US,amas appropriate with the official translations, addsen_ETwhich is accurate to the original source as well.start_yearto 1976 as we didn't have access to any documents prior to the Negarit Gazeta Proclamation No. 16/1975.Note
I tried to update the
arl10n for Ethiopia to match the official holiday names - but since the official source doesn't include Arabic nor did I speaks it, reviews by human reviewers are welcome.Type of change
holidaysfunctionality in general)Checklist
make check, all checks and tests are green