Customizing a Message File

Message text files are located in the /message directory of a component. The Social Program Management Platform is shipped with a set of message files. These may be overridden by placing new message files in the SERVER_DIR/components/<custom >/message directory, where <custom> is any new directory created under components that conform to the same directory structure as components/core. This mechanism avoids the need to make changes directly to the out-of-the-box application, which would complicate later upgrades.
Note: If the package attribute in the overridden message file is modified, then the customization will not work.

This override process involves merging all message files of the same name according to a precedence order. The order is based on the SERVER_COMPONENT_ORDER environment variable. This environment variable contains a comma separated list of component names: the left most has the highest priority, and the right most the lowest.

Figure 1. SERVER COMPONENT ORDER example
SERVER_COMPONENT_ORDER=custom,Appeal,ISProduct,sample

The order in Customizing a Message File, shows that the precedence of Appeal is higher than that of the sample component. The core component always has the lowest priority and as such does not need to be specified. Any components that are not specified are placed alphabetically above core and below those that are specified.

Note: After changing the component precedence order in SERVER_COMPONENT_ORDER it is necessary to perform a clean build to ensure that you are using the appropriate files. This is done by invoking build clean server.

When merging message files, the components listed in the SERVER_COMPONENT_ORDER are taken in order of highest to lowest priority. In Customizing a Message File message files from the sample component are merged with the message files located in the core component. The message files from ISProduct are then merged into the intermediate results and the merge process continues until the messages in the custom component are merged.