Translations never do anything with the API always returning an empty string

Description

Whenever I click translate email it just does nothing. I opened dev tools and the result is always empty. Using manjaro linux through a snap, which I thought might be missing something, so moved to using a package compiled using the AUR and it still has the same issue.

To Reproduce…

Steps to reproduce the behavior:

  1. Go to any Spanish written email
  2. Click translate to English
  3. No result

Expected Behavior

It translates and replaces text.

Setup

  • OS: Linux 5.8.11-1-MANJARO x86_64 20.1 Mikah
  • Mailspring Version: AUR and Snap both 1.7.8

Additional Context

This hasn’t worked since installing weeks ago. I have searched issues and not seen this come up for anyone else. But since I can inspect the network request and see that it just returns an empty result it must be an issue for everyone.

Here is a full request from devtools

Request URL: https://id.getmailspring.com/api/translate
Request Method: POST
Status Code: 200 OK
Remote Address: 107.20.76.229:443

Response Headers

HTTP/1.1 200 OK
cache-control: no-cache
content-encoding: gzip
content-type: application/json; charset=utf-8
Date: Tue, 06 Oct 2020 20:37:35 GMT
vary: accept-encoding
transfer-encoding: chunked
Connection: keep-alive

Request Headers

POST /api/translate HTTP/1.1
Host: id.getmailspring.com
Connection: keep-alive
Content-Length: 80
accept: application/json
Origin: null
authorization: Basic [secret]
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Mailspring/1.7.8 Chrome/69.0.3497.128 Electron/4.2.2 Safari/537.36
content-type: application/json
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US

Request Payload

{ "lang":"en", "text":"<b>Gracias Rodrigo, </b><b>Cuidensee </b>", "format":"html" }

Response

{"result":""}

(Originally posted by robclancy on GitHub.)

Description

Messages are not translated despite the blue box showing “Mailspring has translated your message into English”, whether it is after clicking translate button or whether it is set on “always”

To Reproduce…

Steps to reproduce the behavior:

  1. Go to a message
  2. Click on ‘Translate’
  3. You see “Mailspring has translated your message into English”
  4. But the text is not translated

Expected behavior

Text translated with Translation button has been clicked or when Always translate has been activated.

Setup

  • OS: Debian [stable]
  • Mailspring Version: 1.7.8

(Originally posted by phylophyl on GitHub.)

I can confirm this myself on Mailspring 1.8.0 on Ubuntu 20.04.

I suspect both bugs have the same cause: the API has probably changed, and thus is now always returning an empty string.

1 Like

Update: @bengotow has diagnosed the problem to be related to the API we were using for this. We’re switching APIs, and the next release should fix this problem.

1 Like