@@ -9,10 +9,13 @@ import { Settings, User } from 'lucide-react';
99import { FiCode , FiFile , FiMessageCircle } from 'react-icons/fi' ;
1010
1111import { CommandDialog , CommandEmpty , CommandGroup , CommandInput , CommandItem , CommandList , CommandSeparator , CommandShortcut } from '@/components/ui/command' ;
12+ import { useTranslations } from 'next-intl' ;
1213
1314export const ClientCommand = ( ) => {
1415 const router = useRouter ( ) ;
1516
17+ const t = useTranslations ( 'component' ) ;
18+
1619 const [ open , setOpen ] = React . useState ( false ) ;
1720
1821 React . useEffect ( ( ) => {
@@ -28,10 +31,10 @@ export const ClientCommand = () => {
2831
2932 return (
3033 < CommandDialog open = { open } onOpenChange = { setOpen } >
31- < CommandInput placeholder = 'Type a command or search...' />
34+ < CommandInput placeholder = { t ( 'Type a command to search' ) } />
3235 < CommandList >
33- < CommandEmpty > No results found. </ CommandEmpty >
34- < CommandGroup heading = 'Conversation' >
36+ < CommandEmpty > { t ( ' No command found' ) } </ CommandEmpty >
37+ < CommandGroup heading = { t ( 'Conversation' ) } >
3538 < CommandItem >
3639 < button
3740 onClick = { ( ) => {
@@ -41,7 +44,7 @@ export const ClientCommand = () => {
4144 className = 'flex items-center'
4245 >
4346 < FiMessageCircle className = 'mr-2 h-4 w-4' />
44- < span > New Chat</ span >
47+ < span > { t ( ' New Chat' ) } </ span >
4548 </ button >
4649 </ CommandItem >
4750 < CommandItem >
@@ -53,7 +56,7 @@ export const ClientCommand = () => {
5356 className = 'flex items-center'
5457 >
5558 < FiCode className = 'mr-2 h-4 w-4' />
56- < span > New Code</ span >
59+ < span > { t ( ' New Code' ) } </ span >
5760 </ button >
5861 </ CommandItem >
5962 < CommandItem >
@@ -65,12 +68,12 @@ export const ClientCommand = () => {
6568 className = 'flex items-center'
6669 >
6770 < FiFile className = 'mr-2 h-4 w-4' />
68- < span > New File</ span >
71+ < span > { t ( ' New File' ) } </ span >
6972 </ button >
7073 </ CommandItem >
7174 </ CommandGroup >
7275 < CommandSeparator />
73- < CommandGroup heading = 'Profile' >
76+ < CommandGroup heading = { t ( 'Profile' ) } >
7477 < CommandItem >
7578 < button
7679 onClick = { ( ) => {
@@ -80,7 +83,7 @@ export const ClientCommand = () => {
8083 className = 'flex items-center'
8184 >
8285 < User className = 'mr-2 h-4 w-4' />
83- < span > Info</ span >
86+ < span > { t ( ' Info' ) } </ span >
8487 </ button >
8588 </ CommandItem >
8689 < CommandItem >
@@ -92,7 +95,7 @@ export const ClientCommand = () => {
9295 className = 'flex items-center'
9396 >
9497 < User className = 'mr-2 h-4 w-4' />
95- < span > Share</ span >
98+ < span > { t ( ' Share' ) } </ span >
9699 </ button >
97100 </ CommandItem >
98101 < CommandItem >
@@ -104,12 +107,12 @@ export const ClientCommand = () => {
104107 className = 'flex items-center'
105108 >
106109 < Settings className = 'mr-2 h-4 w-4' />
107- < span > Settings</ span >
110+ < span > { t ( ' Settings' ) } </ span >
108111 </ button >
109112 </ CommandItem >
110113 </ CommandGroup >
111114 < CommandSeparator />
112- < CommandGroup heading = 'Team' >
115+ < CommandGroup heading = { t ( 'Team' ) } >
113116 < CommandItem >
114117 < button
115118 onClick = { ( ) => {
@@ -119,7 +122,7 @@ export const ClientCommand = () => {
119122 className = 'flex items-center'
120123 >
121124 < User className = 'mr-2 h-4 w-4' />
122- < span > Overview</ span >
125+ < span > { t ( ' Overview' ) } </ span >
123126 </ button >
124127 </ CommandItem >
125128 </ CommandGroup >
0 commit comments