Text in the Grouper UI can change in the 2.2 redesign.
Currently we use resource bundles, but we could switch to the new config overlays instead of Java resource bundles.
The UI text would be externalized and internationalized.
The config files are similar to the project config files, in that they have configurable overlays. These config files are refereshed every so often, so they can be edited (or patched) on the server without a restart.
For example, the default english/US text config file is on the classpath in: grouperText/grouperUi.text.en.us.base.properties
You should not edit the base text file, you should edit the overlay. In this case the overlay is specified in the config file
So the file you should edit is: grouperUi.text.en.us.properties. Any text item in the base can be overridden here.
Example of text override
In the base (grouperUi.text.en.us.base.properties), is:
At Penn, this is called a PennGroup, so in the grouperUi.text.en.us.properties, we could have:
Referencing text in other text. You can do a quick reference of another text item in a text item like this:
Dynamic data in text
When text is calculated for a user, all of the text references are resolved for the HTTP request at once. Each time a text item is used, if there is an EL scriptlet, it will be calculated only for that text item call. Here is an example:
Using text in JSP
There are a few calls to use text in JSP. The default one needs no escaping:
If you want HTML escaped, you can call
If you want double quotes escaped for HTML use:
Using text in Java
To use text in Java, call the following. Note, if there are variables needed in the text, set those in the request container first.