@@ -8,22 +8,24 @@ import { PageTransition } from './shared/PageTransition';
88import { BackToTop } from './shared/BackToTop' ;
99import { Button } from '@leanspec/ui-components' ;
1010import { useProject } from '../contexts' ;
11+ import { useTranslation } from 'react-i18next' ;
1112
1213function KeyboardShortcutsHelp ( { onClose } : { onClose : ( ) => void } ) {
14+ const { t } = useTranslation ( 'common' ) ;
1315 const shortcuts = [
14- { key : 'h' , description : 'Go to dashboard (home)' } ,
15- { key : 'g' , description : 'Go to specs list' } ,
16- { key : 's' , description : 'Go to stats' } ,
17- { key : 'd' , description : 'Go to dependencies' } ,
18- { key : ',' , description : 'Go to settings' } ,
19- { key : '/' , description : 'Focus search' } ,
20- { key : '⌘ + K' , description : 'Open quick search' } ,
16+ { key : 'h' , description : t ( 'keyboardShortcuts.items. dashboard' ) } ,
17+ { key : 'g' , description : t ( 'keyboardShortcuts.items. specs' ) } ,
18+ { key : 's' , description : t ( 'keyboardShortcuts.items. stats') } ,
19+ { key : 'd' , description : t ( 'keyboardShortcuts.items. dependencies') } ,
20+ { key : ',' , description : t ( 'keyboardShortcuts.items. settings') } ,
21+ { key : '/' , description : t ( 'keyboardShortcuts.items. search') } ,
22+ { key : '⌘ + K' , description : t ( 'keyboardShortcuts.items.quickSearch' ) } ,
2123 ] ;
2224
2325 return (
2426 < div className = "fixed inset-0 bg-black/50 flex items-center justify-center z-50" onClick = { onClose } >
2527 < div className = "bg-background border rounded-lg shadow-lg p-6 max-w-md w-full mx-4" onClick = { e => e . stopPropagation ( ) } >
26- < h3 className = "text-lg font-medium mb-4" > Keyboard Shortcuts </ h3 >
28+ < h3 className = "text-lg font-medium mb-4" > { t ( 'keyboardShortcuts.title' ) } </ h3 >
2729 < div className = "space-y-2" >
2830 { shortcuts . map ( ( s ) => (
2931 < div key = { s . key } className = "flex items-center justify-between" >
@@ -38,7 +40,7 @@ function KeyboardShortcutsHelp({ onClose }: { onClose: () => void }) {
3840 size = "sm"
3941 className = "mt-4 w-full"
4042 >
41- Close
43+ { t ( 'actions.close' ) }
4244 </ Button >
4345 </ div >
4446 </ div >
0 commit comments