Update l10n for RTL languages
Proposed change
Update l10n for RTL languages (Arabic, Farsi, Hebrew).
Thanks to @Wasif-Shahzad for bringing this issue to my attention.
Type of change
- [ ] New country/market holidays support (thank you!)
- [x] 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
holidaysfunctionality in general)
Checklist
- [x] I've followed the contributing guidelines
- [x] I've successfully run
make check, all checks and tests are green
Summary by CodeRabbit
-
Style
- Updated the Arabic and Persian localization of holiday labels for "estimated" and "observed" holidays across multiple countries to use a suffix format (e.g., "%s (المقدرة)") instead of a prefix.
- Improved consistency in holiday label phrasing for Arabic and Hebrew, affecting how estimated and observed holidays appear in user interfaces.
-
Tests
- Adjusted test cases to match the new localization format for holiday names in Arabic, Persian, and Hebrew, ensuring correct display of estimated and observed holiday labels.
Summary by CodeRabbit
- Style
- Updated the formatting and placement of "estimated" and "observed" labels in Arabic, Hebrew, and Persian holiday names, moving them from a prefix to a suffix position for improved localization consistency.
- Tests
- Adjusted test cases to reflect the new label formats for estimated and observed holidays across multiple countries and languages.
- Documentation
- Updated translation files to match the revised label formats in all supported locales.
Walkthrough
This update standardizes the formatting of "estimated" and "observed" holiday labels in Arabic, Hebrew, and Persian across multiple country modules, localization files, and related tests. Prefix-based labels are replaced with suffix-based ones, and the specific wording is updated for consistency. No logic or public API signatures are changed.
Changes
| Files/Groups | Change Summary |
|---|---|
| holidays/countries/algeria.py, holidays/countries/bahrain.py, holidays/countries/egypt.py, | Updated estimated_label string from prefix "(تقدير) %s" to suffix "%s (المقدرة)" in Arabic. |
| holidays/countries/jordan.py, holidays/countries/kuwait.py, holidays/countries/morocco.py, | |
| holidays/countries/saudi_arabia.py, holidays/countries/tunisia.py, holidays/countries/ | |
| united_arab_emirates.py, holidays/countries/oman.py, holidays/countries/yemen.py | |
| holidays/countries/iran.py | Updated estimated_label from "(تخمین زده) %s" to "%s (تخمینی)" in Persian. |
| holidays/countries/israel.py | Updated observed_label from prefix "(נצפה) %s" to suffix "%s (נצפה)" in Hebrew. |
| holidays/locale/ar/LC_MESSAGES/*.po | Updated Arabic translation strings for estimated/observed labels to suffix and new wording. |
| holidays/locale/en_US/LC_MESSAGES/*.po, holidays/locale/fa_IR/LC_MESSAGES/IR.po, | Updated source message IDs for estimated/observed labels to suffix form and revised wording. |
| holidays/locale/fr/LC_MESSAGES/DZ.po, holidays/locale/fr/LC_MESSAGES/MA.po | Updated Arabic msgid for estimated label to suffix and new wording; French translations unchanged. |
| holidays/locale/he/LC_MESSAGES/IL.po, holidays/locale/th/LC_MESSAGES/IL.po, | Swapped order of placeholder and "observed" in Hebrew msgid for observed holidays. |
| holidays/locale/th/LC_MESSAGES/AE.po, holidays/locale/uk/LC_MESSAGES/IL.po | Updated Arabic/Hebrew msgid for estimated/observed labels to suffix form. |
| tests/countries/test_algeria.py, tests/countries/test_bahrain.py, tests/countries/ | Updated Arabic test assertions for estimated/observed labels to match new suffix-based format. |
| test_canada.py, tests/countries/test_djibouti.py, tests/countries/test_egypt.py, | |
| tests/countries/test_israel.py, tests/countries/test_jordan.py, tests/countries/ | |
| test_kuwait.py, tests/countries/test_morocco.py, tests/countries/test_saudi_arabia.py, | |
| tests/countries/test_tunisia.py, tests/countries/test_ukraine.py | |
| tests/countries/test_israel.py | Added test_l10n_default method to check default Hebrew localization with new observed label format. |
Possibly related PRs
- vacanza/holidays#2522: Introduces the Yemen holidays implementation including the original
estimated_labelattribute that this PR updates.
Suggested reviewers
- arkid15r
✨ Finishing Touches
🧪 Generate Unit Tests
- [ ] Create PR with Unit Tests
- [ ] Post Copyable Unit Tests in 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.
🪧 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.Explain this complex logic.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai explain this code block.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin 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 explain its main purpose.@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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai auto-generate unit teststo generate unit tests for this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere 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.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
ee60201) to head (7f6f1a1). Report is 4 commits behind head on dev.
Additional details and impacted files
@@ Coverage Diff @@
## dev #2676 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 251 251
Lines 15286 15286
Branches 2095 2095
=========================================
Hits 15286 15286
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@Wasif-Shahzad could you review these changes if you have time? Thank you!
@Wasif-Shahzad could you review these changes if you have time? Thank you!
Sure, I'll do it tomorrow 👍
Arabic and Farsi LGTM ✅
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code