Page MenuHomePhabricator

Once the MT warning is shown for a paragraph update it as the user edits its contents
Closed, ResolvedPublic4 Estimated Story Points

Description

Once users get a warning about unedited contents, the MT percentage shown is not updated when the user edit the paragraph, which can generate confusion. The user may be reducing the percentage of unedited MT and the warning message does not reflect that.

Currently the warning is updated when the paragraph loses focus (disappearing or showing a correct percentage). This ticket proposes to update the behavior to make sure that for those paragraphs where the warning is already shown (and only those), the warning is checked as the user edits.

It is ok for the checks to happen in intervals of a few seconds. That is, there is no need for a real-time update of the percentage as users type. But after making some modifications it would be good to show the user that those were taken into account.

Note that this may require to have a different approach for evaluating paragraphs depending on whether warnings were shown for them:

  • Paragraphs with a warning and editing activity (focus + typing): check regularly
  • Paragraphs without a warning: check when editing is complete: focus moves to another paragraph, or some time has passed since the last input event. This was covered in T285861

An example of the problem is captured below:

Steps to reproduce:

  1. Add a paragraph to the translation.
  2. Click to the next paragraph.
  3. Observe a warning to appear for the first paragraph.
  4. Click the first paragraph and observe the "100% unmodified contents" message.
  5. Add and remove contents from the paragraph as the "100%" indicator remains the same without update.

Event Timeline

Pginer-WMF created this task.

This ticket need reevaluation as we modified the behavior in T285861: MT warnings showing too early as the paragraph loses focus

I updated the ticket description to make it clear the part covered in T285861, as well as the specific behaviour that this ticket aims to improve. The steps to reproduce and video have been updated, but the main purpose of the ticket remains the same: as users edit a paragraph with an MT warning should see how their changes are reflected in the MT percentage of the warning. T285861 changed how the warnings are shown for the paragraph, and that behaviour should be preserved.

Please, let me know if anything is unclear.

Nikerabbit set the point value for this task to 4.Feb 9 2022, 2:12 PM

Change 765121 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] For sections with MT misuse issue, validate it on content updates

https://gerrit.wikimedia.org/r/765121

Change 765121 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] For sections with MT misuse issue, validate it on content updates

https://gerrit.wikimedia.org/r/765121

Etonkovidova subscribed.

Checked on wmf.25 - as a user modifies text in MT paragraph, the machine translated text percentage is changing. When the percentage reaches the percentage that triggers the removal of warning, the warning disappears.

cx1.gif (762×1 px, 655 KB)