Update China and Taiwan holidays: refine and standardize holiday terminology#3411
Conversation
…nd administrative terms in CN, HK and TW.
WalkthroughThis PR updates China holiday label terminology across code, translations, and tests. The changes replace "observed day" references with "makeup/compensatory day" terminology and rephrase substitution labels for rest days, affecting English, Thai, Chinese Simplified, and Traditional Chinese locales. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR refines Chinese localizations across Mainland China, Hong Kong, and Taiwan holiday labels to use more idiomatic and region-appropriate terminology, while updating corresponding translation catalogs and tests to match.
Changes:
- Update Hong Kong Lunar New Year’s Eve wording to the idiomatic “農曆除夕”.
- Standardize Mainland China “observed/substituted” terminology to “连休/调休” in code, translations, and tests.
- Adjust Taiwan and China zh_* localization expectations and update PO metadata; add contributor entry.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/countries/test_taiwan.py | Updates zh_CN localized holiday name expectations to the standardized 调休/连休 terminology. |
| tests/countries/test_hongkong.py | Updates expected Hong Kong Lunar New Year’s Eve label to “農曆除夕”. |
| tests/countries/test_china.py | Updates zh_CN/zh_TW localized holiday name expectations to match the new observed/substituted terminology. |
| holidays/locale/zh_TW/LC_MESSAGES/CN.po | Updates China→zh_TW translations (incl. 國慶節, 補假/放假日 mappings) and aligns msgids with new CN labels. |
| holidays/locale/zh_HK/LC_MESSAGES/HK.po | Updates Hong Kong zh_HK msgid for Lunar New Year’s Eve to “農曆除夕”. |
| holidays/locale/zh_CN/LC_MESSAGES/TW.po | Updates Taiwan→zh_CN translations to use 连休/调休 wording. |
| holidays/locale/zh_CN/LC_MESSAGES/HK.po | Updates Hong Kong→zh_CN translations (incl. Lunar New Year’s Eve msgid/msgstr) and 连休 terminology. |
| holidays/locale/zh_CN/LC_MESSAGES/CN.po | Updates China zh_CN msgids for observed/substituted labels to 连休/调休. |
| holidays/locale/th/LC_MESSAGES/HK.po | Updates Hong Kong Thai catalog msgid for Lunar New Year’s Eve to match new key. |
| holidays/locale/th/LC_MESSAGES/CN.po | Updates China Thai catalog msgids for observed/substituted labels to match new keys. |
| holidays/locale/en_US/LC_MESSAGES/HK.po | Updates Hong Kong en_US catalog msgid for Lunar New Year’s Eve to match new key. |
| holidays/locale/en_US/LC_MESSAGES/CN.po | Updates China en_US catalog msgids for observed/substituted labels to match new keys. |
| holidays/locale/en_HK/LC_MESSAGES/HK.po | Updates Hong Kong en_HK catalog msgid for Lunar New Year’s Eve to match new key. |
| holidays/countries/hongkong.py | Switches Lunar New Year’s Eve translation key from the literal phrase to “農曆除夕”. |
| holidays/countries/china.py | Renames observed/substituted labels to “连休/调休” for zh_CN source strings. |
| CONTRIBUTORS | Adds “Ryan Lee”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holidays/locale/zh_CN/LC_MESSAGES/HK.po`:
- Around line 39-44: The HK translation uses mainland term “连休” instead of the
correct Hong Kong term “补假”; update the msgstr for msgid "%s(補假)" (and the
related observed form msgid "%s(補假)" if duplicated) to use "%s(补假)" (and
similarly change "%s(连休,推定)" to the HK-consistent wording if that string is for
補假 observed/estimated cases) so the localized output uses 补假 rather than 连休;
edit the msgstr entries that currently contain "连休" to "补假" for the HK PO
entries.
In `@holidays/locale/zh_CN/LC_MESSAGES/TW.po`:
- Around line 39-44: The zh_CN translations mistakenly replace Taiwan-specific
terms with mainland terms; restore Taiwan terminology for the affected msgid
entries by changing the msgstr for msgid "%s(補假)" to use "补假" (e.g. "%s(补假)")
and ensure the related entry for observed/adjusted holidays uses the Taiwan
phrasing (e.g. "放假日(由…调休)" or the existing TW equivalent) instead of "连休" or
"休息日(由…调休)"; update both the block containing msgid "%s(補假)" and the other
occurrence referenced (lines 172-173) so zh_CN preserves the Taiwan terms.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9777c97a-e5ff-4323-b434-b81e92a82829
📒 Files selected for processing (16)
CONTRIBUTORSholidays/countries/china.pyholidays/countries/hongkong.pyholidays/locale/en_HK/LC_MESSAGES/HK.poholidays/locale/en_US/LC_MESSAGES/CN.poholidays/locale/en_US/LC_MESSAGES/HK.poholidays/locale/th/LC_MESSAGES/CN.poholidays/locale/th/LC_MESSAGES/HK.poholidays/locale/zh_CN/LC_MESSAGES/CN.poholidays/locale/zh_CN/LC_MESSAGES/HK.poholidays/locale/zh_CN/LC_MESSAGES/TW.poholidays/locale/zh_HK/LC_MESSAGES/HK.poholidays/locale/zh_TW/LC_MESSAGES/CN.potests/countries/test_china.pytests/countries/test_hongkong.pytests/countries/test_taiwan.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3411 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 310 310
Lines 18584 18584
Branches 2380 2380
=========================================
Hits 18584 18584 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holidays/locale/zh_CN/LC_MESSAGES/TW.po`:
- Around line 39-44: Restore the zh_CN convention by changing the two msgstr
entries that currently use "补假" back to "连休": update the msgstr "%s(补假,推定)" and
the msgstr "%s(补假)" so they read "%s(连休,推定)" and "%s(连休)" respectively, keeping
the corresponding msgid lines (e.g., msgid "%s(補假)") and the c-format/comment
markers intact to preserve formatting and translator context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 05cc8e1a-569e-40fb-9b63-0d3a906a5f42
📒 Files selected for processing (10)
holidays/countries/china.pyholidays/locale/en_US/LC_MESSAGES/CN.poholidays/locale/th/LC_MESSAGES/CN.poholidays/locale/zh_CN/LC_MESSAGES/CN.poholidays/locale/zh_CN/LC_MESSAGES/RU.poholidays/locale/zh_CN/LC_MESSAGES/TW.poholidays/locale/zh_TW/LC_MESSAGES/CN.potests/countries/test_china.pytests/countries/test_russia.pytests/countries/test_taiwan.py
|
I made another change after finding this source using "补假"(literally "supplementary holidays") instead of "连休"(literally "consecutive holidays") for "observed holidays". Although "连休" is functionally same in HK and TW cases, it may case misunderstanding across regions where the the observed holidays sometimes are far away from the festivals themselves. |
|
Proposed change
Refine Chinese localization (
zh_CN,zh_HK,zh_TW) to resolve literal translations, improve natural phrasing, and ensure cross-regional terminology consistency.Discarded to return to the mandated original.zh_HK: Replace the literal "農曆年初一的前一日" (The day preceding the first day of the Lunar New Year) with the idiomatic "農曆除夕" (Lunar New Year's Eve).zh_CN: Standardize "观察日/取代" to "连休补假/调休" (aligning with the logic introduced in Update Russia holidays: add Simplified Chinese language support #3386). Use "补假" as this term is used in this official source.国庆节國慶節, not國慶日, these are distinct holidays on different dates; substituting one for the other would be misleading)补假/休息日for CN vs.補假/放假日for HK/TW).Add
Ryan Leeto CONTRIBUTORS.Type of change
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.