Update United States holidays: add Native American Heritage Day in WA#3045
Update United States holidays: add Native American Heritage Day in WA#3045arkid15r merged 4 commits intovacanza:devfrom
Conversation
Summary by CodeRabbit
WalkthroughAdds Native American Heritage Day for Washington state (effective 2014), bumps locale version to 0.85, adds English and Thai translations, updates tests, and adds a contributor entry. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
CONTRIBUTORS(1 hunks)holidays/countries/united_states.py(1 hunks)holidays/locale/en_US/LC_MESSAGES/US.po(2 hunks)holidays/locale/th/LC_MESSAGES/US.po(2 hunks)tests/countries/test_united_states.py(2 hunks)
🧰 Additional context used
🧠 Learnings (32)
📓 Common learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2829
File: holidays/countries/canada.py:281-284
Timestamp: 2025-08-19T16:13:06.400Z
Learning: For Manitoba's National Day for Truth and Reconciliation (Sep 30), Manitoba's Bill 4 creates two separate rules: Employment Standards Code prohibits date substitution for employers/employees (so Sep 30 is always the holiday), while Public Schools Act requires school closure on following Monday only when Sep 30 falls on weekend. The holidays library's PUBLIC category follows employment law, not school schedules.
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-09-26T13:58:49.363Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:148-151
Timestamp: 2025-09-26T13:58:49.363Z
Learning: In the holidays project, when translating holiday names in .po files, the msgstr should be a faithful translation of the original msgid (in the country's default language), not influenced by English commentary or common en_US names. For example, "Día de la Pascua Granada" (Spanish) correctly translates to "Dia de la Pasqua Granada" (Catalan), even though the English comment refers to it as "Whit Monday".
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-09-26T13:44:12.652Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:97-100
Timestamp: 2025-09-26T13:44:12.652Z
Learning: When fixing localization issues in the holidays project, corrections should be made in both the Python source code comments and the en_US .po file msgstr entries, then all other language .po files should be regenerated to pick up the corrected en_US comments.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-06-10T12:17:58.880Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-05-10T04:34:02.406Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/locale/sv_FI/LC_MESSAGES/AX.po:17-27
Timestamp: 2025-05-10T04:34:02.406Z
Learning: The `Plural-Forms` header isn't used in .po file generation for the holidays project and doesn't need to be manually added to localization files.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.po
📚 Learning: 2025-06-25T10:09:29.029Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
Repo: vacanza/holidays PR: 2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.poholidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/US.po
📚 Learning: 2025-09-28T05:42:12.777Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:221-223
Timestamp: 2025-09-28T05:42:12.777Z
Learning: In tests/countries/test_indonesia.py, the manual set inclusion checks using get_named and years_found for Lunar New Year (test_lunar_new_year) and Vesak Day (test_vesak_day) are intentional and should remain until both holidays get their own `{insert}_no_estimated` flags implemented, rather than using standard harness assertions like assertHolidayName/assertNoHolidayName.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-11-08T05:09:56.141Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_french_polynesia.py:19-22
Timestamp: 2025-11-08T05:09:56.141Z
Learning: In the vacanza/holidays project's test framework (PR #2881 onwards), the base class CommonCountryTests provides a default test_no_holidays implementation that automatically tests years=start_year - 1 for standard PUBLIC category cases. Individual country test files should only override test_no_holidays when the country supports additional non-PUBLIC categories (GOVERNMENT, WORKDAY, OPTIONAL, etc.) with different start years requiring separate validation.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.657Z
Learning: The default estimated_label change from "%s (estimated)" to "%s" in holidays/groups/eastern.py is intentional to remove English-only fallback text from localized holiday names. Countries that need estimated labels should define them properly with localization support rather than relying on the English fallback.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-04-02T18:38:35.164Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_united_states.py
📚 Learning: 2025-11-08T05:36:32.762Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_faroe_islands.py:16-16
Timestamp: 2025-11-08T05:36:32.762Z
Learning: In PR #2881 onwards, the vacanza/holidays project moved to centralized alias testing via the `check_aliases` method in `tests/common.py`. Individual country test files no longer need to import country code aliases (e.g., FO, FRO for Faroe Islands) or define `test_country_aliases` methods. The common test framework automatically validates all aliases by dynamically importing them from the registry and calling `assertAliases`.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support DO use tr() wrappers around holiday names when calling _add_* methods. This is the correct pattern for l10n-enabled country implementations, contrary to previous learning about translation being handled internally by _add_* methods.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-06-25T10:36:39.909Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2678
File: tests/countries/test_united_states_virgin_islands.py:59-84
Timestamp: 2025-06-25T10:36:39.909Z
Learning: In the holidays library, test methods typically do not have docstrings. Only special test methods that need specific explanation (like edge cases or unique behaviors) have docstrings. Regular test methods like test_l10n_default, test_l10n_th, test_government_holidays, etc. should not have docstrings added.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-09-17T15:16:16.192Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:183-191
Timestamp: 2025-09-17T15:16:16.192Z
Learning: The special_public_holidays formatting pattern in the holidays codebase follows a consistent convention: single entries per year use flat tuple format like `2024: (MONTH, DAY, name)`, while multiple entries per year use tuple-of-tuples format like `2024: ((MONTH, DAY, name), (MONTH, DAY, name))`. This pattern is used consistently across all countries.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-03-19T16:53:00.375Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Applied to files:
tests/countries/test_united_states.py
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Applied to files:
holidays/locale/th/LC_MESSAGES/US.po
📚 Learning: 2025-07-02T18:17:53.342Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:
holidays/countries/united_states.py
📚 Learning: 2025-10-28T17:26:45.090Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3026
File: holidays/countries/spain.py:189-189
Timestamp: 2025-10-28T17:26:45.090Z
Learning: In the vacanza/holidays codebase, `_populate` methods (such as `_populate_public_holidays`, `_populate_subdiv_holidays`, and subdivision-specific methods like `_populate_subdiv_XX_public_holidays`) intentionally do not include return type annotations like `-> None`. This is a consistent pattern across country implementations (e.g., Germany, United States, Spain) and should not be changed even when static analysis tools like Ruff suggest adding them.
<!-- </add_learning>
Applied to files:
holidays/countries/united_states.py
📚 Learning: 2025-06-18T10:07:58.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:
holidays/countries/united_states.py
📚 Learning: 2025-06-14T11:04:31.180Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2609
File: holidays/countries/nauru.py:57-60
Timestamp: 2025-06-14T11:04:31.180Z
Learning: In the holidays library, the base `HolidayBase._populate()` method already includes a guard clause that prevents holiday population methods like `_populate_public_holidays()` from being called when the year is before `start_year` or after `end_year`. Therefore, individual country implementations do not need to add their own guard clauses for years before independence or other start dates.
Applied to files:
holidays/countries/united_states.py
📚 Learning: 2025-07-14T20:23:48.198Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2654
File: holidays/countries/cabo_verde.py:133-141
Timestamp: 2025-07-14T20:23:48.198Z
Learning: The holidays library provides helper methods `_add_holiday_2nd_sun_of_may()` and `_add_holiday_3rd_sun_of_jun()` for adding holidays on the 2nd Sunday of May and 3rd Sunday of June respectively. These methods are used across multiple country implementations including Latvia, Finland, Belarus, Malaysia, Madagascar, and Cape Verde.
Applied to files:
holidays/countries/united_states.py
🔇 Additional comments (8)
CONTRIBUTORS (1)
166-166: LGTM!Contributor addition is correctly placed in alphabetical order.
holidays/locale/th/LC_MESSAGES/US.po (2)
17-17: Version bump looks good.The Project-Id-Version update to 0.85 is consistent with the en_US locale file.
411-413: Thai translation added correctly.The translation entry follows the standard format and placement. Note that the PR description indicates this translation is from Google Translate.
holidays/countries/united_states.py (1)
1284-1286: Implementation looks solid.The holiday correctly uses
_add_holiday_1_day_past_4th_thu_of_novfor the Friday after Thanksgiving, starts in 2014 per SB 6078, and follows the established pattern for Washington state holidays.holidays/locale/en_US/LC_MESSAGES/US.po (2)
17-17: Version update is consistent.The Project-Id-Version bump to 0.85 aligns with the Thai locale file.
411-413: Translation entry properly formatted.The empty msgstr is correct for the en_US default locale, and placement after Bennington Battle Day is appropriate.
tests/countries/test_united_states.py (2)
2266-2267: Test expectations updated correctly.The addition of "Native American Heritage Day" to the 2022-11-25 test data is accurate and maintains proper alphabetical ordering.
2372-2374: Thai localization test updated appropriately.The Thai translation for Native American Heritage Day is correctly included in the expected output for 2022-11-25.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3045 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 306 306
Lines 17991 17993 +2
Branches 2276 2277 +1
=========================================
+ Hits 17991 17993 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PPsyrius
left a comment
There was a problem hiding this comment.
A bit standardization for th l10n, otherwise this already looks pretty good 👍
Co-authored-by: Panpakorn Siripanich <[email protected]> Signed-off-by: waltdowning <[email protected]>
Co-authored-by: Panpakorn Siripanich <[email protected]> Signed-off-by: waltdowning <[email protected]>
|
arkid15r
left a comment
There was a problem hiding this comment.
Thank you @waltdowning



Proposed change
Adds the Washington state public holiday Native American Heritage Day.
Added translation for
thper Google Translate.Modified
test_united_states.pyto expect the holiday on November 25, 2022.Resolves #3043.
Type of change
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.