thuantan2060 / comment-translator

Comment translator is extension for Visual Studio 2017. It make easy way to translate comment in editor. Sorry everyone because I'm focusing in another project so that I don't have enough time to take care this project anymore. If you want to modify this project feel free to fork it. Thanks! API repository: https://github.com/thuantan2060/comment-translator-api
Other
17 stars 12 forks source link

Default server URL reports 'Gateway Timeout' on all translation attempts #5

Closed DougSchmidt-AI closed 6 years ago

DougSchmidt-AI commented 6 years ago

Installed product versions

Description

All translation attempts report 'Gateway Timeout' after 30 seconds.

Steps to recreate

  1. Install the Comment Translator extension and restart Visual Studio
  2. Configure the extension as follows
Option Value
Server.Translate Server Url http://mti-translate-api-mti-translate-api.a3c1.starter-us-west-1.openshiftapps.com (this is the default value for the URL)
Translate.Auto detect language True
Translate.Auto translate comment True
Translate.From Language es-SP
Translate.To Language en-US

The intent of this configuration is to translate from Spanish to English.

  1. Restart Visual Studio to ensure configuration settings take effect
  2. Try to translate a comment. The translating... hovertip shows for 30 seconds, then says 'Gateway Timeout'

Current behavior

The translation request is being sent to the configured server URL. But the server is failing after 30 seconds with a 504 - Gateway Timeout status.

Request captured via Fiddler trying to translate "NivelInicio":

POST http://mti-translate-api-mti-translate-api.a3c1.starter-us-west-1.openshiftapps.com/api/translate HTTP/1.1
from-language: es-SP
to-language: en-US
auto-detect-language: True
Content-Type: application/text; charset=UTF-8
Host: mti-translate-api-mti-translate-api.a3c1.starter-us-west-1.openshiftapps.com
Content-Length: 11
Expect: 100-continue
Connection: Keep-Alive

NivelInicio

Response from server after 30 seconds:

HTTP/1.0 504 Gateway Time-out
Cache-Control: no-cache
Connection: close
Content-Type: text/html

<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>

Expected behavior

I'd expect the translation to come back as "Home Level"

thuantan2060 commented 6 years ago

Thank you for your response @schmidt4brains. I'am sorry about that. I use free server so some time it will off. I will move my server to other server soon.