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

translate: rebrand #1885

Merged
merged 1 commit into from
Dec 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 71 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ This client supports the following Google Cloud Platform services at an [Alpha](
* [Google Cloud Pub/Sub](#google-cloud-pubsub-alpha) (Alpha)
* [Google Cloud Resource Manager](#google-cloud-resource-manager-alpha) (Alpha)
* [Google Cloud Speech](#google-cloud-speech-alpha) (Alpha)
* [Google Cloud Translation API](#google-cloud-translation-api-alpha) (Alpha)
* [Google Cloud Vision](#google-cloud-vision-alpha) (Alpha)
* [Google Compute Engine](#google-compute-engine-alpha) (Alpha)
* [Google Prediction API](#google-prediction-api-alpha) (Alpha)
* [Google Stackdriver Monitoring](#google-stackdriver-monitoring-alpha) (Alpha)
* [Google Translate API](#google-translate-api-alpha) (Alpha)

If you need support for other Google APIs, check out the [Google Node.js API Client library][googleapis].

Expand Down Expand Up @@ -85,9 +85,9 @@ If you are not running this client on Google Cloud Platform, you need a Google D
* Google Cloud Speech API
* Google Cloud Storage
* Google Cloud Storage JSON API
* Google Cloud Translation API
* Google Cloud Vision API
* Google Compute Engine API
* Google Translate API
* Prediction API
* Stackdriver Logging API
4. Navigate to **APIs & auth** > **Credentials** and then:
Expand Down Expand Up @@ -796,6 +796,75 @@ fs.createReadStream('./audio.raw')
```


## Google Cloud Translation API (Alpha)

- [API Documentation][gcloud-translate-docs]
- [Official Documentation][cloud-translate-docs]

#### Using the all-in-one module

```
$ npm install --save google-cloud
```

```js
var gcloud = require('google-cloud');
var translate = gcloud.translate;

This comment was marked as spam.

```

#### Using the Google Translate API module

This comment was marked as spam.


```
$ npm install --save @google-cloud/translate
```

```js
var translate = require('@google-cloud/translate');
```

#### Preview

```js
// Authenticating on a per-API-basis. You don't need to do this if you auth on a
// global basis (see Authentication section above).

var translateClient = translate({
projectId: 'grape-spaceship-123',
keyFilename: '/path/to/keyfile.json'
});

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

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

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


## Google Cloud Vision (Alpha)

- [API Documentation][gcloud-vision-docs]
Expand Down Expand Up @@ -1089,75 +1158,6 @@ var monitoringClient = monitoring.v3({
```


## Google Translate API (Alpha)

- [API Documentation][gcloud-translate-docs]
- [Official Documentation][cloud-translate-docs]

#### Using the all-in-one module

```
$ npm install --save google-cloud
```

```js
var gcloud = require('google-cloud');
var translate = gcloud.translate;
```

#### Using the Google Translate API module

```
$ npm install --save @google-cloud/translate
```

```js
var translate = require('@google-cloud/translate');
```

#### Preview

```js
// Authenticating on a per-API-basis. You don't need to do this if you auth on a
// global basis (see Authentication section above).

var translateClient = translate({
projectId: 'grape-spaceship-123',
keyFilename: '/path/to/keyfile.json'
});

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

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

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


## Versioning

This library follows [Semantic Versioning][semver].
Expand All @@ -1169,7 +1169,6 @@ Please note it is currently under active development. Any release versioned 0.x.
**Alpha**: Libraries defined at an Alpha quality level are still a work-in-progress and are more likely to get backwards-incompatible updates.



## Contributing

Contributions to this library are always welcome and highly encouraged.
Expand Down
8 changes: 4 additions & 4 deletions packages/google-cloud/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,11 @@ var apis = {
storage: require('@google-cloud/storage'),

/**
* With [Google Translate](https://cloud.google.com/translate), you can
* dynamically translate text between thousands of language pairs.
* With [Google Cloud Translation](https://cloud.google.com/translate), you
* can dynamically translate text between thousands of language pairs.
*
* The Google Translate API lets websites and programs integrate with Google
* Translate programmatically.
* This API lets websites and programs integrate with Google Cloud Translation
* API programmatically.
*
* @type {module:translate}
*
Expand Down
6 changes: 3 additions & 3 deletions packages/translate/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @google-cloud/translate ([Alpha][versioning])
> Google Translate API Client Library for Node.js
> Google Cloud Translation API Client Library for Node.js
*Looking for more Google APIs than just Translate? You might want to check out [`google-cloud`][google-cloud].*
*Looking for more Google APIs than just Translation? You might want to check out [`google-cloud`][google-cloud].*

- [API Documentation][gcloud-translate-docs]
- [Official Documentation][cloud-translate-docs]
Expand Down Expand Up @@ -78,7 +78,7 @@ If you are not running this client on Google Cloud Platform, you need a Google D
1. Visit the [Google Developers Console][dev-console].
2. Create a new project or click on an existing project.
3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services):
* Google Translate API
* Google Cloud Translation API
4. Navigate to **APIs & auth** > **Credentials** and then:
* If you want to use a new service account key, click on **Create credentials** and select **Service account key**. After the account key is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests.
* If you want to generate a new service account key for an existing service account, click on **Generate new JSON key** and download the JSON key file.
Expand Down
2 changes: 1 addition & 1 deletion packages/translate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@google-cloud/translate",
"version": "0.6.0",
"author": "Google Inc.",
"description": "Google Translate API Client Library for Node.js",
"description": "Google Cloud Translation API Client Library for Node.js",
"contributors": [
{
"name": "Burcu Dogan",
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = {
instanceName: 'gcs'
},
translate: {
title: 'Google Translate API'
title: 'Google Cloud Translation API'
},
vision: {
title: 'Google Cloud Vision'
Expand Down