Skip to content

Commit

Permalink
docs(samples): fix translate with glossary sample (#306)
Browse files Browse the repository at this point in the history
Translation results from glossaries are in a different collection
(glossary_translations rather than translations)
  • Loading branch information
Rebecca Taylor authored and JustinBeckwith committed Aug 5, 2019
1 parent 9cd31da commit 74c3aef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe(REGION_TAG, () => {
const output = execSync(
`node v3beta1/${REGION_TAG}.js ${projectId} ${location} ${glossaryId} ${input}`
);
assert.match(output, /direcciones/);
assert.match(output, /indicaciones/);
});

after(async function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function main(
// Run request
const [response] = await translationClient.translateText(request);

for (const translation of response.translations) {
for (const translation of response.glossaryTranslations) {
console.log(`Translation: ${translation.translatedText}`);
}
}
Expand Down

0 comments on commit 74c3aef

Please sign in to comment.