Skip to content

Conversation

@KJhellico
Copy link
Collaborator

Proposed change

Update countries with Eastern holidays:

  • add estimated holidays labels (estimated_label, observed_estimated_label)
  • standardize terminology in countries that use traditional Chinese (Taiwan, Hong Kong, Macau)

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Summary by CodeRabbit

  • New Features

    • Added “estimated” and “observed, estimated” labels for China, Hong Kong, Macau, Mongolia, South Korea, Taiwan, and Vietnam (with Macau-specific conditional phrasing).
  • Refactor

    • Eastern calendar now uses class-provided estimated labels.
  • Bug Fixes

    • Correctly strips full-width parentheses when building observed holiday names.
  • Tests

    • Updated expected labels for Hong Kong, Taiwan, China; adjusted common checks; fixed KR snapshot punctuation.
  • Chores

    • Extensive localization updates and metadata bumps across multiple locales (en, zh, ko, vi, th, pt, mn), including new strings for estimated/observed-estimated and revised observed wording.

Walkthrough

Adds estimated and observed‑estimated label templates to several Asian country holiday classes, updates observed-label wording for Hong Kong and Taiwan, adjusts Eastern group label usage and observed-label trimming, updates many locale PO files, and updates tests and a snapshot to expect the new labels.

Changes

Cohort / File(s) Summary of changes
Country classes — labels added/updated
holidays/countries/china.py, holidays/countries/hongkong.py, holidays/countries/macau.py, holidays/countries/mongolia.py, holidays/countries/south_korea.py, holidays/countries/taiwan.py, holidays/countries/vietnam.py
Add estimated_label and observed_estimated_label attributes (localized templates). Update observed_label in HongKong and Taiwan from "慶祝" → "補假". Macau assigns observed_estimated_label per-year in its population method. No date-calculation changes.
Eastern group label usage
holidays/groups/eastern.py
Removed local fallback for estimated label; use self.estimated_label directly when formatting estimated holiday names.
Observed label trimming/normalization
holidays/observed_holiday_base.py
Extend trimming to include full‑width parentheses / when deriving estimated_label_text for observed names.
Tests
tests/common.py, tests/countries/test_hongkong.py, tests/countries/test_taiwan.py, tests/countries/test_china.py
Update expectations to new observed wording ("補假") and assert presence of estimated_label for EasternCalendarHolidays; test dates unchanged.
Locale files — translations & metadata
holidays/locale/**/LC_MESSAGES/*.po (e.g. en_HK, en_MO, en_US variants, ko, mn, vi, th, pt_MO, zh_CN, zh_HK, zh_MO, zh_TW, ...)
Bump PO headers (Project‑Id‑Version, PO‑Revision‑Date, Last‑Translator); add msgids/translations for estimated and observed+estimated labels (e.g. %s(推定), %s(補假,推定), localized equivalents); replace some observed msgids from "慶祝" → "補假".
Snapshots / minor text fixes
snapshots/countries/KR_COMMON.json
Remove trailing period from "National Conference for Unification Election Day." → "National Conference for Unification Election Day".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • PPsyrius
  • arkid15r

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely and accurately summarizes the primary change: adding estimated-holiday labels for countries with Eastern holidays, which matches the added estimated_label and observed_estimated_label attributes and localization updates in the diff. It is a single clear sentence without extraneous detail, so a reviewer scanning history will understand the main intent.
Description Check ✅ Passed The PR description is on-topic and matches the changeset: it states the addition of estimated_label and observed_estimated_label across Eastern country modules and the standardization of observed-label terminology for traditional Chinese locales, and notes tests/locales were updated and checks were run. The level of detail is sufficient for this lenient check and aligns with the provided file summaries and objectives.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9af5201 and feef176.

📒 Files selected for processing (1)
  • snapshots/countries/KR_COMMON.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
Learning: In the holidays library, maintainers have agreed to keep comments like "# %s (estimated)." above estimated_label declarations across country files, even though they duplicate the label content. This decision was made to maintain consistency and usefulness regardless of localization support status.
Learnt from: KJhellico
PR: vacanza/holidays#2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.
Learnt from: 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#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#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.
⏰ 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). (2)
  • GitHub Check: Test docs build
  • GitHub Check: Build distribution

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 12, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2924   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          295       296    +1     
  Lines        17519     17584   +65     
  Branches      2267      2269    +2     
=========================================
+ Hits         17519     17584   +65     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

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

⚠️ Outside diff range comments (3)
holidays/observed_holiday_base.py (2)

180-191: Fix: remove estimated suffix for both ASCII and full‑width parens; avoid AttributeError when missing observed_estimated_label.

Current replace only matches "(…)" without the preceding space and ignores "(…)", so names like “春节(推定)” become “春节(推定)(观察日,推定)”. Also, getattr(self, "observed_estimated_label") can raise if undefined.

Apply:

@@
-            estimated_label_text = estimated_label.strip("%s ()()")
+            estimated_label_text = estimated_label.strip("%s ()()")
@@
-                holiday_name = self.tr(name)
-                observed_estimated_label = None
-                if estimated_label_text and estimated_label_text in holiday_name:
-                    holiday_name = holiday_name.replace(f"({estimated_label_text})", "").strip()
-                    observed_estimated_label = self.tr(getattr(self, "observed_estimated_label"))
+                holiday_name = self.tr(name)
+                observed_estimated_label = None
+                if estimated_label_text and estimated_label_text in holiday_name:
+                    # Drop trailing estimated marker in either ASCII or full-width parens,
+                    # with or without a leading space.
+                    for marker in (f"({estimated_label_text})", f"({estimated_label_text})",
+                                   f" ({estimated_label_text})", f" ({estimated_label_text})"):
+                        holiday_name = holiday_name.replace(marker, "")
+                    holiday_name = holiday_name.strip()
+                    obs_est_lbl = getattr(self, "observed_estimated_label", None)
+                    observed_estimated_label = self.tr(obs_est_lbl) if obs_est_lbl else None

Also add the regex-free approach keeps dependencies minimal. If you prefer a single pass, I can switch this to a small re.sub with both paren variants.


13-18: Optional: future-proof with a tiny helper.

If similar stripping is needed elsewhere, consider a private util to normalize/remove “(estimated)” in both paren styles to avoid duplication.

tests/common.py (1)

384-405: Fix substring check for full-width parentheses.

Current strip("%s ()") misses full-width brackets and will fail for CJK locales. Use a placeholder removal plus ASCII/full-width bracket trim before the containment check.

Apply:

-            self.assertIn(estimated_label.strip("%s ()"), observed_estimated_label)
+            estimated_text = estimated_label.replace("%s", "").strip(" ()()")
+            self.assertIn(estimated_text, observed_estimated_label)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0128617 and f5ba647.

📒 Files selected for processing (39)
  • holidays/countries/china.py (1 hunks)
  • holidays/countries/hongkong.py (1 hunks)
  • holidays/countries/macau.py (2 hunks)
  • holidays/countries/mongolia.py (1 hunks)
  • holidays/countries/south_korea.py (1 hunks)
  • holidays/countries/taiwan.py (1 hunks)
  • holidays/countries/vietnam.py (1 hunks)
  • holidays/groups/eastern.py (1 hunks)
  • holidays/locale/en_HK/LC_MESSAGES/HK.po (2 hunks)
  • holidays/locale/en_MO/LC_MESSAGES/MO.po (3 hunks)
  • holidays/locale/en_US/LC_MESSAGES/CN.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/HK.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/KR.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/MN.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/MO.po (3 hunks)
  • holidays/locale/en_US/LC_MESSAGES/TW.po (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/VN.po (2 hunks)
  • holidays/locale/ko/LC_MESSAGES/KR.po (2 hunks)
  • holidays/locale/mn/LC_MESSAGES/MN.po (2 hunks)
  • holidays/locale/pt_MO/LC_MESSAGES/MO.po (3 hunks)
  • holidays/locale/th/LC_MESSAGES/CN.po (2 hunks)
  • holidays/locale/th/LC_MESSAGES/HK.po (2 hunks)
  • holidays/locale/th/LC_MESSAGES/KR.po (2 hunks)
  • holidays/locale/th/LC_MESSAGES/MO.po (3 hunks)
  • holidays/locale/th/LC_MESSAGES/TW.po (2 hunks)
  • holidays/locale/th/LC_MESSAGES/VN.po (2 hunks)
  • holidays/locale/vi/LC_MESSAGES/VN.po (2 hunks)
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po (2 hunks)
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po (2 hunks)
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po (3 hunks)
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po (2 hunks)
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po (2 hunks)
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po (3 hunks)
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po (2 hunks)
  • holidays/locale/zh_TW/LC_MESSAGES/TW.po (2 hunks)
  • holidays/observed_holiday_base.py (1 hunks)
  • tests/common.py (2 hunks)
  • tests/countries/test_hongkong.py (15 hunks)
  • tests/countries/test_taiwan.py (38 hunks)
🧰 Additional context used
🧠 Learnings (71)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
Learning: In the holidays library, maintainers have agreed to keep comments like "# %s (estimated)." above estimated_label declarations across country files, even though they duplicate the label content. This decision was made to maintain consistency and usefulness regardless of localization support status.
Learnt from: 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#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.
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:

  • holidays/countries/mongolia.py
  • tests/common.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/groups/eastern.py
  • holidays/countries/vietnam.py
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.py
  • holidays/countries/macau.py
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • tests/countries/test_taiwan.py
📚 Learning: 2025-08-28T11:45:56.892Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
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/mongolia.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/groups/eastern.py
  • holidays/countries/vietnam.py
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.py
  • holidays/countries/macau.py
  • holidays/locale/en_US/LC_MESSAGES/KR.po
📚 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/mongolia.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/groups/eastern.py
  • holidays/countries/vietnam.py
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.py
  • holidays/countries/macau.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/mongolia.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/groups/eastern.py
  • holidays/countries/vietnam.py
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.py
  • holidays/countries/macau.py
  • holidays/locale/zh_TW/LC_MESSAGES/CN.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/mongolia.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/groups/eastern.py
  • holidays/countries/vietnam.py
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.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/mongolia.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/groups/eastern.py
  • holidays/countries/vietnam.py
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.py
  • holidays/countries/macau.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/mongolia.py
  • tests/common.py
  • holidays/observed_holiday_base.py
  • holidays/countries/china.py
  • holidays/groups/eastern.py
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.py
  • holidays/countries/macau.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/mongolia.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/countries/hongkong.py
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/countries/south_korea.py
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
📚 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/mongolia.py
  • holidays/observed_holiday_base.py
  • holidays/countries/taiwan.py
  • holidays/countries/china.py
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.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/common.py
  • holidays/groups/eastern.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:

  • tests/common.py
  • holidays/countries/hongkong.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants internally through parent class implementations even when these constants don't appear directly in the file. Removing imports that seem unused based on a simple text search could break functionality.

Applied to files:

  • tests/common.py
  • holidays/observed_holiday_base.py
  • holidays/groups/eastern.py
📚 Learning: 2025-08-21T05:56:33.276Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:15-16
Timestamp: 2025-08-21T05:56:33.276Z
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-04-23T14:55:35.504Z
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.

Applied to files:

  • tests/common.py
  • tests/countries/test_hongkong.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
  • tests/countries/test_hongkong.py
  • tests/countries/test_taiwan.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/common.py
📚 Learning: 2025-08-26T21:29:47.753Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: tests/common.py:365-372
Timestamp: 2025-08-26T21:29:47.753Z
Learning: In the holidays library, countries with Islamic holidays inherit directly from the IslamicHolidays class (e.g., `class Afghanistan(HolidayBase, InternationalHolidays, IslamicHolidays)`). The separate `_CustomIslamicHolidays` classes (like `AfghanistanIslamicHolidays`) are helper classes for specific date data, not the main country classes. Therefore, `isinstance(holidays_instance, IslamicHolidays)` is sufficient to detect all countries with Islamic holidays.

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-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-08-11T13:48:45.953Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/calendars/ethiopian.py:13-13
Timestamp: 2025-08-11T13:48:45.953Z
Learning: The holidays library does not use `__all__` declarations in calendar modules (holidays/calendars/). Calendar files follow a standard pattern of defining constants and functions directly without explicit exports, similar to the convention used in country modules.

Applied to files:

  • tests/common.py
📚 Learning: 2025-03-30T08:08:30.415Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:84-85
Timestamp: 2025-03-30T08:08:30.415Z
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-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-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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/th/LC_MESSAGES/TW.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/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/zh_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.po
  • holidays/locale/pt_MO/LC_MESSAGES/MO.po
📚 Learning: 2025-08-31T09:54:07.868Z
Learnt from: PPsyrius
PR: vacanza/holidays#2874
File: tests/countries/test_taiwan.py:347-349
Timestamp: 2025-08-31T09:54:07.868Z
Learning: In Taiwan's holiday implementation, Children's Day (兒童節) appears in multiple categories simultaneously: Optional holidays (1998-2000 via special_optional_holidays_observed for observed date handling), Workday holidays (1998-2010), and Public holidays (2011+). The Optional category includes observed date logic for 1998-2000 that moves Children's Day to April 3rd when April 4th falls on Sunday.

Applied to files:

  • holidays/locale/zh_TW/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/th/LC_MESSAGES/TW.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/en_US/LC_MESSAGES/VN.po
  • holidays/locale/en_US/LC_MESSAGES/TW.po
  • holidays/locale/en_US/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/mn/LC_MESSAGES/MN.po
  • holidays/locale/en_US/LC_MESSAGES/MO.po
  • holidays/locale/vi/LC_MESSAGES/VN.po
  • holidays/locale/en_MO/LC_MESSAGES/MO.po
  • holidays/locale/zh_CN/LC_MESSAGES/MO.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
📚 Learning: 2025-04-02T04:54:07.204Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:25-25
Timestamp: 2025-04-02T04:54:07.204Z
Learning: For English-speaking countries in the holidays library (like Trinidad and Tobago), the `default_language` and `supported_languages` parameters are optional. If languages are added for such countries, ensure that `en_US` is included in the list alongside the regional code variant (e.g., `en_TT` for Trinidad and Tobago).

Applied to files:

  • holidays/countries/taiwan.py
  • holidays/countries/hongkong.py
  • holidays/countries/south_korea.py
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/en_US/LC_MESSAGES/MN.po
📚 Learning: 2025-08-11T10:14:28.517Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/christian.py:328-343
Timestamp: 2025-08-11T10:14:28.517Z
Learning: For Ethiopian holidays in the `holidays/groups/christian.py` file, docstring wording should maintain source-accurate phrasing (e.g., "in coincidence of" for Ethiopian New Year/Enkutatash), even when it might read awkwardly in English, to ensure consistency with official Ethiopian documentation.

Applied to files:

  • holidays/groups/eastern.py
📚 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/en_US/LC_MESSAGES/CN.po
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/th/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
📚 Learning: 2025-04-08T14:46:10.656Z
Learnt from: KJhellico
PR: vacanza/holidays#2437
File: holidays/countries/bhutan.py:27-30
Timestamp: 2025-04-08T14:46:10.656Z
Learning: For country classes in the holidays library, there's no need to explicitly specify `supported_categories = (PUBLIC,)` when PUBLIC is the only category being used, as it's already the default category inherited from HolidayBase.

Applied to files:

  • holidays/countries/hongkong.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_hongkong.py
📚 Learning: 2025-07-02T18:21:59.302Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:21:59.302Z
Learning: In the Saint Vincent and the Grenadines holiday tests, for holidays without observed rules that only require a single assertHolidayName call, pass the holiday name directly as a string literal rather than storing it in a variable first for cleaner, more concise code.

Applied to files:

  • tests/countries/test_hongkong.py
📚 Learning: 2025-09-04T08:54:35.319Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_albania.py:40-42
Timestamp: 2025-09-04T08:54:35.319Z
Learning: In the vacanza/holidays project test files, extract holiday name strings to local variables only when they are reused multiple times within the same test method (e.g., used in both assertHolidayName and assertNoHolidayName calls). When a holiday name is used only once, keep it inline rather than extracting it to a variable for the sake of consistency.

Applied to files:

  • tests/countries/test_hongkong.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_hongkong.py
  • tests/countries/test_taiwan.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_hongkong.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_hongkong.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_hongkong.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_hongkong.py
  • tests/countries/test_taiwan.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_hongkong.py
  • tests/countries/test_taiwan.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_hongkong.py
  • tests/countries/test_taiwan.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_argentina.py:375-375
Timestamp: 2025-09-03T16:49:35.246Z
Learning: In the holidays library, national holiday tests use self.full_range (or similar comprehensive year ranges) even when explicit test dates only show modern observance. This is intentional for correctness and comprehensive coverage, unlike subdivision-specific holidays which have explicit year boundaries based on known start dates.

Applied to files:

  • tests/countries/test_hongkong.py
📚 Learning: 2025-09-03T14:05:10.592Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_aruba.py:77-79
Timestamp: 2025-09-03T14:05:10.592Z
Learning: The assertNoHolidayName helper method in the vacanza/holidays test framework accepts both individual years (scalars) and iterables of years, making calls like assertNoHolidayName(name, AW.start_year, range(2023, 2050)) valid where AW.start_year is a single integer year.

Applied to files:

  • tests/countries/test_hongkong.py
  • tests/countries/test_taiwan.py
📚 Learning: 2025-03-04T10:06:09.555Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:385-396
Timestamp: 2025-03-04T10:06:09.555Z
Learning: The winter solstice calculation in Macau's holiday implementation uses the same approximation method as Hong Kong's implementation and has been verified against the official Macau calendar for years 2017-2025. The method is valid for years 1952-2099.

Applied to files:

  • tests/countries/test_hongkong.py
📚 Learning: 2025-07-08T10:20:04.069Z
Learnt from: KJhellico
PR: vacanza/holidays#2701
File: holidays/countries/palestine.py:131-131
Timestamp: 2025-07-08T10:20:04.069Z
Learning: In Palestine, both the first and second days of Christmas (Orthodox and Catholic) are holidays. The first day is a nationwide public holiday, while the second day is a holiday for the relevant religious groups (Catholic or Orthodox) with the same name. The implementation correctly uses `_add_christmas_day` for nationwide holidays and `_add_christmas_day_two` for group-specific second days.

Applied to files:

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

Applied to files:

  • tests/countries/test_hongkong.py
📚 Learning: 2025-08-19T19:47:21.735Z
Learnt from: KJhellico
PR: vacanza/holidays#2829
File: tests/countries/test_canada.py:291-296
Timestamp: 2025-08-19T19:47:21.735Z
Learning: In the holidays library, HolidayBase objects automatically populate years on-demand when expand=True (the default). When checking dates from years not initially in the years range, those years are automatically populated via the logic at line 646 in holiday_base.py: "if self.expand and dt.year not in self.years:". This means tests can check dates outside the initial year range without needing separate holiday instances.

Applied to files:

  • tests/countries/test_hongkong.py
📚 Learning: 2025-06-26T13:20:10.172Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: holidays/locale/th/LC_MESSAGES/US.po:30-34
Timestamp: 2025-06-26T13:20:10.172Z
Learning: In the holidays library Thai localizations, the "observed" format consistently uses "ชดเชย%s" without spaces between the Thai word and placeholder across all .po files in the codebase.

Applied to files:

  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/MO.po
  • holidays/locale/th/LC_MESSAGES/VN.po
📚 Learning: 2025-03-05T02:35:03.298Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.

Applied to files:

  • holidays/countries/macau.py
📚 Learning: 2025-03-04T11:41:56.389Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:284-366
Timestamp: 2025-03-04T11:41:56.389Z
Learning: For Macau holidays implementation, maintaining separate methods for each holiday category (PUBLIC, MANDATORY, GOVERNMENT) is preferred because these categories are based on different sets of laws and have distinct historical evolution.

Applied to files:

  • holidays/countries/macau.py
📚 Learning: 2025-03-04T14:38:15.029Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/locale/zh_CN/LC_MESSAGES/MO.po:230-234
Timestamp: 2025-03-04T14:38:15.029Z
Learning: For Macau holidays localization, official Macau government sources (e.g., gov.mo) should be the reference for correct terminology, even when it differs from mainland Chinese standards.

Applied to files:

  • holidays/countries/macau.py
📚 Learning: 2025-07-09T20:27:37.760Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: holidays/countries/christmas_island.py:110-112
Timestamp: 2025-07-09T20:27:37.760Z
Learning: In Christmas Island, ANZAC Day (April 25) follows the same observed holiday rules as other holidays, using the SAT_SUN_TO_NEXT_MON rule to move to Monday when it falls on a weekend. The implementation correctly uses `_add_observed` wrapper around `_add_anzac_day`.

Applied to files:

  • holidays/countries/macau.py
📚 Learning: 2025-03-23T10:11:50.465Z
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:63-70
Timestamp: 2025-03-23T10:11:50.465Z
Learning: In the holidays library, the `SAT_SUN_TO_NEXT_MON_TUE` rule is specifically used for consecutive holidays (like Christmas Day and Boxing Day) to ensure they're observed on separate weekdays (Monday and Tuesday) when they fall on weekends, while `SAT_SUN_TO_NEXT_MON` is used as the default rule for other holidays.

Applied to files:

  • holidays/countries/macau.py
📚 Learning: 2025-03-13T15:17:45.519Z
Learnt from: PPsyrius
PR: vacanza/holidays#2349
File: tests/countries/test_taiwan.py:0-0
Timestamp: 2025-03-13T15:17:45.519Z
Learning: For Taiwan's holiday system, different categories (GOVERNMENT, OPTIONAL, SCHOOL, WORKDAY) have distinct uses and contexts, justifying separate instances rather than parameterization in tests.

Applied to files:

  • tests/countries/test_taiwan.py
📚 Learning: 2025-08-31T09:54:22.093Z
Learnt from: PPsyrius
PR: vacanza/holidays#2874
File: tests/countries/test_taiwan.py:379-381
Timestamp: 2025-08-31T09:54:22.093Z
Learning: In Taiwan's holiday system, some holidays like Women's Day can appear in multiple categories simultaneously. Women's Day appears in the WORKDAY category for regular March 8th dates but also has special observed dates in the OPTIONAL category (1998-2000) when it was moved before Tomb-Sweeping Day. The test cases correctly reflect this dual-category behavior.

Applied to files:

  • tests/countries/test_taiwan.py
📚 Learning: 2025-09-03T18:29:09.398Z
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py:76-76
Timestamp: 2025-09-03T18:29:09.398Z
Learning: The assertNoNonObservedHoliday method in tests/common.py accepts a holidays object as its first parameter, followed by the dates to check. Usage like assertNoNonObservedHoliday(self.government_holidays_non_observed, obs_dt) is correct and intended behavior.

Applied to files:

  • tests/countries/test_taiwan.py
📚 Learning: 2025-04-03T05:58:00.033Z
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: holidays/locale/en_TL/LC_MESSAGES/TL.po:42-44
Timestamp: 2025-04-03T05:58:00.033Z
Learning: The en_TL (English for Timor-Leste) localization for holidays intentionally uses "World" instead of "International" (e.g., "World Labour Day") to maintain accuracy with official Timor-Leste government sources, even though code comments and other localizations like en_US use "International".

Applied to files:

  • holidays/locale/th/LC_MESSAGES/TW.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/pt_MO/LC_MESSAGES/MO.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/pt_MO/LC_MESSAGES/MO.po
🧬 Code graph analysis (3)
tests/common.py (1)
holidays/groups/eastern.py (1)
  • EasternCalendarHolidays (19-49)
tests/countries/test_hongkong.py (1)
holidays/countries/hongkong.py (1)
  • HongKong (46-375)
tests/countries/test_taiwan.py (1)
tests/common.py (1)
  • assertHolidayName (198-202)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (2)
holidays/countries/south_korea.py (1)

112-117: Bug: observed_estimated_label is never used; ordering of “(추정)” will be wrong.
current code always applies observed_label and will produce “설날 (추정) 대체 휴일” instead of “설날 대체 휴일 (추정)”, and won’t strip the estimated suffix before formatting.

Apply this diff to respect estimated suffix and use observed_estimated_label when needed:

-                for name in names:
-                    self._add_holiday(self.tr(self.observed_label) % self.tr(name), dt_observed)
+                est_txt = ""
+                if hasattr(self, "estimated_label") and self.estimated_label:
+                    # Derive the literal estimated suffix, e.g., " (추정)".
+                    est_txt = (self.tr(self.estimated_label) % "").strip()
+                for name in names:
+                    nm = self.tr(name)
+                    if est_txt and nm.endswith(est_txt):
+                        base = nm[: -len(est_txt)].rstrip()
+                        label = self.tr(self.observed_estimated_label) % base
+                    else:
+                        label = self.tr(self.observed_label) % nm
+                    self._add_holiday(label, dt_observed)
holidays/locale/en_US/LC_MESSAGES/KR.po (1)

147-150: Nit: remove trailing period for consistency.
Other entries don’t end with a period.

 msgid "통일주체국민회의 선거일"
-msgstr "National Conference for Unification Election Day."
+msgstr "National Conference for Unification Election Day"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5ba647 and 51205f6.

📒 Files selected for processing (6)
  • holidays/countries/south_korea.py (1 hunks)
  • holidays/locale/en_US/LC_MESSAGES/KR.po (2 hunks)
  • holidays/locale/ko/LC_MESSAGES/KR.po (2 hunks)
  • holidays/locale/th/LC_MESSAGES/KR.po (2 hunks)
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po (2 hunks)
  • tests/countries/test_china.py (2 hunks)
🧰 Additional context used
🧠 Learnings (27)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
Learning: In the holidays library, maintainers have agreed to keep comments like "# %s (estimated)." above estimated_label declarations across country files, even though they duplicate the label content. This decision was made to maintain consistency and usefulness regardless of localization support status.
Learnt from: 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#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#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#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#2678
File: holidays/locale/th/LC_MESSAGES/US.po:30-34
Timestamp: 2025-06-26T13:20:10.172Z
Learning: In the holidays library Thai localizations, the "observed" format consistently uses "ชดเชย%s" without spaces between the Thai word and placeholder across all .po files in the codebase.
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support DO use tr() wrappers around holiday names when calling _add_* methods. This is the correct pattern for l10n-enabled country implementations, contrary to previous learning about translation being handled internally by _add_* methods.
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:

  • holidays/countries/south_korea.py
  • tests/countries/test_china.py
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/south_korea.py
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
📚 Learning: 2025-08-28T11:45:56.892Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
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/south_korea.py
  • holidays/locale/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.po
📚 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/south_korea.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/south_korea.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/south_korea.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/south_korea.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/south_korea.py
  • holidays/locale/th/LC_MESSAGES/KR.po
📚 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/south_korea.py
📚 Learning: 2025-04-02T04:54:07.204Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:25-25
Timestamp: 2025-04-02T04:54:07.204Z
Learning: For English-speaking countries in the holidays library (like Trinidad and Tobago), the `default_language` and `supported_languages` parameters are optional. If languages are added for such countries, ensure that `en_US` is included in the list alongside the regional code variant (e.g., `en_TT` for Trinidad and Tobago).

Applied to files:

  • holidays/countries/south_korea.py
📚 Learning: 2025-08-30T12:49:19.688Z
Learnt from: KJhellico
PR: vacanza/holidays#2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:49:19.688Z
Learning: The assertLocalizedHolidays method in the vacanza/holidays project requires a complete list of all holidays for the specific year being tested, not just a subset. When testing localization, all holidays from that year must be included in the assertion.

Applied to files:

  • tests/countries/test_china.py
📚 Learning: 2025-08-30T12:52:58.539Z
Learnt from: KJhellico
PR: vacanza/holidays#2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:52:58.539Z
Learning: In the NSE holidays implementation, assertLocalizedHolidays should only include holidays that are actually observed (trading holidays), not holidays that fall on weekends and are excluded by the observed_rule. For example, Eid al-Fitr 2023 falls on Saturday and is correctly excluded from localization tests.

Applied to files:

  • tests/countries/test_china.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/ko/LC_MESSAGES/KR.po
  • holidays/locale/en_US/LC_MESSAGES/KR.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.po
  • holidays/locale/th/LC_MESSAGES/KR.po
📚 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/locale/zh_TW/LC_MESSAGES/CN.po
📚 Learning: 2025-06-26T13:20:10.172Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: holidays/locale/th/LC_MESSAGES/US.po:30-34
Timestamp: 2025-06-26T13:20:10.172Z
Learning: In the holidays library Thai localizations, the "observed" format consistently uses "ชดเชย%s" without spaces between the Thai word and placeholder across all .po files in the codebase.

Applied to files:

  • holidays/locale/zh_TW/LC_MESSAGES/CN.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/zh_TW/LC_MESSAGES/CN.po
🔇 Additional comments (9)
holidays/locale/th/LC_MESSAGES/KR.po (2)

30-34: Estimated label: translation and placeholder usage are correct.

"%s (โดยประมาณ)" matches style and keeps c-format parity.


35-39: Observed-estimated label: Thai spacing/style is consistent.

"ชดเชย%s (โดยประมาณ)" preserves the no-space rule before %s for Thai observed labels.

holidays/locale/zh_TW/LC_MESSAGES/CN.po (3)

17-21: Header metadata bump looks good.
Matches project conventions and tools.


30-38: Adds estimated/observed-estimated entries with correct order and punctuation.
“observed, estimated” order and full-width parens are consistent.


42-44: TW wording switch to 補假 is consistent with tests and PR goals.
This also resolves prior inconsistency with observed+estimated.

holidays/countries/south_korea.py (1)

84-87: Good: KR now defines estimated and observed-estimated labels.
tr()-wrapped class attrs match library practice.

tests/countries/test_china.py (1)

1411-1435: zh_TW expectations updated to 補假 — aligned with CN.po.
Terminology and punctuation match the new translations.

holidays/locale/ko/LC_MESSAGES/KR.po (1)

30-38: KR adds “(추정)” keys; msgstr left empty is correct for default language.
Consistent with ko as default_language=“ko”.

holidays/locale/en_US/LC_MESSAGES/KR.po (1)

30-38: EN translations for new estimated keys look good.
Wording matches library style.

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Added to the queue, waiting for @PPsyrius's review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
snapshots/countries/KR_COMMON.json (1)

451-456: Inconsistent punctuation for the same holiday — fix 1978-05-18.

Another instance still ends with a period. Normalize to match 1972 and KR.po.

Apply:

-"1978-05-18": "National Conference for Unification Election Day.",
+"1978-05-18": "National Conference for Unification Election Day",
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 51205f6 and 9af5201.

📒 Files selected for processing (2)
  • holidays/locale/en_US/LC_MESSAGES/KR.po (3 hunks)
  • snapshots/countries/KR_COMMON.json (1 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
Learning: In the holidays library, maintainers have agreed to keep comments like "# %s (estimated)." above estimated_label declarations across country files, even though they duplicate the label content. This decision was made to maintain consistency and usefulness regardless of localization support status.
Learnt from: 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#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#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: PPsyrius
PR: vacanza/holidays#2678
File: holidays/locale/th/LC_MESSAGES/US.po:30-34
Timestamp: 2025-06-26T13:20:10.172Z
Learning: In the holidays library Thai localizations, the "observed" format consistently uses "ชดเชย%s" without spaces between the Thai word and placeholder across all .po files in the codebase.
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#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.
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.
📚 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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.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/en_US/LC_MESSAGES/KR.po
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:

  • holidays/locale/en_US/LC_MESSAGES/KR.po
📚 Learning: 2025-08-28T11:45:56.892Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
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/locale/en_US/LC_MESSAGES/KR.po
⏰ 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 windows-latest
🔇 Additional comments (2)
holidays/locale/en_US/LC_MESSAGES/KR.po (2)

17-20: Header metadata update — ok.

Version/author/date bumps are fine.


30-39: Estimated/observed c-format placeholders — OK
Both entries contain one %s in msgid and msgstr; c-format placeholders and order/types match.

@sonarqubecloud
Copy link

Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌏

@arkid15r arkid15r added this pull request to the merge queue Sep 13, 2025
Merged via the queue into vacanza:dev with commit b1728bf Sep 13, 2025
36 checks passed
@KJhellico KJhellico deleted the add-estimated-label-eastern branch September 13, 2025 20:18
@KJhellico KJhellico mentioned this pull request Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants