Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ any) in brackets, available languages and additional holiday categories. All cou
<td>India</td>
<td>IN</td>
<td>States: AN (Andaman and Nicobar Islands), AP (Andhra Pradesh), AR (Arunachal Pradesh, Arunāchal Pradesh), AS (Assam), BR (Bihar, Bihār), CG (Chhattisgarh, Chhattīsgarh), CH (Chandigarh, Chandīgarh), DH (Dadra and Nagar Haveli and Daman and Diu, Dādra and Nagar Haveli and Damān and Diu), DL (Delhi), GA (Goa), GJ (Gujarat, Gujarāt), HP (Himachal Pradesh, Himāchal Pradesh), HR (Haryana, Haryāna), JH (Jharkhand, Jhārkhand), JK (Jammu and Kashmir, Jammu and Kashmīr), KA (Karnataka, Karnātaka), KL (Kerala), LA (Ladakh, Ladākh), LD (Lakshadweep), MH (Maharashtra, Mahārāshtra), ML (Meghalaya, Meghālaya), MN (Manipur), MP (Madhya Pradesh), MZ (Mizoram), NL (Nagaland, Nāgāland), OD (Odisha), PB (Punjab), PY (Puducherry), RJ (Rajasthan, Rājasthān), SK (Sikkim), TN (Tamil Nadu, Tamil Nādu), TR (Tripura), TS (Telangana, Telangāna), UK (Uttarakhand, Uttarākhand), UP (Uttar Pradesh), WB (West Bengal)</td>
<td><strong>en_IN</strong>, en_US, gu, hi</td>
<td><strong>en_IN</strong>, en_US, gu, hi,ml</td>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<td><strong>en_IN</strong>, en_US, gu, hi,ml</td>
<td><strong>en_IN</strong>, en_US, gu, hi, ml</td>

<td>OPTIONAL</td>
</tr>
<tr>
Expand Down
5 changes: 4 additions & 1 deletion holidays/countries/india.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ class India(
"West Bengal": "WB",
}
supported_categories = (OPTIONAL, PUBLIC)
supported_languages = ("en_IN", "en_US", "gu", "hi")
supported_languages = ("en_IN", "en_US", "gu", "hi","ml")
# Malayalam translations source:
# https://en.wikipedia.org/wiki/Public_holidays_in_India

Comment on lines +149 to +152
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Move the Malayalam l10n reference to the correct section instead - also I don't think there's any Malayalam l10n reference in your English language Wikipedia citation?

Suggested change
supported_languages = ("en_IN", "en_US", "gu", "hi","ml")
# Malayalam translations source:
# https://en.wikipedia.org/wiki/Public_holidays_in_India
supported_languages = ("en_IN", "en_US", "gu", "hi", "ml")

_deprecated_subdivisions = (
"DD", # Daman and Diu.
"OR", # Orissa.
Expand Down
172 changes: 172 additions & 0 deletions holidays/locale/ml/LC_MESSAGES/IN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# holidays
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We have a standard file header and a standard set of metadata for .po files. Please take a look at them.

# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly.
#
# India holidays ml localization.
#
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)

msgid ""
msgstr ""
"Project-Id-Version: Holidays\n"
"POT-Creation-Date: 2026-01-18 00:00+0000\n"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

New change from #3274 (if you're finishing this PR later)

Suggested change
"POT-Creation-Date: 2026-01-18 00:00+0000\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-01-18 00:00+0000\n"

"PO-Revision-Date: 2026-01-19 11:10+0700\n"
"Last-Translator: Devadarsana R <devadarsana06@gmail.com>\n"
"Language-Team: Malayalam\n"
"Language: ml\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Source-Language: en_IN\n"

#. %s (estimated)
#, c-format
msgid "%s (estimated)"
msgstr "%s (അനുമാനിച്ചിരിക്കുന്നു)"


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The .po file is not created manually; it's generated as a result of running make l10n and should only contain strings that are present in .py file (and which need to be translated into the target language).

#. Republic Day
msgid "Republic Day"
msgstr "പ്രജാസ്വാമ്യ ദിനം"

#. Independence Day
msgid "Independence Day"
msgstr "സ്വാതന്ത്ര്യ ദിനം"

#. Gandhi Jayanti
msgid "Mahatma Gandhi’s Birthday"
msgstr "മഹാത്മാ ഗാന്ധി ജന്മദിനം"

#. Buddha Purnima
msgid "Buddha Purnima"
msgstr "ബുദ്ധ പൂർണിമ"

#. Diwali
msgid "Diwali (Deepavali)"
msgstr "ദീപാവലി"

#. Janmashtami
msgid "Janmashtami"
msgstr "ജന്മാഷ്ടമി"

#. Dussehra
msgid "Dussehra (Vijay Dashami)"
msgstr "ദശരാ (വിജയ് ദശമി)"

#. Mahavir Jayanti
msgid "Mahavir Jayanti"
msgstr "മഹാവീർ ജയന്തി"

#. Maha Shivratri
msgid "Maha Shivratri"
msgstr "മഹാ ശിവരാത്രി"

#. Guru Nanak Jayanti
msgid "Guru Nanak’s Birthday"
msgstr "ഗുരു നാനക് ജന്മദിനം"

#. Muharram
msgid "Muharram"
msgstr "മുഹറാം"

#. Milad-un-Nabi
msgid "Milad‑un‑Nabi / Id‑e‑Milad"
msgstr "മിലാദ്‑ഉന്‍ നബി / ഇദ്‑എ‑മിലാദ്"

#. Id-ul-Fitr
msgid "Id‑ul‑Fitr"
msgstr "ഇദ്‑ഉൽ‑ഫിതർ"

#. Bakrid
msgid "Id‑ul‑Zuha (Bakrid)"
msgstr "ഇദ്‑ഉൽ‑സുഹ (ബക്രിദ്)"

#. Good Friday
msgid "Good Friday"
msgstr "ഗുഡ് ഫ്രൈഡേ"

#. Christmas
msgid "Christmas Day"
msgstr "ക്രിസ്മസ്"

#. Holi
msgid "Holi"
msgstr "ഹോളി"

#. Ram Navami
msgid "Ram Navami"
msgstr "രാമ നവമി"

#. Ganesh Chaturthi
msgid "Ganesh Chaturthi / Vinayak Chaturthi"
msgstr "ഗണേഷ് ചതുര്തി / വിനായക് ചതുര്തി"

#. Onam
msgid "Onam"
msgstr "ഓണം"

#. Pongal
msgid "Pongal"
msgstr "പോങ്കൽ"

#. Vishu
msgid "Vishu"
msgstr "വിഷു"

#. Maha Vishuva Sankranti / Pana Sankranti
msgid "Maha Vishuva Sankranti / Pana Sankranti"
msgstr "മഹാ വിഷു സംക്രാന്തി / പാന സംക്രാന്തി"

#. Thiruvalluvar Day / Mattu Pongal
msgid "Thiruvalluvar Day / Mattu Pongal"
msgstr "തിരുവല്ലുവരുടെ ദിനം / മട്ടു പോങ്കൽ"

#. Uzhavar Thirunal
msgid "Uzhavar Thirunal"
msgstr "ഉഴവർ തിരുനാൾ"

#. Puthandu (Tamil New Year)
msgid "Puthandu"
msgstr "പുതൻഡു (തമിഴ് പുതുവർഷം)"

#. Kerala Foundation Day
msgid "Kerala Foundation Day"
msgstr "കേരള സ്ഥാപനം ദിനം"

#. Chhath Puja
msgid "Chhath Puja"
msgstr "ഛഠ് പൂജ"

#. Eid al-Fitr (optional for Kerala employees)
msgid "Eid al-Fitr (Optional)"
msgstr "ഇദ്-ഉൽ-ഫിതർ (ഐച്ഛികം)"

#. Eid al-Adha (optional for Kerala employees)
msgid "Eid al-Adha (Optional)"
msgstr "ഇദ്-ഉൽ-സുഹ / ബക്രിദ് (ഐച്ഛികം)"

#. Additional Kerala regional holidays
msgid "Nehru Trophy Boat Race"
msgstr "നെഹ്രു ട്രോഫി ബോട്ട് റേസ്"

msgid "Attukal Pongala"
msgstr "അറ്റുക്കൽ പൊങ്കാല"

msgid "Vallamkali"
msgstr "വള്ളംകളി"

msgid "Thrissur Pooram"
msgstr "തൃശ്ശൂർ പൂരം"

msgid "Chingam 1 (Malayalam New Year)"
msgstr "ചിങ്ങം 1 (മലയാളം പുതുവർഷം)"

#. Buddha Purnima (Observed)
msgid "Buddha Purnima (Observed)"
msgstr "ബുദ്ധ പൂർണിമ (കാഴ്ച)"

#. Dussehra (Observed)
msgid "Dussehra (Observed)"
msgstr "ദശരാ (കാഴ്ച)"
49 changes: 49 additions & 0 deletions tests/countries/test_india.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,59 @@ def test_l10n_en_us(self):
("2018-12-25", "Christmas"),
)

def test_l10n_ml(self):
self.assertLocalizedHolidays(
"ml",
(
("2018-01-26", "പ്രജാസത്താക ദിനം"), # Republic Day
("2018-08-15", "സ്വാതന്ത്ര്യ ദിനം"), # Independence Day
("2018-10-02", "ഗാന്ധി ജയന്തി"), # Gandhi Jayanti
("2018-04-30", "ബുദ്ധ പൂർത്തിമ"), # Buddha Purnima
("2018-11-07", "ദീപാവലി"), # Diwali
("2018-08-03", "ജന്മാഷ്ടമി"), # Janmashtami
("2018-10-19", "ദസേര"), # Dussehra
("2018-04-18", "മഹാവീർ ജയന്തി"), # Mahavir Jayanti
("2018-02-13", "മഹാ ശിവരാത്രി"), # Maha Shivaratri
("2018-11-23", "ഗുരു നാനക് ജയന്തി"), # Guru Nanak Jayanti
("2018-09-20", "മോഹറം"), # Muharram
("2018-11-21", "മിലാദ്-ഉൻ-നബി"), # Milad-un-Nabi
("2018-06-15", "ഇദ്-ഉൽ-ഫിത്ര"), # Id-ul-Fitr
("2018-08-22", "ബकरीഇദ്"), # Bakrid
("2018-03-30", "ഗുഡ് ഫ്രൈഡേ"), # Good Friday
("2018-12-25", "ക്രിസ്മസ്"), # Christmas
("2018-11-14", "ബാലദിനം"), # Children's Day
("2018-03-02", "ഹോളി"), # Holi
("2018-09-13", "ഗണേശ ചതുർത്തി"), # Ganesh Chaturthi
("2018-11-08", "ഗോവർധൻ പൂജ"), # Govardhan Puja
("2018-05-01", "ശ്രമിക ദിനം"), # Labour Day
("2018-10-17", "മഹാ നവമി"), # Maha Navami
("2018-01-14", "മകര സംക്രാന്തി"), # Makar Sankranti
("2018-08-26", "രക്ഷാബന്ധൻ"), # Raksha Bandhan
("2018-04-13", "രാമ നവമി"), # Ram Navami
("2018-10-10", "നവരാത്രി / ശറദ് നവരാത്രി"), # Navratri / Sharad Navratri
("2018-03-25", "ഈസ്റ്റർ സണ്ടേ"), # Easter Sunday
("2018-03-25", "പാം സണ്ടേ"), # Palm Sunday
("2018-04-14", "ഡോ. ബി.ആർ. ആംബേദ്കർ ജയന്തി"), # Dr. B. R. Ambedkar Jayanti
("2018-11-01", "കേരള സ്ഥാപക ദിനം"), # Kerala Foundation Day
("2018-08-15", "ആന്ധ്ര പ്രദേശ് സ്ഥാപക ദിനം"), # Andhra Pradesh Foundation Day
("2018-03-18", "ഉഗാടി"), # Ugadi
("2018-01-14", "മാഘ് ബിഹു"), # Magh Bihu
("2018-12-02", "ബിഹാർ ദിനം"), # Bihar Day
("2018-11-01", "ഒഡിഷാ ദിനം (ഉത്കല ദിനം)"), # Odisha Day
("2018-08-15", "ഗോവാ മോക്ഷ ദിനം"), # Goa Liberation Day
("2018-10-17", "ഒണം"), # Onam
("2018-10-02", "സാർദാർ വല്ലഭഭായി പട്ടേൽ ജയന്തി"), # Sardar Vallabhbhai Patel Jayanti
("2018-11-14", "വൈശാഖി"), # Vaisakhi
)
)
Comment on lines +783 to +827
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

IMO once the full Malayalam l10n list is ready, it's probably quicker to add this test case by hand (20 minutes max) than relying on LLM for this one.

Just copy test_l10n_en_us or test_l10n_hi then replace those with Malayalam's




def test_deprecated(self):
self.assertEqual(
India(subdiv="DD", years=2023).keys(), India(subdiv="DH", years=2023).keys()
)
self.assertEqual(
India(subdiv="OR", years=2023).keys(), India(subdiv="OD", years=2023).keys()
)