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>
157
+
<h3>{t('for at least one of the following visits',
158
+
{ns: 'dataquery'})}</h3>
158
159
<VisitListoptions={fieldDictionary.visits}
159
160
selected={selectedVisits||[]}
160
161
onChange={setSelectedVisits}
@@ -176,7 +177,10 @@ function AddFilterModal(props: {
176
177
<divstyle={{
177
178
color: 'white',
178
179
padding: '1em',
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
+
}}>{t('This field may exist multiple times for a single {{scope}}.'
181
+
+' Adding a criteria based on it means that it must match for '
182
+
+'<i>at least one</i> of the data points.',{ns: 'dataquery',
183
+
scope: fieldDictionary.scope})}</div>
180
184
</div>;
181
185
}
182
186
}
@@ -194,7 +198,8 @@ function AddFilterModal(props: {
194
198
swal.fire({
195
199
type: 'error',
196
200
title: t('Invalid field',{ns: 'dataquery'}),
197
-
text: t('You must select a field for the criteria.',{ns: 'dataquery'}),
201
+
text: t('You must select a field for the criteria.',
202
+
{ns: 'dataquery'}),
198
203
});
199
204
reject();
200
205
return;
@@ -203,7 +208,8 @@ function AddFilterModal(props: {
203
208
swal.fire({
204
209
type: 'error',
205
210
title: t('Invalid operator',{ns: 'dataquery'}),
206
-
text: t('You must select an operator for the criteria.',{ns: 'dataquery'}),
211
+
text: t('You must select an operator for the criteria.',
212
+
{ns: 'dataquery'}),
207
213
});
208
214
reject();
209
215
return;
@@ -215,7 +221,8 @@ function AddFilterModal(props: {
215
221
swal.fire({
216
222
type: 'error',
217
223
title: t('Invalid value',{ns: 'dataquery'}),
218
-
text: t('You must enter a value to compare the field against.',{ns: 'dataquery'}),
224
+
text: t('You must enter a value to compare the field against.',
225
+
{ns: 'dataquery'}),
219
226
});
220
227
reject();
221
228
return;
@@ -362,6 +369,7 @@ function getOperatorOptions(dict: FieldDictionary) {
362
369
* @param {string} op - The operator selected
363
370
* @param {string|string[]} value - The current value
364
371
* @param {string} setValue - a callback when a new value is selected
372
+
* @param {function} t - Translation function from i18next
365
373
* @returns {React.ReactElement} - the react element
Copy file name to clipboardExpand all lines: modules/dataquery/jsx/definefilters.importcsvmodal.tsx
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,9 @@ function ImportCSVModal(props: {
61
61
swal.fire({
62
62
type: 'error',
63
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}),
64
+
text: t('Expected {{expectedLength}} columns in CSV. '
65
+
+'Got {{gotLength}} on line {{line}}.',{ns: 'dataquery',
@@ -140,7 +141,11 @@ function DefineFilters(props: {
140
141
if(showAdvanced){
141
142
advancedButtons=(
142
143
<div>
143
-
<p>{t('The "nested groups" options are advanced options for queries that do not have any specific condition at the base of the query. Use Add nested "or" condition groups if you need to build a query of the form. (a or b) and (c or d) [or (e and f)..]',{ns: 'dataquery'})}</p>
144
+
<p>{t('The "nested groups" options are advanced options for '
145
+
+'queries that do not have any specific condition at the base'
146
+
+' of the query. Use Add nested "or" condition groups if you'
147
+
+' need to build a query of the form. (a or b) and (c or d)'
@@ -171,10 +178,15 @@ function DefineFilters(props: {
171
178
<divstyle={{paddingLeft: '2em',
172
179
paddingRight: '2em'}}>
173
180
<p>{t('Currently querying for ALL candidates.',{ns: 'dataquery'})}</p>
174
-
<p>{t('You can add conditions by clicking one of the buttons below.',{ns: 'dataquery'})}</p>
175
-
<p>{t('Click Add Condition to add one or more conditions to your filters (ie. "Date Of Birth < 2015-02-15"). This is most likely where you want to start your filters.',{ns: 'dataquery'})}</p>
176
-
<p>{t('You can also import a population from a CSV by clicking the Import from CSV button.',{ns: 'dataquery'})}</p>
177
-
<p>{t('The advanced options are for queries that do not have a condition to add at the base of the query.',{ns: 'dataquery'})}</p>
181
+
<p>{t('You can add conditions by clicking one of the buttons below.',
182
+
{ns: 'dataquery'})}</p>
183
+
<p>{t('Click Add Condition to add one or more conditions to your'
184
+
+' filters (ie. "Date Of Birth < 2015-02-15"). This is most likely'
185
+
+' where you want to start your filters.',{ns: 'dataquery'})}</p>
186
+
<p>{t('You can also import a population from a CSV by clicking the'
187
+
+' Import from CSV button.',{ns: 'dataquery'})}</p>
188
+
<p>{t('The advanced options are for queries that do not have a '
189
+
+'condition to add at the base of the query.',{ns: 'dataquery'})}</p>
178
190
</div>
179
191
<form>
180
192
<fieldset>
@@ -218,15 +230,23 @@ function DefineFilters(props: {
218
230
advancedButtons=(
219
231
<div>
220
232
<divstyle={bGroupStyle}>
221
-
<p>{t('Use New "and" subgroup if the rest of the query you need to write is a subgroup consisting of "and" conditions. ie your query is of the form: (your condition above) or (c and d [and e and f..])',{ns: 'dataquery'})}</p>
233
+
<p>{t('Use New "and" subgroup if the rest of the query you'
234
+
+' need to write is a subgroup consisting of "and" '
235
+
+'conditions. ie your query is of the form: (your condition'
236
+
+' above) or (c and d [and e and f..])',
237
+
{ns: 'dataquery'})}</p>
222
238
<ButtonElement
223
239
label={t('New "and" subgroup',{ns: 'dataquery'})}
224
240
onUserInput={(e: React.MouseEvent)=>{
225
241
e.preventDefault();
226
242
props.query.operator='or';
227
243
props.addNewQueryGroup(props.query);
228
244
}}/>
229
-
<p>{t('Use New "or" subgroup if the rest of the query you need to write is a subgroup consisting of "or" conditions. ie your query is of the form: (your condition above) and (c or d [or e or f..])',{ns: 'dataquery'})}</p>
245
+
<p>{t('Use New "or" subgroup if the rest of the query you '
246
+
+'need to write is a subgroup consisting of "or" '
247
+
+'conditions. ie your query is of the form: (your '
248
+
+'condition above) and (c or d [or e or f..])',
249
+
{ns: 'dataquery'})}</p>
230
250
<ButtonElement
231
251
label={t('New "or" subgroup',{ns: 'dataquery'})}
232
252
onUserInput={(e: React.MouseEvent)=>{
@@ -240,7 +260,8 @@ function DefineFilters(props: {
@@ -365,7 +388,10 @@ function DefineFilters(props: {
365
388
{matchCount}
366
389
</div>
367
390
<InfoPanel>
368
-
{t('Note that only candidates which you have permission to access in LORIS are included in results. Number of results may vary from other users running the same query.',{ns: 'dataquery'})}
391
+
{t('Note that only candidates which you have permission to '
392
+
+'access in LORIS are included in results. Number of results'
393
+
+' may vary from other users running the same query.',
0 commit comments