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
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 12 2017, 4:51 AM
santhosh removed santhosh as the assignee of this task.May 3 2017, 6:33 AM

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:

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:

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

Pginer-WMF removed santhosh as the assignee of this task.Feb 19 2018, 8:14 AM
Pginer-WMF updated the task description. (Show Details)Feb 19 2018, 9:24 AM
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:

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

Arrbee moved this task from In Review to QA on the Language-2018-Apr-June board.Apr 5 2018, 8:03 AM

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:


(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.

(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:

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.

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:

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.

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

Etonkovidova closed this task as Resolved.Apr 18 2018, 6:25 PM

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