Skip to content

Conversation

@pyniuX
Copy link
Contributor

@pyniuX pyniuX commented Mar 12, 2025

Proposed change

Added German translation of Polish holidays.

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 Mar 12, 2025

Summary by CodeRabbit

  • New Features
    • Expanded language support for Poland by adding German for holiday information.
  • Documentation
    • Updated language listings to reflect German as a supported language.
  • Tests
    • Introduced new tests to validate accurate German holiday localization.

Walkthrough

The changes add German ("de") language support for Poland. The README.rst and the Poland class in the holidays module have been updated to include German among the supported languages. A new German translation file for Polish holidays has been introduced, and tests have been added to verify the correct localization of holidays in German.

Changes

File(s) Change Summary
README.rst, holidays/countries/poland.py Updated the supported languages for Poland by adding German ("de") alongside English, Polish, and Ukrainian.
holidays/locale/de/LC_MESSAGES/PL.po Added a new translation file containing German translations for various Polish holidays.
tests/countries/test_poland.py Introduced a new test method test_l10n_de to verify the German holiday localization.

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 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 e4c0dbf and 8a2b17c.

📒 Files selected for processing (2)
  • holidays/locale/de/LC_MESSAGES/PL.po (1 hunks)
  • tests/countries/test_poland.py (1 hunks)
🔇 Additional comments (4)
holidays/locale/de/LC_MESSAGES/PL.po (3)

1-28: LGTM! Header section is correctly formatted.

The PO file header contains all the necessary metadata including proper license information, language specification, and charset encoding.


29-112: German translations are accurate and culturally appropriate.

The translations follow proper German naming conventions for holidays. I particularly appreciate the use of traditional German holiday names like "Heilige Drei Könige", "Fronleichnam", and "Mariä Himmelfahrt" which are the authentic terms used in German-speaking regions.


113-116: Christmas holiday translations look good.

The Christmas holiday translations use the correct German terminology for both first and second Christmas days.

tests/countries/test_poland.py (1)

287-321: Test implementation for German localization is well-structured.

The German localization test follows the existing pattern in the file, properly testing holiday names for both 2018 and 2022. The method is correctly placed in alphabetical order between the default and en_us tests, maintaining the project's convention.

All translations match the expected values from the PO file, which ensures consistency between the translation resources and actual implementation.

✨ Finishing Touches
  • 📝 Generate Docstrings

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

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

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

🔭 Outside diff range comments (1)
holidays/locale/de/LC_MESSAGES/PL.po (1)

112-115: ⚠️ Potential issue

Fix typo in Second Day of Christmas translation

There's a spelling error in the German translation for the Second Day of Christmas.

-msgstr "Zweister Weihnachtstag"
+msgstr "Zweiter Weihnachtstag"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 759a629 and 2dcc616.

📒 Files selected for processing (5)
  • README.rst (1 hunks)
  • holidays/countries/poland.py (1 hunks)
  • holidays/locale/de/LC_MESSAGES/PL.po (1 hunks)
  • tests/countries/test_poland.py (1 hunks)
  • tests/test_l10n.py (1 hunks)
🔇 Additional comments (6)
holidays/countries/poland.py (1)

30-30: LGTM on adding German language support!

The addition of "de" to the supported_languages tuple is correctly implemented and maintains alphabetical ordering of language codes.

README.rst (1)

777-777: LGTM on README update!

The addition of "de" to the supported languages list for Poland is consistent with the implementation change and maintains alphabetical ordering.

holidays/locale/de/LC_MESSAGES/PL.po (2)

1-27: Metadata looks good!

The gettext metadata is properly formatted with appropriate project information, creation date, and translator details.


28-107: Holiday translations look accurate!

The German translations for Polish holidays are culturally appropriate and correctly formatted with helpful comments.

tests/countries/test_poland.py (1)

357-374: German language tests are well structured!

The test follows the same pattern as the existing tests for other languages, which is good for consistency.

tests/test_l10n.py (1)

37-42: Well implemented test for German language fallback behavior.

The added test method follows the established pattern of existing tests and properly verifies that when an unavailable language is requested but the environment language is set to German, the system correctly falls back to using German for the holiday names.

@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (72d70ef) to head (8a2b17c).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2346   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          204       204           
  Lines        12853     12853           
  Branches      1817      1817           
=========================================
  Hits         12853     12853           

☔ 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

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

@pyniuX, thank you for this contribution, new translation is always welcome!

Is there any established translation of Polish holidays into German, or is this your own translation?

And please take a look at few suggestions.

@KJhellico KJhellico changed the title Update Polish holidays Update Poland holidays: add de localization Mar 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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4bf8d05 and 5e66a15.

📒 Files selected for processing (2)
  • holidays/locale/de/LC_MESSAGES/PL.po (1 hunks)
  • tests/countries/test_poland.py (1 hunks)
🔇 Additional comments (6)
holidays/locale/de/LC_MESSAGES/PL.po (6)

13-13: Comment header format looks good.

The header correctly identifies this file as the German localization for Polish holidays.


22-22: Language code properly defined.

The file correctly specifies German ("de") as the language being used for these translations.


29-31: New Year's Day translation looks good.

The German translation "Neujahr" for "Nowy Rok" is correct.


33-35: Epiphany translation is correct.

"Heilige Drei Könige" is the proper German translation for the Polish "Święto Trzech Króli".


109-111: Christmas Day translation is now correct.

The German translation "Erster Weihnachtstag" is the correct spelling for Christmas Day.


113-115: Second Christmas Day translation is correct.

"Zweiter Weihnachtstag" is the proper German term for the second day of Christmas.

@pyniuX
Copy link
Contributor Author

pyniuX commented Mar 13, 2025

@KJhellico,
I changed the code according to Your suggestions.
Translation is mine, I couldn't find any official sources.

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.

Then I propose a few replacements. I'm not good at both languages, so I'm open to discussion and don't insist on my own options.

@pyniuX
Copy link
Contributor Author

pyniuX commented Mar 15, 2025

Then I propose a few replacements. I'm not good at both languages, so I'm open to discussion and don't insist on my own options.

There's no need to discuss.
All of Your corrections look sensible to me, changed.

@sonarqubecloud
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. @pyniuX, you can add your name to AUTHORS file.

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 🇵🇱🇩🇪

@pyniuX
Copy link
Contributor Author

pyniuX commented Mar 16, 2025

One more question, when can I approximately expect the code to be officially available in an update?

@PPsyrius
Copy link
Collaborator

One more question, when can I approximately expect the code to be officially available in an update?

The upcoming release is likely on Monday or Tuesday, depending on the timezone. We currently follow a twice-a-month release schedule.

@arkid15r
Copy link
Collaborator

One more question, when can I approximately expect the code to be officially available in an update?

It's around Mon, Mar 17th

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.

Hi @manuel2258
Could you review it if you have time?

Thank you!

Copy link

@manuel2258 manuel2258 left a comment

Choose a reason for hiding this comment

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

Native German here. All translations already sound good and the to me knows ones, that we also celebrate here, use the correct names.

I chased down some Wikipedia entries and their linked German translations, and maybe some of the Polish only ones could be translated, slightly better. However, that is not strictly needed, so it is also mergeable just like this.

@arkid15r
Copy link
Collaborator

@manuel2258 thanks for verifying the 🇩🇪 translation!

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.

@pyniuX thank you for improving this!

@arkid15r arkid15r added this pull request to the merge queue Mar 17, 2025
Merged via the queue into vacanza:dev with commit 3e20bec Mar 17, 2025
33 checks passed
@KJhellico KJhellico mentioned this pull request Mar 17, 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.

5 participants