### What problem does this PR solve? feat: translate name of operator #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { Handle, Position } from 'reactflow';
|
||||
// import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { useTranslate } from '@/hooks/commonHooks';
|
||||
import lowerFirst from 'lodash/lowerFirst';
|
||||
import styles from './index.less';
|
||||
|
||||
const DEFAULT_HANDLE_STYLE = {
|
||||
@@ -20,7 +18,6 @@ interface IProps {
|
||||
}
|
||||
|
||||
const CategorizeHandle = ({ top, right, text, idx }: IProps) => {
|
||||
const { t } = useTranslate('flow');
|
||||
return (
|
||||
<Handle
|
||||
type="source"
|
||||
@@ -36,9 +33,7 @@ const CategorizeHandle = ({ top, right, text, idx }: IProps) => {
|
||||
color: 'black',
|
||||
}}
|
||||
>
|
||||
<span className={styles.categorizeAnchorPointText}>
|
||||
{lowerFirst(t(text))}
|
||||
</span>
|
||||
<span className={styles.categorizeAnchorPointText}>{text}</span>
|
||||
</Handle>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@ const DynamicCategorize = ({ nodeId }: IProps) => {
|
||||
))}
|
||||
|
||||
<Button type="dashed" onClick={handleAdd} block>
|
||||
+ Add Item
|
||||
+ {t('addItem')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -38,7 +38,7 @@ const MessageForm = ({ onValuesChange, form }: IOperatorForm) => {
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item
|
||||
{...(index === 0 ? formItemLayout : formItemLayoutWithOutLabel)}
|
||||
label={index === 0 ? t('message') : ''}
|
||||
label={index === 0 ? t('msg') : ''}
|
||||
required={false}
|
||||
key={field.key}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user