Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Hong Kong holidays: add l10n support #2268

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

PPsyrius
Copy link
Collaborator

@PPsyrius PPsyrius commented Feb 4, 2025

Proposed change

  • Adds Hong Kong English (en_HK), American English (en_US), Traditional Chinese (zh_HK), Simplified Chinese (zh_CN), Thai (th) localization support - with zh_HK as the new default l10n option.
  • Fixes Hong Kong 🇭🇰 's Remembrance Day being mistranslated as Taiwan 🇹🇼 's "Peace Memorial Day" for English l10ns.

Note

I'm using zh_HK instead of zh_TW for Hong Kong's Traditional Chinese l10n for now since I'm not sure if both Taiwanese and Hong Konger ones are the same or not.

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

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (915dafb) to head (39f8568).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2268   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          199       199           
  Lines        12144     12148    +4     
  Branches      1731      1731           
=========================================
+ Hits         12144     12148    +4     

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

Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

@PPsyrius, great work! 👍 When I worked on Hong Kong last time, I tried to leave comment with Chinese name for all holidays, with the aim of l10n. I hope this was helpful.
Just a few suggestions:

holidays/locale/en_US/LC_MESSAGES/HK.po Outdated Show resolved Hide resolved
holidays/countries/hongkong.py Outdated Show resolved Hide resolved
@PPsyrius PPsyrius requested a review from KJhellico February 4, 2025 16:09
Copy link

sonarqubecloud bot commented Feb 4, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
6.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@PPsyrius
Copy link
Collaborator Author

PPsyrius commented Feb 4, 2025

At some point, we’ll likely need to implement support for ISO-3166-2:CN for Hong Kong and Macau (the latter of which I’m currently working on).

Since each has a distinct default_language code, rather than merging them into the CN file and treating HK and MO as stub entities - like the approach proposed in #1852 for the Netherlands; we should instead look for ways to directly reference another ISO 3166-1-level entities.

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.

2 participants