mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### 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,4 +1,3 @@
|
||||
import { useTranslate } from '@/hooks/commonHooks';
|
||||
import { ResponseType } from '@/interfaces/database/base';
|
||||
import { DSL, IFlow, IFlowTemplate } from '@/interfaces/database/flow';
|
||||
import i18n from '@/locales/config';
|
||||
@ -46,7 +45,6 @@ export const EmptyDsl = {
|
||||
};
|
||||
|
||||
export const useFetchFlowTemplates = (): ResponseType<IFlowTemplate[]> => {
|
||||
const { t } = useTranslate('flow');
|
||||
const { data } = useQuery({
|
||||
queryKey: ['fetchFlowTemplates'],
|
||||
initialData: [],
|
||||
@ -55,8 +53,8 @@ export const useFetchFlowTemplates = (): ResponseType<IFlowTemplate[]> => {
|
||||
if (Array.isArray(data?.data)) {
|
||||
data.data.unshift({
|
||||
id: uuid(),
|
||||
title: t('blank'),
|
||||
description: t('createFromNothing'),
|
||||
title: 'Blank',
|
||||
description: 'Create from nothing',
|
||||
dsl: EmptyDsl,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user