Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Translate the operator options of the Switch operator #1739 #4519

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions web/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -956,17 +956,17 @@ This procedure will improve precision of retrieval by adding more information to
switch: 'Switch',
logicalOperator: 'Logical operator',
switchOperatorOptions: {
equal: 'equal',
notEqual: 'notEqual',
equal: 'Equals',
notEqual: 'Not equal',
gt: 'Greater than',
ge: 'Greater equal',
lt: 'Less than',
le: 'Less equal',
contains: 'Contains',
notContains: 'Not contains',
startWith: 'Start with',
endWith: 'End with',
empty: 'Empty',
startWith: 'Starts with',
endWith: 'Ends with',
empty: 'Is empty',
notEmpty: 'Not empty',
},
switchLogicOperatorOptions: {
Expand Down
8 changes: 6 additions & 2 deletions web/src/pages/flow/form/switch-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import {
} from '../../constant';
import { useBuildFormSelectOptions } from '../../form-hooks';
import { useBuildComponentIdSelectOptions } from '../../hooks/use-get-begin-query';
import { IOperatorForm, ISwitchForm } from '../../interface';
import { IOperatorForm } from '../../interface';
import { getOtherFieldValues } from '../../utils';

import { ISwitchForm } from '@/interfaces/database/flow';
import styles from './index.less';

const SwitchForm = ({ onValuesChange, node, form }: IOperatorForm) => {
Expand Down Expand Up @@ -88,7 +89,10 @@ const SwitchForm = ({ onValuesChange, node, form }: IOperatorForm) => {
)
}
</Form.Item>
<Form.Item label={t('flow.to')} name={[field.name, 'to']}>
<Form.Item
label={t('flow.nextStep')}
name={[field.name, 'to']}
>
<Select
allowClear
options={buildCategorizeToOptions([
Expand Down