Skip to content

Commit f13718e

Browse files
Rebecca TaylorAce Nassri
Rebecca Taylor
authored and
Ace Nassri
committed
docs(samples): fix translate with glossary sample (#306)
Translation results from glossaries are in a different collection (glossary_translations rather than translations)
1 parent ef665f2 commit f13718e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

translate/test/v3beta1/translate_translate_text_with_glossary_beta.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe(REGION_TAG, () => {
6464
const output = execSync(
6565
`node v3beta1/${REGION_TAG}.js ${projectId} ${location} ${glossaryId} ${input}`
6666
);
67-
assert.match(output, /direcciones/);
67+
assert.match(output, /indicaciones/);
6868
});
6969

7070
after(async function() {

translate/v3beta1/translate_translate_text_with_glossary_beta.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function main(
5555
// Run request
5656
const [response] = await translationClient.translateText(request);
5757

58-
for (const translation of response.translations) {
58+
for (const translation of response.glossaryTranslations) {
5959
console.log(`Translation: ${translation.translatedText}`);
6060
}
6161
}

0 commit comments

Comments
 (0)