Page MenuHomePhabricator

Provide section order information in the section suggestions API
Closed, ResolvedPublic

Description

T243430: Basic service for mapping sections added a basic api for providing suggestions for sections to translate. However it is noted that the order of sections in "present" and "missing" need to be preserved so that we can present them in UI in that order.

Event Timeline

Change 616727 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] Provide section order information in the section suggestions API

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

Change 616727 merged by jenkins-bot:
[mediawiki/services/cxserver@master] Provide section order information in the section suggestions API

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

Change 618525 had a related patch set uploaded (by KartikMistry; owner: KartikMistry):
[operations/deployment-charts@master] Update cxserver to 2020-08-05-070016-production

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

Change 618525 merged by jenkins-bot:
[operations/deployment-charts@master] Update cxserver to 2020-08-05-070016-production

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

This is now deployed in Production and can be tested.

Example:
https://cxserver.wikimedia.org/v2/suggest/sections/Sitar/en/ml

{
  "sections": {
    "sourceLanguage": "en",
    "sourceTitle": "Sitar",
    "targetLanguage": "ml",
    "targetTitle": "സിത്താർ",
    "sourceSections": [
      "Etymology",
      "History",
      "General layout",
      "Construction styles",
      "Tuning",
      "Playing",
      "World music influence",
      "See also",
      "References",
      "External links"
    ],
    "targetSections": [
      "പ്രമുഖർ",
      "അവലംബം"
    ],
    "present": {
      "References": "അവലംബം"
    },
    "missing": {
      "Etymology": "പേരിന്റെ ഉത്ഭവം",
      "History": "ചരിത്രം",
      "Playing": "വായിക്കുന്ന രീതി",
      "See also": "ഇതും കാണുക",
      "External links": "പുറത്തേക്കുള്ള കണ്ണികൾ"
    }
  }
}

@Jpita You may just verify the above result and move