Introduction
This page describe how to configure custom labels for existing fields of OpenSpecimena different field label. E.g. change "National ID" to "MRIC" or "Aadhaar" etc.
Configuration
Back-end:
In OpenSpecimen source code, there is default messages.properties file in WEB-INF/resources/errors/ directory. This file contains label names for all fields in OpenSpecimen. Use this file to create a custom messages.properties file with the labels that needs to be changed.
...
Create a custom messages.properties containing the labels that needs to change like below and place in the plugin directory. For example: /sgh/src/main/resources/errors
errors/messages.properties | sgh/src/main/resources/errors/messages.properties |
---|---|
cp_irb_id=IRB ID participant_ssn=Social Security Number | cp_irb_id=Ethics Approval ID participant_ssn=NRIC |
Front-end:
There is message property file under "modules/i18n/" directory. Files name are language specific. Like american english - en_US.js etc.
...
participant module property : Social Security Number vs NRIC
modules/i18n/en_US.js | sgh/src/main/webapp/app/i18n/en.js |
---|---|
{ "participant": { "uid": "Social Security Number", } } | { "participant": { "uid": "NRIC", } } |
...