Skip to content

Commit aa660aa

Browse files
author
Saket Hatwar
committed
fixes
1 parent adcf070 commit aa660aa

File tree

3 files changed

+111
-48
lines changed

3 files changed

+111
-48
lines changed

locale/hi/LC_MESSAGES/loris.po

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,19 @@ msgstr "हाँ"
120120
msgid "No"
121121
msgstr "नहीं"
122122

123+
# Common swal labels
124+
msgid "Cancel"
125+
msgstr "रद्द करें"
126+
127+
msgid "Success!"
128+
msgstr "सफलता!"
129+
130+
msgid "Selection Filters"
131+
msgstr "चयन फ़िल्टर"
132+
133+
msgid "Clear Filters"
134+
msgstr "फ़िल्टर साफ़ करें"
135+
123136
# Common candidate terms
124137
msgid "PSCID"
125138
msgstr "पीएससीआईडी"
@@ -169,6 +182,12 @@ msgstr "प्रतिक्रिया"
169182
msgid "Scans"
170183
msgstr "स्कैन"
171184

185+
msgid "Stage"
186+
msgstr "चरण"
187+
188+
msgid "Sent To DCC"
189+
msgstr "डीसीसी को भेजा गया"
190+
172191
msgid "Date of Birth"
173192
msgstr "जन्म तिथि"
174193

@@ -190,6 +209,9 @@ msgstr "उन्नत फ़िल्टर दिखाएँ"
190209
msgid "Hide Advanced Filters"
191210
msgstr "उन्नत फ़िल्टर छुपाएँ"
192211

212+
msgid "Language"
213+
msgstr "भाषा"
214+
193215
# Data table strings
194216
msgid "{{pageCount}} rows displayed of {{totalCount}}."
195217
msgstr "{{totalCount}} में से {{pageCount}} पंक्तियाँ प्रदर्शित"
@@ -199,3 +221,47 @@ msgstr "प्रति पृष्ठ अधिकतम पंक्तिय
199221

200222
msgid "Download Data as CSV"
201223
msgstr "डेटा को CSV के रूप में डाउनलोड करें"
224+
225+
# Common strings on widgets
226+
msgid "NEW"
227+
msgstr "नया"
228+
229+
msgid "Updated"
230+
msgstr "अपडेट किया गया"
231+
232+
msgid "Uploaded"
233+
msgstr "अपलोड किया गया"
234+
235+
msgid "Total"
236+
msgstr "कुल"
237+
238+
# Common timepoint and visit terms
239+
msgid "Not Started"
240+
msgstr "शुरू नहीं हुआ"
241+
242+
msgid "Screening"
243+
msgstr "जांच"
244+
245+
msgid "Visit"
246+
msgstr "भेंट"
247+
248+
msgid "Approval"
249+
msgstr "स्वीकृति"
250+
251+
msgid "Subject"
252+
msgstr "विषय"
253+
254+
msgid "Recycling Bin"
255+
msgstr "रीसाइक्लिंग बिन"
256+
257+
msgid "Pass"
258+
msgstr "उत्तीर्ण"
259+
260+
msgid "Failure"
261+
msgstr "विफलता"
262+
263+
msgid "Withdrawal"
264+
msgstr "वापसी"
265+
266+
msgid "In Progress"
267+
msgstr "प्रगति पर"

locale/loris.pot

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ msgstr ""
126126
msgid "Success!"
127127
msgstr ""
128128

129+
msgid "Selection Filters"
130+
msgstr ""
131+
132+
msgid "Clear Filters"
133+
msgstr ""
134+
129135
# Common candidate terms
130136
msgid "PSCID"
131137
msgstr ""

modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -81,77 +81,68 @@ class BehaviouralFeedback extends Component {
8181
* @return {*} a formatted table cell for a given column
8282
*/
8383
formatColumn(column, cell, rowData, rowHeaders) {
84-
let reactElement;
85-
switch (column) {
86-
case 'PSCID':
87-
reactElement = (
84+
const {t} = this.props;
85+
const labelPSCID = t('PSCID', {ns: 'loris'});
86+
const labelDCCID = t('DCCID', {ns: 'loris'});
87+
const labelBVL = t('Feedback Level', {ns: 'behavioural_qc'});
88+
89+
// PSCID column (match English or translated)
90+
if (column === 'PSCID' || column === labelPSCID) {
91+
return (
8892
<td>
89-
<a href={this.props.baseURL +
90-
'/' +
91-
rowData['DCCID']
92-
}>
93+
<a href={this.props.baseURL + '/' + rowData['DCCID']}>
9394
{rowData['PSCID']}
9495
</a>
9596
</td>
9697
);
97-
break;
98-
case 'DCCID':
99-
reactElement = (
98+
}
99+
100+
// DCCID column
101+
if (column === 'DCCID' || column === labelDCCID) {
102+
return (
100103
<td>
101-
<a href={this.props.baseURL +
102-
'/' +
103-
rowData['DCCID']
104-
}>
104+
<a href={this.props.baseURL + '/' + rowData['DCCID']}>
105105
{rowData['DCCID']}
106106
</a>
107107
</td>
108108
);
109-
break;
110-
case 'Feedback Level':
109+
}
110+
111+
// Feedback Level column — build link depending on row data
112+
if (column === 'Feedback Level' || column === labelBVL) {
111113
let bvlLink = '';
112114
let bvlLevel = '';
113115
if (rowData['Instrument']) {
114116
bvlLink = this.props.baseURL +
115-
'/instruments/' +
116-
rowData['Test Name'] +
117-
'/?candID=' +
118-
rowData['DCCID'] +
119-
'&sessionID=' +
120-
rowData['sessionID'] +
121-
'&commentID=' +
122-
rowData['commentID'];
123-
// Open feedback panel
124-
bvlLink += '&showFeedback=true';
125-
bvlLevel ='Instrument : ' + rowData['Instrument'];
117+
'/instruments/' +
118+
rowData['Test Name'] +
119+
'/?candID=' + rowData['DCCID'] +
120+
'&sessionID=' + rowData['sessionID'] +
121+
'&commentID=' + rowData['commentID'] +
122+
'&showFeedback=true';
123+
bvlLevel = t('Instrument', {ns: 'behavioural_qc'}) + ' : '
124+
+ rowData['Instrument'];
126125
} else if (rowData['Visit']) {
127126
bvlLink = this.props.baseURL +
128-
'/instrument_list/' +
129-
'?candID=' +
130-
rowData['DCCID'] +
131-
'&sessionID=' +
132-
rowData['sessionID'];
133-
// Open feedback panel
134-
bvlLink += '&showFeedback=true';
135-
bvlLevel ='Visit : ' + rowData['Visit'];
127+
'/instrument_list/?candID=' + rowData['DCCID'] +
128+
'&sessionID=' + rowData['sessionID'] +
129+
'&showFeedback=true';
130+
bvlLevel = t('Visit', {ns: 'behavioural_qc'}) + ' : '
131+
+ rowData['Visit'];
136132
} else {
137-
bvlLink = this.props.baseURL +
138-
'/' + rowData['DCCID'];
139-
// Open feedback panel
140-
bvlLink += '/?showFeedback=true';
141-
bvlLevel ='Profile : ' + rowData['PSCID'];
133+
bvlLink = this.props.baseURL + '/' + rowData['DCCID']
134+
+ '/?showFeedback=true';
135+
bvlLevel = t('Profile', {ns: 'behavioural_qc'}) + ' : '
136+
+ rowData['PSCID'];
142137
}
143-
reactElement = (
138+
return (
144139
<td>
145140
<a href={bvlLink}>{bvlLevel}</a>
146141
</td>
147142
);
148-
break;
149-
default:
150-
reactElement = (
151-
<td>{cell}</td>
152-
);
153143
}
154-
return reactElement;
144+
145+
return <td>{cell}</td>;
155146
}
156147

157148
/**

0 commit comments

Comments
 (0)