Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fixing translate-with-glossary bug (#2323)" #2326

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion translate/cloud-client/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.glossary_translations:
for translation in result.translations:
print(translation)
# [END translate_translate_text_with_glossary_beta]

Expand Down
4 changes: 2 additions & 2 deletions translate/cloud-client/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, 'account')
PROJECT_ID, glossary, 'directions')
out, _ = capsys.readouterr()
assert 'cuenta' in out
assert 'direcciones' in out


def test_delete_glossary(capsys, unique_glossary_id):
Expand Down