GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — introduce Translate API by stephenplusplus · Pull Request #1023 · googleapis/google-cloud-node

Conversation

@stephenplusplus

@stephenplusplus stephenplusplus commented Dec 15, 2015

Copy link
Copy Markdown
Contributor

Fixes #977

To Dos

  • Enable Translate API for Travis account
  • Set env var in Travis for API key
  • Docs
  • Tests
    • Unit
    • System

Preview

var gcloud = require('gcloud');

var translate = gcloud.translate({
  key: 'API Key'
});

// Translate a string of text.
translate.translate('Hello', 'es', function(err, translation) {
  if (!err) {
    // translation = 'Hola'
  }
});

// Detect a language from a string of text.
translate.detect('Hello', function(err, results) {
  if (!err) {
    // results = {
    //   language: 'en',
    //   confidence: 1,
    //   input: 'Hello'
    // }
  }
});

// Get a list of supported languages.
translate.getLanguages(function(err, languages) {
  if (!err) {
    // languages = [
    //   'af',
    //   'ar',
    //   'az',
    //   ...
    // ]
  }
});

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@stephenplusplus stephenplusplus added the don't merge label Dec 15, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 15, 2015
@stephenplusplus
stephenplusplus force-pushed the spp--translate branch 2 times, most recently from 0d3ac92 to 12d1d4a Compare December 15, 2015 17:59
@stephenplusplus stephenplusplus added the api: translate Issues related to the Cloud Translation API. label Dec 15, 2015
@stephenplusplus

stephenplusplus commented Dec 15, 2015

Copy link
Copy Markdown
Contributor Author

@callmehiphop PTAQL. This one's pretty small. I just want to be sure I'm not doing anything too crazy before locking it up with the unit tests.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

callmehiphop
callmehiphop reviewed Dec 15, 2015
View reviewed changes
Comment thread lib/translate/index.js Outdated

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@callmehiphop

callmehiphop commented Dec 15, 2015

Copy link
Copy Markdown
Contributor

@stephenplusplus LGTM :) unit test away!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Dec 16, 2015

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jgeewax
jgeewax reviewed Dec 16, 2015
View reviewed changes
Comment thread README.md Outdated

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jgeewax

jgeewax commented Dec 16, 2015

Copy link
Copy Markdown
Contributor

/cc @ilsung

Does Translate work with service account credentials (ie, keyfile.json) ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus stephenplusplus removed the don't merge label Dec 16, 2015
@stephenplusplus

stephenplusplus commented Dec 16, 2015

Copy link
Copy Markdown
Contributor Author

Tests added: stephenplusplus@1ebcde0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus force-pushed the spp--translate branch from 1ebcde0 to a72427a Compare December 18, 2015 16:43
@stephenplusplus stephenplusplus added the status: blocked Resolving the issue is dependent on other work. label Dec 22, 2015
@stephenplusplus

stephenplusplus commented Dec 22, 2015

Copy link
Copy Markdown
Contributor Author

Marking as blocked until we hear from @ilsung about authenticating with a service account keyfile. (Thanks in advance for your help!)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
introduce Translate API.
027a4ba
@stephenplusplus
stephenplusplus force-pushed the spp--translate branch from a72427a to 027a4ba Compare December 22, 2015 17:55
@ilsung

ilsung commented Jan 4, 2016

Copy link
Copy Markdown

Sorry for the delay -- No, the Translate API does not support service account creds since it doesn't use OAuth. A key is required.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus stephenplusplus removed the status: blocked Resolving the issue is dependent on other work. label Jan 4, 2016
@stephenplusplus

stephenplusplus commented Jan 4, 2016

Copy link
Copy Markdown
Contributor Author

Thanks for clearing that up.

@callmehiphop if this LGTY, merge away.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

callmehiphop added a commit that referenced this pull request Jan 4, 2016
@callmehiphop
Merge pull request #1023 from stephenplusplus/spp--translate
00dfae9
introduce Translate API
@callmehiphop
callmehiphop merged commit 00dfae9 into googleapis:master Jan 4, 2016
@callmehiphop

callmehiphop commented Jan 4, 2016

Copy link
Copy Markdown
Contributor

🍰

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miguelvelezsa pushed a commit that referenced this pull request Jul 23, 2025
@release-please
chore: release 2.15.0 (#1023)
2690a88
🤖 I have created a release \*beep\* \*boop\*
---
## [2.15.0](https://www.github.com/googleapis/gax-nodejs/compare/v2.14.1...v2.15.0) (2021-06-10)


### Features

* expose cert and key for mTLS ([#1014](https://www.github.com/googleapis/gax-nodejs/issues/1014)) ([f025fc1](https://www.github.com/googleapis/gax-nodejs/commit/f025fc155c505792bc74929a7803a2df63c331cd))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this pull request Feb 3, 2026
@steffnay
feat: Add jobs.delete and update to latest discovery types (#1023)
2e2a70a
* feat: add jobs.delete

* fix test

* refactor

* lint

* lint

* update jobs test

* refactor

* lint

* remove unnecessary DeleteCallback

* remove unnecessary DeleteCallback

* update

* add deleteJobs() to system-test to delete stale job resources

* remove unnecessary jobs cleanup
sofisl pushed a commit that referenced this pull request Feb 3, 2026
@release-please
chore: release 5.10.0 (#1059)
e41360f
🤖 I have created a release \*beep\* \*boop\*
---
## [5.10.0](https://www.github.com/googleapis/nodejs-bigquery/compare/v5.9.3...v5.10.0) (2022-01-10)


### Features

* Add jobs.delete and update to latest discovery types ([#1023](https://www.github.com/googleapis/nodejs-bigquery/issues/1023)) ([12f7771](https://www.github.com/googleapis/nodejs-bigquery/commit/12f77710accfca8c512d021a1c75a732c6c666f7))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
GautamSharda pushed a commit that referenced this pull request Mar 5, 2026
@JustinBeckwith @freelerobot
fix(deps): remove dependency on through2 (#1023)
4f07e88
* fix(deps): remove dependency on through2

* nothru!

Co-authored-by: Nicole Zhu <[email protected]>
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@release-please
chore: release 2.2.0 (#1023)
91982a8
🤖 I have created a release \*beep\* \*boop\* 
---
## [2.2.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.1.0...v2.2.0) (2020-07-09)


### Features

* add flow control settings for StreamingPullRequest to pubsub.proto ([#1035](https://www.github.com/googleapis/nodejs-pubsub/issues/1035)) ([a7dff65](https://www.github.com/googleapis/nodejs-pubsub/commit/a7dff65c1a4115e75251b775f679e6beb092928e))
* move ts target to es2018 from es2016 ([#1022](https://www.github.com/googleapis/nodejs-pubsub/issues/1022)) ([016568d](https://www.github.com/googleapis/nodejs-pubsub/commit/016568df466c2a543762ab4f194b785a426ad880))
* Re-export ClientConfig from pubsub.ts in package index.ts ([#1038](https://www.github.com/googleapis/nodejs-pubsub/issues/1038)) ([c2ac083](https://www.github.com/googleapis/nodejs-pubsub/commit/c2ac083fdb5f3b71dcb3be482b8ee5c9d527342d)), closes [#972](https://www.github.com/googleapis/nodejs-pubsub/issues/972)


### Bug Fixes

* handle fallback option properly ([#1028](https://www.github.com/googleapis/nodejs-pubsub/issues/1028)) ([5dc1827](https://www.github.com/googleapis/nodejs-pubsub/commit/5dc18270220dbf39f5a871716b4dd9d002d0c536))
* update node issue template ([#1033](https://www.github.com/googleapis/nodejs-pubsub/issues/1033)) ([52ba0ae](https://www.github.com/googleapis/nodejs-pubsub/commit/52ba0ae0218c0859a03d8ad9e4f27130ceb4cc61))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: translate Issues related to the Cloud Translation API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@stephenplusplus @callmehiphop @jgeewax @ilsung @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.