-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: hardcode delete confirmation text to avoid translation mismatch #1487
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
WalkthroughThe changes involve a modification to the Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint (1.23.1)
apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "@documenso/eslint-config" to extend from. Please check that the name of the config is correct. The config "@documenso/eslint-config" was referenced from the config file in "/.eslintrc.cjs". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🚨 @ephraimduncan has 11 pull requests awaiting review. Please consider reviewing them when possible. 🚨 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx (1)
90-90
: Consider UX impact of hardcoded English textWhile hardcoding 'delete' prevents translation mismatches, it forces non-English speakers to type an English word. Consider these alternatives:
- Use a case-insensitive comparison to be more forgiving:
- setIsDeleteEnabled(event.target.value === 'delete'); + setIsDeleteEnabled(event.target.value.toLowerCase() === 'delete');
- Or use a numeric confirmation code instead:
- setIsDeleteEnabled(event.target.value === 'delete'); + setIsDeleteEnabled(event.target.value === '123456');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx
(1 hunks)
🔇 Additional comments (1)
apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx (1)
90-90
: Update placeholder text to match hardcoded value
Since we're now requiring the English word 'delete', ensure the placeholder text (line 165) is consistent with this requirement and doesn't get translated:
- placeholder={_(msg`Type 'delete' to confirm`)}
+ placeholder="Type 'delete' to confirm"
They should be typing in the translation version, not delete |
Summary by CodeRabbit
New Features
Bug Fixes