Update Gabon holidays: add l10n support #3178
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds French and en_US PO catalogs for Gabon (GA); localizes Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
|
@aman-coder03, are you planning to continue working on this PR? |
|
Hi @KJhellico! Yes, I'm still working on this. |
|
@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! |
|
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
holidays/countries/gabon.pyholidays/locale/en_US/LC_MESSAGES/GA.poholidays/locale/fr/LC_MESSAGES/GA.potests/countries/test_gabon.py
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
holidays/locale/fr/LC_MESSAGES/GA.po (1)
13-13:⚠️ Potential issue | 🟡 MinorUse default-language header format.
For a default French catalog, this header should be
# Gabon holidays.(withoutfr localizationsuffix).Based on learnings: Default-language `.po` headers use `# [Country] holidays.`, while only non-default locales use `# [Country] holidays [locale] localization.`.🛠️ Suggested fix
-# Gabon holidays fr localization. +# Gabon holidays.🤖 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
📒 Files selected for processing (3)
holidays/countries/gabon.pyholidays/locale/en_US/LC_MESSAGES/GA.poholidays/locale/fr/LC_MESSAGES/GA.po
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
♻️ Duplicate comments (1)
tests/countries/test_gabon.py (1)
61-61:⚠️ Potential issue | 🟡 MinorFrench 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
Hi @KJhellico The failing checks appear to be infrastructure related( |
|
@aman-coder03, please run tests before pushing changes ( |
|
@KJhellico I’ve run the tests locally (pytest) and everything passes on my side (6883 passed, 4 skipped) |
|
Yes, I see now - .po file for the default language is not checked for obsolete entries, this needs to be fixed. |
|
@KJhellico for the failing tests, shall i update the holiday names in |
Yes, of course. |
|
arkid15r
left a comment
There was a problem hiding this comment.
Looks good, thanks for taking care of that 👍



Adds missing French (fr) localization for Gabon (GA).
This introduces a new
GA.pofile with correct gettext structure(English source strings with French translations), following existing
Francophone locale patterns.
fixes #3176.
Part of #3152.