Skip to content

fix(web): translate attachment delete confirmation copy#9421

Open
priyamkarn wants to merge 3 commits into
makeplane:previewfrom
priyamkarn:fix/translate-attachment-delete-modal
Open

fix(web): translate attachment delete confirmation copy#9421
priyamkarn wants to merge 3 commits into
makeplane:previewfrom
priyamkarn:fix/translate-attachment-delete-modal

Conversation

@priyamkarn

@priyamkarn priyamkarn commented Jul 14, 2026

Copy link
Copy Markdown

What

Replaces the hardcoded English delete-confirmation text in IssueAttachmentDeleteModal with proper i18n translation keys, resolving the existing TODO: 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.json

Added the following translation keys:

  • attachment.delete_confirmation.prefix
  • attachment.delete_confirmation.suffix

The message is split around the dynamic filename, following the existing pattern used by:

  • recurring_work_items.delete_confirmation.prefix
  • recurring_work_items.delete_confirmation.suffix

apps/web/core/components/issues/attachment/delete-attachment-modal.tsx

Replaced the hardcoded confirmation text with:

t("attachment.delete_confirmation.prefix")
t("attachment.delete_confirmation.suffix")

The attachment filename remains bold and dynamically rendered.

Scope and Risk

  • Limited to a single component.
  • No logic or behavior changes.
  • No API, store, type, or schema changes.
  • Only the English locale was updated.
  • Other locales will fall back to English for missing keys, consistent with the repository’s existing translation behavior.

Summary by CodeRabbit

  • Localization
    • Updated the attachment deletion confirmation message to use translated, i18n-driven text.
    • The attachment filename is now shown in the confirmation prompt.
    • Added localized wording clarifying the deletion is permanent and cannot be undone.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 25402f5a-4d2d-40ae-ab23-ff9bb283a521

📥 Commits

Reviewing files that changed from the base of the PR and between e4ce5fb and 4fc01ba.

📒 Files selected for processing (19)
  • packages/i18n/src/locales/cs/common.json
  • packages/i18n/src/locales/de/common.json
  • packages/i18n/src/locales/en/common.json
  • packages/i18n/src/locales/es/common.json
  • packages/i18n/src/locales/fr/common.json
  • packages/i18n/src/locales/id/common.json
  • packages/i18n/src/locales/it/common.json
  • packages/i18n/src/locales/ja/common.json
  • packages/i18n/src/locales/ko/common.json
  • packages/i18n/src/locales/pl/common.json
  • packages/i18n/src/locales/pt-BR/common.json
  • packages/i18n/src/locales/ro/common.json
  • packages/i18n/src/locales/ru/common.json
  • packages/i18n/src/locales/sk/common.json
  • packages/i18n/src/locales/tr-TR/common.json
  • packages/i18n/src/locales/ua/common.json
  • packages/i18n/src/locales/vi-VN/common.json
  • packages/i18n/src/locales/zh-CN/common.json
  • packages/i18n/src/locales/zh-TW/common.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/i18n/src/locales/en/common.json

📝 Walkthrough

Walkthrough

The attachment deletion modal now renders translated confirmation fragments around the bold attachment filename. The corresponding delete_confirmation.prefix and suffix entries were added across the supported locales.

Changes

Attachment deletion localization

Layer / File(s) Summary
Localized confirmation messages
packages/i18n/src/locales/*/common.json
Adds attachment.delete_confirmation.prefix and suffix entries across supported locales while retaining the attachment delete label.
Localized confirmation flow
apps/web/core/components/issues/attachment/delete-attachment-modal.tsx
Renders the translated fragments around the bold attachment filename instead of the hardcoded confirmation sentence.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: sriramveeraghanta

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning It explains the change, but it omits the required template sections and incorrectly says only English was updated despite many locale files changing. Use the repository template and add the Description, Type of Change, Screenshots and Media, Test Scenarios, and References sections, and correct the stated scope.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: translating the attachment delete confirmation copy.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between d3d3de4 and e4ce5fb.

📒 Files selected for processing (2)
  • apps/web/core/components/issues/attachment/delete-attachment-modal.tsx
  • packages/i18n/src/locales/en/common.json

Comment thread packages/i18n/src/locales/en/common.json
Comment thread packages/i18n/src/locales/en/common.json Outdated
@sriramveeraghanta

Copy link
Copy Markdown
Member

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.

@CLAassistant

CLAassistant commented Jul 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@priyamkarn

priyamkarn commented Jul 14, 2026

Copy link
Copy Markdown
Author

@sriramveeraghanta can you please review and merge this.I have fixed it for all languages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants