vacanza / holidays

Generate and work with holidays in Python
https://pypi.org/project/holidays
MIT License
1.45k stars 460 forks source link

Add Vietnamese translation of VietNam holidays #2025

Closed vunhatchuong closed 5 days ago

vunhatchuong commented 1 week ago

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

Checklist

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

KJhellico commented 1 week ago

@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 commented 1 week ago

@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 commented 1 week ago

@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 commented 1 week ago

@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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 6 days ago

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 commented 6 days ago

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?

sonarcloud[bot] commented 5 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud