Skip to content

Update Lebanon holidays: add French language support#3407

Merged
arkid15r merged 17 commits into
vacanza:devfrom
osamaajr:osamaajr-patch-2
Mar 31, 2026
Merged

Update Lebanon holidays: add French language support#3407
arkid15r merged 17 commits into
vacanza:devfrom
osamaajr:osamaajr-patch-2

Conversation

@osamaajr

@osamaajr osamaajr commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Proposed change

This PR adds French localisation support for Lebanon holidays.

Changes:

  • Added "fr" to supported_languages in lebanon.py
  • Added LB.po with French translations for Lebanon holidays
  • Added test_l10n_fr to test_lebanon.py
  • Updated README to include French as a supported language

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

Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds French localization for Lebanon: README updated, Lebanon.supported_languages extended with fr, a new French PO locale file added, French localization tests added, and a contributor entry appended.

Changes

Cohort / File(s) Summary
Documentation
README.md
Updated Lebanon "Available Countries" table to include fr in Supported Languages.
Country config
holidays/countries/lebanon.py
Added "fr" to Lebanon.supported_languages.
French localization
holidays/locale/fr/LC_MESSAGES/LB.po
New French PO file with translations and PO metadata for Lebanon holidays.
Tests
tests/countries/test_lebanon.py
Added test_l10n_fr asserting French holiday names (2025) including estimated/observed labels and multi-label dates.
Contributors
CONTRIBUTORS
Added contributor Osama Alnajar.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
  • PPsyrius
  • KJhellico
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding French language support to Lebanon holidays, which is the core objective of all file modifications.
Description check ✅ Passed The description is directly related to the changeset, detailing the French localization additions across multiple files and matching the actual modifications in the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@osamaajr

Copy link
Copy Markdown
Contributor Author

Hi, I’ve opened a PR adding French localisation for Lebanon holidays. Happy to make any adjustments if needed!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@holidays/countries/lebanon.py`:
- Line 46: supported_languages is indented with 3 spaces causing a syntax error;
align it with the surrounding class body by using 4-space indentation so the
tuple assignment (supported_languages = ("ar", "en_US", "fr")) is at the same
indentation level as other class attributes/methods (e.g., inside the Lebanon
class or equivalent) without changing the tuple contents.

In `@tests/countries/test_lebanon.py`:
- Around line 359-391: The test_l10n_fr expected strings in test_l10n_fr do not
match the updated French translations in LB.po; for dates with multiple holiday
names (e.g., 2025-04-18, 2025-04-21 and the other mismatched entries) update the
tuples in test_l10n_fr to use the exact French strings from
holidays/locale/fr/LC_MESSAGES/LB.po and ensure when multiple names share a date
they are alphabetically ordered within the string (separated by the same
delimiter used in LB.po); locate and edit the expected tuples in the
test_l10n_fr function to match LB.po exactly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ce7390dd-316a-478a-be52-c323ac21df7c

📥 Commits

Reviewing files that changed from the base of the PR and between b1b7de7 and 72a6a92.

📒 Files selected for processing (4)
  • README.md
  • holidays/countries/lebanon.py
  • holidays/locale/fr/LC_MESSAGES/LB.po
  • tests/countries/test_lebanon.py

Comment thread holidays/countries/lebanon.py Outdated
Comment thread tests/countries/test_lebanon.py Outdated

@PPsyrius PPsyrius left a comment

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.

Minor fixes aside, feel free to add your name to the CONTRIBUTORS file as well - the rest are LGTM👍

Comment thread holidays/countries/lebanon.py Outdated
Comment thread tests/countries/test_lebanon.py Outdated
@PPsyrius PPsyrius changed the title Add French localisation for Lebanon holidays Update Lebanon holidays: add French language support Mar 25, 2026
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Refactored the test_l10n_fr method to include updated holiday names and added the method back after it was previously removed.

Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/countries/test_lebanon.py`:
- Around line 327-328: Move the def test_l10n_default out of the nested scope so
it's a top-level test method in the test class (currently it's nested inside
test_2024); reduce its indentation to the class-level method indent (4 spaces)
and indent its body to the standard method body indent (8 spaces) so the method
signature is at the same indent as other test methods and unittest discovery
will find it; verify the method body lines are consistently indented and not
left-aligned with the def.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 19a3211b-bcf2-4bca-811d-04dd905f39d5

📥 Commits

Reviewing files that changed from the base of the PR and between ffdbd1f and 39c4df0.

📒 Files selected for processing (1)
  • tests/countries/test_lebanon.py

Comment thread tests/countries/test_lebanon.py Outdated
@osamaajr

Copy link
Copy Markdown
Contributor Author

Thank you for the feedback! Ive sorted the minor issues and added my name to the contributors list. Id love to connect too

Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CONTRIBUTORS`:
- Line 193: The CONTRIBUTORS file entry "Osama Alnajar" is out of alphabetical
order; remove the current line containing "Osama Alnajar" and insert it between
the lines for "Osayd Abdu" and "Oscar Romero" so the list remains sorted by
first name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4d891150-44be-4651-9d7e-345eff164ed3

📥 Commits

Reviewing files that changed from the base of the PR and between 39c4df0 and 566885f.

📒 Files selected for processing (1)
  • CONTRIBUTORS

Comment thread CONTRIBUTORS Outdated

@PPsyrius PPsyrius left a comment

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.

Please look at the 2 remaining issues still left open for this PR as marked by the bot, others are LGTM 👍

Comment thread holidays/locale/fr/LC_MESSAGES/LB.po Outdated
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Comment thread CONTRIBUTORS Outdated
osamaajr and others added 2 commits March 29, 2026 19:29
…and included their links)

Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Comment thread holidays/locale/fr/LC_MESSAGES/LB.po Outdated
Added additional references for Lebanon holidays.

Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Comment thread holidays/countries/lebanon.py Outdated
Comment thread holidays/locale/fr/LC_MESSAGES/LB.po Outdated
Comment thread holidays/locale/fr/LC_MESSAGES/LB.po Outdated
Comment thread tests/countries/test_lebanon.py Outdated
osamaajr and others added 4 commits March 30, 2026 05:56
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
Comment thread CONTRIBUTORS Outdated
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Osama Alnajar <osama.alnajar.26@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b1b7de7) to head (a2448ce).
⚠️ Report is 25 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3407   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          310       312    +2     
  Lines        18585     18643   +58     
  Branches      2380      2382    +2     
=========================================
+ Hits         18585     18643   +58     

☔ 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.

@KJhellico KJhellico left a comment

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.

LGTM.

@PPsyrius PPsyrius left a comment

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.

LGTM 🇱🇧

@arkid15r arkid15r left a comment

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.

LGTM, thanks for adding this @osamaajr

@arkid15r arkid15r added this pull request to the merge queue Mar 31, 2026
@osamaajr

Copy link
Copy Markdown
Contributor Author

Thanks everyone, really appreciate the reviews! 🙌

Merged via the queue into vacanza:dev with commit c3eb7a1 Mar 31, 2026
32 checks passed
@KJhellico KJhellico mentioned this pull request Apr 6, 2026
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.

4 participants