Although, the initial plan was to support suggestions based on user's previous edits, this feature was never implemented for Section Translation/Unified Dashboard. This task is created to capture the design specifications and the implementation plan for it.
Current implementation
Since the creation of Section Translation, page and section suggestions has been based on previously published translations (CX) from the source to the target language. More specifically, we fetch up to 200 such translated articles, and we use these articles as seeds to fetch page suggestions to translate from the Recommendation API. However, given that the Recommendation API doesn't support section translation suggestions, for section suggestions we use such translated articles, and check for each article if there are sections available to translate to the target language, and if so, we display these articles as section suggestions.
Proposed approach
For page suggestions, we already use the Recommendation API which can provide multiple (up to 500) suggestions based on just one seed. So, for the sake of this task, we only need to properly get article seeds that are based on user's previous edits. This can be done based on the following order:
- If the user has published any translations using CX/SX, then we should use these published translations as seeds.
- If no published translations exist for the given user, we should fetch user's previous edits (any kind of edit) in the source wiki, and use the edited articles as seeds.
- If no edits by the user in the source wiki exist, we should fetch the user's previous edits in the target wiki. Given that the suggestion seed titles should be article titles in the source wiki, this case requires another request to fetch the sitelinks for these edited articles, so that we can use the corresponding article titles in the source language - if such sitelink exists.
- If no valid suggestion seeds have been found from the previous cases, we should fall back to our current approach (CX published translations). However, we may need to communicate to the user that we do not provide suggestions based on previous edits, since we were not able to find the required suggestion seeds for them.
For section suggestions, things get more complicated, as we need at least one seed per section suggestion - as each seed is not guaranteed to provide such a suggestion, we only get a section suggestion if CXServer API finds missing non-appendix sections to translate for the given seed article. For this reason, my suggested approach here would be to implement a new API endpoint inside the Recommendation API, that uses the CXServer API to provide several valid section suggestions, based on just one seed, in a similar way that multiple suggestions are provided for a given seed for page translations.