Skip to content

Commit 8be5ddf

Browse files
Bump Translation to GA (#2259)
* Bump Translation to GA * Update READMEs
1 parent 95f0dd7 commit 8be5ddf

4 files changed

Lines changed: 40 additions & 40 deletions

File tree

README.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ This client supports the following Google Cloud Platform services at a [GA](#ver
1616
- [Stackdriver Logging](#stackdriver-logging-ga) (GA)
1717
- [Cloud Datastore](#google-cloud-datastore-ga) (GA)
1818
- [Cloud Storage](#google-cloud-storage-ga) (GA)
19+
- [Cloud Translation](#google-translation-ga) (GA)
1920

2021
This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level:
2122

2223
- [BigQuery](#google-cloud-bigquery-beta) (Beta)
2324
- [Cloud Pub/Sub](#google-cloud-pubsub-beta) (Beta)
2425
- [Cloud Spanner](#cloud-spanner-beta) (Beta)
25-
- [Cloud Translation](#google-translation-beta) (Beta)
2626
- [Cloud Natural Language](#google-cloud-language-beta) (Beta)
2727
- [Cloud Vision](#google-cloud-vision-beta) (Beta)
2828

@@ -368,6 +368,40 @@ if (blob != null) {
368368
}
369369
```
370370
371+
Google Translation (GA)
372+
----------------
373+
374+
- [API Documentation][translate-api]
375+
- [Official Documentation][translate-docs]
376+
377+
#### Preview
378+
379+
Here's a snippet showing a simple usage example. The example shows how to detect the language of
380+
some text and how to translate some text. The example assumes that either Application Default
381+
Credentials or a valid API key are available. An API key stored in the `GOOGLE_API_KEY` environment
382+
variable will be automatically detected. Complete source code can be found at
383+
[DetectLanguageAndTranslate.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java).
384+
385+
```java
386+
import com.google.cloud.translate.Detection;
387+
import com.google.cloud.translate.Translate;
388+
import com.google.cloud.translate.Translate.TranslateOption;
389+
import com.google.cloud.translate.TranslateOptions;
390+
import com.google.cloud.translate.Translation;
391+
392+
Translate translate = TranslateOptions.getDefaultInstance().getService();
393+
394+
Detection detection = translate.detect("Hola");
395+
String detectedLanguage = detection.getLanguage();
396+
397+
Translation translation = translate.translate(
398+
"World",
399+
TranslateOption.sourceLanguage("en"),
400+
TranslateOption.targetLanguage(detectedLanguage));
401+
402+
System.out.printf("Hola %s%n", translation.getTranslatedText());
403+
```
404+
371405
Google Cloud BigQuery (Beta)
372406
----------------------
373407
@@ -742,40 +776,6 @@ while (projectIterator.hasNext()) {
742776
}
743777
```
744778
745-
Google Translation (Beta)
746-
----------------
747-
748-
- [API Documentation][translate-api]
749-
- [Official Documentation][translate-docs]
750-
751-
#### Preview
752-
753-
Here's a snippet showing a simple usage example. The example shows how to detect the language of
754-
some text and how to translate some text. The example assumes that either Application Default
755-
Credentials or a valid API key are available. An API key stored in the `GOOGLE_API_KEY` environment
756-
variable will be automatically detected. Complete source code can be found at
757-
[DetectLanguageAndTranslate.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java).
758-
759-
```java
760-
import com.google.cloud.translate.Detection;
761-
import com.google.cloud.translate.Translate;
762-
import com.google.cloud.translate.Translate.TranslateOption;
763-
import com.google.cloud.translate.TranslateOptions;
764-
import com.google.cloud.translate.Translation;
765-
766-
Translate translate = TranslateOptions.getDefaultInstance().getService();
767-
768-
Detection detection = translate.detect("Hola");
769-
String detectedLanguage = detection.getLanguage();
770-
771-
Translation translation = translate.translate(
772-
"World",
773-
TranslateOption.sourceLanguage("en"),
774-
TranslateOption.targetLanguage(detectedLanguage));
775-
776-
System.out.printf("Hola %s%n", translation.getTranslatedText());
777-
```
778-
779779
Google Cloud Speech (Alpha)
780780
----------------
781781

google-cloud-translate/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-translate</artifactId>
25-
<version>0.20.2-beta</version>
25+
<version>1.2.2</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-translate:0.20.2-beta'
30+
compile 'com.google.cloud:google-cloud-translate:1.2.2'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "0.20.2-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "1.2.2"
3535
```
3636

3737
Example Application

google-cloud-translate/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-translate</artifactId>
5-
<version>0.20.3-beta-SNAPSHOT</version>
5+
<version>1.2.3-SNAPSHOT</version>
66
<packaging>jar</packaging>
77
<name>Google Cloud Translation</name>
88
<url>https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-translate</url>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
<speech.version>0.20.3-alpha-SNAPSHOT</speech.version>
162162
<storage.version>1.2.3-SNAPSHOT</storage.version>
163163
<trace.version>0.20.3-alpha-SNAPSHOT</trace.version>
164-
<translate.version>0.20.3-beta-SNAPSHOT</translate.version>
164+
<translate.version>1.2.3-SNAPSHOT</translate.version>
165165
<vision.version>0.20.3-beta-SNAPSHOT</vision.version>
166166
<video-intelligence.version>0.20.3-alpha-SNAPSHOT</video-intelligence.version>
167167
<testing.version>0.20.3-alpha-SNAPSHOT</testing.version>

0 commit comments

Comments
 (0)