Skip to content

Commit

Permalink
fix autotests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Oct 18, 2022
1 parent 1c0045c commit 293ddb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/autotests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [12, 14]
node-version: [14, 16]

steps:
- uses: actions/checkout@v1
Expand All @@ -30,13 +30,3 @@ jobs:

- name: run tests
run: npm test

- name: Generate lcov report
if: matrix.node-version == 14
run: npx nyc report --reporter=lcov

- name: Run coveralls
uses: coverallsapp/github-action@master
if: matrix.node-version == 14
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# google-translate-api
[![Actions Status](https://github.com/vitalets/google-translate-api/workflows/autotests/badge.svg)](https://github.com/vitalets/google-translate-api/actions)
[![NPM version](https://img.shields.io/npm/v/@vitalets/google-translate-api.svg)](https://www.npmjs.com/package/@vitalets/google-translate-api)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![Coverage Status](https://coveralls.io/repos/github/vitalets/google-translate-api/badge.svg?branch=master)](https://coveralls.io/github/vitalets/google-translate-api?branch=master)

A **free** and **unlimited** API for Google Translate :dollar: :no_entry_sign: for Node.js.

In version 9+ library was fully rewritten. For **legacy version (<=8)** please see [README_legacy.md](/README_legacy.md)
**In version 9+ library was fully rewritten. For legacy versions (<=8) please see [legacy branch](https://github.com/vitalets/google-translate-api/tree/legacy).**

## Features
## Features

- Auto language detection
- Spelling correction
- Language correction
- Language correction
- Fast and reliable – it uses the same servers that [translate.google.com](https://translate.google.com) uses

## Why this fork?
Expand All @@ -29,7 +27,7 @@ This fork of original [matheuss/google-translate-api](https://github.com/matheus
- Added TypeScript definitions (see [#50](https://github.com/vitalets/google-translate-api/pull/50), thanks to [@olavoparno](https://github.com/olavoparno))
- Migrated to Google's latest batch-style RPC API (see [#60](https://github.com/vitalets/google-translate-api/pull/60), thanks to [@vkedwardli](https://github.com/vkedwardli))

## Install
## Install

```
npm install @vitalets/google-translate-api
Expand All @@ -53,7 +51,7 @@ If server returns **Response code 403 (Forbidden)** try set option `client=gtx`:
const res = await translate('Ik spreek Engels', { to: 'en', client: 'gtx' }).then(res => { ... });
```

> Please note that maximum text length for single translation call is **5000** characters.
> Please note that maximum text length for single translation call is **5000** characters.
> In case of longer text you should split it on chunks, see [#20](https://github.com/vitalets/google-translate-api/issues/20).
### Autocorrect
Expand Down Expand Up @@ -86,7 +84,7 @@ You can use **proxy** to bypass them:
const tunnel = require('tunnel');
translate('Ik spreek Engels', {to: 'en'}, {
agent: tunnel.httpsOverHttp({
proxy: {
proxy: {
host: 'whateverhost',
proxyAuth: 'user:pass',
port: '8080',
Expand Down

0 comments on commit 293ddb2

Please sign in to comment.