+
Skip to content

Conversation

mbfarah
Copy link
Contributor

@mbfarah mbfarah commented Aug 12, 2025

Proposed change

Five one-off national holidays (two due to national censuses; three due to extensions of the national holidays) that have taken place during the XXI century have been registered, along with the relevant laws in the references section.

I have also added my name to the contributors list, as was suggested.

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: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
…during the XXI century — test_chile.py.

Added the test case for the newly registered five one-off holidays.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
…during the XXI century.

Five one-off national holidays (two due to national censuses; three due to extensions of the national holidays) that have taken place during the XXI century have been registered, along with the relevant laws in the references section.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
Mbfarah patch 2 — five one-off Chilean national holidays in 2002, 2004, 2010 (two) and 2017.
Copy link
Contributor

coderabbitai bot commented Aug 12, 2025

Warning

Rate limit exceeded

@mbfarah has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 46 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fb6b1f1 and 388daca.

📒 Files selected for processing (3)
  • holidays/locale/en_US/LC_MESSAGES/CL.po (1 hunks)
  • holidays/locale/es/LC_MESSAGES/CL.po (1 hunks)
  • holidays/locale/uk/LC_MESSAGES/CL.po (1 hunks)

Summary by CodeRabbit

  • New Features
    • Chile calendar now includes census-related public holidays and special national holidays on: 2002-04-24, 2004-09-17, 2010-09-17, 2010-09-20, and 2017-04-19.
  • Tests
    • Expanded Chile special-holidays tests to cover newly added dates.
  • Chores
    • Added Miguel Farah to the public contributors list.
    • Added translations for the new Chile census holiday name in English, Spanish, and Ukrainian locales.

Walkthrough

Adds a Chile census holiday label and specific census-related special holidays, updates Chile tests and locale translations, and appends a contributor entry.

Changes

Cohort / File(s) Summary of changes
Contributors list
CONTRIBUTORS
Inserted Miguel Farah after Michael Thessel.
Chile holidays logic
holidays/countries/chile.py
Added APR import; introduced national_census = tr("Censo Nacional de Población y Vivienda"); extended special_public_holidays with 2002-04-24, 2004-09-17, 2010-09-17, 2010-09-20, 2017-04-19; updated comment references to relevant laws.
Tests (Chile)
tests/countries/test_chile.py
Expanded expected special holiday dates to include the new census/special dates; test structure unchanged.
Locales — English
holidays/locale/en_US/LC_MESSAGES/CL.po
Added msgid/msgstr for "Censo Nacional de Población y Vivienda" → "National Population and Housing Census".
Locales — Spanish
holidays/locale/es/LC_MESSAGES/CL.po
Added msgid for "Censo Nacional de Población y Vivienda" with empty msgstr.
Locales — Ukrainian
holidays/locale/uk/LC_MESSAGES/CL.po
Added msgid and Ukrainian translation "Національний перепис населення та житла".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • PPsyrius
  • KJhellico
✨ Finishing Touches
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the test label Aug 12, 2025
Copy link
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

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c28da4 and d0fefaa.

📒 Files selected for processing (3)
  • CONTRIBUTORS (1 hunks)
  • holidays/countries/chile.py (3 hunks)
  • tests/countries/test_chile.py (1 hunks)
🧰 Additional context used
🧠 Learnings (16)
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-05-09T18:36:09.607Z
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-04-23T14:55:35.504Z
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • tests/countries/test_chile.py
📚 Learning: 2025-05-06T15:29:31.893Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/countries/andorra.py:13-14
Timestamp: 2025-05-06T15:29:31.893Z
Learning: In this codebase, `tr` imported as `from gettext import gettext as tr` is used as a message marker for extracting translatable strings when generating .po files, not just for runtime translation.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-06-16T14:08:09.492Z
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: holidays/countries/bhutan.py:13-16
Timestamp: 2025-06-16T14:08:09.492Z
Learning: In the holidays library, translation is performed in the `_add_holiday` methods, not at the string level. Holiday strings passed to `_add_holiday_*` methods are processed through the translation machinery within those methods, so using `tr()` or `self.tr()` wrappers is unnecessary.

Applied to files:

  • holidays/countries/chile.py
📚 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/countries/chile.py
📚 Learning: 2025-03-19T16:53:00.375Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-05-10T04:32:15.760Z
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-03-04T11:32:45.095Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
PR: vacanza/holidays#2706
File: holidays/countries/cayman_islands.py:80-97
Timestamp: 2025-07-10T03:36:16.461Z
Learning: In the holidays library, date dictionaries that map years to specific dates (like queens_birthday_dates, spring_bank_dates, thanksgiving_day_dates, etc.) are typically defined within the _populate_public_holidays method rather than as module-level constants. This is the established library-wide pattern seen across multiple country implementations including United Kingdom, United States, Sri Lanka, and others.

Applied to files:

  • holidays/countries/chile.py
🔇 Additional comments (6)
CONTRIBUTORS (1)

101-101: Contributor addition — LGTM

Entry is correctly alphabetized by first name between Michael Thessel and Mike Borsetti.

holidays/countries/chile.py (4)

15-15: APR import is necessary for April one-off holidays — LGTM

Required for the new census-day entries in ChileStaticHolidays.


54-61: Helpful legal references — LGTM

Links to Law 17.374 (census days) and Law 19.973/20.450 (Sep 17/20 exceptions) substantiate the new entries.


271-273: New census label is clear and consistent — LGTM

Using a dedicated label for census days keeps naming explicit and reusable.


276-277: Census one-off holidays (2002-04-24, 2017-04-19) — LGTM

Dates and naming match the cited law. No observance edge cases for these Wednesdays.

Also applies to: 282-282

tests/countries/test_chile.py (1)

31-36: Expanded special-holidays coverage — LGTM

The new dates align with the added Chile special holidays (census days and 2004/2010 exceptions).

Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0c28da4) to head (388daca).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2798   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          282       282           
  Lines        16966     16967    +1     
  Branches      2243      2243           
=========================================
+ Hits         16966     16967    +1     

☔ 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 changed the title Update Chile holidays: added five national one-off holidays during the XXI century — chile.py Update Chile holidays: add special holidays Aug 12, 2025
mbfarah and others added 3 commits August 12, 2025 07:04
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
Updated the PO file for the Spanish language.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
Updated the PO file for the Spanish language.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
@github-actions github-actions bot added the l10n label Aug 12, 2025
Updated the PO file for the Ukrainian language.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Copy link
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

🔭 Outside diff range comments (1)
holidays/locale/uk/LC_MESSAGES/CL.po (1)

138-141: Add a translator comment for the census entry

Please update the Census entry in holidays/locale/uk/LC_MESSAGES/CL.po so it uses a #. translator comment with an en_US phrasing:

• File: holidays/locale/uk/LC_MESSAGES/CL.po (at the “Censo Nacional de Población y Vivienda” msgid)
Apply this diff:

-#
+#. National Population and Housing Census.
 msgid "Censo Nacional de Población y Vivienda"
 msgstr "Національний перепис населення та житла"

Afterward, run make l10n to normalize PO formatting.

♻️ Duplicate comments (1)
holidays/countries/chile.py (1)

274-284: Special public holidays entries look correct (incl. Sep 17/20, 2010).

  • 2002-04-24 and 2017-04-19 as census days: OK.
  • 2004-09-17 one-off: OK.
  • 2010-09-17 and 2010-09-20: necessary; the general Sep 17 rule (2007–2016) applies only when Sep 17 is Monday, so 2010 (Friday) needs a static entry. No duplication with other rules for 2010-09-20.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0fefaa and fb6b1f1.

📒 Files selected for processing (4)
  • holidays/countries/chile.py (3 hunks)
  • holidays/locale/en_US/LC_MESSAGES/CL.po (1 hunks)
  • holidays/locale/es/LC_MESSAGES/CL.po (1 hunks)
  • holidays/locale/uk/LC_MESSAGES/CL.po (1 hunks)
🧰 Additional context used
🧠 Learnings (30)
📓 Common learnings
Learnt from: mbfarah
PR: vacanza/holidays#2798
File: holidays/countries/chile.py:278-281
Timestamp: 2025-08-12T03:21:09.001Z
Learning: In Chile holidays implementation, the general rule for September 17 (years >= 2007) uses MON_ONLY for years 2007-2016, meaning it only adds the holiday when September 17 falls on a Monday. For years when September 17 falls on other days and was declared a one-off holiday by specific laws, it must be added to the special_public_holidays dictionary.
📚 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/es/LC_MESSAGES/CL.po
  • holidays/locale/uk/LC_MESSAGES/CL.po
  • holidays/locale/en_US/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 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/es/LC_MESSAGES/CL.po
  • holidays/locale/uk/LC_MESSAGES/CL.po
  • holidays/locale/en_US/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 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/es/LC_MESSAGES/CL.po
  • holidays/locale/uk/LC_MESSAGES/CL.po
  • holidays/locale/en_US/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 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/es/LC_MESSAGES/CL.po
📚 Learning: 2025-05-10T04:32:15.760Z
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").

Applied to files:

  • holidays/locale/es/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.

Applied to files:

  • holidays/locale/es/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.

Applied to files:

  • holidays/locale/es/LC_MESSAGES/CL.po
  • holidays/locale/en_US/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 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/es/LC_MESSAGES/CL.po
  • holidays/locale/en_US/LC_MESSAGES/CL.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/es/LC_MESSAGES/CL.po
  • holidays/locale/en_US/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 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/es/LC_MESSAGES/CL.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/en_US/LC_MESSAGES/CL.po
  • holidays/countries/chile.py
📚 Learning: 2025-06-25T10:09:29.029Z
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/locale/ar/LC_MESSAGES/EG.po:0-0
Timestamp: 2025-06-25T10:09:29.029Z
Learning: In the holidays library, msgstr fields can be left empty for source/default_language files when using Lingva, the localization tool used by the project.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/CL.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/CL.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/en_US/LC_MESSAGES/CL.po
📚 Learning: 2025-08-12T03:21:09.001Z
Learnt from: mbfarah
PR: vacanza/holidays#2798
File: holidays/countries/chile.py:278-281
Timestamp: 2025-08-12T03:21:09.001Z
Learning: In Chile holidays implementation, the general rule for September 17 (years >= 2007) uses MON_ONLY for years 2007-2016, meaning it only adds the holiday when September 17 falls on a Monday. For years when September 17 falls on other days and was declared a one-off holiday by specific laws, it must be added to the special_public_holidays dictionary.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-08-12T03:21:09.001Z
Learnt from: mbfarah
PR: vacanza/holidays#2798
File: holidays/countries/chile.py:278-281
Timestamp: 2025-08-12T03:21:09.001Z
Learning: September 17, 2010 and September 20, 2010 were both one-off holidays in Chile established by Law 20.450, separate from the general September 17 observance rule that only applies to Mondays.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-03-19T16:53:00.375Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-08-03T13:48:11.910Z
Learnt from: KJhellico
PR: vacanza/holidays#2777
File: holidays/countries/gambia.py:120-122
Timestamp: 2025-08-03T13:48:11.910Z
Learning: When reviewing holiday implementations in the holidays library, defer to the maintainers' choice of start years for specific holiday policies, as they likely have access to more reliable primary sources and official documentation than what can be found through web searches.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-03-04T11:32:45.095Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-03-04T11:32:45.095Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-03-05T02:35:03.298Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-06-18T10:21:01.376Z
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:300-319
Timestamp: 2025-06-18T10:21:01.376Z
Learning: In the France holidays implementation, legislative years for holiday changes should be hard-coded rather than extracted into constants, as this maintains consistency with the existing codebase pattern and provides historical accuracy for specific legislative acts.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-06-16T12:28:31.641Z
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-06-10T05:08:07.939Z
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.939Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-05-03T20:16:58.203Z
Learnt from: KJhellico
PR: vacanza/holidays#2524
File: holidays/countries/grenada.py:81-83
Timestamp: 2025-05-03T20:16:58.203Z
Learning: In the Vacanza holidays library, localization (l10n) comments are always written in American English (en_US locale), even when the translatable strings use different regional spellings. For example, comments use "Labor Day" while the corresponding translatable string might use "Labour Day".

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-04-05T09:44:39.998Z
Learnt from: KJhellico
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:75-76
Timestamp: 2025-04-05T09:44:39.998Z
Learning: In the holidays library, en_US locale is the standard for localization comments (using American English spelling like "Labor"), while the actual holiday names in code use the appropriate locale-specific spelling (like "Labour" for British English locales such as en_TT).

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-05-06T15:29:31.893Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/countries/andorra.py:13-14
Timestamp: 2025-05-06T15:29:31.893Z
Learning: In this codebase, `tr` imported as `from gettext import gettext as tr` is used as a message marker for extracting translatable strings when generating .po files, not just for runtime translation.

Applied to files:

  • holidays/countries/chile.py
📚 Learning: 2025-06-16T14:08:09.492Z
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: holidays/countries/bhutan.py:13-16
Timestamp: 2025-06-16T14:08:09.492Z
Learning: In the holidays library, translation is performed in the `_add_holiday` methods, not at the string level. Holiday strings passed to `_add_holiday_*` methods are processed through the translation machinery within those methods, so using `tr()` or `self.tr()` wrappers is unnecessary.

Applied to files:

  • holidays/countries/chile.py
📚 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/countries/chile.py
🔇 Additional comments (3)
holidays/countries/chile.py (3)

15-15: APR import is correct and necessary.

APR is used in the new census one-offs; import looks good.


54-61: Good addition of legal references for one-off holidays.

Adding Law 17.374 for census-day holidays and Laws 19.973/20.450 for Sep 17/20 clarifies provenance.


271-273: New census label aligns with i18n conventions.

Defining national_census = tr("Censo Nacional de Población y Vivienda") matches the existing pattern and is used in the static list.

Using translator comments, as suggested by coderabbitai.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
Using translator comments, as suggested by coderabbitai.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
Using translator comments, as suggested by coderabbitai.

Signed-off-by: Miguel Farah <53548382+mbfarah@users.noreply.github.com>
Copy link

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. @mbfarah, thank you for your contribution!

@arkid15r arkid15r added this pull request to the merge queue Aug 12, 2025
Copy link
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.

Great update 👍

Merged via the queue into vacanza:dev with commit 4eb9b41 Aug 12, 2025
36 checks passed
@arkid15r arkid15r mentioned this pull request Aug 18, 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.

4 participants

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