Browse Source

Improve i18n.

HEAD
Yang Luo 3 years ago
parent
commit
89ba33089b
4 changed files with 17 additions and 17 deletions
  1. +2
    -2
      web/src/WordsetEditPage.js
  2. +9
    -9
      web/src/WordsetListPage.js
  3. +3
    -3
      web/src/locales/en/data.json
  4. +3
    -3
      web/src/locales/zh/data.json

+ 2
- 2
web/src/WordsetEditPage.js View File

@@ -86,11 +86,11 @@ class WordsetEditPage extends React.Component {
</Row> </Row>
<Row style={{marginTop: '20px'}} > <Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}> <Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{i18next.t("wordset:Vectors")}:
{i18next.t("wordset:Words")}:
</Col> </Col>
<Col span={22} > <Col span={22} >
<VectorTable <VectorTable
title={i18next.t("wordset:Vectors")}
title={i18next.t("wordset:Words")}
table={this.state.wordset.vectors} table={this.state.wordset.vectors}
onUpdateTable={(value) => { this.updateWordsetField('vectors', value)}} onUpdateTable={(value) => { this.updateWordsetField('vectors', value)}}
/> />


+ 9
- 9
web/src/WordsetListPage.js View File

@@ -99,7 +99,7 @@ class WordsetListPage extends React.Component {
sorter: (a, b) => a.distance - b.distance, sorter: (a, b) => a.distance - b.distance,
}, },
{ {
title: i18next.t("wordset:Vectors"),
title: i18next.t("wordset:Words"),
dataIndex: 'vectors', dataIndex: 'vectors',
key: 'vectors', key: 'vectors',
// width: '120px', // width: '120px',
@@ -109,21 +109,21 @@ class WordsetListPage extends React.Component {
} }
}, },
{ {
title: i18next.t("wordset:All vectors"),
dataIndex: 'allVectors',
key: 'allVectors',
title: i18next.t("wordset:All words"),
dataIndex: 'allWords',
key: 'allWords',
width: '140px', width: '140px',
sorter: (a, b) => a.allVectors - b.allVectors,
sorter: (a, b) => a.allWords - b.allWords,
render: (text, record, index) => { render: (text, record, index) => {
return record.vectors.length; return record.vectors.length;
} }
}, },
{ {
title: i18next.t("wordset:Valid vectors"),
dataIndex: 'validVectors',
key: 'validVectors',
title: i18next.t("wordset:Valid words"),
dataIndex: 'validWords',
key: 'validWords',
width: '140px', width: '140px',
sorter: (a, b) => a.validVectors - b.validVectors,
sorter: (a, b) => a.validWords - b.validWords,
render: (text, record, index) => { render: (text, record, index) => {
return record.vectors.filter(vector => vector.data.length !== 0).length; return record.vectors.filter(vector => vector.data.length !== 0).length;
} }


+ 3
- 3
web/src/locales/en/data.json View File

@@ -31,10 +31,10 @@
"File size": "File size" "File size": "File size"
}, },
"wordset": { "wordset": {
"All vectors": "All vectors",
"All words": "All words",
"Distance": "Distance", "Distance": "Distance",
"Edit Wordset": "Edit Wordset", "Edit Wordset": "Edit Wordset",
"Valid vectors": "Valid vectors",
"Vectors": "Vectors"
"Valid words": "Valid words",
"Words": "Words"
} }
} }

+ 3
- 3
web/src/locales/zh/data.json View File

@@ -31,10 +31,10 @@
"File size": "文件大小" "File size": "文件大小"
}, },
"wordset": { "wordset": {
"All vectors": "所有向量",
"All words": "所有词汇",
"Distance": "距离", "Distance": "距离",
"Edit Wordset": "编辑词汇集", "Edit Wordset": "编辑词汇集",
"Valid vectors": "有效向量",
"Vectors": "向量"
"Valid words": "有效词汇",
"Words": "词汇表"
} }
} }

Loading…
Cancel
Save