Page MenuHomePhabricator

Section Translation: Compare the contents before translating
Open, MediumPublic

Description

As part of the Section translation workflow (T243495), allow users to preview the contents of the section to translate and the contents already present in the target article, to confirm their initial selection.

This is an intermediate step that is the continuation of the initial section selection (T241587) and leads to the translation editor (on desktop: the one-section mode of Content Translation; on mobile: a custom mobile editor).

View this step in prototype for a general overview.

General concept

Once users have selected a section, they can compare the contents in both languages. In this way, they can check what they are going to translate and how that fits in the current contents of the target article. From this point, users can confirm the selection to start translating, or go back to pick a different section.

OverviewLayout diagramLayout detail

As part of the Section translation workflow, users are provided a view to preview the contents before starting the translation:

  • Tabs are provided for the user so view the source section and the whole target article.
    • A placeholder is shown in the target article view to indicate where the translated section will be added.
  • Navigation: users can go back to the section selection menu (T241587), or move through the next/previous section.
  • "Translate this section" option leads users to the translation view to translate the section (Content translation editor on desktop, or the mobile translation editor, when available, on mobile).
    • When scrolling a sticky header will keep the translation action visible.
  • The solution will be responsive to support both mobile and desktop devices.

Below are described in more detail the different pieces supporting this step.

Header

Source and Target selector

Contents

Sticky Header

Contents to review can be long. As users get immersed in reviewing these contents it is useful to keep the main actions at hand. A sticky header will be shown to provide easy access as the user scrolls down past the main actions.

Sections already present

Most of the time, users will pick a section that is missing in the target article in the "Pick a section" step (T241587). However, it is possible for them to select an existing section. In those cases, the user will be informed of the implications and provided an option to ignore the section found in case it was mapped incorrectly.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 30 2019, 3:23 PM
Pginer-WMF triaged this task as Medium priority.Dec 30 2019, 3:24 PM
Pginer-WMF updated the task description. (Show Details)Jan 23 2020, 10:26 AM
Pginer-WMF renamed this task from Section Translation: Preview section before translating to Section Translation: Compare the contents before translating.Apr 14 2020, 9:58 AM
Pginer-WMF updated the task description. (Show Details)

Change 606169 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SX Compare Contents: Create component skeleton

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

Pginer-WMF updated the task description. (Show Details)Jul 13 2020, 2:27 PM

Change 612369 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXContentComparor: Add support for present sections

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

Change 612386 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXContentComparor: Add section navigation

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

Change 606169 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SX Compare Contents: Create component skeleton

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

Change 615222 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add discard section functionality

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

Change 615223 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add new section placeholder for present sections

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

Change 612369 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add support for present sections

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

Change 612386 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add section navigation

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

Change 615222 merged by Nik Gkountas:
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add discard section functionality

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

Change 615223 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add new section placeholder for present sections

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

I cannot start a translation in https://sx.wmflabs.org/

See the main page of that wiki for instructions. The big "New Translation" button is not implemented yet. You need to use URL params - an example is given in the main page of that wiki

When I try to follow the example in the testing sever to translate the "Legal status" section of the Moon article, I'm able to view the target article, but the source tab hows blank with a console error:

Uncaught (in promise) TypeError: Cannot read property 'innerHTML' of null

at new t (load.php?lang=es&modules=jquery|mw.cx3&skin=vector&version=1m4gn:156)
at load.php?lang=es&modules=jquery|mw.cx3&skin=vector&version=1m4gn:156
at Array.map (<anonymous>)
at load.php?lang=es&modules=jquery|mw.cx3&skin=vector&version=1m4gn:156
Jpita added a comment.Wed, Sep 9, 2:49 PM

When I try to follow the example in the testing sever to translate the "Legal status" section of the Moon article, I'm able to view the target article, but the source tab hows blank with a console error:

Uncaught (in promise) TypeError: Cannot read property 'innerHTML' of null

at new t (load.php?lang=es&modules=jquery|mw.cx3&skin=vector&version=1m4gn:156)
at load.php?lang=es&modules=jquery|mw.cx3&skin=vector&version=1m4gn:156
at Array.map (<anonymous>)
at load.php?lang=es&modules=jquery|mw.cx3&skin=vector&version=1m4gn:156

I see the same issue as you.
for testing I've been told by the devs to use this link
https://sx.wmflabs.org/index.php?title=Special%3AContentTranslation&from=en&to=es&sx=true&page=Vlasovite&targettitle=Vlasovite#/sx/content-comparator
and click the Vlasovite article under Expand with new sections

@Pginer-WMF I can't see this section in sx.wmflabs.org, is this not implemented yet (as in, will be in another task) or should be implementedin this task?

Pginer-WMF added a comment.EditedThu, Sep 10, 9:40 AM

@Pginer-WMF I can't see this section in sx.wmflabs.org, is this not implemented yet (as in, will be in another task) or should be implementedin this task?

Yes. That's covered in T259492: Compare the contents: Show new section placeholder where the new section will be added

For large tickets (most of those starting with "Section Translation: ___" in the title, I was creating sub-tasks to have more specific tickets. The general ones are kept to provide a more holistic overview. As Nik pointed, we may want to keep the large ones in the backlog, until the small ones are completed. Then, the large ones can be useful as a general review.

Pginer-WMF updated the task description. (Show Details)Mon, Sep 14, 9:17 AM
Jony added a subscriber: Jony.Sat, Sep 26, 4:39 PM