I'm trying to translate the "Action Denied" system popup.
Currently, the translation for the title ("Action Denied") works correctly. However, the message body changes depending on the action being performed and the name of the object where the action was configured.
Because of this, it is quite difficult to add every possible message variation to the Translation Manager.
Is there any way to use placeholders or wildcard entries in the Translation Manager so that similar messages can be translated dynamically?
I found some older forum posts suggesting the use of system.util.translate(), but since this is a built-in system popup, I don't think that approach can be applied in this case.
Has anyone encountered a similar requirement or found a workaround?
I'm not going to pretend that this is a particularly good pattern that we force you into, and it's something we're planning/hoping to improve in future releases, right now the way this particular popup would be translated is by injecting two specific keys:
messageDetail = `${actionDenied.eventName} ${i18n(client, 'action for component')} ${actionDenied.elementName} ${i18n(client, 'was denied.')}`;
If you add action for component and was denied. to your translation management, those substrings will get translated at runtime.
Again - not pretending this is great - obviously you cannot rearrange the message into a grammar that makes sense in every language, localize the actual component names or event names, etc. But it should work.
Thank you for the clarification.
As a workaround, this solution is perfectly acceptable for us at the moment. While it doesn't allow for ideal localization in every language, it is definitely better than leaving the entire message in English.
Out of curiosity, is there any plan on the roadmap to introduce support for placeholders, wildcards, or similar functionality in the Translation Manager? It would be very helpful for translating dynamic messages while still allowing proper sentence structure in different languages.
Thanks again for your help.
It's high on the list of potential improvements, but don't take that to mean it'll happen immediately; at this point the soonest release with (probably) placeholder replacement would be in 2028 (we're moving to a yearly calendar versioning scheme starting next year with 2027.2.0).
In addition to this topic, with actual version is there any way to translate the login page?
It seems like adding test into translation manager is not working.
Unfortunately it's not possible to localize the identity provider pages.
It's (another...) longstanding feature request we haven't implemented yet; you can add your vote here to help us prioritize it: