-
Notifications
You must be signed in to change notification settings - Fork 490
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 United Kingdom & Isle of Man holidays: add l10n support #2258
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2258 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 200 200
Lines 12200 12215 +15
Branches 1735 1737 +2
=========================================
+ Hits 12200 12215 +15 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small fix:
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to merge it, added to the merge queue while test were green.
In parallel I was checking something locally. So it seems that at least at my localhost make l10n
(technically it's scripts/l10n/generate_po_files.py
) produces some changes specifically in IM.po files. It may be related to the derived from UK
situation - the script keeps items that originate from isle_of_man.py
file while removing everything else.
I had thought it'd be great if someone else looked at it and removed it from the queue before the CI/CD was done.
@PPsyrius, look at my PR in your repo. It seems to be working. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're going to use parent_entity
in v1
so it may be a good idea to introduce it here too in order keep the parent translation logic simple. We can also migrate to composition approach for entities like IM
.
@KJhellico @PPsyrius please review and test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arkid15r I can confirm that it's now working as intended with your latest changes in ❤️
>>> import holidays
>>> print(holidays.IM(years=2024, language="th")){datetime.date(2024, 3, 29): 'วันศุกร์ประเสริฐ', datetime.date(2024, 5, 6): 'วันเมย์เดย์', datetime.date(2024, 5, 27): 'วันหยุดฤดูใบไม้ผลิของธนาคาร', datetime.date(2024, 4, 1): 'วันจันทร์อีสเตอร์', datetime.date(2024, 8, 26): 'วันหยุดช่วงปลายฤดูร้อนของธนาคาร', datetime.date(2024, 6, 7): 'วันแข่งไอร์ออฟแมน ทีที', datetime.date(2024, 7, 5): 'วันไทน์วอลด์', datetime.date(2024, 1, 1): 'วันขึ้นปีใหม่', datetime.date(2024, 12, 25): 'วันคริสต์มาส', datetime.date(2024, 12, 26): 'วันเปิดกล่องของขวัญ'}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Proposed change
Add
en_GB
,en_US
,th
localization for the United Kingdom (gb
) and Isle of Man (im
).Note
en_GB
) rather than the Manx English (en_IM
) dialect.IM
file. This limitation is hopefully resolved in thev1
implementation.Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green