Yes, you can override individual messages in messages.properties by putting
them in custom_messages.properties with new values.

You can also define completely new messages in there as well, and reference
them with Thymeleaf in the page templates, using the same syntax as used
for the "standard" properties..

Just create <maven overlay
root>/src/main/resources/custom_messages.properties and
it'll get picked up on your next "mvnw clean package".

--Dave


--

DAVID A. CURRY, CISSP
*DIRECTOR OF INFORMATION SECURITY*
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728 • david.cu...@newschool.edu

[image: The New School]

On Mon, Apr 9, 2018 at 3:47 PM, Teddy Brown <te...@teddybrown.ca> wrote:

> Will those override the ones specified in messages.properties?
>
> For instance, if I want to override one specific message:
>
> screen.success.success=You, <strong>{0}</strong>, have successfully logged
> into the Central Authentication Service. However, you are seeing \
>   this page because CAS does not know about your target destination and
> how to get you there. Examine the authentication request again and \
>   make sure a target service/application that is authorized and registered
> with CAS is specified.
>
> Do I put this in custom_messages.properties?
>
> Currently we copied the whole messages.properties but I'd rather override
> specific messages.
>
>
> On Monday, April 9, 2018 at 3:35:58 PM UTC-4, Misagh Moayyed wrote:
>>
>> Take a look here:
>> https://apereo.github.io/cas/5.2.x/installation/User-Interfa
>> ce-Customization-Localization.html
>>
>> custom_messages.properties should do the job, IIRC.
>>
>> --Misagh
>>
>> ------------------------------
>>
>> *From: *"Teddy Brown" <te...@teddybrown.ca>
>> *To: *"CAS Community" <cas-...@apereo.org>
>> *Sent: *Monday, April 9, 2018 12:26:02 PM
>> *Subject: *[cas-user] Customizing messages
>>
>> Hi,
>> We recently found need to customize a handful of messages in
>> messages.properties.
>>
>> We use the CAS Maven overlay template from GitHub.  To override messages
>> on 5.0 we took the source messages.properties file and placed it in
>> src/main/resources which works.  Recently we updated to 5.2, I just
>> recently noticed a handful of messages missing.
>>
>> Is there a way we can override just the messages we want without the
>> entire messages.properties file?  Otherwise it seems when we update we will
>> have to manually verify that there are no missing messages.
>>
>> Thanks
>>
>> --
>> - Website: https://apereo.github.io/cas
>> - Gitter Chatroom: https://gitter.im/apereo/cas
>> - List Guidelines: https://goo.gl/1VRrw7
>> - Contributions: https://goo.gl/mh7qDG
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CAS Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cas-user+u...@apereo.org.
>> To view this discussion on the web visit https://groups.google.com/a/ap
>> ereo.org/d/msgid/cas-user/80dc348a-36cd-4026-adcd-f5c1d020d1
>> c0%40apereo.org
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/80dc348a-36cd-4026-adcd-f5c1d020d1c0%40apereo.org?utm_medium=email&utm_source=footer>
>> .
>>
>> --
> - Website: https://apereo.github.io/cas
> - Gitter Chatroom: https://gitter.im/apereo/cas
> - List Guidelines: https://goo.gl/1VRrw7
> - Contributions: https://goo.gl/mh7qDG
> ---
> You received this message because you are subscribed to the Google Groups
> "CAS Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cas-user+unsubscr...@apereo.org.
> To view this discussion on the web visit https://groups.google.com/a/
> apereo.org/d/msgid/cas-user/9efadb65-d86e-4f3e-8e8f-
> 5a4b4da929a9%40apereo.org
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/9efadb65-d86e-4f3e-8e8f-5a4b4da929a9%40apereo.org?utm_medium=email&utm_source=footer>
> .
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CA%2Bd9XAP%2BFuK8zL0sFS-uhFhsyEdo6rPr8VRX0AK4TE08%3D4DYdQ%40mail.gmail.com.

Reply via email to