Page MenuHomePhabricator

Section translation Desktop editor: basic publishing of a section
Closed, ResolvedPublic

Description

As part of the work to adapt Content Translation editor to translate a single section (T234323), this ticket is focused on supporting the publishing step. Publishing a section is different than publishing a new article so a number of adjustments may be required. This ticket proposes to start with simple publishing and leave for future tickets other considerations such as finding the right position, dealing with existing sections, publishing on the sandbox, etc.

Details. For the basic publishing support we'll consider the following:

  • Publishing will add the translated section to the target article at the end.
    • If it were trivial to reuse the approach to find a better position, it can be considered. Otherwise, a better position will be a follow-up ticket.
  • Publishing setting menu will be hidden (until options to deal with section conflict and publishing to sandbox are supported).
  • Once publishing is completed, the usual confirmation message will be shown. In this case, linking to the specific published section.
  • Publishing must not affect (changing or overwriting) other contents in the page.

Additional considerations. The publishing process is a complex step where different systems may intersect and some may not work as expected when the content is a section (as opposed to a full article). In order to avoid scope creep we may want to identify issues, disable necessary systems for this case if adapting them requires additional effort and create follow-up tickets for the needed improvements. Some of the aspects to consider:

  • Saving the translation data: during translaiton (auto-save) and when publishing (in paralell corpora)
  • Quality checks: edit/abuse filters, MT limit calculations...

Event Timeline

Change 824126 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] Basic Publishing of section translation from desktop

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

Change 824198 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: Do not modify target title on section title change

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

Change 824199 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: first working implementation of publishing

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

Change 824126 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Basic Publishing of section translation from desktop

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

Change 824198 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: Add SectionTitleWidget and SectionTitleModel classes

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

Change 825767 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: fix CAPTCHA support

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

Change 825768 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: fix error on editing enablement after publishing

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

Change 824199 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: first working implementation of publishing

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

Change 825767 merged by Santhosh:

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: fix CAPTCHA support

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

Change 825768 merged by Santhosh:

[mediawiki/extensions/ContentTranslation@master] SX in Desktop: fix error on editing enablement after publishing

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

Change 827948 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Move section position calculation to server-side

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

Change 828757 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Move section title prepending to server-side

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

Change 827951 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX section positioning: Use "prependtext" param in "edit" API request

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

Change 827948 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Move section position calculation logic to server-side

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

Change 827951 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX section positioning: Use "prependtext" param in "edit" API request

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

Change 837265 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20221003

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

Change 828757 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Move section title prepending to server-side

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

The functionality seems to work properly on production wikis, as demonstrated in the screencast below - from Greek (el) wikipedia:

I'm moving this back to "Needs QA" column.

Note to QA: Unfortunately, this feature has to be tested on production wikis only, because section positioning (which causes the "missing" section title issue that is demonstrated in the screenshots of the previous message) doesn't work properly for the test wiki. The format of the URL to be used to access the section translation on desktop is:
https://el.wikipedia.org/w/index.php?title=Special:ContentTranslation&from=en&to=el&page=Morrosaurus&sourcesection=Discovery, where "Morrosaurus" can be replaced with any page title and "Discovery" with any section title of the page.