fix(web): translate attachment delete confirmation copy#9421
fix(web): translate attachment delete confirmation copy#9421priyamkarn wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe attachment deletion modal now renders translated confirmation fragments around the bold attachment filename. The corresponding ChangesAttachment deletion localization
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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: 2
🤖 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 `@packages/i18n/src/locales/en/common.json`:
- Line 767: Update the “prefix” translation value to include a separator between
“attachment” and the filename, replacing the unintended trailing hyphen with a
space or intended punctuation so it renders as “delete attachment report”.
- Around line 765-769: Add attachment.delete_confirmation.prefix and
attachment.delete_confirmation.suffix to every non-English common.json locale
file, matching the new English key structure and providing the appropriate
localized text so these locales do not fall back to English.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4a7732a8-8838-4d33-a413-4a1d3d25ebb6
📒 Files selected for processing (2)
apps/web/core/components/issues/attachment/delete-attachment-modal.tsxpackages/i18n/src/locales/en/common.json
|
Hello @priyamkarn Thanks for your contribution but the translations are not done in all the languages so the checks are failing. Please take a look at them. |
|
@sriramveeraghanta can you please review and merge this.I have fixed it for all languages |
What
Replaces the hardcoded English delete-confirmation text in
IssueAttachmentDeleteModalwith proper i18n translation keys, resolving the existingTODO: Translate here.Why
The attachment delete-confirmation message was written directly in JSX, bypassing the application’s translation system even though the component already uses
useTranslation.As a result, the confirmation text remained in English for non-English locales.
Changes
packages/i18n/src/locales/en/common.jsonAdded the following translation keys:
attachment.delete_confirmation.prefixattachment.delete_confirmation.suffixThe message is split around the dynamic filename, following the existing pattern used by:
recurring_work_items.delete_confirmation.prefixrecurring_work_items.delete_confirmation.suffixapps/web/core/components/issues/attachment/delete-attachment-modal.tsxReplaced the hardcoded confirmation text with:
The attachment filename remains bold and dynamically rendered.
Scope and Risk
Summary by CodeRabbit