+
Skip to content

Conversation

PPsyrius
Copy link
Collaborator

Proposed change

Constituição da Republica -> Constituição da República

This is part of the non-test case changes decoupling from #2881

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

Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the Brazilian holiday name to “Constituição da República” (proper diacritics), ensuring consistent display across supported locales.
  • Chores
    • Updated translation metadata and synchronized entries across locales to reflect the corrected holiday name.
  • Tests
    • Adjusted test expectations to match the corrected holiday naming.

Walkthrough

Corrects a diacritic in Brazil’s Republic Constitution Day name to “Constituição da República” in the holiday definition, updates corresponding locale PO files (en_US, pt_BR, uk) and adjusts tests. PO headers (project version, revision date, generator) were refreshed; no control flow or public API changes.

Changes

Cohort / File(s) Summary
Brazil holiday definition
holidays/countries/brazil.py
Fixes the holiday name string to “Constituição da República” in the 1892–1930 block.
Localization updates
holidays/locale/en_US/LC_MESSAGES/BR.po, holidays/locale/pt_BR/LC_MESSAGES/BR.po, holidays/locale/uk/LC_MESSAGES/BR.po
Updates msgid to “Constituição da República”; bumps PO header metadata (Project-Id-Version, PO-Revision-Date, X-Generator). Msgstr values unchanged.
Tests
tests/countries/test_brazil.py
Updates expected holiday name to “Constituição da República”.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • arkid15r

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and accurately describes the primary change: a typo/diacritic fix for Brazil's "Republic Constitution Day" and references the affected area (Brazil holidays), so it clearly communicates the main intent to reviewers. It is concise, on-topic, and appropriate for scanable PR history.
Description Check ✅ Passed The description plainly states the exact correction (Constituição da Republica -> Constituição da República), the rationale, PR linkage, change type (bugfix), and notes that checks/tests passed locally, so it is directly related to and sufficient for this localization fix. It gives reviewers the necessary context without being overly verbose.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9efe256 and f422f84.

📒 Files selected for processing (3)
  • holidays/locale/en_US/LC_MESSAGES/BR.po (1 hunks)
  • holidays/locale/pt_BR/LC_MESSAGES/BR.po (1 hunks)
  • holidays/locale/uk/LC_MESSAGES/BR.po (1 hunks)
🧰 Additional context used
🧠 Learnings (15)
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).

Applied to files:

  • holidays/locale/pt_BR/LC_MESSAGES/BR.po
  • holidays/locale/uk/LC_MESSAGES/BR.po
  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
PR: vacanza/holidays#2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library, when a locale file matches the country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language files should have filled msgstr fields with translations.

Applied to files:

  • holidays/locale/pt_BR/LC_MESSAGES/BR.po
  • holidays/locale/uk/LC_MESSAGES/BR.po
  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
PR: vacanza/holidays#2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.

Applied to files:

  • holidays/locale/pt_BR/LC_MESSAGES/BR.po
  • holidays/locale/uk/LC_MESSAGES/BR.po
  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
PR: vacanza/holidays#2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library localization pattern, when a locale file matches a country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language locale files should have translations in the msgstr fields.

Applied to files:

  • holidays/locale/pt_BR/LC_MESSAGES/BR.po
  • holidays/locale/uk/LC_MESSAGES/BR.po
  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-06-29T09:37:35.283Z
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: holidays/locale/en_US/LC_MESSAGES/CF.po:13-28
Timestamp: 2025-06-29T09:37:35.283Z
Learning: In the holidays project, .po files follow a standard formatting convention where there is always a blank line after the metadata header section (after the "X-Source-Language" line). This blank line separates the header from the actual translation content and should not be removed.

Applied to files:

  • holidays/locale/pt_BR/LC_MESSAGES/BR.po
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.

Applied to files:

  • holidays/locale/pt_BR/LC_MESSAGES/BR.po
  • holidays/locale/uk/LC_MESSAGES/BR.po
  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/BR.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/BR.po
  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/BR.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/BR.po
📚 Learning: 2025-09-17T15:53:16.940Z
Learnt from: PPsyrius
PR: vacanza/holidays#2944
File: holidays/countries/myanmar.py:108-111
Timestamp: 2025-09-17T15:53:16.940Z
Learning: In the holidays package, explanatory comments about year restrictions or policy context should be placed above conditional blocks or at method level, never directly above holiday name comments that precede tr() function calls, as this would include the explanatory text in .po localization files when running `make l10n`.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/BR.po
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-04-26T19:55:09.581Z
Learnt from: KJhellico
PR: vacanza/holidays#2501
File: scripts/docs/gen_index.py:1-12
Timestamp: 2025-04-26T19:55:09.581Z
Learning: The holidays project uses a standard header for all Python (.py) files in the repository that describes the overall holidays library, including authors, website and license information, regardless of the specific purpose of individual script files.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-06-19T05:54:49.792Z
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/french_polynesia.py:1-12
Timestamp: 2025-06-19T05:54:49.792Z
Learning: The holidays library uses a standard file header format across all country implementation files consisting of a comprehensive comment block with project description, authors, website, and license information. Country files do not use module-level docstrings but instead rely on this header format followed by class-level docstrings.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/BR.po
📚 Learning: 2025-06-10T12:17:58.880Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: holidays/locale/en_VC/LC_MESSAGES/VC.po:1-14
Timestamp: 2025-06-10T12:17:58.880Z
Learning: In the holidays project, .po files should use the full multi-line header format including the project description, authors, website, and license information, rather than a single-line comment format.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/BR.po
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Test Python 3.12 on ubuntu-latest
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.11 on windows-latest
  • GitHub Check: Test Python 3.10 on ubuntu-latest
  • GitHub Check: Test Python 3.11 on macos-latest
🔇 Additional comments (5)
holidays/locale/uk/LC_MESSAGES/BR.po (2)

17-17: LGTM: header metadata bump and format are correct.

Version/date/generator updates look consistent with project l10n conventions. Header comment style and the blank line after X-Source-Language are correct.

Also applies to: 19-19, 27-27


35-36: Approve: Diacritic fixed to "República"

No occurrences of "Republica" remain; corrected msgid found in:

  • holidays/countries/brazil.py:109
  • holidays/locale/uk/LC_MESSAGES/BR.po:35
  • holidays/locale/pt_BR/LC_MESSAGES/BR.po:35
  • holidays/locale/en_US/LC_MESSAGES/BR.po:35
  • tests/countries/test_brazil.py:39
holidays/locale/pt_BR/LC_MESSAGES/BR.po (2)

17-17: LGTM: metadata refresh is fine.

Values align with recent localization edits; formatting preserved.

Also applies to: 19-19, 27-27


35-36: Source msgid corrected; msgstr kept empty as required for default locale.

This follows the project convention for pt_BR.

holidays/locale/en_US/LC_MESSAGES/BR.po (1)

35-36: Diacritic correction acknowledged.

en_US translation remains correct and consistent with code/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.

Copy link

codecov bot commented Sep 16, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2933   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          296       296           
  Lines        17616     17616           
  Branches      2269      2269           
=========================================
  Hits         17616     17616           

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

@PPsyrius PPsyrius requested a review from KJhellico September 17, 2025 03:22
Copy link
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

@arkid15r arkid15r added this pull request to the merge queue Sep 18, 2025
Merged via the queue into vacanza:dev with commit b31cf70 Sep 18, 2025
36 checks passed
@PPsyrius PPsyrius deleted the bra_typo branch September 19, 2025 02:43
@arkid15r arkid15r mentioned this pull request Oct 6, 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.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载