mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
fix for i18n (#1164)
### TL;DR Added translation support for command palette item titles. ### What changed? Wrapped the `item.title` in the command palette with the translation function `t()` to enable internationalization of command palette items. ### How to test? 1. Set your application to a non-default language 2. Open the command palette 3. Verify that item titles are correctly translated to the selected language ### Why make this change? To improve the user experience for non-English speakers by ensuring command palette items are displayed in the user's preferred language, making the application more accessible to a global audience. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added localization support for command titles in the main command palette, enabling display in multiple languages. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -864,7 +864,7 @@ export function CommandPalette() {
|
||||
/>
|
||||
)}
|
||||
<div className="ml-2 flex flex-1 flex-col">
|
||||
<span>{item.title}</span>
|
||||
<span>{t(item.title)}</span>
|
||||
{item.description && (
|
||||
<span className="text-muted-foreground text-xs">{item.description}</span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user