Page MenuHomePhabricator

CX2: Basic translation publishing and error handling
Closed, ResolvedPublic

Description

Support the basic functionality of publishing for the translation editor: clicking publish, creates a new page with the content of the translation:

  • The page will be created in the destination that indicates the title of the translation considering the namespace.
  • The published page will be linked in Wikidata to make it possible for users to navigate across languages.
  • If the destination page already exists, the content will be replaced with the new translation (other tickets will show warnings about this later).
  • The edit message will include a reference to the source article ("Created by translating the page X") and the "contenttranslation" tag as CX1 currently does.
  • If there is an issue during this process, it will be shown as an error.

We don't need to develop all translation tools before doing this. Once MT and link adaptation work is done, let us make sure the content publishes cleanly with all error handling.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 353040 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] CX2: Fix the js error in publishing and show success message

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

Change 353040 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX2: Fix the js error in publishing and show success message

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

Change 378030 had a related patch set uploaded (by Santhosh; owner: Esanders):
[mediawiki/extensions/ContentTranslation@master] CX2: Publish the translation

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

Publishing is working now with VE provided content from editor. There are some more testing I need to do for the title conflicts, overwrite warning and namespace selection. The success message banner also need some attention since it goes below the floating sticky headers

Change 378030 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX2: Publish the translation

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

In CX2 the error message is currently showing in two places:

image.png (182×1 px, 21 KB)

A persistent message like this is probably not the correct type for a fatal error that requires the user's immediate attention. For fatal errors we should show a modal dialog, such as this failure-to-load dialog in VE:

image.png (205×351 px, 13 KB)

For the less severe messages such as auto-save status, we can leave that at the top-of-page status bar.

Pginer-WMF renamed this task from CX2: Translation publishing and error handling to CX2: Basic translation publishing and error handling.Feb 26 2018, 3:15 PM
Pginer-WMF updated the task description. (Show Details)

I tried to publish in CX2 testing server the Nasothek article (tanslated from English to Spanish) and got the following error:

Screen Shot 2018-03-02 at 13.17.29.png (597×1 px, 160 KB)

Change 416447 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Bring back publish namespace picker

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

Change 417184 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] CX2: Basic error handling

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

Change 416447 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Bring back publish namespace picker

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

Change 417184 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX2: Basic error handling

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

Publishing works successfully according to specs with only few issues.

@santhosh and @Pginer-WMF The issues seem to be kind of out of the overall scope of this task. Should be there separate tickets?
(1) When "[CX] Invalid target title" Console error is shown, there is no indication to a user that the title needs to be corrected. The article will be published with the previous valid title or defaults to the title of the article being translated.
(2) Another case for error handling - when a user session is expired. The Publish icon remains active but no action can be performed:

Screen Shot 2018-04-09 at 5.01.31 PM.png (319×1 px, 63 KB)

(3) A warning to a user looks a little bit unbalanced in terms of space between lines and centering of the text. Also referring to "replacing the existing page" made me think that the source page might be replaced.
Screen Shot 2018-04-11 at 9.10.46 PM.png (383×945 px, 56 KB)

(1) When "[CX] Invalid target title" Console error is shown, there is no indication to a user that the title needs to be corrected. The article will be published with the previous valid title or defaults to the title of the article being translated.

Is "[CX] Invalid target title" only produced when there are invalid characters in the title? If that is the case, we have a ticket to deal with such case (T190804). If not, we may want to create a ticket and describe which is the cause of such error.

(2) Another case for error handling - when a user session is expired. The Publish icon remains active but no action can be performed:

Screen Shot 2018-04-09 at 5.01.31 PM.png (319×1 px, 63 KB)

Thanks for caching this. I created a separate ticket with the info you provided (T192066), and will work on the designs for it later.

(3) A warning to a user looks a little bit unbalanced in terms of space between lines and centering of the text. Also referring to "replacing the existing page" made me think that the source page might be replaced.

Screen Shot 2018-04-11 at 9.10.46 PM.png (383×945 px, 56 KB)

These changes are part of T190038, we can further comment on those there.

@santhosh and @Pginer-WMF The issues seem to be kind of out of the overall scope of this task. Should be there separate tickets?

There actually is a separate ticket for everything listed.

(1) When "[CX] Invalid target title" Console error is shown, there is no indication to a user that the title needs to be corrected. The article will be published with the previous valid title or defaults to the title of the article being translated.

I'm dealing with this in T191349, which is meant to restore what we have in CX1 - when user tries to publish with invalid target title, error is displayed. T190804 is set to indicate which characters are wrong and prohibit publishing if there are invalid characters in target title.

(2) Another case for error handling - when a user session is expired. The Publish icon remains active but no action can be performed:

Screen Shot 2018-04-09 at 5.01.31 PM.png (319×1 px, 63 KB)

There was no ticket for this specific case at the time you wrote the comment, but @Pginer-WMF created T192066 after that.

I would add that behavior is coming from "If publishing failed or warnings were shown, the publishing button will become enabled, allowing to try to publish again without the need for making further changes" which is described in T189291. Also, in this patch, I have introduced recoverable and unrecoverable errors, but that is yet unused. It can be used to disable publish button if error which occurred is unrecoverable.

(3) A warning to a user looks a little bit unbalanced in terms of space between lines and centering of the text. Also referring to "replacing the existing page" made me think that the source page might be replaced.

Screen Shot 2018-04-11 at 9.10.46 PM.png (383×945 px, 56 KB)

As @Pginer-WMF noted, this is part of T190038.

Thanks @Pginer-WMF and @Petar.petkovic for your clarifications on my comment. Closing this ticket as Resolved.