You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h3>{t('for at least one of the following visits',{ns: 'dataquery'})}</h3>
155
158
<VisitListoptions={fieldDictionary.visits}
156
159
selected={selectedVisits||[]}
157
160
onChange={setSelectedVisits}
@@ -173,10 +176,7 @@ function AddFilterModal(props: {
173
176
<divstyle={{
174
177
color: 'white',
175
178
padding: '1em',
176
-
}}>This field may exist multiple times for a
177
-
single {fieldDictionary.scope}. Adding a criteria
178
-
based on it means that it must match for <i>at least
179
-
one</i> of the data points.</div>
179
+
}}>{t('This field may exist multiple times for a single {{scope}}. Adding a criteria based on it means that it must match for <i>at least one</i> of the data points.',{ns: 'dataquery',scope: fieldDictionary.scope})}</div>
180
180
</div>;
181
181
}
182
182
}
@@ -193,17 +193,17 @@ function AddFilterModal(props: {
193
193
if(!fieldname){
194
194
swal.fire({
195
195
type: 'error',
196
-
title: 'Invalid field',
197
-
text: 'You must select a field for the criteria.',
196
+
title: t('Invalid field',{ns: 'dataquery'}),
197
+
text: t('You must select a field for the criteria.',{ns: 'dataquery'}),
198
198
});
199
199
reject();
200
200
return;
201
201
}
202
202
if(!op){
203
203
swal.fire({
204
204
type: 'error',
205
-
title: 'Invalid operator',
206
-
text: 'You must select an operator for the criteria.',
205
+
title: t('Invalid operator',{ns: 'dataquery'}),
206
+
text: t('You must select an operator for the criteria.',{ns: 'dataquery'}),
207
207
});
208
208
reject();
209
209
return;
@@ -214,9 +214,8 @@ function AddFilterModal(props: {
214
214
&&op!='exists'&&op!='notexists'){
215
215
swal.fire({
216
216
type: 'error',
217
-
title: 'Invalid value',
218
-
text: 'You must enter a value to compare the '+
219
-
'field against.',
217
+
title: t('Invalid value',{ns: 'dataquery'}),
218
+
text: t('You must enter a value to compare the field against.',{ns: 'dataquery'}),
220
219
});
221
220
reject();
222
221
return;
@@ -227,8 +226,8 @@ function AddFilterModal(props: {
227
226
if(!selectedVisits||selectedVisits.length==0){
228
227
swal.fire({
229
228
type: 'error',
230
-
title: 'Invalid visits',
231
-
text: 'No visits selected for criteria.',
229
+
title: t('Invalid visits',{ns: 'dataquery'}),
230
+
text: t('No visits selected for criteria.',{ns: 'dataquery'}),
232
231
});
233
232
reject();
234
233
return;
@@ -257,13 +256,13 @@ function AddFilterModal(props: {
257
256
}
258
257
);
259
258
return(
260
-
<Modaltitle="Add criteria"
259
+
<Modaltitle={t('Add criteria',{ns: 'dataquery'})}
261
260
show={true}
262
261
throwWarning={true}
263
262
onClose={props.closeModal}
264
263
onSubmit={submitPromise}>
265
264
<divstyle={{width: '100%',padding: '1em'}}>
266
-
<h3>Field</h3>
265
+
<h3>{t('Field',{ns: 'dataquery'})}</h3>
267
266
<divstyle={{display: 'flex',width: '100%'}}>
268
267
<divstyle={{width: '40%'}}>
269
268
<FilterableSelectGroup
@@ -300,7 +299,7 @@ function AddFilterModal(props: {
@@ -44,8 +46,8 @@ function ImportCSVModal(props: {
44
46
console.error(value.errors);
45
47
swal.fire({
46
48
type: 'error',
47
-
title: 'Invalid CSV',
48
-
text: 'Could not parse CSV file',
49
+
title: t('Invalid CSV',{ns: 'dataquery'}),
50
+
text: t('Could not parse CSV file',{ns: 'dataquery'}),
49
51
});
50
52
}
51
53
@@ -58,21 +60,17 @@ function ImportCSVModal(props: {
58
60
if(value.data[i].length!=expectedLength){
59
61
swal.fire({
60
62
type: 'error',
61
-
title: 'Invalid CSV',
62
-
text: 'Expected '+expectedLength+' columns in CSV.'
63
-
+' Got '+value.data[i].length+' on line '+
64
-
(i+1)+'.',
63
+
title: t('Invalid CSV',{ns: 'dataquery'}),
64
+
text: t('Expected {{expectedLength}} columns in CSV. Got {{gotLength}} on line {{line}}.',{ns: 'dataquery', expectedLength,gotLength: value.data[i].length,line: i+1}),
65
65
});
66
66
return;
67
67
}
68
68
if(idType==='CandID'){
69
69
if(candIDRegex.test(value.data[i][0])!==true){
70
70
swal.fire({
71
71
type: 'error',
72
-
title: 'Invalid DCC ID',
73
-
text: 'Invalid DCC ID ('+value.data[i][0]
74
-
+') on line '
75
-
+(i+1)+'.',
72
+
title: t('Invalid DCC ID',{ns: 'dataquery'}),
73
+
text: t('Invalid DCC ID ({{id}}) on line {{line}}.',{ns: 'dataquery',id: value.data[i][0],line: i+1}),
76
74
});
77
75
return;
78
76
}
@@ -125,51 +123,51 @@ function ImportCSVModal(props: {
125
123
marginTop: '1em',
126
124
};
127
125
128
-
return<Modaltitle="Import Population From CSV"
126
+
return<Modaltitle={t('Import Population From CSV',{ns: 'dataquery'})}
129
127
show={true}
130
128
throwWarning={true}
131
129
onClose={props.closeModal}
132
130
onSubmit={submitPromise}>
133
131
<fieldset>
134
132
<div>
135
133
<dl>
136
-
<dtstyle={dtstyle}>CSV containing list of</dt>
134
+
<dtstyle={dtstyle}>{t('CSV containing list of',{ns: 'dataquery'})}</dt>
0 commit comments