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

Add Vietnamese translation of VietNam holidays #2025

Merged

Conversation

vunhatchuong
Copy link
Contributor

Proposed change

Add vi translation of Vietnam holidays.

This translation has been checked by me who was born and currently lives in Viet Nam and crossed-checked with the state source.

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 python-holidays functionality in general)

Checklist

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (bcd8d88) to head (8b9f42d).
Report is 11 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2025   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          189       189           
  Lines        11478     11482    +4     
  Branches      1796      1795    -1     
=========================================
+ Hits         11478     11482    +4     

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

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.

Great to see new localizations :) 🇻🇳

AUTHORS Outdated Show resolved Hide resolved
holidays/countries/vietnam.py Show resolved Hide resolved
holidays/countries/vietnam.py Outdated Show resolved Hide resolved
Copy link

@func25 func25 left a comment

Choose a reason for hiding this comment

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

It's overall good, I have some suggestions

holidays/locale/en_US/LC_MESSAGES/VN.po Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/VN.po Outdated Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/VN.po Outdated Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/VN.po Outdated Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/VN.po Outdated Show resolved Hide resolved
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.

@vunhatchuong, great work! Look at some naming suggestions, please.

holidays/countries/vietnam.py Outdated Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/VN.po Outdated Show resolved Hide resolved
holidays/countries/vietnam.py Outdated Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/VN.po Outdated Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/VN.po Outdated Show resolved Hide resolved
@KJhellico
Copy link
Collaborator

@vunhatchuong,
I have a few more questions about the names of holidays in Vietnam. I hope you can tell me something.

  1. How official (and common) are the names “Second Day of Lunar New Year”, “Third Day of Lunar New Year”, etc.? Labor Code simply says “Tết Âm lịch: 05 ngày” (“Lunar new year festival: 5 days”). Reputable unofficial holiday portals (Timeanddate, OfficeHolidays) only list New Year's Eve / New Year / Tet holiday (for the rest of the days).

  2. What is the Vietnamese name for a day off moved from a weekend (for example, April 29, 2024)? In Python Holidays, we call such days "substituted holidays". I would like to add such holidays for Vietnam, but I can't find the original name for them. In fact, I need the correct translation of sentence “Day off (substituted from 4/5/2024)”.

I would be thankful for your help!

@vunhatchuong
Copy link
Contributor Author

vunhatchuong commented Sep 30, 2024

@KJhellico,
Sorry for the late response, in this PR I mainly tackle translation since I'm not confident about how Tet is calculated and I can't find any official sources as proof.

  1. “Second Day of Lunar New Year”, ... is a common way to call it. I can't find any source to prove if the State calls them as either.
    Tet holiday technically only lasts 3 days or 7 (I'm unsure) starting from 1/1 on the Lunar calendar but the Labor Code allows people to have a minimum of 5 days off starting on Dec 29th hence “Lunar New Year: 5".

  2. Isn't "substituted holiday" the same as "observed holiday"? This is why I translate "% (observed)" as "% (nghỉ bù)", "nghỉ bù" means "compensatory leave".


Regarding days off because of a holiday, the Tet holiday calculation is currently incorrect because it starts from the 29th in the Lunar calendar + another 4 days (minimum of 5 days). So in 2024, people were already off work on 2024-02-08 and not 2024-02-09.

So it doesn't matter if Feb has 29 or 30 days, people will always leave work starting from the 29th.

@KJhellico
Copy link
Collaborator

@vunhatchuong, thank you for your answer!

  1. “Second Day of Lunar New Year”, ... is a common way to call it. I can't find any source to prove if the State calls them as either.
    Tet holiday technically only lasts 3 days or 7 (I'm unsure) starting from 1/1 on the Lunar calendar but the Labor Code allows people to have a minimum of 5 days off starting on Dec 29th hence “Lunar New Year: 5".

OK, I get it. And what are the extra days called (as Feb 8 and Feb 14 in 2024, Jan 20 and Jan 26 in 2023, ...)?

  1. Isn't "substituted holiday" the same as "observed holiday"? This is why I translate "% (observed)" as "% (nghỉ bù)", "nghỉ bù" means "compensatory leave".

In Python holidays we call it "observed holiday" when a holiday falls on weekend and there is an additional non-working day. For example, in 2023, New Year's Day (Jan 1) fell on a Sunday, and Jan 2, Monday, was a "observed" holiday.
"Substituted holiday" - it's when working day is transfer to weekend (to make a long holiday). For example, in 2024 working day from Apr 29 (Mon) was moved to May 4 (Sun), and there were no working days from Apr 27 (Sat) to May 1 (Wed, International Labor Day).

So your current translation is correct. And I'm looking for the translation for name of such days as Apr 29, 2024.

Regarding days off because of a holiday, the Tet holiday calculation is currently incorrect because it starts from the 29th in the Lunar calendar + another 4 days (minimum of 5 days). So in 2024, people were already off work on 2024-02-08 and not 2024-02-09.

Yes, I'm already working on it. I think I understand this scheme.

@vunhatchuong
Copy link
Contributor Author

@KJhellico

OK, I get it. And what are the extra days called (as Feb 8 and Feb 14 in 2024, Jan 20 and Jan 26 in 2023, ...)?

They just call it "The X Day of Lunar New Year". "ngày" and "mùng" or "mồng" just mean "day" but "mùng" is used to refer to the Lunar day. So "ngày 1" means "day 1 on the Gregorian Calendar" and "mùng 1" means "day 1 on the Lunar Calendar".

And I'm looking for the translation for name of such days as Apr 29, 2024

I can't find any specific name for it, so the direct translation is "nghỉ thay thế" which sounds good enough.

@KJhellico
Copy link
Collaborator

They just call it "The X Day of Lunar New Year".

But how about Lunar New Year's Eve and the day before it? As Feb 9 and Feb 8 in 2024?

I can't find any specific name for it, so the direct translation is "nghỉ thay thế" which sounds good enough.

For such holidays, we also mention the day on from which the day off is moved (“Day off (substituted from 4/5/2024)” in English). Google Translate gave me "Ngày nghỉ (thay thế từ ngày 4/5/2024)". How correct is this?

@vunhatchuong
Copy link
Contributor Author

But how about Lunar New Year's Eve and the day before it? As Feb 9 and Feb 8 in 2024?

There are no special names for it. You can see here and other sources they call it "29 Tet" and 30 Tet". But my current translate for Lunar New Year's Eve is "Giao thừa" is correct.

"Ngày nghỉ (thay thế từ ngày 4/5/2024)". How correct is this?

I'd say "Ngày nghỉ (thay cho ngày 4/5/2024)" is more correct.

@KJhellico
Copy link
Collaborator

There are no special names for it. You can see here and other sources they call it "29 Tet" and 30 Tet".

Yes, I understood. But we need to name them somehow, with the possibility of translation into other languages...

But my current translate for Lunar New Year's Eve is "Giao thừa" is correct.

Google translates it just as "New Year's Eve". What would the Vietnamese name be for the Dec 31 holiday ("New Year's Eve") that exists in some countries?

I'd say "Ngày nghỉ (thay cho ngày 4/5/2024)" is more correct.

Thank you! 👍

@vunhatchuong
Copy link
Contributor Author

vunhatchuong commented Oct 2, 2024

Yes, I understood. But we need to name them somehow, with the possibility of translation into other languages...

Yeah this is why I'm not confident... but If it was up to me, I will name it "29 Tết" and "30 Tết", "29 of Lunar New Year" and "30 of Lunar New Year".

Google translates it just as "New Year's Eve". What would the Vietnamese name be for the Dec 31 holiday ("New Year's Eve") that exists in some countries?

I guess to be precise it's "Lunar New Year's Eve", the reason I shortened it is that Dec 31 "New Year's Eve" is not important in Vietnam so it's not named.

@KJhellico
Copy link
Collaborator

I guess to be precise it's "Lunar New Year's Eve", the reason I shortened it is that Dec 31 "New Year's Eve" is not important in Vietnam so it's not named.

Maybe "Giao thừa Tết Nguyên Đán" would be better, In terms of generality?

@vunhatchuong vunhatchuong force-pushed the feat/add_vietnam_holidays_localization branch from acfc24a to eca366f Compare October 2, 2024 13:40
KJhellico
KJhellico previously approved these changes Oct 3, 2024
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.

LGTM! 👍

PPsyrius
PPsyrius previously approved these changes Oct 3, 2024
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 👍🇻🇳

Remove `Authors:` as we use AUTHORS file now
@arkid15r arkid15r dismissed stale reviews from PPsyrius and KJhellico via 8b9f42d October 3, 2024 16:58
Copy link

sonarcloud bot commented Oct 3, 2024

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.

@vunhatchuong thank you for the great contribution and VN holidays localization!

@func25 @KJhellico @PPsyrius thanks for reviewing this!

@arkid15r arkid15r added this pull request to the merge queue Oct 3, 2024
Merged via the queue into vacanza:dev with commit 8890983 Oct 3, 2024
32 checks passed
@vunhatchuong vunhatchuong deleted the feat/add_vietnam_holidays_localization branch October 4, 2024 04:03
@arkid15r arkid15r mentioned this pull request Oct 7, 2024
@KJhellico KJhellico mentioned this pull request Oct 11, 2024
10 tasks
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