Page MenuHomePhabricator

/v2/translate API fails to perform any translation when no provider is provided
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The response has the same HTML: <p>Hello, world</p>

What should have happened instead?:
The response should be translated: <p>Hola Mundo</p>

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Cxserver version 1.2.1

Event Timeline

abi_ triaged this task as Medium priority.
abi_ updated the task description. (Show Details)
abi_ set the point value for this task to 2.

Change #1119179 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/services/cxserver@master] Use default provider if none is provided when making MT translations

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

Change #1119179 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Use default provider if none is provided when making MT translations

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

Change #1119478 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2025-02-13-102531-production

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

Change #1119478 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2025-02-13-102531-production

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

Mentioned in SAL (#wikimedia-operations) [2025-02-13T13:04:01Z] <kart_> Updated Cxserver to 2025-02-13-102531-production (T381943, T386231)

abi_ moved this task from Need QA to Done on the LPL Essential (LPL Essential 2025 Feb-Mar) board.

This was happening because the code was returning early instead of using the default provider when an MT engine was not selected. Testing with Spanish now returns Authorization header is missing. Translating to Hindi, returns expected results:

{
  "contents": "<p>नमस्कार, दुनिया</p>"
}