Skip to content

Commit

Permalink
fixing translate-with-glossary bug [(#2323)](#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
crowdus authored and danoscarmike committed Jul 31, 2020
1 parent a5be14a commit fe60e6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion translation/samples/snippets/beta_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.translations:
for translation in result.glossary_translations:
print(translation)
# [END translate_translate_text_with_glossary_beta]

Expand Down
4 changes: 2 additions & 2 deletions translation/samples/snippets/beta_snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, 'directions')
PROJECT_ID, glossary, 'account')
out, _ = capsys.readouterr()
assert 'direcciones' in out
assert 'cuenta' in out


def test_delete_glossary(capsys, unique_glossary_id):
Expand Down

0 comments on commit fe60e6e

Please sign in to comment.