Skip to content

Commit

Permalink
Update Vietnam holidays: add th localization (#2060)
Browse files Browse the repository at this point in the history
  • Loading branch information
PPsyrius authored Oct 17, 2024
1 parent 6750bf1 commit ed048eb
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ All other default values are highlighted with bold:
* - Vietnam
- VN
-
- en_US, **vi**
- en_US, th, **vi**
-
* - Virgin Islands (U.S.)
- VI
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/vietnam.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Vietnam(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHoliday
# %s (observed).
observed_label = tr("%s (nghỉ bù)")
default_language = "vi"
supported_languages = ("en_US", "vi")
supported_languages = ("en_US", "th", "vi")

def __init__(self, *args, **kwargs):
ChineseCalendarHolidays.__init__(self)
Expand Down
93 changes: 93 additions & 0 deletions holidays/locale/th/LC_MESSAGES/VN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see AUTHORS file)
# dr-prodigy <[email protected]> (c) 2017-2023
# ryanss <[email protected]> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# Vietnam holidays th localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.59\n"
"POT-Creation-Date: 2024-09-27 15:50+0700\n"
"PO-Revision-Date: 2024-10-09 20:58+0300\n"
"Last-Translator: PPsyrius <[email protected]>\n"
"Language-Team: Holidays Localization Team\n"
"Language: th\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.4\n"
"X-Generator: Poedit 3.5\n"

#. %s (observed).
#, c-format
msgid "%s (nghỉ bù)"
msgstr "ชดเชย%s"

#. New Year's Day.
msgid "Tết Dương lịch"
msgstr "วันปีใหม่สากล"

#. 29 of Lunar New Year.
msgid "29 Tết"
msgstr "วันที่ 29 เดือน 12 ตามปฏิทินจันทรคติ"

#. Lunar New Year's Eve.
msgid "Giao thừa Tết Nguyên Đán"
msgstr "วันก่อนวันตรุษเต๊ต"

#. Lunar New Year.
msgid "Tết Nguyên Đán"
msgstr "วันตรุษเต๊ต"

#. Second Day of Lunar New Year.
msgid "Mùng hai Tết Nguyên Đán"
msgstr "วันตรุษเต๊ตวันที่สอง"

#. Third Day of Lunar New Year.
msgid "Mùng ba Tết Nguyên Đán"
msgstr "วันตรุษเต๊ตวันที่สาม"

#. Fourth Day of Lunar New Year.
msgid "Mùng bốn Tết Nguyên Đán"
msgstr "วันตรุษเต๊ตวันที่สี่"

#. Fifth Day of Lunar New Year.
msgid "Mùng năm Tết Nguyên Đán"
msgstr "วันตรุษเต๊ตวันที่ห้า"

#. Sixth Day of Lunar New Year.
msgid "Mùng sáu Tết Nguyên Đán"
msgstr "วันตรุษเต๊ตวันที่หก"

#. Hung Kings' Commemoration Day.
msgid "Ngày Giỗ Tổ Hùng Vương"
msgstr "วันสักการะบูชาบรรพกษัตริย์หุ่ง"

#. Liberation Day/Reunification Day.
msgid "Ngày Chiến thắng"
msgstr "วันปลดปล่อยภาคใต้เพื่อรวมชาติ"

#. International Labor Day.
msgid "Ngày Quốc tế Lao động"
msgstr "วันแรงงานสากล"

#. National Day.
msgid "Quốc khánh"
msgstr "วันชาติเวียตนาม"

#. Date format (see strftime() Format Codes).
msgid "%d/%m/%Y"
msgstr "%d/%m/%Y"

#. Day off (substituted from %s).
#, c-format
msgid "Ngày nghỉ (thay cho ngày %s)"
msgstr "วันหยุด (แทน %s)"
20 changes: 20 additions & 0 deletions tests/countries/test_vietnam.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,23 @@ def test_l10n_en_us(self):
("2022-09-01", "National Day"),
("2022-09-02", "National Day"),
)

def test_l10n_th(self):
self.assertLocalizedHolidays(
"th",
("2022-01-01", "วันปีใหม่สากล"),
("2022-01-03", "ชดเชยวันปีใหม่สากล"),
("2022-01-31", "วันก่อนวันตรุษเต๊ต"),
("2022-02-01", "วันตรุษเต๊ต"),
("2022-02-02", "วันตรุษเต๊ตวันที่สอง"),
("2022-02-03", "วันตรุษเต๊ตวันที่สาม"),
("2022-02-04", "วันตรุษเต๊ตวันที่สี่"),
("2022-04-10", "วันสักการะบูชาบรรพกษัตริย์หุ่ง"),
("2022-04-11", "ชดเชยวันสักการะบูชาบรรพกษัตริย์หุ่ง"),
("2022-04-30", "วันปลดปล่อยภาคใต้เพื่อรวมชาติ"),
("2022-05-01", "วันแรงงานสากล"),
("2022-05-02", "ชดเชยวันปลดปล่อยภาคใต้เพื่อรวมชาติ"),
("2022-05-03", "ชดเชยวันแรงงานสากล"),
("2022-09-01", "วันชาติเวียตนาม"),
("2022-09-02", "วันชาติเวียตนาม"),
)

0 comments on commit ed048eb

Please sign in to comment.