Update PO generator: fix .po files refresh#3570
Conversation
Summary by CodeRabbit
WalkthroughThe PR refines PO file change detection in the localization generation script. A new ChangesPO File Equality Comparison
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/l10n/generate_po_files.py`:
- Line 102: The loop pairing entries uses zip(pofile1, pofile2) which should
enforce equal-length iteration; update the loop to call zip with strict=True
(i.e., zip(pofile1, pofile2, strict=True)) to satisfy Ruff B905 and make the
contract explicit—modify the for loop where pofile1 and pofile2 are iterated
together in scripts/l10n/generate_po_files.py (the line containing "for entry1,
entry2 in zip(pofile1, pofile2):").
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1347139c-93da-476a-943d-9846aad3a236
📒 Files selected for processing (1)
scripts/l10n/generate_po_files.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3570 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 314 314
Lines 18766 18766
Branches 2401 2401
=========================================
Hits 18766 18766 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more
Proposed change
The standard compare .po files does not consider comments, so generator didn't consider "changes l10n comments only" and didn't update the file.
#3531 (comment)
Type of change
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.