-
-
Notifications
You must be signed in to change notification settings - Fork 688
Update India holidays: add Malayalam language support #3225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
687c0d3
84f36e7
22b72fb
4d9ef66
ff88cfe
059b58d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
|
||||||||||
| _deprecated_subdivisions = ( | ||||||||||
| "DD", # Daman and Diu. | ||||||||||
| "OR", # Orissa. | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,172 @@ | ||||||||
| # holidays | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
|
||||||||
| "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 (അനുമാനിച്ചിരിക്കുന്നു)" | ||||||||
|
|
||||||||
|
|
||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||||||||
| #. 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 "ദശരാ (കാഴ്ച)" | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
|
|
||
|
|
||
| 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() | ||
| ) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.