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 Ace Nassri committed Nov 17, 2022
1 parent 6d690a6 commit db37188
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 db37188

Please sign in to comment.