Skip to content

Update Italy holidays: add new holiday Oct 4, historical holidays, l10n support#3075

Merged
arkid15r merged 5 commits intovacanza:devfrom
KJhellico:upd-italy
Nov 26, 2025
Merged

Update Italy holidays: add new holiday Oct 4, historical holidays, l10n support#3075
arkid15r merged 5 commits intovacanza:devfrom
KJhellico:upd-italy

Conversation

@KJhellico
Copy link
Copy Markdown
Collaborator

Proposed change

Update Italy holidays: add new holiday Oct 4, historical holidays, l10n support.
Resolves #3022.

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 23, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added multilingual support for Italy holidays with English and Italian language options.
    • Holiday names now available in localized versions for enhanced user experience.
  • Tests

    • Expanded test coverage for Italian holiday calculations across multiple historical periods and language variants.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds English and Italian localization for Italy holidays, introduces default_language = "it_IT", supported_languages = ("en_US", "it_IT"), and start_year = 1870; wraps user-facing holiday/subdivision names with tr(); adds PO catalogs for it_IT and en_US; updates Italy holiday logic (including Saint Francis as a national holiday from 2026) and expands tests to cover localization, subdivisions, and historical ranges.

Changes

Cohort / File(s) Summary
Repository metadata
README.md
Updated Italy row to list supported languages: en_US, it_IT.
Italy country module
holidays/countries/italy.py
Added default_language = "it_IT", start_year = 1870, supported_languages = ("en_US","it_IT"); imported gettext.gettext as tr; replaced hard-coded holiday and subdivisional labels with tr(...); adjusted docstrings and holiday population logic, including adding Saint Francis from 2026 and many localized/subdivision names.
Locale catalogs
holidays/locale/en_US/LC_MESSAGES/IT.po, holidays/locale/it_IT/LC_MESSAGES/IT.po
Added PO files: Italian catalog entries and English (en_US) translations mapping Italian holiday names to English.
Tests
tests/countries/test_italy.py
Expanded and renamed tests to reflect Italian naming, localization behavior (test_l10n_default, test_l10n_en_us), subdivision-specific holidays, and extensive historical year windows (many added/adjusted tests including the 2026 Saint Francis change).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

  • Heterogeneous changes: i18n calls sprinkled through holiday logic, two large PO files (data review), and many updated tests.
  • Pay extra attention to:
    • Correct placement and context of tr() for all user-facing strings.
    • Accuracy/completeness of PO msgid/msgstr pairs and locale file headers.
    • Test year windows and the new 2026 Saint Francis holiday.

Suggested reviewers

  • arkid15r

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: adding a new October 4 holiday, historical holidays, and localization support for Italy.
Description check ✅ Passed The description is directly related to the changeset, referencing the specific issue (#3022) and describing the updates to Italy holidays with localization support.
Linked Issues check ✅ Passed The PR successfully implements both requirements from #3022: adds Saint Francis of Assisi holiday from 2026 onward and implements en_US l10n support alongside it_IT.
Out of Scope Changes check ✅ Passed All changes are scoped to Italy holiday support: adding the new holiday, historical holidays, translations, and comprehensive test coverage—all directly aligned with #3022 objectives.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (959da3c) to head (2f1438b).
⚠️ Report is 3 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3075   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          306       306           
  Lines        18015     18049   +34     
  Branches      2285      2300   +15     
=========================================
+ Hits         18015     18049   +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Copy link
Copy Markdown
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

Other one-off special holidays not included yet:

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

LGTM 🇮🇹

@arkid15r arkid15r requested a review from dr-prodigy November 25, 2025 04:54
@arkid15r
Copy link
Copy Markdown
Collaborator

@dr-prodigy @mborsetti any chance to get your review on this?
Thank you!

@mborsetti
Copy link
Copy Markdown
Contributor

@KJhellico, @arkid15r and @PPsyrius,

Wow, this looks extremely well researched and impressive, with details down to the province level (well done!). Nothing unusual sticks out to me.

A big bow to you guys for all the work you've done on this library!!!

Copy link
Copy Markdown
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

Well... 👏

@arkid15r
Copy link
Copy Markdown
Collaborator

@KJhellico, @arkid15r and @PPsyrius,

Wow, this looks extremely well researched and impressive, with details down to the province level (well done!). Nothing unusual sticks out to me.

A big bow to you guys for all the work you've done on this library!!!

Thanks for reviewing @mborsetti
If Italian holiday names look good to you we can merge it confidently -- I'm sure @KJhellico and @PPsyrius took a proper care of the calendar accuracy.

@arkid15r arkid15r added this pull request to the merge queue Nov 26, 2025
Merged via the queue into vacanza:dev with commit 0d9f0e7 Nov 26, 2025
33 checks passed
@KJhellico KJhellico deleted the upd-italy branch November 26, 2025 09:58
@arkid15r arkid15r mentioned this pull request Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Italy holidays: add "National Feast of Saint Francis of Assisi, Patron Saint of Italy" from 2026 onwards, add en_US l10n

4 participants