Skip to content

Conversation

@nattsw
Copy link
Contributor

@nattsw nattsw commented Nov 27, 2024

When translating a post, most of our available providers have an arbitrary character limit. In Google, this arbitrary limit is 5000 characters.

This PR removes the arbitrary limits per provider by moving it to a site setting max_characters_per_translation, and leaves the hard limits set by each provider (Amazon 10k, Azure 50k).

Additional context

I bumped the site setting to 10k to test on googleapis, and Google happily translated more than 5k characters despite the recommendation.

default: ''
translator_libretranslate_api_key:
default: ''
max_characters_per_translation:
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need a description in server.en.yml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I should for consistency.

@nattsw nattsw merged commit 352493d into main Nov 27, 2024
3 checks passed
@nattsw nattsw deleted the setting-for-max-detect branch November 27, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants