Vitaliy Potapov

Results 102 comments of Vitaliy Potapov

thanks for explanation. so the correct code to catch error in nested pormise is: ``` js Q.ninvoke(db, 'collection', 'users') .then(function(collection) { return Q.ninvoke(collection, 'findOne', {url: id}) .then(function(item) { throw new...

This lib is for Node.js.

> It doesn't work in browser because it uses cross origin requests. I made it work here [google-translate-api-browser](https://github.com/cjvnjde/google-translate-api-browser). It uses [cors-anywhere](https://github.com/Rob--W/cors-anywhere) I think you should definitely mention that all requests...

I was also getting 403 but for another reason. It was caused by getting incorrect token in dependency module [google-translate-token](https://github.com/matheuss/google-translate-token), see [#12](https://github.com/matheuss/google-translate-token/issues/12) (there is already working pr). The url above...

> So, what's the best practice? Will somebody fix this bug? I forked [google-translate-api](https://github.com/vitalets/google-translate-api) and [google-translate-token](https://github.com/vitalets/google-translate-token) and made it work. You can try by installing: ```js npm i vitalets/google-translate-api ```...

> Could you publish it to npm? @vitalets I can make a scoped package, but frankly speaking I'm not a fan of many similar packages in npm. Hi @matheuss, could...

@P0oOOOo0YA I will re-check. Thanks!

I've published to npm working scoped package [@vitalets/google-translate-api](https://www.npmjs.com/package/@vitalets/google-translate-api): ```bash npm install @vitalets/google-translate-api ``` After install don't forget to use scope in `require`: ``` -- const translate = require('google-translate-api'); ++ const...

> gtx no longer functions correctly. > > After looking at it it seems to be a way for Google Translate Plugin to receive translations without creating a token. Thus...

> Maybe someone should create a fork of this and keep it updated ? Done in https://github.com/vitalets/google-translate-api/pull/2.