Skip to content

Commit

Permalink
Add Thai localization for Japan holidays (#1545)
Browse files Browse the repository at this point in the history
  • Loading branch information
PPsyrius committed Nov 10, 2023
1 parent 762b08f commit e754126
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ The list of supported countries, their subdivisions, supported languages and cat
* - Japan
- JP
-
- en_US, **ja**
- en_US, **ja**, th
- BANK, **PUBLIC**
* - Kazakhstan
- KZ
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/japan.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Japan(HolidayBase, InternationalHolidays, StaticHolidays):
country = "JP"
default_language = "ja"
supported_categories = {BANK, PUBLIC}
supported_languages = ("en_US", "ja")
supported_languages = ("en_US", "ja", "th")

def __init__(self, *args, **kwargs) -> None:
InternationalHolidays.__init__(self)
Expand Down
117 changes: 117 additions & 0 deletions holidays/locale/th/LC_MESSAGES/JP.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Japan holidays th localization.
# Authors: PPsyrius <ppsyrius@ppsyrius.dev>, (c) 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.37\n"
"POT-Creation-Date: 2023-09-11 10:20+0700\n"
"PO-Revision-Date: 2023-11-10 11:20+0700\n"
"Last-Translator: PPsyrius <ppsyrius@ppsyrius.dev>\n"
"Language-Team: Python 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"
"Plural-Forms: nplurals=1; plural=0;\n"
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.4.1\n"

#. New Year's Day.
msgid "元日"
msgstr "วันขึ้นปีใหม่"

#. Coming of Age Day.
msgid "成人の日"
msgstr "วันฉลองบรรลุนิติภาวะ"

#. Foundation Day.
msgid "建国記念の日"
msgstr "วันชาติญี่ปุ่น"

#. Emperor's Birthday.
msgid "天皇誕生日"
msgstr "วันคล้ายวันพระราชสมภพ สมเด็จพระจักรพรรดินารุฮิโตะ"

#. Vernal Equinox Day.
msgid "春分の日"
msgstr "วันวสันตวิษุวัต"

#. Greenery Day.
msgid "みどりの日"
msgstr "วันพฤกษชาติ"

#. Showa Day.
msgid "昭和の日"
msgstr "วันโชวะ"

#. Constitution Day.
msgid "憲法記念日"
msgstr "วันรัฐธรรมนูญ"

#. Children's Day.
msgid "こどもの日"
msgstr "วันเด็กแห่งชาติ"

#. Marine Day.
msgid "海の日"
msgstr "วันแห่งทะเล"

#. Mountain Day.
msgid "山の日"
msgstr "วันแห่งภูเขา"

#. Respect for the Aged Day.
msgid "敬老の日"
msgstr "วันเคารพผู้สูงอายุ"

#. Autumnal Equinox Day.
msgid "秋分の日"
msgstr "วันศารทวิษุวัต"

#. Sports Day.
msgid "スポーツの日"
msgstr "วันกีฬาแห่งชาติ"

#. Physical Education Day.
msgid "体育の日"
msgstr "วันพลศึกษา"

#. Culture Day.
msgid "文化の日"
msgstr "วันวัฒนธรรม"

#. Labor Thanksgiving Day.
msgid "勤労感謝の日"
msgstr "วันขอบคุณแรงงาน"

#. Substitute Holiday.
msgid "振替休日"
msgstr "วันหยุดชดเชย"

#. National Holiday.
msgid "国民の休日"
msgstr "วันหยุดพิเศษ (เพิ่มเติม)"

#. Bank Holiday.
msgid "銀行休業日"
msgstr "วันหยุดธนาคาร"

#. The Crown Prince marriage ceremony.
msgid "結婚の儀"
msgstr "พิธีเสกสมรสมกุฎราชกุมาร"

#. State Funeral of Emperor Shōwa.
msgid "大喪の礼"
msgstr "พระราชพิธีพระบรมศพของสมเด็จพระจักรพรรดิโชวะ"

#. Enthronement ceremony.
msgid "即位礼正殿の儀"
msgstr "พระราชพิธีจักรพรรดิยาภิเษกของสมเด็จพระจักรพรรดิ"

#. Enthronement day.
msgid "天皇の即位の日"
msgstr "พระราชพิธีขึ้นครองราชย์ของสมเด็จพระจักรพรรดิ"

#. Enthronement ceremony.
msgid "即位礼正殿の儀が行われる日"
msgstr "พระราชพิธีจักรพรรดิยาภิเษกของสมเด็จพระจักรพรรดิ"
24 changes: 24 additions & 0 deletions tests/countries/test_japan.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,3 +782,27 @@ def test_l10n_en_us(self):
("2022-11-23", "Labor Thanksgiving Day"),
("2022-12-31", "Bank Holiday"),
)

def test_l10n_th(self):
self.assertLocalizedHolidays(
"th",
("2022-01-01", "วันขึ้นปีใหม่"),
("2022-01-02", "วันหยุดธนาคาร"),
("2022-01-03", "วันหยุดธนาคาร"),
("2022-01-10", "วันฉลองบรรลุนิติภาวะ"),
("2022-02-11", "วันชาติญี่ปุ่น"),
("2022-02-23", "วันคล้ายวันพระราชสมภพ สมเด็จพระจักรพรรดินารุฮิโตะ"),
("2022-03-21", "วันวสันตวิษุวัต"),
("2022-04-29", "วันโชวะ"),
("2022-05-03", "วันรัฐธรรมนูญ"),
("2022-05-04", "วันพฤกษชาติ"),
("2022-05-05", "วันเด็กแห่งชาติ"),
("2022-07-18", "วันแห่งทะเล"),
("2022-08-11", "วันแห่งภูเขา"),
("2022-09-19", "วันเคารพผู้สูงอายุ"),
("2022-09-23", "วันศารทวิษุวัต"),
("2022-10-10", "วันกีฬาแห่งชาติ"),
("2022-11-03", "วันวัฒนธรรม"),
("2022-11-23", "วันขอบคุณแรงงาน"),
("2022-12-31", "วันหยุดธนาคาร"),
)

0 comments on commit e754126

Please sign in to comment.