Add a disclaimer message

Created on 25 April 2025, 7 days ago

Problem/Motivation

Machine translation is not yet as perfect as human translation, so a message needs to be displayed to notice the user that this is a machine translation.

Proposed resolution

Create a message block with a disclaimer text.

✨ Feature request
Status

Active

Version

1.1

Component

Code

Created by

🇭🇺Hungary peri22

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @peri22
  • Merge request !25Issue #3521121 Add disclaimer message. → (Open) created by peri22
  • Pipeline finished with Success
    7 days ago
    Total: 219s
    #481775
  • 🇭🇺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.

  • Pipeline finished with Success
    3 days ago
    Total: 171s
    #484664
  • 🇭🇺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.

  • Pipeline finished with Success
    3 days ago
    Total: 335s
    #484672
Production build 0.71.5 2024