balibabu commited on
Commit
2962077
·
1 Parent(s): 73e52d6

feat: translate graph list #918 (#1426)

Browse files

### What problem does this PR solve?

feat: translate graph list #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)

web/src/locales/en.ts CHANGED
@@ -581,6 +581,8 @@ The above is the content you need to summarize.`,
581
  promptText: `Please summarize the following paragraphs. Be careful with the numbers, do not make things up. Paragraphs as following:
582
  {input}
583
  The above is the content you need to summarize.`,
 
 
584
  },
585
  footer: {
586
  profile: 'All rights reserved @ React',
 
581
  promptText: `Please summarize the following paragraphs. Be careful with the numbers, do not make things up. Paragraphs as following:
582
  {input}
583
  The above is the content you need to summarize.`,
584
+ create: 'Create graph',
585
+ createFromTemplates: 'Create from templates',
586
  },
587
  footer: {
588
  profile: 'All rights reserved @ React',
web/src/locales/zh-traditional.ts CHANGED
@@ -541,6 +541,8 @@ export default {
541
  promptText: `請總結以下段落。注意數字,不要胡編亂造。段落如下:
542
  {input}
543
  以上就是你需要總結的內容。`,
 
 
544
  },
545
  footer: {
546
  profile: '“保留所有權利 @ react”',
 
541
  promptText: `請總結以下段落。注意數字,不要胡編亂造。段落如下:
542
  {input}
543
  以上就是你需要總結的內容。`,
544
+ createGraph: '建立圖表',
545
+ createFromTemplates: '從模板創建',
546
  },
547
  footer: {
548
  profile: '“保留所有權利 @ react”',
web/src/locales/zh.ts CHANGED
@@ -560,6 +560,8 @@ export default {
560
  promptText: `请总结以下段落。注意数字,不要胡编乱造。段落如下:
561
  {input}
562
  以上就是你需要总结的内容。`,
 
 
563
  },
564
  footer: {
565
  profile: 'All rights reserved @ React',
 
560
  promptText: `请总结以下段落。注意数字,不要胡编乱造。段落如下:
561
  {input}
562
  以上就是你需要总结的内容。`,
563
+ createGraph: '创建图表',
564
+ createFromTemplates: '从模板创建',
565
  },
566
  footer: {
567
  profile: 'All rights reserved @ React',
web/src/pages/flow/list/create-flow-modal.tsx CHANGED
@@ -70,7 +70,7 @@ const CreateFlowModal = ({
70
  <Input />
71
  </Form.Item>
72
  </Form>
73
- <Title level={5}>Create from templates</Title>
74
  <Flex vertical gap={16} className={styles.templatesBox}>
75
  {list?.map((x) => (
76
  <Card
 
70
  <Input />
71
  </Form.Item>
72
  </Form>
73
+ <Title level={5}>{t('createFromTemplates', { keyPrefix: 'flow' })}</Title>
74
  <Flex vertical gap={16} className={styles.templatesBox}>
75
  {list?.map((x) => (
76
  <Card
web/src/pages/flow/list/index.tsx CHANGED
@@ -4,6 +4,7 @@ import CreateFlowModal from './create-flow-modal';
4
  import FlowCard from './flow-card';
5
  import { useFetchDataOnMount, useSaveFlow } from './hooks';
6
 
 
7
  import styles from './index.less';
8
 
9
  const FlowList = () => {
@@ -14,6 +15,7 @@ const FlowList = () => {
14
  flowSettingLoading,
15
  onFlowOk,
16
  } = useSaveFlow();
 
17
 
18
  const { list, loading } = useFetchDataOnMount();
19
 
@@ -25,7 +27,7 @@ const FlowList = () => {
25
  icon={<PlusOutlined />}
26
  onClick={showFlowSettingModal}
27
  >
28
- create canvas
29
  </Button>
30
  </Flex>
31
  <Spin spinning={loading}>
 
4
  import FlowCard from './flow-card';
5
  import { useFetchDataOnMount, useSaveFlow } from './hooks';
6
 
7
+ import { useTranslate } from '@/hooks/commonHooks';
8
  import styles from './index.less';
9
 
10
  const FlowList = () => {
 
15
  flowSettingLoading,
16
  onFlowOk,
17
  } = useSaveFlow();
18
+ const { t } = useTranslate('flow');
19
 
20
  const { list, loading } = useFetchDataOnMount();
21
 
 
27
  icon={<PlusOutlined />}
28
  onClick={showFlowSettingModal}
29
  >
30
+ {t('create')}
31
  </Button>
32
  </Flex>
33
  <Spin spinning={loading}>