@@ -9,7 +9,7 @@ import { useZoomToNode } from 'features/nodes/hooks/useZoomToNode';
9
9
import { formElementRemoved } from 'features/nodes/store/workflowSlice' ;
10
10
import type { FormElement , NodeFieldElement } from 'features/nodes/types/workflow' ;
11
11
import { isContainerElement , isNodeFieldElement } from 'features/nodes/types/workflow' ;
12
- import { startCase } from 'lodash-es' ;
12
+ import { camelCase } from 'lodash-es' ;
13
13
import type { RefObject } from 'react' ;
14
14
import { memo , useCallback , useMemo } from 'react' ;
15
15
import { useTranslation } from 'react-i18next' ;
@@ -103,15 +103,16 @@ const RemoveElementButton = memo(({ element }: { element: FormElement }) => {
103
103
RemoveElementButton . displayName = 'RemoveElementButton' ;
104
104
105
105
const Label = memo ( ( { element } : { element : FormElement } ) => {
106
+ const { t } = useTranslation ( ) ;
106
107
const label = useMemo ( ( ) => {
107
108
if ( isContainerElement ( element ) && element . data . layout === 'column' ) {
108
- return `Container (column layout)` ;
109
+ return t ( 'workflows.builder.containerColumnLayout' ) ;
109
110
}
110
111
if ( isContainerElement ( element ) && element . data . layout === 'row' ) {
111
- return `Container (row layout)` ;
112
+ return t ( 'workflows.builder.containerRowLayout' ) ;
112
113
}
113
- return startCase ( element . type ) ;
114
- } , [ element ] ) ;
114
+ return t ( `workflows.builder. ${ camelCase ( element . type ) } ` ) ;
115
+ } , [ element , t ] ) ;
115
116
116
117
return (
117
118
< Text fontWeight = "semibold" noOfLines = { 1 } wordBreak = "break-all" userSelect = "none" >
0 commit comments