Page MenuHomePhabricator

SX: Appendix titles are not fetched when page title for translation is prefilled in URL params
Closed, ResolvedPublicBUG REPORT

Description

Appendix titles in target language are needed to be available for two different functionalities:
a. to filter out section suggestions that only contain appendix sections, from the Dashboard suggestions
b. to properly position the section to be translated before appendix sections (if such sections exist).

The first functionality (a) is properly working in all cases, since the appendix titles are always fetched before the suggestions are being fetched.
However, regarding the second functionality (b) there are some corner cases, when appendix titles are not fetched and the section is positioned wrongfully, at the end of the article. More specifically, when the page title is prefilled inside URL params, the suggestion initialization is skipped and so is the fetching of the appendix titles, leading to empty appendix target titles, which leads to the wrong positioning of the section at the bottom of the target article.

Steps to reproduce:

  1. Visit Section Translation dashboard with target language set to a different language than "en", "es", "bn", "fr" or "de".
  2. Select an article to translate (from section suggestions) where appendix sections (e.g. "References", "Notes" etc) exist inside target article.
  3. Proceed to "Compare contents" step and click on the "Full article in {target language}" option. Scroll to the bottom of the page and see the new section placeholder (a light blue banner) just above the first appendix section present inside target article.
  4. Refresh the page so that the page title is already prefilled inside "page" URL parameter.
  5. Go to "Compare contents" > "Full article in {target language}" option again. Scroll to the bottom of the page and see the new section placeholder positioned (wrongfully) at the bottom of the target article.

Screencasts of the above steps:

Event Timeline

ngkountas triaged this task as Medium priority.

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

[mediawiki/extensions/ContentTranslation@master] SX: Ensure appendix titles are fetched in "Confirm translation" step

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

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

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

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

Change 810314 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Ensure appendix titles are fetched in "Confirm translation" step

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

Change 810859 merged by jenkins-bot:

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

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

@ngkountas using the article "NneNne Iwuji-Eme", I did try to translate the "early life and career" section from "en" to "ig" and when I navigate to the "full article in igbo", I see the new section placeholder at the bottom of the targer article ( even after refreshing). That is expected ?

See video

@EChukwukere-WMF this behaviour is expected because the "References" section title is not considered an appendix title for "ig" wiki. Since there is no appendix title found, the section placeholder is correctly positioned at the bottom of the target article. This endpoint returns the section titles that are considered as references for the "ig" wiki, and as you can check the "References" title is missing from the result.

@ngkountas thanks for the clarification.

Testing status: QA PASS

Screen Shot 2022-09-13 at 11.31.15 PM.png (745×399 px, 243 KB)