Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
Verify translation key structure and add missing translations.
The change correctly adds i18n support, but there are potential issues with the current approach:
Hardcoded titles: Many command titles are hardcoded English strings (e.g., "Compose Email", "Search Emails" on lines 675, 684) rather than translation keys. The
t()function will look for these as keys in translation files.Inconsistent pattern: The existing group title translation (lines 779-780) uses structured keys like
common.commandPalette.groups.${groupKey}, suggesting a more organized approach.Consider updating hardcoded command titles to use proper translation keys:
Run this script to identify all hardcoded command titles that need translation keys:
🏁 Script executed:
Length of output: 370
🏁 Script executed:
Length of output: 1235
Ensure all command titles use structured translation keys
The command-palette titles currently include several hardcoded English strings. To prevent missing keys at runtime and maintain consistency with existing group translations (
common.commandPalette.groups.*), please convert these titles to structured keys undercommon.commandPalette.commands.*. Specifically:• apps/mail/components/context/command-palette-context.tsx
– Line 458: replace
'Unread Emails'→common.commandPalette.commands.unreadEmails– Line 472: replace
'Starred Emails'→common.commandPalette.commands.starredEmails– Line 486: replace
'With Attachments'→common.commandPalette.commands.withAttachments– Line 500: replace
'Last 7 Days'→common.commandPalette.commands.last7Days– Line 675: replace
'Compose Email'→common.commandPalette.commands.composeEmail– Line 684: replace
'Search Emails'→common.commandPalette.commands.searchEmails– Line 694: replace
'Filter Emails'→common.commandPalette.commands.filterEmails– (Optional) Lines 704 & 713 for commented-out commands (
'Saved Searches','Filter Builder') should becomecommon.commandPalette.commands.savedSearchesandcommon.commandPalette.commands.filterBuilderExample diff for one command:
Also update your translation JSON/PO files with matching entries for each new key.
🤖 Prompt for AI Agents