11import { Bot , LayoutDashboard , Layers3 , MessageSquare , Vault , type LucideIcon } from "lucide-react" ;
2+ import { useTranslation } from "react-i18next" ;
23
34export type ProductView = "dashboard" | "agents" | "sessions" | "vaults" | "templates" ;
45
5- const productViews : Array < { id : ProductView ; label : string ; icon : LucideIcon } > = [
6- { id : "dashboard" , label : "Dashboard " , icon : LayoutDashboard } ,
7- { id : "agents" , label : "Agents " , icon : Bot } ,
8- { id : "sessions" , label : "Sessions " , icon : MessageSquare } ,
9- { id : "templates" , label : "Templates " , icon : Layers3 } ,
10- { id : "vaults" , label : "Vaults " , icon : Vault } ,
6+ const productViews : Array < { id : ProductView ; label : "dashboard" | "agents" | "sessions" | "templates" | "vaults" ; icon : LucideIcon } > = [
7+ { id : "dashboard" , label : "dashboard " , icon : LayoutDashboard } ,
8+ { id : "agents" , label : "agents " , icon : Bot } ,
9+ { id : "sessions" , label : "sessions " , icon : MessageSquare } ,
10+ { id : "templates" , label : "templates " , icon : Layers3 } ,
11+ { id : "vaults" , label : "vaults " , icon : Vault } ,
1112] ;
1213
1314export function ProductNavigation ( {
@@ -21,9 +22,10 @@ export function ProductNavigation({
2122 showVaults ?: boolean ;
2223 showTemplates ?: boolean ;
2324} ) {
25+ const { t } = useTranslation ( "navigation" ) ;
2426 return (
25- < nav className = "main-nav product-navigation" aria-label = "Agents product" >
26- < p className = "nav-label" > Workspace </ p >
27+ < nav className = "main-nav product-navigation" aria-label = { t ( "productLabel" ) } >
28+ < p className = "nav-label" > { t ( "workspace" ) } </ p >
2729 { productViews . filter ( ( item ) => ( item . id !== "vaults" || showVaults ) && ( item . id !== "templates" || showTemplates ) ) . map ( ( item ) => {
2830 const Icon = item . icon ;
2931 return (
@@ -32,11 +34,11 @@ export function ProductNavigation({
3234 className = { active === item . id ? "active" : "" }
3335 key = { item . id }
3436 onClick = { ( ) => onSelect ( item . id ) }
35- aria-label = { item . label }
37+ aria-label = { t ( item . label ) }
3638 aria-current = { active === item . id ? "page" : undefined }
3739 >
3840 < Icon size = { 15 } strokeWidth = { 1.5 } aria-hidden = "true" />
39- < span > { item . label } </ span >
41+ < span > { t ( item . label ) } </ span >
4042 </ button >
4143 ) ;
4244 } ) }
0 commit comments