Skip to content

Update China and Taiwan holidays: refine and standardize holiday terminology#3411

Merged
arkid15r merged 11 commits into
vacanza:devfrom
m0cal:l10n/unify-cn-expression
Mar 26, 2026
Merged

Update China and Taiwan holidays: refine and standardize holiday terminology#3411
arkid15r merged 11 commits into
vacanza:devfrom
m0cal:l10n/unify-cn-expression

Conversation

@m0cal

@m0cal m0cal commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Proposed change

Refine Chinese localization (zh_CN, zh_HK,zh_TW) to resolve literal translations, improve natural phrasing, and ensure cross-regional terminology consistency.

  • Terminology Updates:
    • zh_HK: Replace the literal "農曆年初一的前一日" (The day preceding the first day of the Lunar New Year) with the idiomatic "農曆除夕" (Lunar New Year's Eve). Discarded to return to the mandated original.
    • 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.
  • Localization Strategy:
    • Holiday Names: Direct script conversion to follow each region's official legal designation. (e.g., 国庆节 $\rightarrow$ 國慶節, not 國慶日, these are distinct holidays on different dates; substituting one for the other would be misleading)
    • Adjustment Terms: Regional idiomatic adaptations (e.g., 补假/休息日 for CN vs. 補假/放假日 for HK/TW).

Add Ryan Lee to CONTRIBUTORS.

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

Copilot AI review requested due to automatic review settings March 25, 2026 06:54
@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This 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

Cohort / File(s) Summary
Project metadata
CONTRIBUTORS
Added new contributor entry for Ryan Lee.
China holiday constants
holidays/countries/china.py
Updated observed_estimated_label and observed_label from "观察日" to "补假", and changed substituted_label from "rest day replaced from" to "rest day adjusted from".
Translation files – English & Thai
holidays/locale/en_US/LC_MESSAGES/CN.po, holidays/locale/th/LC_MESSAGES/CN.po
Updated project version to 0.94 and synchronized msgid strings for day-off descriptions to match the "补假" terminology without altering msgstr translations.
Translation files – Chinese Simplified & Traditional
holidays/locale/zh_CN/LC_MESSAGES/CN.po, holidays/locale/zh_CN/LC_MESSAGES/TW.po, holidays/locale/zh_TW/LC_MESSAGES/CN.po
Updated project version to 0.94 and modified msgid/msgstr pairs for observed-day and substituted-day labels, aligning terminology across locales and adjusting phrasing for rest-day substitutions.
Translation file – Russian localization
holidays/locale/zh_CN/LC_MESSAGES/RU.po
Changed Chinese translation for Russian holiday descriptor from "连休" to "补假".
China holiday tests
tests/countries/test_china.py
Updated test assertions to reflect new "补假" terminology and rewording of substituted rest-day labels across named holidays.
Taiwan and Russia holiday tests
tests/countries/test_taiwan.py, tests/countries/test_russia.py
Updated localized test expectations to match new terminology for observed and substituted day labels.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
  • PPsyrius
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: standardizing Chinese holiday terminology across regions.
Description check ✅ Passed The PR description clearly relates to the changeset by detailing Chinese localization refinements and terminology standardization across regions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

❤️ Share

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between b1b7de7 and f0b6c1b.

📒 Files selected for processing (16)
  • CONTRIBUTORS
  • holidays/countries/china.py
  • holidays/countries/hongkong.py
  • holidays/locale/en_HK/LC_MESSAGES/HK.po
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/en_US/LC_MESSAGES/HK.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/HK.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/zh_HK/LC_MESSAGES/HK.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • tests/countries/test_china.py
  • tests/countries/test_hongkong.py
  • tests/countries/test_taiwan.py

Comment thread holidays/locale/zh_CN/LC_MESSAGES/HK.po Outdated
Comment thread holidays/locale/zh_CN/LC_MESSAGES/TW.po Outdated
Comment thread holidays/countries/hongkong.py Outdated
Comment thread holidays/locale/en_HK/LC_MESSAGES/HK.po
@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

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

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.
📢 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.

@KJhellico KJhellico changed the title Update Mainland China, Hong Kong and Taiwan holidays: refine and standardize holiday terminology Update China, Hong Kong and Taiwan holidays: refine and standardize holiday terminology Mar 25, 2026

@PPsyrius PPsyrius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 🇨🇳

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between aee335d and 27d4988.

📒 Files selected for processing (10)
  • holidays/countries/china.py
  • holidays/locale/en_US/LC_MESSAGES/CN.po
  • holidays/locale/th/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/CN.po
  • holidays/locale/zh_CN/LC_MESSAGES/RU.po
  • holidays/locale/zh_CN/LC_MESSAGES/TW.po
  • holidays/locale/zh_TW/LC_MESSAGES/CN.po
  • tests/countries/test_china.py
  • tests/countries/test_russia.py
  • tests/countries/test_taiwan.py

Comment thread holidays/locale/zh_CN/LC_MESSAGES/TW.po
@m0cal

m0cal commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

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.

@m0cal m0cal changed the title Update China, Hong Kong and Taiwan holidays: refine and standardize holiday terminology Update China and Taiwan holidays: refine and standardize holiday terminology Mar 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

@arkid15r arkid15r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great work 👍
Thank you @m0cal

@arkid15r arkid15r added this pull request to the merge queue Mar 26, 2026
Merged via the queue into vacanza:dev with commit 0cc5738 Mar 26, 2026
32 checks passed
arkid15r pushed a commit to arkid15r/python-holidays that referenced this pull request Mar 28, 2026
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.

5 participants