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

Translations can break some commands. #114

Closed
AiroPi opened this issue Dec 5, 2023 · 1 comment
Closed

Translations can break some commands. #114

AiroPi opened this issue Dec 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@AiroPi
Copy link
Member

AiroPi commented Dec 5, 2023

Describe the bug
When a translations is longer than it's english equivalent, it can break some Discord limitations.
For example, some Embeds fields have small maximum length, and a translation in french, which is longer than in English, can exceed this limit.

To Reproduce
The /sondage command in French raise an error.

Code suggestion
Add an optional argument to _() allowing specify a max_length like :
_("Hello world", _max_length=100)

If a translation is longer than the provided length, the bot log a WARNING and return the stripper string.

@AiroPi AiroPi added the bug Something isn't working label Dec 5, 2023
@AiroPi
Copy link
Member Author

AiroPi commented Dec 17, 2023

Solved in #128

@AiroPi AiroPi closed this as completed Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant