- Issue created by @peri22
- ðŸ‡ðŸ‡ºHungary peri22
I created a new service to check whether the translation is an ec_etranslation job and to build the warning message. I also created a block plugin to display the message when needed.
If you'd like to use the disclaimer, you can either place the block in the appropriate location or add the message from a preprocess function, like this:
if ($translationHelper->isEcEtranslationJob($comment)) { $variables['content']['content']['notification'] = $translationHelper->buildWarningMessage($comment, $sourceLanguage); }
I plan to enhance the solution by allowing the message type and text to be configurable.
- 🇧🇪Belgium dieterholvoet Brussels
dieterholvoet → changed the visibility of the branch 1.x to hidden.
- ðŸ‡ðŸ‡ºHungary peri22
I’ve added new fields to the provider settings form to make the Disclaimer notification configurable. You can now choose whether to display the notification and customize its type, title, and message. The message is also translatable.