Skip to content

Commit b5ea8ea

Browse files
committed
add translations for DatasetInfo.tsx and DatasetVersions.tsx
Signed-off-by: Michael Robinson <merobi@gmail.com>
1 parent ebd2795 commit b5ea8ea

3 files changed

Lines changed: 95 additions & 16 deletions

File tree

web/src/components/datasets/DatasetInfo.tsx

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import MqText from '../core/text/MqText'
1010
import React, { FunctionComponent } from 'react'
1111
import RunStatus from '../jobs/RunStatus'
1212

13-
const DATASET_COLUMNS = ['NAME', 'TYPE', 'DESCRIPTION']
13+
// const DATASET_COLUMNS = ['NAME', 'TYPE', 'DESCRIPTION']
1414

1515
interface DatasetInfoProps {
1616
datasetFields: Field[]
@@ -34,15 +34,25 @@ const DatasetInfo: FunctionComponent<DatasetInfoProps> = props => {
3434
<Table size='small'>
3535
<TableHead>
3636
<TableRow>
37-
{DATASET_COLUMNS.map(column => {
38-
return (
39-
<TableCell key={column} align='left'>
40-
<MqText subheading inline>
41-
{column}
42-
</MqText>
43-
</TableCell>
44-
)
45-
})}
37+
{/* {DATASET_COLUMNS.map(column => {
38+
return ( */}
39+
<TableCell align='left'>
40+
<MqText subheading inline>
41+
{i18next.t('dataset_info_columns.name')}
42+
</MqText>
43+
</TableCell>
44+
<TableCell align='left'>
45+
<MqText subheading inline>
46+
{i18next.t('dataset_info_columns.type')}
47+
</MqText>
48+
</TableCell>
49+
<TableCell align='left'>
50+
<MqText subheading inline>
51+
{i18next.t('dataset_info_columns.description')}
52+
</MqText>
53+
</TableCell>
54+
{/* )
55+
})} */}
4656
</TableRow>
4757
</TableHead>
4858
<TableBody>

web/src/components/datasets/DatasetVersions.tsx

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const DatasetVersions: FunctionComponent<
4747
const handleClick = (newValue: SetStateAction<DatasetVersion | null>) => {
4848
setInfoView(newValue)
4949
}
50+
const i18next = require('i18next')
5051

5152
if (versions.length === 0) {
5253
return null
@@ -72,15 +73,35 @@ const DatasetVersions: FunctionComponent<
7273
<Table size='small'>
7374
<TableHead>
7475
<TableRow>
75-
{DATASET_VERSIONS_COLUMNS.map(column => {
76-
return (
77-
<TableCell key={column} align='left'>
76+
{/* {DATASET_VERSIONS_COLUMNS.map(column => {
77+
return ( */}
78+
<TableCell align='left'>
79+
<MqText subheading inline>
80+
{i18next.t('dataset_versions_columns.version')}
81+
</MqText>
82+
</TableCell>
83+
<TableCell align='left'>
84+
<MqText subheading inline>
85+
{i18next.t('dataset_versions_columns.created_at')}
86+
</MqText>
87+
</TableCell>
88+
<TableCell align='left'>
89+
<MqText subheading inline>
90+
{i18next.t('dataset_versions_columns.fields')}
91+
</MqText>
92+
</TableCell>
93+
<TableCell align='left'>
94+
<MqText subheading inline>
95+
{i18next.t('dataset_versions_columns.created_by_run')}
96+
</MqText>
97+
</TableCell>
98+
<TableCell align='left'>
7899
<MqText subheading inline>
79-
{column}
100+
{i18next.t('dataset_versions_columns.lifecycle_state')}
80101
</MqText>
81102
</TableCell>
82-
)
83-
})}
103+
{/* )
104+
})} */}
84105
</TableRow>
85106
</TableHead>
86107
<TableBody>

web/src/i18n/config.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ i18next
8787
started_at: 'STARTED AT',
8888
ended_at: 'ENDED AT',
8989
duration: 'DURATION'
90+
},
91+
dataset_info_columns: {
92+
name: 'NAME',
93+
type: 'TYPE',
94+
description: 'DESCRIPTION'
95+
},
96+
dataset_versions_columns: {
97+
version: 'VERSION',
98+
created_at: 'CREATED AT',
99+
fields: 'FIELDS',
100+
created_by_run: 'CREATED BY RUN',
101+
lifecycle_state: 'LIFECYCLE STATE'
90102
}
91103
}
92104
},
@@ -161,6 +173,18 @@ i18next
161173
started_at: 'COMMENCÉ À',
162174
ended_at: 'TERMINÉ À',
163175
duration: 'DURÉE'
176+
},
177+
dataset_info_columns: {
178+
name: 'NOM',
179+
type: 'TAPER',
180+
description: 'DESCRIPTION'
181+
},
182+
dataset_versions_columns: {
183+
version: 'VERSION',
184+
created_at: 'CRÉÉ À',
185+
fields: 'DOMAINES',
186+
created_by_run: 'CRÉÉ PAR RUN',
187+
lifecycle_state: 'ÉTAT DU CYCLE DE VIE'
164188
}
165189
}
166190
},
@@ -235,6 +259,18 @@ i18next
235259
started_at: 'EMPEZÓ A LAS',
236260
ended_at: 'TERMINÓ EN',
237261
duration: 'DURACIÓN'
262+
},
263+
dataset_info_columns: {
264+
name: 'NOMBRE',
265+
type: 'ESCRIBE',
266+
description: 'DESCRIPCIÓN'
267+
},
268+
dataset_versions_columns: {
269+
version: 'VERSIÓN',
270+
created_at: 'CREADO EN',
271+
fields: 'CAMPOS',
272+
created_by_run: 'CREADO POR EJECUTAR',
273+
lifecycle_state: 'ESTADO DEL CICLO DE VIDA'
238274
}
239275
}
240276
},
@@ -309,6 +345,18 @@ i18next
309345
started_at: 'ROZPOCZĘŁO SIĘ O GODZ',
310346
ended_at: 'ZAKOŃCZONE O GODZ',
311347
duration: 'TRWANIE'
348+
},
349+
dataset_info_columns: {
350+
name: 'NAZWA',
351+
type: 'RODZAJ',
352+
description: 'OPIS'
353+
},
354+
dataset_versions_columns: {
355+
version: 'WERSJA',
356+
created_at: 'UTWORZONY W',
357+
fields: 'KIERUNKI',
358+
created_by_run: 'STWORZONY PRZEZ URUCHOM',
359+
lifecycle_state: 'STAN CYKLU ŻYCIA'
312360
}
313361
}
314362
}

0 commit comments

Comments
 (0)