Page MenuHomePhabricator

Add support for translating pages where target page is not empty
Open, NormalPublic

Description

I would like to translate an article, but a version already exists. We should add support for this, so that the Content Translation tool loads the existing article contents and lets me expand it.

Proposed solution

The existing content on the target article can be shown on top of the translation, with actions to make it easy to move the existing paragraphs to the right place of the translation (or discard them). The idea is illustrated below:

  • A greyed-out area and a message explains that there is content for the current article.
  • "Discard all existing content" action allows to discard the previous content completely.
  • Actions to "cut" are provided for each paragraph. Users can use them to pick a paragraph to add it to the translation.

  • Once a paragraph is selected, several new options appear.
  • Each paragraph cut icon turns into a checkbox to allow users to select multiple paragraphs to be moved at once.
  • On the translation, an action to "paste" is made available between each paragraph. This allows to move the selected paragraphs there.
  • On the top of the selection area, an indicator of the items selected with options to delete the paragraphs (trashcan icon) or exit the paste mode ("done") are provided.

Related tickets capture some entry points to consider for this functionality:

Event Timeline

Gryllida created this task.Oct 7 2015, 3:39 AM
Gryllida raised the priority of this task from to Needs Triage.
Gryllida updated the task description. (Show Details)
Gryllida added a subscriber: Gryllida.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 7 2015, 3:39 AM
Pginer-WMF added a subscriber: Pginer-WMF.EditedOct 7 2015, 9:50 AM

This is a very relevant usecase, but we still need to figure out how can be solved for different situations. Loading a random existing article has some challenges when trying to present it side-by-side with a source article, especially if it was not created as a translation of it (i.e., how to figure out which paragraph corresponds to each one where the paragraph structure can be completely different).

For the specific case of articles that were created as a translation and have not been heavily modified since, we considered T102966.

For more general cases, currently it is possible to publish the translation in your user namespace which would allow you to do the merge with the current version manually. This process is not very obvious (which we try to improve in T105278) and can be better assisted (we also want to explore the process of translating and deciding where to add such translation as part of T103901).

Loading a random existing article has some challenges when trying to present it side-by-side with a source article, especially if it was not created as a translation of it (i.e., how to figure out which paragraph corresponds to each one where the paragraph structure can be completely different).

Load it without any corresponding relationship.

A _
B _
C _
_ D
_ E

Write an interface which lets the user move things around easily.

Load it without any corresponding relationship.

I think it is a totally valid approach, but still there are aspects we need to solve.

From the design side we need to figure out the details on how to (a) communicate what is the existing article, and (b) how to "move things around easily" considering that articles can be long and the pieces to move (sentences? paragraphs?) are rich editable elements. I added the Design tag to explore options for it in the future.

From the technical perspective, the scenario of creating new content has lower demands in terms of round-trip compared to the "extend existing content" scenario. If Content Translation does not support some templates yet (T102964), those can be ignored from the source article and the users still have enough information to create a good initial translation.
If we support extending existing articles we need to be able to load all their content (including templates) and be able to save it back, in order to make sure the content of the existing articles does not get lost in the process of adding new content.

Amire80 triaged this task as Normal priority.Oct 9 2015, 9:28 PM
Pginer-WMF updated the task description. (Show Details)Feb 4 2018, 9:39 AM

As part of the Wikimedia prehackathon, I made a quick design exploration to illustrate how the process could work. I added some mockups to the ticket description.

The existing content on the target article can be shown on top of the translation, with actions to make it easy to move the existing paragraphs to the right place of the translation (or discard them). The idea is illustrated below:

  • A greyed-out area and a message explains that there is content for the current article.
  • "Discard all existing content" action allows to discard the previous content completely.
  • Actions to "cut" are provided for each paragraph. Users can use them to pick a paragraph to add it to the translation.

  • Once a paragraph is selected, several new options appear.
  • Each paragraph cut icon turns into a checkbox to allow users to select multiple paragraphs to be moved at once.
  • On the translation, an action to "paste" is made available between each paragraph. This allows to move the selected paragraphs there.
  • On the top of the selection area, an indicator of the items selected with options to delete the paragraphs (trashcan icon) or exit the paste mode ("done") are provided.

Change 433752 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] WIP: Load stub articles

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

Arrbee moved this task from Bugs to Enhancements on the ContentTranslation board.Jun 22 2018, 1:38 PM
Pginer-WMF updated the task description. (Show Details)Aug 7 2018, 3:15 PM

This was requested by a user in this comment.