Content Translation shows a warning when translation paragraphs contain too much content that has not been modified (T190279). With the current approach, the checks are not done immediately, but postponed until the user edits a paragraph. This approach is one step to prevent showing the issues too early, but still has some limitations (illustrated in the animation below):
- Users adding several paragraphs in a sequence, receive the feedback about the paragraphs being problematically too late, not discouraging them from adding more unreviewed paragraphs.
- Users editing a paragraph get a warning for the current paragraph they are trying to improve too early, not giving them a chance to make a good translation before the warning is shown.
In order to avoid the problems described above, a strategy that surfaces the issues when needed but does not get in the way of users trying to edit the initial translation of a paragraph is proposed. The approach combines all the three behaviours described below:
Check other pending paragraphs when a new paragraph is added to the translation.
When a paragraph is added to the translation, we can assume that the user is done with other paragraphs that were added before, and issues can be shown for them.
In this way, adding three paragraphs in a row will show the warning for the first paragraph when the second is added; and warnings for the second paragraph will be shown when the third paragraph is added. Note that the paragraph being added is not checked immediately, and that this approach surfaces warnings for all paragraphs except for the last added paragraph (which will be covered by the approaches listed below).
Check pending paragraphs when input focus moves out of a paragraph.
The input focus moving away from the current paragraph is another indicator that the work is completed. It may not be the case, but the user will be less surprised if the warning mark appears after completing this editing action than getting it after the first modification.
Delay the check of the current paragraph after the user starts editing it.
The previous strategies should cover most of the cases, but they can leave the current paragraph unchecked which may be problematic if the user tries to publish unaware of the warning for it. We can show a warning for the current paragraph, if there is some time of inactivity after the user started modifying it. For example, if the user adds a paragraph and starts editing remains 15 seconds without making any modification, the issue can be shown.
If this adds too much complexity, we can consider measuring only the time since the first edit on the paragraph, ignoring whether there have been further modifications in between, but using a longer time period as a reference.