@@ -9,7 +9,7 @@ import { useZoomToNode } from 'features/nodes/hooks/useZoomToNode';
99import { formElementRemoved } from 'features/nodes/store/workflowSlice' ;
1010import type { FormElement , NodeFieldElement } from 'features/nodes/types/workflow' ;
1111import { isContainerElement , isNodeFieldElement } from 'features/nodes/types/workflow' ;
12- import { startCase } from 'lodash-es' ;
12+ import { camelCase } from 'lodash-es' ;
1313import type { RefObject } from 'react' ;
1414import { memo , useCallback , useMemo } from 'react' ;
1515import { useTranslation } from 'react-i18next' ;
@@ -103,15 +103,16 @@ const RemoveElementButton = memo(({ element }: { element: FormElement }) => {
103103RemoveElementButton . displayName = 'RemoveElementButton' ;
104104
105105const Label = memo ( ( { element } : { element : FormElement } ) => {
106+ const { t } = useTranslation ( ) ;
106107 const label = useMemo ( ( ) => {
107108 if ( isContainerElement ( element ) && element . data . layout === 'column' ) {
108- return `Container (column layout)` ;
109+ return t ( 'workflows.builder.containerColumnLayout' ) ;
109110 }
110111 if ( isContainerElement ( element ) && element . data . layout === 'row' ) {
111- return `Container (row layout)` ;
112+ return t ( 'workflows.builder.containerRowLayout' ) ;
112113 }
113- return startCase ( element . type ) ;
114- } , [ element ] ) ;
114+ return t ( `workflows.builder. ${ camelCase ( element . type ) } ` ) ;
115+ } , [ element , t ] ) ;
115116
116117 return (
117118 < Text fontWeight = "semibold" noOfLines = { 1 } wordBreak = "break-all" userSelect = "none" >
0 commit comments