Skip to content

Conversation

@KJhellico
Copy link
Collaborator

Proposed change

Fix typography: replace U+2019 with "'" and U+2013 with '-'.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 3, 2025

Summary by CodeRabbit

  • Style

    • Standardized apostrophe and hyphen usage in holiday names, comments, and documentation across multiple countries and localization files for improved consistency and readability.
  • Tests

    • Updated holiday name strings in Ivory Coast holiday tests to use standard apostrophes, ensuring alignment with style changes.

Walkthrough

This update standardizes typographic punctuation in docstrings, comments, localization files, and test cases across several country modules and related files. The changes primarily involve replacing curly apostrophes and en dashes with straight apostrophes and hyphens, respectively, in holiday names, comments, and reference URLs. No code logic, control flow, or exported entities were altered.

Changes

Files Change Summary
holidays/countries/albania.py
holidays/countries/hongkong.py
holidays/countries/macau.py
holidays/countries/portugal.py
Standardized en dash (–) to hyphen (-) in docstrings and comments referencing holiday year ranges or URLs.
holidays/countries/canada.py Replaced curly apostrophe with ASCII apostrophe in a docstring.
holidays/countries/ivory_coast.py Replaced typographic apostrophes with straight apostrophes in French holiday names and descriptions.
holidays/ical.py Replaced curly apostrophe in docstring contraction with ASCII apostrophe.
holidays/locale/en_CI/LC_MESSAGES/CI.po
holidays/locale/en_US/LC_MESSAGES/CI.po
holidays/locale/fr/LC_MESSAGES/CI.po
Replaced typographic apostrophes with straight apostrophes in French msgid strings for multiple holidays.
tests/countries/test_ivory_coast.py Updated test assertions to use straight apostrophes in holiday name strings.

Suggested labels

l10n, test


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 180b104 and 72c7bf0.

📒 Files selected for processing (11)
  • holidays/countries/albania.py (1 hunks)
  • holidays/countries/canada.py (1 hunks)
  • holidays/countries/hongkong.py (1 hunks)
  • holidays/countries/ivory_coast.py (4 hunks)
  • holidays/countries/macau.py (2 hunks)
  • holidays/countries/portugal.py (1 hunks)
  • holidays/ical.py (1 hunks)
  • holidays/locale/en_CI/LC_MESSAGES/CI.po (3 hunks)
  • holidays/locale/en_US/LC_MESSAGES/CI.po (3 hunks)
  • holidays/locale/fr/LC_MESSAGES/CI.po (3 hunks)
  • tests/countries/test_ivory_coast.py (5 hunks)
🧰 Additional context used
🧠 Learnings (2)
holidays/locale/en_CI/LC_MESSAGES/CI.po (2)
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.
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.
holidays/ical.py (2)
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: tests/test_ical.py:270-283
Timestamp: 2025-03-24T04:30:42.748Z
Learning: The `export_ics` method in `ICalExporter` takes a string parameter `file_path` and doesn't use `Path` from `pathlib` for file operations.
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: tests/test_ical.py:270-283
Timestamp: 2025-03-24T04:30:41.443Z
Learning: The `export_ics` method in `ICalExporter` takes a string parameter `file_path` and doesn't use `Path` from `pathlib` for file operations.
🧬 Code Graph Analysis (1)
holidays/countries/ivory_coast.py (2)
holidays/groups/christian.py (2)
  • _add_ascension_thursday (119-127)
  • _add_assumption_of_mary_day (148-164)
holidays/groups/islamic.py (1)
  • _add_mawlid_day (329-339)
⏰ Context from checks skipped due to timeout of 300000ms (1)
  • GitHub Check: Test build on windows-latest
🔇 Additional comments (28)
holidays/ical.py (1)

215-215: Typographic fix: use ASCII apostrophe
The docstring now uses a straight apostrophe in "it's" instead of the curly variant. No functional impact.

holidays/countries/canada.py (1)

178-178: Typographic fix: use ASCII apostrophe
The docstring now uses "Queen Victoria's" with a straight apostrophe rather than the curly mark.

holidays/countries/portugal.py (1)

108-108: Typographic fix: replace en dash with hyphen
The date range comment now reads "2013-2015" with a standard hyphen.

holidays/countries/albania.py (1)

35-35: Typographic fix: replace en dash with hyphen
The reference link label now shows "2018-2024" using a hyphen instead of an en dash.

holidays/countries/hongkong.py (1)

66-66: Typographic fix: replace en dash with hyphen
The URL description now reads "2007-2025" with a hyphen for consistency.

holidays/countries/macau.py (2)

58-58: Typographic consistency in docstring URL
Replaced the en dash with a standard hyphen in the 2017-2025 reference under Cross-Checking.


417-417: Typographic consistency in static-holidays docstring
Applied the same hyphen replacement for the 2017-2025 reference in the MacauStaticHolidays class.

holidays/locale/fr/LC_MESSAGES/CI.po (4)

54-54: Typographic fix in French msgid
Replaced the curly apostrophe with an ASCII apostrophe in “Fête de l'Assomption”.


66-66: Typographic fix in French msgid
Replaced the curly apostrophe with an ASCII apostrophe in “Jour de l'Ascension”.


83-83: Typographic fix in French msgid
Replaced the curly apostrophe with an ASCII apostrophe in “Lendemain de l'Anniversaire de la Naissance du Prophète Mahomet”.


91-91: Typographic fix in French msgid
Replaced the curly apostrophe with an ASCII apostrophe in “Victoire à la Coupe d'Afrique des Nations 2024”.

holidays/countries/ivory_coast.py (4)

90-90: Typographic correction in code string
Replaced the curly apostrophe with an ASCII apostrophe in "Jour de l'Ascension".


99-99: Typographic correction in code string
Replaced the curly apostrophe with an ASCII apostrophe in "Fête de l'Assomption".


119-119: Typographic correction in code string
Replaced the curly apostrophe with an ASCII apostrophe in "Lendemain de l'Anniversaire de la Naissance du Prophète Mahomet".


155-155: Typographic correction in static mapping
Replaced the curly apostrophe with an ASCII apostrophe in "Victoire à la Coupe d'Afrique des Nations 2024".

holidays/locale/en_US/LC_MESSAGES/CI.po (4)

54-54: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Fête de l'Assomption".


66-66: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Jour de l'Ascension".


83-83: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Lendemain de l'Anniversaire de la Naissance du Prophète Mahomet".


91-91: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Victoire à la Coupe d'Afrique des Nations 2024".

holidays/locale/en_CI/LC_MESSAGES/CI.po (4)

54-54: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Fête de l'Assomption".


66-66: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Jour de l'Ascension".


83-83: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Lendemain de l'Anniversaire de la Naissance du Prophète Mahomet".


91-91: Typographic fix in msgid
Replaced the curly apostrophe with an ASCII apostrophe in "Victoire à la Coupe d'Afrique des Nations 2024".

tests/countries/test_ivory_coast.py (5)

81-81: Typographic apostrophe standardization in Ascension Day test
Replaced the curly apostrophe with a straight apostrophe in the "Jour de l'Ascension" string to align with ASCII-only typography.


108-108: Straight apostrophe in Assumption Day test
Updated "Fête de l'Assomption" to use a straight apostrophe, matching the PR’s cleanup of U+2019 to '.


178-178: Standardize apostrophe in Mawlid anniversary test
Changed "Lendemain de l'Anniversaire de la Naissance du Prophète Mahomet" to use an ASCII apostrophe for consistency.


205-205: Apply straight apostrophes in 2024 holiday assertions
Fixed all curly apostrophes in the 2024 test tuples ("Victoire à la Coupe d'Afrique des Nations 2024", "Jour de l'Ascension", "Fête de l'Assomption", and "Lendemain de l'Anniversaire de la Naissance du Prophète Mahomet") to their ASCII equivalents.

Also applies to: 210-210, 215-216


230-230: ASCII apostrophes in default localization tests
Updated the default localization entries for 2025 to use straight apostrophes in "Jour de l'Ascension", "Fête de l'Assomption", and "Lendemain de l'Anniversaire de la Naissance du Prophète Mahomet".

Also applies to: 234-235

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

Documentation and Community

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 2025

@codecov
Copy link

codecov bot commented May 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (180b104) to head (72c7bf0).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2523   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          215       215           
  Lines        13650     13650           
  Branches      1930      1930           
=========================================
  Hits         13650     13650           

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

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.

LGTM 👍

@arkid15r arkid15r enabled auto-merge May 3, 2025 15:36
@KJhellico KJhellico mentioned this pull request May 4, 2025
9 tasks
Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

LGTM 🛠️

@arkid15r arkid15r added this pull request to the merge queue May 5, 2025
Merged via the queue into vacanza:dev with commit 8b56d46 May 5, 2025
33 checks passed
@KJhellico KJhellico deleted the fix-apostrophes branch May 5, 2025 10:21
@arkid15r arkid15r mentioned this pull request May 5, 2025
kritibirda26 pushed a commit to kritibirda26/holidays that referenced this pull request May 7, 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