Skip to content

Commit 8e93e85

Browse files
munkhuushmglchingor13
authored andcommitted
Translate: fix sample output (googleapis#6197)
* small bug * forgot to change test * nit
1 parent eb526b4 commit 8e93e85

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/TranslateSnippetsBeta.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static TranslateTextResponse translateTextWithGlossary(
405405
// Call the API
406406
TranslateTextResponse response = translationServiceClient.translateText(translateTextRequest);
407407
System.out.format(
408-
"Translated text: %s", response.getTranslationsList().get(0).getTranslatedText());
408+
"Translated text: %s", response.getGlossaryTranslationsList().get(0).getTranslatedText());
409409
return response;
410410

411411
} catch (Exception e) {

google-cloud-examples/src/test/java/com/google/cloud/examples/translate/snippets/ITTranslateSnippetsBeta.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public void test2_testTranslateTextWithGlossary() {
152152
TranslateTextResponse response =
153153
TranslateSnippetsBeta.translateTextWithGlossary(
154154
projectId, "us-central1", "glossary-testing", "directions", "en", "es");
155-
assertEquals("direcciones", response.getTranslationsList().get(0).getTranslatedText());
155+
assertEquals("indicaciones", response.getGlossaryTranslationsList().get(0).getTranslatedText());
156156
}
157157

158158
@Test

0 commit comments

Comments
 (0)