Skip to content

Commit fe60e6e

Browse files
crowdusdanoscarmike
authored andcommitted
fixing translate-with-glossary bug [(#2323)](#2323)
1 parent a5be14a commit fe60e6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

translation/samples/snippets/beta_snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def translate_text_with_glossary(project_id, glossary_id, text):
269269
target_language_code='es',
270270
glossary_config=glossary_config)
271271

272-
for translation in result.translations:
272+
for translation in result.glossary_translations:
273273
print(translation)
274274
# [END translate_translate_text_with_glossary_beta]
275275

translation/samples/snippets/beta_snippets_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def test_list_glossary(capsys, glossary):
120120

121121
def test_translate_text_with_glossary(capsys, glossary):
122122
beta_snippets.translate_text_with_glossary(
123-
PROJECT_ID, glossary, 'directions')
123+
PROJECT_ID, glossary, 'account')
124124
out, _ = capsys.readouterr()
125-
assert 'direcciones' in out
125+
assert 'cuenta' in out
126126

127127

128128
def test_delete_glossary(capsys, unique_glossary_id):

0 commit comments

Comments
 (0)