Skip to content

Commit 3e43d60

Browse files
author
lorisadmin
committed
Merge remote-tracking branch 'origin/main' into 2025_10_27_mulilingual_candidate_parameters
2 parents 5499ceb + a48aea3 commit 3e43d60

170 files changed

Lines changed: 10829 additions & 1732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,8 @@ RaisinBread:
216216

217217
"Language: SQL":
218218
- changed-files:
219-
- any-glob-to-any-file: '**/*.sql'
219+
- any-glob-to-any-file: '**/*.sql'
220+
221+
"Multilingual":
222+
- changed-files:
223+
- any-glob-to-any-file: '**/*.po'

Makefile

Lines changed: 141 additions & 188 deletions
Large diffs are not rendered by default.

SQL/0000-00-06-BiobankTables.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ CREATE TABLE `biobank_specimen_protocol_attribute_rel` (
182182
`SpecimenAttributeID` int(10) unsigned NOT NULL,
183183
`Required` tinyint(1) DEFAULT NULL,
184184
`showInDataTable` tinyint(1) DEFAULT NULL,
185+
`OrderIndex` INT UNSIGNED NOT NULL,
185186
PRIMARY KEY (`SpecimenProtocolID`,`SpecimenAttributeID`),
187+
UNIQUE KEY `UK_SpecimenProtocolId_OrderIndex` (`SpecimenProtocolID`, `OrderIndex`),
186188
KEY `FK_biobank_specimen_protocol_attribute_rel_SpecimenAttributeID` (`SpecimenAttributeID`),
187189
CONSTRAINT `FK_biobank_specimen_protocol_attribute__rel_SpecimenProtocolID` FOREIGN KEY (`SpecimenProtocolID`) REFERENCES `biobank_specimen_protocol` (`SpecimenProtocolID`),
188190
CONSTRAINT `FK_biobank_specimen_protocol_attribute_rel_SpecimenAttributeID` FOREIGN KEY (`SpecimenAttributeID`) REFERENCES `biobank_specimen_attribute` (`SpecimenAttributeID`)
@@ -399,6 +401,7 @@ VALUES (1,'Blood Collection',1,1),
399401
INSERT INTO `biobank_specimen_type_unit_rel` VALUES (1,1),(2,2);
400402
INSERT INTO `biobank_specimen_type_parent` VALUES (2,1);
401403
INSERT INTO `biobank_specimen_type_container_type_rel` VALUES (1,1),(2,1);
404+
INSERT INTO `shipment_type` VALUES (1, 'Gel Pack Container'),(2, 'Insulated Foam Box'),(3, 'Dry Shipper');
402405

403406
-- Insert ConfigSettings for label printing endpoint
404407
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('biobank', 'Settings related to the biobank module', 1, 0, 'Biobank', 16);
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
-- Step 1: Add the column allowing NULL (temporarily)
2+
-- This allows the operation to succeed on a table that already has existing rows.
3+
ALTER TABLE biobank_specimen_protocol_attribute_rel
4+
ADD COLUMN OrderIndex INT UNSIGNED NULL;
5+
6+
-- Step 2: Populate the existing rows with unique, non-NULL OrderIndex values.
7+
-- This uses a variable-based method to assign a sequential number (0, 1, 2, ...)
8+
-- to each row within the same SpecimenProtocolID group.
9+
10+
SET @r := -1;
11+
SET @g := 0;
12+
13+
-- A temporary table/derived table is used to calculate the unique index for each group
14+
UPDATE biobank_specimen_protocol_attribute_rel AS t1
15+
INNER JOIN (
16+
SELECT
17+
t2.SpecimenProtocolID,
18+
t2.SpecimenAttributeID,
19+
@r := CASE WHEN @g = t2.SpecimenProtocolID THEN @r + 1 ELSE 0 END AS new_OrderIndex,
20+
@g := t2.SpecimenProtocolID AS current_group
21+
FROM
22+
biobank_specimen_protocol_attribute_rel AS t2
23+
ORDER BY
24+
t2.SpecimenProtocolID, t2.SpecimenAttributeID
25+
26+
) AS ranked_data
27+
ON t1.SpecimenProtocolID = ranked_data.SpecimenProtocolID
28+
AND t1.SpecimenAttributeID = ranked_data.SpecimenAttributeID
29+
SET t1.OrderIndex = ranked_data.new_OrderIndex;
30+
31+
-- Step 3: Enforce the constraints (NOT NULL and UNIQUE).
32+
-- Now that every row has a valid, unique value, these operations will succeed.
33+
34+
-- 3a. Add the UNIQUE Constraint
35+
ALTER TABLE biobank_specimen_protocol_attribute_rel
36+
ADD CONSTRAINT UK_SpecimenProtocolId_OrderIndex
37+
UNIQUE (SpecimenProtocolID, OrderIndex);
38+
39+
-- 3b. Change the Column to NOT NULL
40+
ALTER TABLE biobank_specimen_protocol_attribute_rel
41+
MODIFY COLUMN OrderIndex INT UNSIGNED NOT NULL;

jsx/DataTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class DataTable extends Component {
443443
</div>
444444
</div>
445445
<div className='alert alert-info no-result-found-panel'>
446-
<strong>No result found.</strong>
446+
<strong>{this.props.t('No result found.', {ns: 'loris'})}</strong>
447447
</div>
448448
</div>
449449
);

jsx/Modal.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ const Modal = ({
4747
const handleClose = () => {
4848
if (throwWarning) { // Display warning if enabled
4949
Swal.fire({
50-
title: t('Are You Sure?'),
51-
text:
52-
t('Leaving the form will result in the'
53-
+' loss of any information entered.'),
50+
title: t('Are You Sure?', {ns: 'loris'}),
51+
text: t('Leaving the form will result in the loss '
52+
+'of any information entered.',
53+
{ns: 'loris'}),
5454
type: 'warning',
5555
showCancelButton: true,
56-
confirmButtonText: t('Proceed'),
57-
cancelButtonText: t('Cancel'),
56+
confirmButtonText: t('Proceed', {ns: 'loris'}),
57+
cancelButtonText: t('Cancel', {ns: 'loris'}),
5858
}).then((result) => result.value && onClose());
5959
} else {
6060
onClose(); // Close immediately if no warning
@@ -178,7 +178,7 @@ const Modal = ({
178178
const loader = loading && (
179179
<div style={processStyle}>
180180
<Loader size={20}/>
181-
<h5 className='animate-flicker'>{t('Saving')}</h5>
181+
<h5 className='animate-flicker'>{t('Saving', {ns: 'loris'})}</h5>
182182
</div>
183183
);
184184

@@ -191,7 +191,7 @@ const Modal = ({
191191
style={{color: 'green', marginBottom: '2px'}}
192192
className='glyphicon glyphicon-ok-circle'
193193
/>
194-
<h5>{t('Success!')}</h5>
194+
<h5>{t('Success!', {ns: 'loris'})}</h5>
195195
</div>
196196
);
197197

jsx/StaticDataTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class StaticDataTable extends Component {
496496
if (this.props.Data === null || this.props.Data.length === 0) {
497497
return (
498498
<div className='alert alert-info no-result-found-panel'>
499-
<strong>No result found.</strong>
499+
<strong>{this.props.t('No result found.', {ns: 'loris'})}</strong>
500500
</div>
501501
);
502502
}

locale/en/LC_MESSAGES/loris.po

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ msgstr "No"
124124
msgid "Cancel"
125125
msgstr "Cancel"
126126

127+
msgid "Clear"
128+
msgstr "Clear"
129+
130+
msgid "Submit"
131+
msgstr "Submit"
132+
133+
msgid "Proceed"
134+
msgstr "Proceed"
135+
127136
# Common candidate terms
128137
msgid "PSCID"
129138
msgstr "PSCID"
@@ -147,7 +156,7 @@ msgid "Cohort"
147156
msgid_plural "Cohorts"
148157
msgstr[0] "Cohort"
149158
msgstr[1] "Cohorts"
150-
159+
151160
msgid "Session"
152161
msgstr "Session"
153162

locale/es/LC_MESSAGES/loris.po

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,21 @@ msgstr "Scan hecho"
248248
msgid "Language"
249249
msgstr "Lenguaje"
250250

251+
msgid "Access denied"
252+
msgstr "Acceso denegado"
253+
254+
msgid "No."
255+
msgstr "número"
256+
257+
msgid "Are you sure?"
258+
msgstr "Estás seguro?"
259+
260+
msgid "Yes, I am sure!"
261+
msgstr "¡Sí, estoy seguro!"
262+
263+
msgid "No, cancel it!"
264+
msgstr "¡No, cancélalo!"
265+
251266
# Data table strings
252267
msgid "{{pageCount}} rows displayed of {{totalCount}}."
253268
msgstr "{{pageCount}} filas mostradas de {{totalCount}}."

locale/fr/LC_MESSAGES/loris.po

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,31 @@ msgstr "Afficher les filtres avancés"
147147
msgid "Hide Advanced Filters"
148148
msgstr "Masquer les filtres avancés"
149149

150+
msgid "Fail"
151+
msgstr "Échec"
152+
153+
msgid "True"
154+
msgstr "Vrai"
155+
156+
msgid "False"
157+
msgstr "Faux"
158+
159+
msgid "Selected"
160+
msgstr "Sélectionné"
161+
162+
msgid "selected"
163+
msgstr "sélectionné"
164+
150165
# Common swal labels
151166
msgid "Cancel"
152167
msgstr "Annuler"
153168

154169
msgid "Success!"
155170
msgstr "Réussi!"
156171

172+
msgid "Success"
173+
msgstr "Réussi"
174+
157175
# Common candidate terms
158176
msgid "PSCID"
159177
msgstr "PSCID"
@@ -241,6 +259,51 @@ msgstr "Scan complété"
241259
msgid "Language"
242260
msgstr "Langue"
243261

262+
msgid "Access denied"
263+
msgstr "Accès refusé"
264+
265+
msgid "No."
266+
msgstr "Nombre"
267+
268+
msgid "Are you Sure?"
269+
msgstr "Es-tu sûr?"
270+
271+
msgid "Are you sure?"
272+
msgstr "Es-tu sûr?"
273+
274+
msgid "Yes, I am sure!"
275+
msgstr "Oui, j'en suis sûr!"
276+
277+
msgid "No, cancel it!"
278+
msgstr "Non, annulez-le !"
279+
280+
msgid "Leaving the form will result in the loss of any information entered."
281+
msgstr "Quitter le formulaire entraînera la perte de toutes les informations saisies."
282+
283+
msgid "Proceed"
284+
msgstr "Procéder"
285+
286+
msgid "Previous"
287+
msgstr "Précédent"
288+
289+
msgid "Next"
290+
msgstr "Suivant"
291+
292+
msgid "Save"
293+
msgstr "Sauvegarder"
294+
295+
msgid "Saving"
296+
msgstr "Sauvegarde"
297+
298+
msgid "Reset"
299+
msgstr "Réinitialiser"
300+
301+
msgid "Note"
302+
msgstr "Note"
303+
304+
msgid "View details"
305+
msgstr "Voir détails"
306+
244307
# Data table strings
245308
msgid "{{pageCount}} rows displayed of {{totalCount}}."
246309
msgstr "{{pageCount}} lignes affichées de {{totalCount}}."
@@ -347,3 +410,25 @@ msgstr "{{months}} mois"
347410

348411
msgid "{{years}} years old"
349412
msgstr "{{years}} ans"
413+
414+
# Other generic terms
415+
msgid "Loading..."
416+
msgstr "Chargement..."
417+
418+
msgid "Permission denied"
419+
msgstr "Permission refusée"
420+
421+
msgid "Unauthorized"
422+
msgstr "Non-autorisé"
423+
424+
msgid "Submit"
425+
msgstr "Soumettre"
426+
427+
msgid "Clear"
428+
msgstr "Effacer"
429+
430+
msgid "Add"
431+
msgstr "Ajouter"
432+
433+
msgid "Dataset"
434+
msgstr "Ensemble de données"

0 commit comments

Comments
 (0)