Skip to content

Commit 6a9f7ca

Browse files
author
Elizabeth Crowdus
committed
fixing translate-with-glossary bug
1 parent d40c363 commit 6a9f7ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

translate/cloud-client/beta_snippets.py

+1-1
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

translate/cloud-client/beta_snippets_test.py

+2-2
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)