Message Boards
Remove a word in liferay message
Piotr Krzesniak, modified 3 Years ago.
Remove a word in liferay message
New Member Posts: 23 Join Date: 7/24/20 Recent Posts
Hello, I have tried to customize my liferay messages and i ended up with changing message but i cant deal with one problem. I would like to remove a word "Error:" in liferay-ui message. The same problem goes with success message, it always displays "Success". Any suggestions how can i solve that problem? Thanks in advance
Attachments:
Olaf Kock, modified 3 Years ago.
RE: Remove a word in liferay message
Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Not that I want to talk you out of it, but often we get asked about more Accessibility features. Having an explicit "Error" or "Success" makes any message read by a screenreader so much more clear, if a user doesn't get the hint of the green/red background. I've come across situations where I got a message that left me puzzled: "Is that a good or a bad thing?"
Granted, that one word isn't the holy grail of accessibility, but it's one component.
Granted, that one word isn't the holy grail of accessibility, but it's one component.
Piotr Krzesniak, modified 3 Years ago.
RE: Remove a word in liferay message
New Member Posts: 23 Join Date: 7/24/20 Recent Posts
Yes, that's true that having an explicit "Error" or "Success" makes message clearer, but i would like to replace it with success written in my langauge. Thats why i asked this question ;)
Olaf Kock, modified 3 Years ago.
RE: Remove a word in liferay message
Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent PostsPiotr Krzesniak:
Yes, that's true that having an explicit "Error" or "Success" makes message clearer, but i would like to replace it with success written in my langauge. Thats why i asked this question ;)
it's as bit as if I had firmly identified a X-Y problem in the first place. I haven't - at least not firmly. But you're clearly hunting for a solution to a different problem.
In your case: Just switch Liferay's UI from english (default) to the language of your choice (which is it?)
You can do that user by user, and provide a default for the whole installation or a separate one for each site.
Piotr Krzesniak, modified 3 Years ago.
RE: Remove a word in liferay message
New Member Posts: 23 Join Date: 7/24/20 Recent Posts
It is not really X-Y problem, i've just suggested that it should have been written in my language, but for me the best solution is to remove this word "Success|Error" completely and i really want to achieve it. Can you give me some hints to make it? Thank you for everything @Olaf Kock
Olaf Kock, modified 3 Years ago.
RE: Remove a word in liferay message
Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent PostsPiotr Krzesniak:
It is not really X-Y problem, i've just suggested that it should have been written in my language, but for me the best solution is to remove this word "Success|Error" completely and i really want to achieve it. Can you give me some hints to make it?
which is it: "remove completely" as you write here, or "replace it with success written in my language"? Because the solution will be different:
The most maintainable way to eliminate it (as it's not a threat if it's contained in the DOM is after looking at the DOM:
Just add CSS to your theme, like (untested)
.alert .lead { display: none; }
(and you can even use the appropriate aria stuff to make it screenreader-accessible while not shown graphically)The most maintainable way to display it in your language is to switch to your langauge.
Attachments:
Piotr Krzesniak, modified 3 Years ago.
RE: Remove a word in liferay message
New Member Posts: 23 Join Date: 7/24/20 Recent Posts
Thank you very much, now it is working correctly ;)