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

FIX: Amazon text size is 10k bytes #137

Merged
merged 1 commit into from
Apr 19, 2024
Merged

FIX: Amazon text size is 10k bytes #137

merged 1 commit into from
Apr 19, 2024

Conversation

ZogStriP
Copy link
Member

The Amazon translate API allows for a text to be up to 10k bytes.

This changes the MAXLENGTH constant into the MAX_BYTES and uses a truncate method that works at the bytes level instead of the character/grapheme level.

Ref - https://meta.discourse.org/t/increase-amazon-translate-limit-to-10-000-characters/304579

@markvanlan
Copy link

Would be good to have a test if possible 🤷

The Amazon translate API allows for a text to be up to 10k bytes.

This changes the `MAXLENGTH` constant into the `MAX_BYTES` and uses a `truncate` method that works at the bytes level instead of the character/grapheme level.

Ref - https://meta.discourse.org/t/increase-amazon-translate-limit-to-10-000-characters/304579
@ZogStriP ZogStriP merged commit 60ab557 into main Apr 19, 2024
3 checks passed
@ZogStriP ZogStriP deleted the fix-amazon-text-size branch April 19, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants