Skip to content

Commit 5e5008d

Browse files
---
yaml --- r: 8165 b: refs/heads/tswast-patch-1 c: b191ab3 h: refs/heads/master i: 8163: 578f7a1
1 parent 886c501 commit 5e5008d

7 files changed

Lines changed: 42 additions & 43 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 157aeb7ca606bd6442c1c49fd737c5f3179ad4e6
60+
refs/heads/tswast-patch-1: b191ab325047a815e4a94c2ae15fb55092901a1f
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/google-cloud-translate/src/main/java/com/google/cloud/translate/Detection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* Information about a language detection. Objects of this class contain the detected language and
2727
* possibly a confidence level.
2828
*
29-
* <a href="https://cloud.google.com/translate/v2/detecting-language-with-rest">Detecting Language
30-
* </a>
29+
* @see <a href="https://cloud.google.com/translate/v2/detecting-language-with-rest">Detecting
30+
* Language </a>
3131
*/
3232
public class Detection implements Serializable {
3333

branches/tswast-patch-1/google-cloud-translate/src/main/java/com/google/cloud/translate/Language.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
/**
2727
* Information about a language supported by Google Translation. Objects of this class contain
28-
* language's code and the language name.
28+
* the language's code and the language name.
2929
*
3030
* @see <a href="https://cloud.google.com/translate/v2/discovering-supported-languages-with-rest">
3131
* Discovering Supported Languages</a>

branches/tswast-patch-1/google-cloud-translate/src/main/java/com/google/cloud/translate/Translate.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public static TranslateOption targetLanguage(String targetLanguage) {
8686
/**
8787
* Sets the language translation model. You can use this parameter to take advantage of Neural
8888
* Machine Translation. Possible values are {@code base} and {@code nmt}. Google Translation could
89-
* use a different model to translate your text, use {@link Translation#getModel()} to know
90-
* which model was used for translation. Please notice that you must be whitelisted to use this
89+
* use a different model to translate your text: use {@link Translation#getModel()} to know
90+
* which model was used for translation. Please note that you must be whitelisted to use this
9191
* option, otherwise translation will fail.
9292
*
9393
* @param model the language translation model
@@ -98,19 +98,19 @@ public static TranslateOption model(String model) {
9898
}
9999

100100
/**
101-
* Returns the list of languages supported by Google Translation. If
102-
* {@link LanguageListOption#targetLanguage(String)} is provided, {@link Language#getName()}
103-
* values are localized according to the provided target language. If no such option is passed,
104-
* {@link Language#getName()} values are localized according to
101+
* Returns the list of languages supported by Google Translation. If an option from
102+
* {@link LanguageListOption#targetLanguage(String)} is provided, the value of
103+
* {@link Language#getName()} is localized according to the provided target language. If no such
104+
* option is passed, the value of {@link Language#getName()} is localized according to
105105
* {@link TranslateOptions#getTargetLanguage()}.
106106
*
107107
* <p>Example of listing supported languages, localized according to
108-
* {@link TranslateOptions#getTargetLanguage()}.
108+
* {@link TranslateOptions#getTargetLanguage()}:
109109
* <pre> {@code
110110
* List<Language> languages = translate.listSupportedLanguages();
111111
* }</pre>
112112
*
113-
* <p>Example of listing supported languages, localized according to a provided language.
113+
* <p>Example of listing supported languages, localized according to a provided language:
114114
* <pre> {@code
115115
* List<Language> languages = translate.listSupportedLanguages(
116116
* LanguageListOption.targetLanguage("es"));
@@ -122,7 +122,7 @@ public static TranslateOption model(String model) {
122122
/**
123123
* Detects the language of the provided texts.
124124
*
125-
* <p>Example of detecting the language of some texts.
125+
* <p>Example of detecting the language of some texts:
126126
* <pre> {@code
127127
* List<String> texts = new LinkedList<>();
128128
* texts.add("Hello, World!");
@@ -132,29 +132,29 @@ public static TranslateOption model(String model) {
132132
*
133133
* @param texts the texts for which language should be detected
134134
* @return a list of objects containing information on the language detection, one for each
135-
* provided text, in order.
135+
* provided text, in order
136136
*/
137137
List<Detection> detect(List<String> texts);
138138

139139
/**
140140
* Detects the language of the provided texts.
141141
*
142-
* <p>Example of detecting the language of some texts.
142+
* <p>Example of detecting the language of some texts:
143143
* <pre> {@code
144144
* List<Detection> detections = translate.detect("Hello, World!", "¡Hola Mundo!");
145145
* }</pre>
146146
*
147147
* @param texts the texts for which language should be detected
148148
* @return a list of objects containing information on the language detection, one for each
149-
* provided text, in order.
149+
* provided text, in order
150150
*/
151151
List<Detection> detect(String... texts);
152152

153153
/**
154154
* Detects the language of the provided text. Returns an object containing information on the
155155
* language detection.
156156
*
157-
* <p>Example of detecting the language of a text.
157+
* <p>Example of detecting the language of a text:
158158
* <pre> {@code
159159
* Detection detection = translate.detect("Hello, World!");
160160
* }</pre>
@@ -165,15 +165,15 @@ public static TranslateOption model(String model) {
165165
/**
166166
* Translates the provided texts.
167167
*
168-
* <p>Example of translating some texts.
168+
* <p>Example of translating some texts:
169169
* <pre> {@code
170170
* List<String> texts = new LinkedList<>();
171171
* texts.add("Hello, World!");
172172
* texts.add("¡Hola Mundo!");
173173
* List<Translation> translations = translate.translate(texts);
174174
* }</pre>
175175
*
176-
* <p>Example of translating some texts, specifying source and target language.
176+
* <p>Example of translating some texts, specifying source and target language:
177177
* <pre> {@code
178178
* List<String> texts = new LinkedList<>();
179179
* texts.add("¡Hola Mundo!");
@@ -183,7 +183,7 @@ public static TranslateOption model(String model) {
183183
*
184184
* @param texts the texts to translate
185185
* @return a list of objects containing information on the language translation, one for each
186-
* provided text, in order.
186+
* provided text, in order
187187
* @throws TranslateException upon failure or if {@link TranslateOption#model(String)} is used by
188188
* a non-whitelisted user
189189
*/
@@ -192,12 +192,12 @@ public static TranslateOption model(String model) {
192192
/**
193193
* Translates the provided texts.
194194
*
195-
* <p>Example of translating a text.
195+
* <p>Example of translating a text:
196196
* <pre> {@code
197197
* Translation translation = translate.translate("¡Hola Mundo!");
198198
* }</pre>
199199
*
200-
* <p>Example of translating a text, specifying source and target language.
200+
* <p>Example of translating a text, specifying source and target language:
201201
* <pre> {@code
202202
* Translation translation = translate.translate("¡Hola Mundo!",
203203
* TranslateOption.sourceLanguage("es"), TranslateOption.targetLanguage("de"));

branches/tswast-patch-1/google-cloud-translate/src/main/java/com/google/cloud/translate/TranslateOptions.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public Builder setTransportOptions(TransportOptions transportOptions) {
100100
}
101101

102102
/**
103-
* Sets project id. Setting a project id has no impact on the {@link Translate} service.
103+
* Sets the project ID. Setting a project ID has no impact on the {@link Translate} service.
104104
*
105105
* @return the builder
106106
*/
@@ -114,8 +114,8 @@ public Builder setProjectId(String projectId) {
114114
* Sets the API key used to issue requests. This will be ignored if credentials are explicitly
115115
* set with {@link ServiceOptions.Builder#setCredentials setCredentials}. If neither are set,
116116
* and no Application Default Credentials are available, an API key is looked for in the
117-
* {@code GOOGLE_API_KEY} environment variable. For instructions on how to get an API key see <a
118-
* href="https://cloud.google.com/translate/v2/quickstart">Translate quickstart</a>.
117+
* {@code GOOGLE_API_KEY} environment variable. For instructions on how to get an API key, see
118+
* the <a href="https://cloud.google.com/translate/v2/quickstart">Translate Quickstart</a>.
119119
*/
120120
@Deprecated
121121
public Builder setApiKey(String apiKey) {
@@ -125,11 +125,10 @@ public Builder setApiKey(String apiKey) {
125125

126126

127127
/**
128-
* Sets the code for the default target language. If not set, English ({@code en}) is used.
129-
* {@link Translate#translate(List, TranslateOption...)} and
130-
* {@link Translate#translate(String, TranslateOption...)} calls will use this
131-
* value unless a {@link TranslateOption#targetLanguage(String)} option is explicitly
132-
* provided.
128+
* Sets the code for the default target language. If not set, English ({@code en}) is
129+
* used. Calls to {@link Translate#translate(List, TranslateOption...)} and
130+
* {@link Translate#translate(String, TranslateOption...)} will use this value unless an option
131+
* from {@link TranslateOption#targetLanguage(String)} is explicitly provided.
133132
*
134133
* @return the builder
135134
*/
@@ -235,7 +234,7 @@ protected String getDefaultHost() {
235234

236235

237236
/**
238-
* Returns the API key, to be used to send requests.
237+
* Returns the API key to be used to send requests.
239238
*/
240239
public String getApiKey() {
241240
return apiKey;

branches/tswast-patch-1/google-cloud-translate/src/main/java/com/google/cloud/translate/Translation.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626

2727
/**
2828
* Information about a translation. Objects of this class contain the translated text and the source
29-
* language's code. Source language's code can be the one provided by the user (if any) or the one
30-
* detected by the Google Translation service.
29+
* language's code. The source language's code can be optionally specified by the user or
30+
* automatically detected by the Google Translation service.
3131
*
32-
* <a href="https://cloud.google.com/translate/v2/translating-text-with-rest">Translating Text</a>
32+
* @see <a href="https://cloud.google.com/translate/v2/translating-text-with-rest">Translating
33+
* Text</a>
3334
*/
3435
public class Translation implements Serializable {
3536

@@ -71,10 +72,10 @@ public String getSourceLanguage() {
7172

7273
/**
7374
* Returns the translation model used to translate the text. This value is only available if
74-
* {@link Translate.TranslateOption#model(String)} was passed to
75+
* a result from {@link Translate.TranslateOption#model(String)} was passed to
7576
* {@link Translate#translate(List, Translate.TranslateOption...)}.
7677
*
77-
* <p>Please notice that you must be whitelisted to use the
78+
* <p>Please note that you must be whitelisted to use the
7879
* {@link Translate.TranslateOption#model(String)} option, otherwise translation will fail.
7980
*/
8081
public String getModel() {

branches/tswast-patch-1/google-cloud-translate/src/main/java/com/google/cloud/translate/package-info.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
/**
1818
* A client to Google Translation.
1919
*
20-
* <p>Here's a simple usage example for using google-cloud. This example shows how to detect the
21-
* language of some text and how to translate some text. The example assumes that the
20+
* <p>Here's a simple usage example for using Google Cloud Translation. This example shows how to
21+
* detect the language of some text and how to translate some text. The example assumes that the
2222
* {@code GOOGLE_API_KEY} is set and contains a valid API key. Alternatively, you can use
2323
* {@link com.google.cloud.translate.TranslateOptions.Builder#setApiKey(java.lang.String)} to set
24-
* the API key. For the complete source code see
25-
* <a href="https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java">
26-
* DetectLanguageAndTranslate.java</a>.
27-
* <pre> {@code
28-
* Translate translate = TranslateOptions.getDefaultInstance().getService();
24+
* the API key. For the complete source code, see: <a
25+
* href="https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java">
26+
* DetectLanguageAndTranslate.java</a>. <pre>
27+
* {@code Translate translate = TranslateOptions.getDefaultInstance().getService();
2928
*
3029
* Detection detection = translate.detect("Hola");
3130
* String detectedLanguage = detection.getLanguage();

0 commit comments

Comments
 (0)