Page MenuHomePhabricator

Validate the translation titles against the abusefilter rules in target wiki
Closed, ResolvedPublic

Description

While analysing the publishing errors, we saw multiple cases where the target wiki prevented creating an article because the title is not in an expected script.
Example: en->ar, Source title is Martin Luther King, Translator did not give a target title. Arabic wiki wont accept articles with latin title and hence it will cause publishing failure.

We can detect this case before publishing and ask the translator to fix and proceed.

Proposed design

abusefilter-error-on-load.png (768×1 px, 235 KB)

  • An error message is shown in red.
  • The publish button remains disabled until the title gets edited.
  • The affected paragraph (the title) gets highlighted with a red line next to it. When the paragraph gets the editing focus, a contextual card will be shown (more below).

abusefilter-error-on-load-paragraph.png (768×1 px, 248 KB)

  • A card is shown with the specific error, and an indication that it prevents from publishing.
  • A "Learn more" link points to the local page with Abuse filter information.
  • A specific action that helps to resolve the issue can be provided. In this case, using MT to translate the title could be helpful. For other cases, other actions (e.g., a quick access to clear the content) or no action may be preferred.

Event Timeline

santhosh raised the priority of this task from to High.
santhosh lowered the priority of this task from High to Medium.
santhosh updated the task description. (Show Details)
santhosh set Security to None.

We can detect this case before publishing and ask the translator to fix and proceed.

Is there a way to check for problems with abusefilter for the title as soon as the translation is started? or we can just anticipate some of the cases in an ad-hoc way?

In the solution above I proposed the use of a generic message, but if we are targeting the specific issue of script mismatch we can make it more specific.

Since we have the new AbuseFilterCheck by @Nikerabbit, we can catch this along with save. That is, before publishing.

The filter checks are in cxsave api and that need to take the title. This will be done as part of T125645: Use cxpublish api only for publish and use cxsave api for save

So this ticket is now dependent on T125645

Change 269379 had a related patch set uploaded (by Santhosh):
Validate the translation titles against abusefilter in target wiki

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

expectedrendering1.png (524×1 px, 195 KB)

Screenshot as per https://gerrit.wikimedia.org/r/#/c/269379/
Article title validations using abuse filter. Consistant with srction validation. Plus, MT card available for title.

santhosh renamed this task from Detect target title same as source title cases and warn translators when source script and target script differs to Validate the translation titles against the abusefilter rules in target wiki.Feb 9 2016, 10:02 AM

expectedrendering1.png (524×1 px, 195 KB)

Screenshot as per https://gerrit.wikimedia.org/r/#/c/269379/
Article title validations using abuse filter. Consistant with srction validation. Plus, MT card available for title.

Looks good. One of the missing aspects is that if we know for sure that this prevents the article from being published, we can present this as an error (red) instead of a warning (yellow). If that is not the case, it is ok to use the warning.

Another question is; when is this checked? Are we highlighting errors for both, the initial title and the ser modifications on it?

One of the missing aspects is that if we know for sure that this prevents the article from being published, we can present this as an error (red) instead of a warning (yellow)

Yes, this is possible, Abusefilter gives 'disallow' error type if the error prevents publishing. I will try that.

Another question is; when is this checked?

This is checked on autosave - that happens at typing pauses or every 5 mins(if there is unsaved sections)

This is checked on autosave - that happens at typing pauses or every 5 mins(if there is unsaved sections)

The case of the title is a bit particular since it is defined before landing to the translation view. Showing the warning on auto-save means that the user will probably get the warning about the title later when editing a different paragraph, which may seem a bit random.

Adding one more clarification: While editing the title also autosave and validation happens.

I suggest to wait till the whole storage migration commits get merged and evaluate the situation. We can evaluate when to trigger the first save for this valdation.

Change 269379 merged by jenkins-bot:
Validate the translation titles against abusefilter in target wiki

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

Arrbee raised the priority of this task from Medium to High.
Arrbee moved this task from QA to Done on the LE-CX8-Sprint 3 board.