@@ -96,8 +96,8 @@ const COMPONENT_PALETTE = [
9696] ;
9797
9898const MODE_TABS = [
99- { value : 'page' , label : 'Page ' } ,
100- { value : 'dashboard' , label : 'Dashboard ' } ,
99+ { value : 'page' , labelKey : 'appDesigner.modePage ' } ,
100+ { value : 'dashboard' , labelKey : 'appDesigner.modeDashboard ' } ,
101101] as const ;
102102
103103type CanvasMode = ( typeof MODE_TABS ) [ number ] [ 'value' ] ;
@@ -206,13 +206,14 @@ function ComponentPropertyPanel({
206206 onChange,
207207 onClose,
208208} : ComponentPropertyPanelProps ) {
209+ const { t } = useDesignerTranslation ( ) ;
209210 return (
210211 < div
211212 data-testid = "component-property-panel"
212213 className = "w-64 shrink-0 space-y-4 rounded-lg border border-gray-200 bg-white p-4"
213214 >
214215 < div className = "flex items-center justify-between" >
215- < h4 className = "text-sm font-semibold text-gray-800" > Component Properties </ h4 >
216+ < h4 className = "text-sm font-semibold text-gray-800" > { t ( 'appDesigner.componentProperties' ) } </ h4 >
216217 < button
217218 type = "button"
218219 onClick = { onClose }
@@ -261,11 +262,12 @@ function ComponentPropertyPanel({
261262// ============================================================================
262263
263264function PagePreview ( { schema, components } : { schema : PageSchema ; components : CanvasComponent [ ] } ) {
265+ const { t } = useDesignerTranslation ( ) ;
264266 return (
265267 < div data-testid = "page-preview" className = "rounded-lg border border-gray-200 bg-gray-50 p-4" >
266- < h4 className = "mb-3 text-sm font-semibold text-gray-700" > { schema . title || 'Page Preview' } </ h4 >
268+ < h4 className = "mb-3 text-sm font-semibold text-gray-700" > { schema . title || t ( 'appDesigner.pagePreview' ) } </ h4 >
267269 { components . length === 0 ? (
268- < div className = "text-xs text-gray-400" > No components to preview </ div >
270+ < div className = "text-xs text-gray-400" > { t ( 'appDesigner.noComponentsPreview' ) } </ div >
269271 ) : (
270272 < div className = "space-y-2" >
271273 { components . map ( ( comp ) => {
@@ -502,7 +504,7 @@ export function PageCanvasEditor({
502504 : 'text-gray-500 hover:text-gray-700'
503505 ) }
504506 >
505- { tab . label }
507+ { t ( tab . labelKey ) }
506508 </ button >
507509 ) ) }
508510 </ div >
@@ -536,7 +538,7 @@ export function PageCanvasEditor({
536538 onClick = { undo }
537539 disabled = { ! canUndo }
538540 className = "rounded p-1.5 text-gray-400 hover:text-gray-700 disabled:opacity-30"
539- aria-label = "Undo"
541+ aria-label = { t ( 'appDesigner.undo' ) }
540542 >
541543 < Undo2 className = "h-4 w-4" />
542544 </ button >
@@ -546,7 +548,7 @@ export function PageCanvasEditor({
546548 onClick = { redo }
547549 disabled = { ! canRedo }
548550 className = "rounded p-1.5 text-gray-400 hover:text-gray-700 disabled:opacity-30"
549- aria-label = "Redo"
551+ aria-label = { t ( 'appDesigner.redo' ) }
550552 >
551553 < Redo2 className = "h-4 w-4" />
552554 </ button >
@@ -592,7 +594,7 @@ export function PageCanvasEditor({
592594 < PagePreview schema = { schema } components = { components } />
593595 ) : components . length === 0 ? (
594596 < div className = "flex h-48 items-center justify-center rounded-lg border-2 border-dashed border-gray-200 text-sm text-gray-400" >
595- Empty page. Click a button above to add a component.
597+ { t ( 'appDesigner.emptyPage' ) }
596598 </ div >
597599 ) : (
598600 < div className = "space-y-2" >
0 commit comments