Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of go-translate #1

Merged
merged 14 commits into from Mar 22, 2019

Add README.md

  • Loading branch information
yrliou committed Mar 18, 2019
commit e1766c0f69fd01b0cea64ee65f78feb8ce367dd7
@@ -0,0 +1,40 @@
# Translation relay server for brave

`go-translate` implements a translation relay server for use in brave-core written in Go.

The intended audience for this server is all users of brave-core.

The translation relay server supports 2 endpoints

1) The `POST /translate` endpoint processes translate requests in Google format, sends corresponding requests in Microsoft format to Microsoft translate server, then returns responses in Google format back to the brave-core client.

2) The `GET /language` endpoint processes requests of getting the support language list in Google format, sends corresponding requests in Microsoft format to Microsoft translate server, then returns responses in Google format back to the brave-core client.

There are also a few static resources requested during in-page translation will be handled by go-translate and will be proxied through a brave to avoid introducing direct connection to any Google server.


## Dependencies

- Install Go 1.10 or later.
- `dep` is used to install the Go dependencies.
- `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`

## Setup

```
go get -d github.com/brave/go-translate
cd ~/go/src/github.com/brave/go-translate
dep ensure
```

## Run lint:

`make lint`

## Run tests:

`make test`

## Build and run go-translate:

`make build`
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.