Its extension should be properties, and its name should
be the same as the name of Tapestry filter defined in the deployment descriptor
web.xml??”hence app.properties in our case. Here is the content of this file
accumulated throughout the previous chapters:
Country.GERMANY=Germany
country.uk=United Kingdom
COUNTRY.USA=United States
dateOfBirth-label=Birth Date
email-regexp=^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+
([a-zA-Z0-9]{2,4})+$
email-regexp-message=Email address is not valid.
age-min-message=You are too young! You should be at least %s years
old.
age-max-message=People do not live that long!
passwords-dont-match=Two versions of password do not match.
authentication-failed=We couldn't authenticate you. Try again or
register.
firstName-required-message=You cannot have a celebrity without a
name!
Internationalization and Localization
[ 178 ]
If we look through the entries, we shall realize that some of them might be needed by
several pages of our growing application, while others are very much page-specific.
For example, the message with the key authentication-failed is certainly needed
only for that single page where we are checking user's credentials.
The application will work fine if we continue to keep all the messages in the root
catalogue, but if we do so, and as the number of pages in the application increases,
this catalog can quickly become unmanageable.
Pages:
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228