/
Change UI field labels
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Change UI field labels

Introduction

This page describe how to configure a 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.

If a site needs to make changes to the labels, for example: 

   1. CP property :   IRB ID vs Ethics Approval ID

   2. Participant property : Social Security Number vs NRIC 

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.propertiessgh/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.

For example:

    participant module property : Social Security Number vs NRIC 

modules/i18n/en_US.jssgh/src/main/webapp/app/i18n/en.js

{

"participant": {

"uid": "Social Security Number",

}

}

{

"participant": {

"uid": "NRIC",

}

}



Related content

Configure Fields on Main Pages
Configure Fields on Main Pages
More like this
General
Read with this
Label configuration
Label configuration
More like this
List View Configuration
List View Configuration
Read with this
Building Language Plugin
Building Language Plugin
More like this
Customize Screens (JSON)
Customize Screens (JSON)
Read with this
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com