Skip to content

Update Gabon holidays: add l10n support #3178

Merged
arkid15r merged 19 commits intovacanza:devfrom
aman-coder03:l10n-fr-ga
Mar 7, 2026
Merged

Update Gabon holidays: add l10n support #3178
arkid15r merged 19 commits intovacanza:devfrom
aman-coder03:l10n-fr-ga

Conversation

@aman-coder03
Copy link
Copy Markdown
Contributor

Adds missing French (fr) localization for Gabon (GA).

This introduces a new GA.po file with correct gettext structure
(English source strings with French translations), following existing
Francophone locale patterns.

fixes #3176.
Part of #3152.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 29, 2025

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 and en_US PO catalogs for Gabon (GA); localizes holidays/countries/gabon.py using gettext (tr), sets default_language/supported_languages, updates estimated_label, and extends tests to verify French and en_US localized holiday names for 2022.

Changes

Cohort / File(s) Summary
French localization PO
holidays/locale/fr/LC_MESSAGES/GA.po
New French translation catalog with PO headers and French msgstr entries for Gabon holiday names and related strings (including "%s (estimé)" and Independence Day variants).
en_US localization PO
holidays/locale/en_US/LC_MESSAGES/GA.po
New English (en_US) PO file mapping French msgids to English msgstr translations; includes "%s (estimated)".
Gabon country implementation
holidays/countries/gabon.py
Wrapped public holiday names in tr(...), added default_language = "fr" and supported_languages = ("en_US", "fr"), and localized estimated_label.
Tests
tests/countries/test_gabon.py
Updated expected holiday names to French and added test_l10n_default and test_l10n_en_us to assert default (fr) and en_US localizations for 2022.
Docs / README
README.md
Updated "Subdivisions/Supported Languages" table entry for Gabon to list en_US and fr.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

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

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding French localization for Gabon holidays.
Description check ✅ Passed The description is directly related to the changeset, explaining the addition of French (fr) localization for Gabon (GA) with proper gettext structure and references to related issues.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #3176: French holiday translations, CLDR-consistent names, proper gettext structure, test coverage, and README updates.
Out of Scope Changes check ✅ Passed All changes are in scope—French translations for Gabon holidays, updated tests for localization verification, and documentation updates align with issue #3176 objectives.

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

✨ Finishing Touches
🧪 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.

@KJhellico KJhellico marked this pull request as draft December 29, 2025 10:27
@github-actions github-actions bot added the test label Dec 29, 2025
@sonarqubecloud
Copy link
Copy Markdown

@KJhellico
Copy link
Copy Markdown
Collaborator

@aman-coder03, are you planning to continue working on this PR?

@aman-coder03
Copy link
Copy Markdown
Contributor Author

aman-coder03 commented Mar 3, 2026

Hi @KJhellico! Yes, I'm still working on this.

@aman-coder03
Copy link
Copy Markdown
Contributor Author

@KJhellico Could you let me know what's still remaining for this PR to be ready for merge? I want to make sure I haven't missed anything. Thanks!

@KJhellico
Copy link
Copy Markdown
Collaborator

  • Translatable strings in .py file should be in French.
  • .po files should have standard header format and metadata entries
  • README, tests...

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: 5

🤖 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/locale/en_US/LC_MESSAGES/GA.po`:
- Around line 17-26: The PO file header is missing the X-Source-Language field;
update the msgstr header block (the existing multiline string starting with
"Project-Id-Version: Holidays 0.77\n" etc.) to include a new line
"X-Source-Language: en\n" (or the project's canonical source language) among the
other header lines so it matches the other .po files' metadata.

In `@holidays/locale/fr/LC_MESSAGES/GA.po`:
- Line 13: The header line "# Gabon holidays (French localization)." should be
changed to the default-language header format "# Gabon holidays."—remove the "
(French localization)" suffix so the GA.po file uses the standard
default-language header; update the header comment string accordingly.
- Around line 17-26: Add the missing X-Source-Language header to the PO metadata
by inserting an "X-Source-Language: fr\n" entry into the msgstr header block so
the file's metadata includes the source language; update the same msgstr block
that contains "Project-Id-Version", "Language", and "Content-Type" (the PO
header string) to include "X-Source-Language: fr\n" alongside the existing
fields.

In `@tests/countries/test_gabon.py`:
- Line 13: Remove the trailing whitespace at the end of the import statement
that reads "from unittest import TestCase " so it becomes "from unittest import
TestCase"; update the import line in tests referencing the TestCase symbol to
eliminate the extra space character.
- Line 129: Remove the unnecessary blank line in test_gabon.py that introduced
extra whitespace inside the Gabon test file; edit the test_gabon.py module to
delete the stray blank line so the file has no superfluous empty lines within
the test block.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a864f69 and 53a5ae1.

📒 Files selected for processing (4)
  • holidays/countries/gabon.py
  • holidays/locale/en_US/LC_MESSAGES/GA.po
  • holidays/locale/fr/LC_MESSAGES/GA.po
  • tests/countries/test_gabon.py

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: 3

♻️ Duplicate comments (1)
holidays/locale/fr/LC_MESSAGES/GA.po (1)

13-13: ⚠️ Potential issue | 🟡 Minor

Use default-language header format.

For a default French catalog, this header should be # Gabon holidays. (without fr localization suffix).

🛠️ Suggested fix
-# Gabon holidays fr localization.
+# Gabon holidays.
Based on learnings: Default-language `.po` headers use `# [Country] holidays.`, while only non-default locales use `# [Country] holidays [locale] localization.`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@holidays/locale/fr/LC_MESSAGES/GA.po` at line 13, Replace the non-default
header string "# Gabon holidays fr localization." with the default-language
header "# Gabon holidays." so the PO file uses the standard default-language
header format (update the header line in the locale file where the string "#
Gabon holidays fr localization." appears).
🤖 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/gabon.py`:
- Around line 54-90: Add standard en_US translator comments above each tr(...)
call in this Gabon holidays method so the .po extractor gets consistent locale
notes; for every holiday invocation (e.g., _add_new_years_day(tr("Jour de
l'An")), _add_easter_monday(tr("Lundi de Pâques")), _add_holiday_apr_17(...),
_add_labor_day(...), _add_ascension_thursday(...), _add_whit_monday(...),
_add_assumption_of_mary_day(...), _add_holiday_aug_16(...),
_add_holiday_aug_17(...), _add_all_saints_day(...), _add_christmas_day(...),
_add_eid_al_fitr_day(...), _add_eid_al_adha_day(...)) insert an en_US translator
comment immediately above the tr(...) call following the existing pattern used
elsewhere (single-line comment like # en_US: <English note>) so translator
comments are consistent across locale catalogs.

In `@holidays/locale/en_US/LC_MESSAGES/GA.po`:
- Around line 55-57: Update the msgid in the en_US GA.po entry from "Lundi de
Pentécôte" to the exact source key "Lundi de Pentecôte" so it matches the
holiday key used in holidays/countries/gabon.py (and therefore allows
translation lookup); also make the identical correction in the
fr/LC_MESSAGES/GA.po catalog so both PO files stay aligned with the country
source string.

In `@holidays/locale/fr/LC_MESSAGES/GA.po`:
- Around line 30-85: This file contains default-language French entries where
msgstr is currently populated; follow project convention by emptying the msgstr
for each default-language entry (leave msgid as-is and set msgstr to an empty
string) for the entries shown (e.g., "%s (estimé)", "Jour de l'An", "Lundi de
Pâques", "Journée des droits de la femme", "Fête du Travail", "Ascension",
"Lundi de Pentécôte", "Assomption", "Fête de l'Indépendance", "Fête de
l'Indépendance (jour férié)", "Toussaint", "Noël", "Aïd el-Fitr", "Aïd
el-Adha"); apply this pattern to all default-language msgid/msgstr pairs in this
locale file so msgid remains the source text and msgstr is an empty string.

---

Duplicate comments:
In `@holidays/locale/fr/LC_MESSAGES/GA.po`:
- Line 13: Replace the non-default header string "# Gabon holidays fr
localization." with the default-language header "# Gabon holidays." so the PO
file uses the standard default-language header format (update the header line in
the locale file where the string "# Gabon holidays fr localization." appears).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 53a5ae1 and ab3f32a.

📒 Files selected for processing (3)
  • holidays/countries/gabon.py
  • holidays/locale/en_US/LC_MESSAGES/GA.po
  • holidays/locale/fr/LC_MESSAGES/GA.po

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: 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_gabon.py`:
- Line 61: The test assertions set the localized holiday label incorrectly as
"Lundi de Pentécôte"; update all occurrences to the correct French spelling
"Lundi de Pentecôte" (replace "Pentécôte" with "Pentecôte") in the test_gabon.py
assertions where the variable name is assigned (e.g., the name = "Lundi de
Pentécôte" lines and the two other similar assertions).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab3f32a and 1c13757.

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

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.

♻️ Duplicate comments (1)
tests/countries/test_gabon.py (1)

61-61: ⚠️ Potential issue | 🟡 Minor

French spelling: "Pentécôte" should be "Pentecôte".

The correct French spelling has no accent on the first 'e'. This affects lines 61, 123, and 140.

Proposed fix
-        name = "Lundi de Pentécôte"
+        name = "Lundi de Pentecôte"

,

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/countries/test_gabon.py` at line 61, Replace the incorrect French
spelling "Pentécôte" with the correct "Pentecôte" in the test file by updating
the string assignments where it's used (e.g., the name variable assignment in
tests/countries/test_gabon.py and the other occurrences referenced in the
review); search for the literal "Pentécôte" and change each to "Pentecôte" so
the tests use the correct holiday name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@tests/countries/test_gabon.py`:
- Line 61: Replace the incorrect French spelling "Pentécôte" with the correct
"Pentecôte" in the test file by updating the string assignments where it's used
(e.g., the name variable assignment in tests/countries/test_gabon.py and the
other occurrences referenced in the review); search for the literal "Pentécôte"
and change each to "Pentecôte" so the tests use the correct holiday name.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c13757 and 8961974.

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9c6e4f9) to head (61f73e2).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3178   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          308       308           
  Lines        18480     18483    +3     
  Branches      2369      2369           
=========================================
+ Hits         18480     18483    +3     

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

@aman-coder03
Copy link
Copy Markdown
Contributor Author

Hi @KJhellico The failing checks appear to be infrastructure related(Python 3.14 download timeout on macOS and Windows cancellations) not caused by code changes

@aman-coder03 aman-coder03 marked this pull request as ready for review March 6, 2026 09:53
@KJhellico KJhellico changed the title Add French (fr) localization for Gabon (GA) Update Gabon holidays: add l10n support Mar 6, 2026
@KJhellico
Copy link
Copy Markdown
Collaborator

@aman-coder03, please run tests before pushing changes (make check or at least make test) - it will save time for all of us.

@aman-coder03
Copy link
Copy Markdown
Contributor Author

@KJhellico I’ve run the tests locally (pytest) and everything passes on my side (6883 passed, 4 skipped)

@KJhellico
Copy link
Copy Markdown
Collaborator

Yes, I see now - .po file for the default language is not checked for obsolete entries, this needs to be fixed.

@aman-coder03
Copy link
Copy Markdown
Contributor Author

@KJhellico for the failing tests, shall i update the holiday names in test_l10n_en_us?

@KJhellico
Copy link
Copy Markdown
Collaborator

shall i update the holiday names in test_l10n_en_us?

Yes, of course.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

Looks good, thanks for taking care of that 👍

@arkid15r arkid15r added this pull request to the merge queue Mar 7, 2026
Merged via the queue into vacanza:dev with commit d855c67 Mar 7, 2026
32 checks passed
@arkid15r arkid15r mentioned this pull request Mar 16, 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.

Add French (fr) localization for Gabon (GA)

3 participants