@@ -10,6 +10,7 @@ import { Query, QueryExpression, QueryOperators } from '@sensenet/query'
1010import { ColDef } from 'ag-grid-community'
1111import { AgGridReact } from 'ag-grid-react'
1212import React , { useCallback , useEffect , useMemo , useRef , useState } from 'react'
13+ import { useLocalization } from '../hooks/use-localization'
1314import { GenericContentWithIsParent } from '../types'
1415
1516// Icons
@@ -152,6 +153,7 @@ const useStyles = makeStyles(() =>
152153 wordBreak : 'break-all' ,
153154 } ,
154155 treeIcon : {
156+ width : '22px' ,
155157 '& span' : {
156158 display : 'flex' ,
157159 } ,
@@ -338,6 +340,8 @@ export const PickerAdvanced: React.FC<PickerAdvancedProps> = ({
338340 const [ rootElement , setRootElement ] = useState < GenericContent > ( )
339341 const [ searchTerm , setSearchTerm ] = useState < string > ( '' )
340342
343+ const localization = useLocalization ( )
344+
341345 const searchFieldRef = useRef < HTMLInputElement | null > ( null )
342346
343347 //Grid Columns
@@ -555,7 +559,7 @@ export const PickerAdvanced: React.FC<PickerAdvancedProps> = ({
555559 < TextField
556560 ref = { searchFieldRef }
557561 fullWidth = { true }
558- placeholder = { 'Search' }
562+ placeholder = { localization . search }
559563 onChange = { ( ev ) => {
560564 onSearchFieldChange ( ev . target . value )
561565 } }
@@ -607,15 +611,15 @@ export const PickerAdvanced: React.FC<PickerAdvancedProps> = ({
607611 < div className = { classes . errorMsg } >
608612 { selectionRoots &&
609613 ! selectionRoots . some ( ( root ) => currentPath === root || currentPath . startsWith ( `${ root } /` ) ) && (
610- < div > Disabled Path </ div >
614+ < div > { localization . disabledPath } </ div >
611615 ) }
612616 </ div >
613617 < Button
614618 type = "button"
615619 onClick = { ( ) => {
616620 onCancel ?.( )
617621 } } >
618- Cancel
622+ { localization . cancel }
619623 </ Button >
620624 < Button
621625 type = "button"
@@ -627,7 +631,7 @@ export const PickerAdvanced: React.FC<PickerAdvancedProps> = ({
627631 onClick = { ( ) => {
628632 onSubmit ?.( selectedItems )
629633 } } >
630- Submit
634+ { localization . submit }
631635 </ Button >
632636 </ div >
633637 </ div >
0 commit comments