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:
- Visit Section Translation dashboard with target language set to a different language than "en", "es", "bn", "fr" or "de".
- Select an article to translate (from section suggestions) where appendix sections (e.g. "References", "Notes" etc) exist inside target article.
- 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.
- Refresh the page so that the page title is already prefilled inside "page" URL parameter.
- 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: