From e7541264a4014fb860fac1bbd421ab0d19b2e731 Mon Sep 17 00:00:00 2001 From: PPsyrius <19505219+PPsyrius@users.noreply.github.com> Date: Sat, 11 Nov 2023 00:25:53 +0700 Subject: [PATCH] Add Thai localization for Japan holidays (#1545) --- README.rst | 2 +- holidays/countries/japan.py | 2 +- holidays/locale/th/LC_MESSAGES/JP.po | 117 +++++++++++++++++++++++++++ tests/countries/test_japan.py | 24 ++++++ 4 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 holidays/locale/th/LC_MESSAGES/JP.po diff --git a/README.rst b/README.rst index 9d36e1740..296e48688 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/holidays/countries/japan.py b/holidays/countries/japan.py index 1d9a019bb..de2eee599 100644 --- a/holidays/countries/japan.py +++ b/holidays/countries/japan.py @@ -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) diff --git a/holidays/locale/th/LC_MESSAGES/JP.po b/holidays/locale/th/LC_MESSAGES/JP.po new file mode 100644 index 000000000..af53e2e0b --- /dev/null +++ b/holidays/locale/th/LC_MESSAGES/JP.po @@ -0,0 +1,117 @@ +# Japan holidays th localization. +# Authors: PPsyrius , (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 \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 "พระราชพิธีจักรพรรดิยาภิเษกของสมเด็จพระจักรพรรดิ" diff --git a/tests/countries/test_japan.py b/tests/countries/test_japan.py index 30735c131..753785c82 100644 --- a/tests/countries/test_japan.py +++ b/tests/countries/test_japan.py @@ -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", "วันหยุดธนาคาร"), + )