diff --git a/translate/cloud-client/beta_snippets.py b/translate/cloud-client/beta_snippets.py index 0f8a423c39ec..7cd94aed59a0 100644 --- a/translate/cloud-client/beta_snippets.py +++ b/translate/cloud-client/beta_snippets.py @@ -269,7 +269,7 @@ def translate_text_with_glossary(project_id, glossary_id, text): target_language_code='es', glossary_config=glossary_config) - for translation in result.glossary_translations: + for translation in result.translations: print(translation) # [END translate_translate_text_with_glossary_beta] diff --git a/translate/cloud-client/beta_snippets_test.py b/translate/cloud-client/beta_snippets_test.py index 56534c6cbad1..f7099a27cae1 100644 --- a/translate/cloud-client/beta_snippets_test.py +++ b/translate/cloud-client/beta_snippets_test.py @@ -120,9 +120,9 @@ def test_list_glossary(capsys, glossary): def test_translate_text_with_glossary(capsys, glossary): beta_snippets.translate_text_with_glossary( - PROJECT_ID, glossary, 'account') + PROJECT_ID, glossary, 'directions') out, _ = capsys.readouterr() - assert 'cuenta' in out + assert 'direcciones' in out def test_delete_glossary(capsys, unique_glossary_id):