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

Add translation details to debug in all cases. #3652

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keyurva
Copy link
Contributor

@keyurva keyurva commented Sep 29, 2023

@keyurva keyurva enabled auto-merge (squash) September 29, 2023 21:40
"translation": translation,
"source_language": source_lang,
"target_language": _EN_LANG,
"translation_response": response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how big is this?

"format": "text",
"source": source_lang,
"target": _EN_LANG
}
response = requests.post(f'{_API_URL}?key={api_key}',
json=request,
headers=_API_HEADER).json()

translation = response.get("data",
{}).get("translations",
[{}])[0].get("translatedText", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there's a doc on this, maybe link to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants