funkyremi / vscode-google-translate

Translate text right in your code
MIT License
133 stars 39 forks source link

Add custom Google Translate API key #14

Open funkyremi opened 5 years ago

funkyremi commented 5 years ago

Add the ability to set and use the user Google Translate API key.

https://www.npmjs.com/package/@google-cloud/translate

davorpa commented 4 years ago

Hi

It's a enhacement good because sometimes translation also throws a 403 http status code #43

Executing... vscode-translate-1

Error notification vscode-translate-err

funkyremi commented 4 years ago

Hey :-) Do you want to make a pull request for this one?

davorpa commented 4 years ago

Sorry @funkyremi, at this moment i don't know how to develop vscode extensions 😣

oshliaer commented 3 years ago

@funkyremi I'll try.

oshliaer commented 3 years ago

I used GT only via a projectID and I don't know is there any API key possibility?

funkyremi commented 3 years ago

Cool thank you @contributorpw 👍 You can use whatever is suggested by Google documentation : https://cloud.google.com/translate/docs/basic/quickstart#translate_translate_text-nodejs

EliteMasterEric commented 3 years ago

Don't forget to add documention providing a guide on how to get a key, once this PR is completed.

oshliaer commented 3 years ago

Presently libraries aka 'A free and unlimited API for Google Translate' use special code to generate a client-side shared token. So they use a different endpoint to call the API.

It looks like connecting the Google Translate API will require an interface to interact with the add-on. We need a common interface to connect all possible translation libraries as needed.