Skip to content

Commit 0e4263c

Browse files
authored
Merge branch 'main' into TranslateMyPreferences
2 parents 4f7e6d4 + fa2e9dd commit 0e4263c

File tree

632 files changed

+3737
-2783
lines changed

Some content is hidden

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

632 files changed

+3737
-2783
lines changed

.github/workflows/loristest.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
# (see https://github.com/actions/runner-images/blob/releases/ubuntu22/20230305/images/linux/Ubuntu2204-Readme.md)
2323
# that updated the list of installed apt packages/apt repositories. That issue may disappear in future Ubuntu images.
2424
run: |
25+
sudo apt-get update
2526
sudo apt install -y imagemagick-6-common libmagickcore-6.q16-7t64 libmagickwand-6.q16-7t64 \
2627
libprotobuf-dev libprotobuf32t64 libprotoc32t64 protobuf-compiler
2728
cd modules/electrophysiology_browser/jsx/react-series-data-viewer/
@@ -259,7 +260,7 @@ jobs:
259260
restore-keys: ${{ runner.os }}-composer-
260261

261262
- name: Change PHP Version in Dockerfile
262-
run: sed -i "s/8.0/${{ matrix.php }}/g" Dockerfile.test.php8
263+
run: sed -i "s/8.3/${{ matrix.php }}/g" Dockerfile.test.php8
263264

264265
- name: Install protoc-gen-js plugin
265266
run: npm install -g protoc-gen-js
@@ -270,6 +271,7 @@ jobs:
270271
# (see https://github.com/actions/runner-images/blob/releases/ubuntu22/20230305/images/linux/Ubuntu2204-Readme.md)
271272
# that updated the list of installed apt packages/apt repositories. That issue may disappear in future Ubuntu images.
272273
run: |
274+
sudo apt-get update
273275
sudo apt install -y imagemagick-6-common libmagickcore-6.q16-7t64 libmagickwand-6.q16-7t64 \
274276
libprotobuf-dev libprotobuf32t64 libprotoc32t64 protobuf-compiler gettext
275277
cd modules/electrophysiology_browser/jsx/react-series-data-viewer/

Dockerfile.test.db

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN cat /sql/0000-00-00-schema.sql \
1313
/sql/0000-00-03-ConfigTables.sql \
1414
/sql/0000-00-04-Help.sql \
1515
/sql/0000-00-05-ElectrophysiologyTables.sql \
16+
/sql/0000-00-06-BiobankTables.sql \
1617
/instruments_sql/*.sql \
1718
/test_instrument.sql \
1819
/RB_files/*.sql \

Dockerfile.test.php8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.1
1+
FROM php:8.3
22

33
# Install necessary packages
44
RUN apt-get update && \

Dockerfile.test.php8.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.1
1+
FROM php:8.3
22

33
RUN apt-get update && \
44
apt-get install -y mariadb-client libzip-dev

Makefile

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
.PHONY: clean dev all check checkstatic unittests phpdev jslatest testdata fastdev jsdev locales
1+
.PHONY: clean dev all check checkstatic unittests jslatest testdata locales
22

3-
all: locales VERSION
4-
composer install --no-dev
5-
npm ci
3+
all: node_modules locales VERSION vendor
64
npm run build
75

6+
%.mo: %.po
7+
msgfmt -o $@ $<
8+
89
# If anything changes, re-generate the VERSION file
910
VERSION: .
1011
tools/gen-version.sh
1112

12-
phpdev:
13+
vendor/bin/phan: composer.lock
1314
composer install
1415

15-
dev: jsdev locales phpdev fastdev
16+
vendor/bin/phpunit: composer.lock
17+
composer install
1618

17-
jsdev:
19+
vendor: composer.lock
20+
composer install --no-dev
21+
22+
node_modules: package-lock.json
1823
npm ci
1924

20-
fastdev: VERSION
25+
dev: node_modules locales vendor/bin/phan VERSION vendor
2126
npm run compile
2227

2328
jslatest: clean
@@ -35,7 +40,7 @@ clean:
3540
rm -f modules/*/locale/*/LC_MESSAGES/*.mo
3641

3742
# Perform static analysis checks
38-
checkstatic: phpdev
43+
checkstatic: vendor/bin/phan dev
3944
npm run lint:php
4045
vendor/bin/phan
4146
npm run lint:js
@@ -48,7 +53,7 @@ checkstatic: phpdev
4853
make checklanguage:
4954
npx alex --quiet --why --diff
5055

51-
unittests: phpdev
56+
unittests: vendor/bin/phpunit
5257
vendor/bin/phpunit --configuration test/phpunit.xml
5358

5459
# Perform all tests that don't require an install.
@@ -62,6 +67,8 @@ locales:
6267
npx i18next-conv -l ja -s locale/ja/LC_MESSAGES/loris.po -t locale/ja/LC_MESSAGES/loris.json
6368
msgfmt -o locale/hi/LC_MESSAGES/loris.mo locale/hi/LC_MESSAGES/loris.po
6469
npx i18next-conv -l hi -s locale/hi/LC_MESSAGES/loris.po -t locale/hi/LC_MESSAGES/loris.json
70+
msgfmt -o locale/es/LC_MESSAGES/loris.mo locale/es/LC_MESSAGES/loris.po
71+
npx i18next-conv -l es -s locale/es/LC_MESSAGES/loris.po -t locale/es/LC_MESSAGES/loris.json
6572
msgfmt -o modules/new_profile/locale/ja/LC_MESSAGES/new_profile.mo modules/new_profile/locale/ja/LC_MESSAGES/new_profile.po
6673
msgfmt -o modules/acknowledgements/locale/ja/LC_MESSAGES/acknowledgements.mo modules/acknowledgements/locale/ja/LC_MESSAGES/acknowledgements.po
6774
msgfmt -o modules/api_docs/locale/ja/LC_MESSAGES/api_docs.mo modules/api_docs/locale/ja/LC_MESSAGES/api_docs.po
@@ -79,6 +86,9 @@ locales:
7986
msgfmt -o modules/configuration/locale/ja/LC_MESSAGES/configuration.mo modules/configuration/locale/ja/LC_MESSAGES/configuration.po
8087
msgfmt -o modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.mo modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.po
8188
msgfmt -o modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.mo modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.po
89+
npx i18next-conv -l ja -s modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.po -t modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.json
90+
msgfmt -o modules/create_timepoint/locale/es/LC_MESSAGES/create_timepoint.mo modules/create_timepoint/locale/es/LC_MESSAGES/create_timepoint.po
91+
npx i18next-conv -l es -s modules/create_timepoint/locale/es/LC_MESSAGES/create_timepoint.po -t modules/create_timepoint/locale/es/LC_MESSAGES/create_timepoint.json
8292
msgfmt -o modules/dashboard/locale/ja/LC_MESSAGES/dashboard.mo modules/dashboard/locale/ja/LC_MESSAGES/dashboard.po
8393
msgfmt -o modules/datadict/locale/ja/LC_MESSAGES/datadict.mo modules/datadict/locale/ja/LC_MESSAGES/datadict.po
8494
msgfmt -o modules/datadict/locale/hi/LC_MESSAGES/datadict.mo modules/datadict/locale/hi/LC_MESSAGES/datadict.po
@@ -120,56 +130,58 @@ locales:
120130
msgfmt -o modules/schedule_module/locale/ja/LC_MESSAGES/schedule_module.mo modules/schedule_module/locale/ja/LC_MESSAGES/schedule_module.po
121131
msgfmt -o modules/server_processes_manager/locale/ja/LC_MESSAGES/server_processes_manager.mo modules/server_processes_manager/locale/ja/LC_MESSAGES/server_processes_manager.po
122132
msgfmt -o modules/statistics/locale/ja/LC_MESSAGES/statistics.mo modules/statistics/locale/ja/LC_MESSAGES/statistics.po
133+
npx i18next-conv -l ja -s modules/statistics/locale/ja/LC_MESSAGES/statistics.po -t modules/statistics/locale/ja/LC_MESSAGES/statistics.json
123134
msgfmt -o modules/survey_accounts/locale/ja/LC_MESSAGES/survey_accounts.mo modules/survey_accounts/locale/ja/LC_MESSAGES/survey_accounts.po
124135
msgfmt -o modules/timepoint_list/locale/ja/LC_MESSAGES/timepoint_list.mo modules/timepoint_list/locale/ja/LC_MESSAGES/timepoint_list.po
136+
msgfmt -o modules/timepoint_list/locale/es/LC_MESSAGES/timepoint_list.mo modules/timepoint_list/locale/es/LC_MESSAGES/timepoint_list.po
125137
msgfmt -o modules/user_accounts/locale/ja/LC_MESSAGES/user_accounts.mo modules/user_accounts/locale/ja/LC_MESSAGES/user_accounts.po
126138

127139

128-
acknowledgements:
140+
acknowledgements: modules/acknowledgements/locale/ja/LC_MESSAGES/acknowledgements.mo
129141
target=acknowledgements npm run compile
130142

131-
data_release:
132-
msgfmt -o modules/data_release/locale/hi/LC_MESSAGES/data_release.mo modules/data_release/locale/hi/LC_MESSAGES/data_release.po
143+
create_timepoint:
144+
target=data_release npm run compile
145+
146+
data_release: modules/data_release/locale/hi/LC_MESSAGES/data_release.mo modules/data_release/locale/ja/LC_MESSAGES/data_release.mo
133147
npx i18next-conv -l hi -s modules/data_release/locale/hi/LC_MESSAGES/data_release.po -t modules/data_release/locale/hi/LC_MESSAGES/data_release.json
134-
msgfmt -o modules/data_release/locale/ja/LC_MESSAGES/data_release.mo modules/data_release/locale/ja/LC_MESSAGES/data_release.po
135148
npx i18next-conv -l ja -s modules/data_release/locale/ja/LC_MESSAGES/data_release.po -t modules/data_release/locale/ja/LC_MESSAGES/data_release.json
136149
target=data_release npm run compile
137150

138-
instrument_manager:
151+
instrument_manager: modules/instrument_manager/locale/ja/LC_MESSAGES/instrument_manager.mo
139152
target=instrument_manager npm run compile
140153

141-
dataquery:
154+
dataquery: modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo
155+
msgfmt -o modules/dataquery/locale/ja/LC_MESSAGES/dataquery.mo modules/dataquery/locale/ja/LC_MESSAGES/dataquery.po
142156
target=dataquery npm run compile
143157

144-
login:
158+
login: modules/login/locale/ja/LC_MESSAGES/login.mo
145159
target=login npm run compile
146160

147-
module_manager:
161+
module_manager: modules/module_manager/locale/ja/LC_MESSAGES/module_manager.mo
148162
target=module_manager npm run compile
149163

150-
mri_violations:
164+
mri_violations: modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.mo
151165
target=mri_violations npm run compile
152166

153-
issue_tracker:
167+
issue_tracker: modules/issue_tracker/locale/ja/LC_MESSAGES/issue_tracker.mo
154168
target=issue_tracker npm run compile
155169

156-
candidate_list:
157-
msgfmt -o modules/candidate_list/locale/ja/LC_MESSAGES/candidate_list.mo modules/candidate_list/locale/ja/LC_MESSAGES/candidate_list.po
170+
candidate_list: modules/candidate_list/locale/ja/LC_MESSAGES/candidate_list.mo modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.mo
158171
npx i18next-conv -l ja -s modules/candidate_list/locale/ja/LC_MESSAGES/candidate_list.po -t modules/candidate_list/locale/ja/LC_MESSAGES/candidate_list.json
159-
msgfmt -o modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.mo modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.po
160172
npx i18next-conv -l hi -s modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.po -t modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.json
161173
target=candidate_list npm run compile
162174

163-
candidate_parameters:
175+
candidate_parameters: modules/candidate_parameters/locale/ja/LC_MESSAGES/candidate_parameters.mo
164176
target=candidate_parameters npm run compile
165177

166-
dashboard:
178+
dashboard: modules/dashboard/locale/ja/LC_MESSAGES/dashboard.mo
167179
target=dashboard npm run compile
168180

169-
publication:
181+
publication: modules/publication/locale/ja/LC_MESSAGES/publication.mo
170182
target=publication npm run compile
171183

172-
server_processes_manager:
184+
server_processes_manager: modules/server_processes_manager/locale/ja/LC_MESSAGES/server_processes_manager.mo
173185
target=server_processes_manager npm run compile
174186

175187
conflict_resolver:

SQL/0000-00-00-schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CREATE TABLE `psc` (
5151
`Phone2` varchar(12) DEFAULT NULL,
5252
`Contact1` varchar(150) DEFAULT NULL,
5353
`Contact2` varchar(150) DEFAULT NULL,
54-
`Alias` char(3) NOT NULL DEFAULT '',
54+
`Alias` char(4) NOT NULL DEFAULT '',
5555
`MRI_alias` varchar(4) NOT NULL DEFAULT '',
5656
`Account` varchar(8) DEFAULT NULL,
5757
`Study_site` enum('N','Y') DEFAULT 'Y',

SQL/0000-00-03-ConfigTables.sql

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,21 @@ CREATE TABLE `ConfigSettings` (
1212
`Parent` int(11) DEFAULT NULL,
1313
`Label` varchar(255) DEFAULT NULL,
1414
`OrderNumber` int(11) DEFAULT NULL,
15+
`Multilingual` boolean DEFAULT false,
1516
PRIMARY KEY (`ID`),
1617
UNIQUE KEY `Name` (`Name`)
1718
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1819

20+
CREATE TABLE `ConfigI18n` (
21+
`Value` text NOT NULL,
22+
`ConfigID` int(11) DEFAULT NULL,
23+
`LanguageID` int(10) unsigned DEFAULT NULL,
24+
KEY `ConfigID` (`ConfigID`),
25+
KEY `LanguageID` (`LanguageID`),
26+
CONSTRAINT `ConfigI18n_ibfk_1` FOREIGN KEY (`ConfigID`) REFERENCES `ConfigSettings` (`ID`),
27+
CONSTRAINT `ConfigI18n_ibfk_2` FOREIGN KEY (`LanguageID`) REFERENCES `language` (`language_id`)
28+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
29+
1930

2031
CREATE TABLE `Config` (
2132
`ID` int(11) NOT NULL AUTO_INCREMENT,
@@ -88,7 +99,7 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
8899

89100

90101
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('dashboard', 'Settings that affect the appearance of the dashboard and its charts', 1, 0, 'Dashboard', 5);
91-
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'projectDescription', 'Description of the study displayed in main dashboard panel', 1, 0, 'textarea', ID, 'Project Description', 1 FROM ConfigSettings WHERE Name="dashboard";
102+
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber, Multilingual) SELECT 'projectDescription', 'Description of the study displayed in main dashboard panel', 1, 0, 'textarea', ID, 'Project Description', 1, true FROM ConfigSettings WHERE Name="dashboard";
92103
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'recruitmentTarget', 'Target number of participants for the study', 1, 0, 'text', ID, 'Target number of participants', 2 FROM ConfigSettings WHERE Name="dashboard";
93104

94105
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('imaging_modules', 'DICOM Archive and Imaging Browser settings', 1, 0, 'Imaging Modules', 6);

SQL/0000-00-06-BiobankTables.sql

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -378,18 +378,27 @@ CREATE TABLE `biobank_container_shipment_rel` (
378378

379379
-- Insert units, processes, container status and shipment status
380380
INSERT INTO `biobank_unit` VALUES (1,'mL'),(2,'µL');
381-
INSERT INTO `biobank_specimen_attribute_datatype` VALUES (1, 'text'),(2, 'number'),(3, 'date'),(4, 'time'),(5, 'boolean');
382-
INSERT INTO `biobank_specimen_protocol` VALUES (1, 'Blood Collection', 1, 1), (2, 'Blood Preparation', 2, 1), (3, 'Serum Collection', 1, 2);
383-
INSERT INTO `biobank_specimen_type` VALUES (1,'Blood',0),(2,'Serum', 1);
384-
INSERT INTO `biobank_specimen_type_unit_rel` VALUES (1, 1), (2, 2);
385-
INSERT INTO `biobank_specimen_type_parent` VALUES (2, 1);
386-
INSERT INTO `biobank_container_dimension` VALUES (1, 1, 1, 1, 1, 0, 0), (2, 10, 1, 10, 0, 1, 0), (3, 1, 0, 5, 0, 1, 0);
387-
INSERT INTO `biobank_container_capacity` VALUES (1, 1, 1);
388-
INSERT INTO `biobank_container_type` VALUES (1, 'Brand', 'Product Number 1', 'Vial', 1, 1, 1), (2, 'Brand', 'Product Number 2', 'Matrix Box', 0, null, 2), (3, 'Brand', 'Product Number 3', 'Rack', 0, null, 3);
389-
INSERT INTO `biobank_specimen_type_container_type_rel` VALUES (1, 1), (2, 1);
390-
INSERT INTO `biobank_specimen_process` VALUES (2,'Analysis'),(1,'Collection'),(3,'Preparation');
391-
INSERT INTO `biobank_container_status` VALUES (1,'Available'),(4,'Discarded'),(3,'Dispensed');
381+
INSERT INTO `biobank_specimen_attribute_datatype` VALUES (1,'text'),(2,'number'),(3,'date'),(4,'time'),(5,'boolean');
382+
INSERT INTO `biobank_specimen_process` VALUES (1,'Collection'),(2,'Analysis'),(3,'Preparation');
383+
INSERT INTO `biobank_container_status` VALUES (1,'Available'),(3,'Dispensed'),(4,'Discarded');
392384
INSERT INTO `shipment_status` VALUES (1,'cancelled'),(2,'created'),(3,'received'),(4,'returned'),(5,'shipped');
385+
INSERT INTO `biobank_specimen_type` VALUES (1,'Blood',0),(2,'Serum',1);
386+
INSERT INTO `biobank_container_dimension`
387+
VALUES (1,1,1,1,1,0,0),
388+
(2,10,1,10,0,1,0),
389+
(3,1,0,5,0,1,0);
390+
INSERT INTO `biobank_container_capacity` VALUES (1,1,1);
391+
INSERT INTO `biobank_container_type`
392+
VALUES (1,'Brand','Product Number 1','Vial',1,1,1),
393+
(2,'Brand','Product Number 2','Matrix Box',0,NULL,2),
394+
(3,'Brand','Product Number 3','Rack',0,NULL,3);
395+
INSERT INTO `biobank_specimen_protocol`
396+
VALUES (1,'Blood Collection',1,1),
397+
(2,'Blood Preparation',2,1),
398+
(3,'Serum Collection',1,2);
399+
INSERT INTO `biobank_specimen_type_unit_rel` VALUES (1,1),(2,2);
400+
INSERT INTO `biobank_specimen_type_parent` VALUES (2,1);
401+
INSERT INTO `biobank_specimen_type_container_type_rel` VALUES (1,1),(2,1);
393402

394403
-- Insert ConfigSettings for label printing endpoint
395404
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('biobank', 'Settings related to the biobank module', 1, 0, 'Biobank', 16);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ALTER table ConfigSettings ADD COLUMN Multilingual boolean DEFAULT false;
2+
UPDATE ConfigSettings SET Multilingual=true WHERE Name='projectDescription';
3+
4+
CREATE TABLE `ConfigI18n` (
5+
`Value` text NOT NULL,
6+
`ConfigID` int(11) DEFAULT NULL,
7+
`LanguageID` int(10) unsigned DEFAULT NULL,
8+
KEY `ConfigID` (`ConfigID`),
9+
KEY `LanguageID` (`LanguageID`),
10+
CONSTRAINT `ConfigI18n_ibfk_1` FOREIGN KEY (`ConfigID`) REFERENCES `ConfigSettings` (`ID`),
11+
CONSTRAINT `ConfigI18n_ibfk_2` FOREIGN KEY (`LanguageID`) REFERENCES `language` (`language_id`)
12+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
13+
14+
-- Sample translation of projectDescription for testing. We do not have a
15+
-- foreign key value in the 'language' table to add it to RB.
16+
-- INSERT INTO ConfigI18n VALUES ('このデータベースは、様々な場所で収集された画像データと行動データの両方をオンラインで保存するための仕組みを提供します。このフレームワークには、このプロセスを可能な限り効率的かつシンプルにするためのツールがいくつか用意されています。データベースに関する詳細な情報については、右上のヘルプアイコンをクリックしてください。それ以外の場合は、DCCまでお気軽にお問い合わせください。私たちは、データ収集を楽しいものにすることを目指しています。', 48, 2)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE notification_modules
2+
SET Description='Issue Tracker: All issues created or edited'
3+
WHERE module_name='issue_tracker' AND operation_type='create/edit';

0 commit comments

Comments
 (0)