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

Default locale in I18nMiddleware is unused #562

Closed
r4rdsn opened this issue Apr 11, 2021 · 1 comment · Fixed by #563
Closed

Default locale in I18nMiddleware is unused #562

r4rdsn opened this issue Apr 11, 2021 · 1 comment · Fixed by #563
Labels
bug Something is wrong with the framework

Comments

@r4rdsn
Copy link

r4rdsn commented Apr 11, 2021

Expected Behavior

When user's locale is not available, I18nMiddleware(default=locale) uses given locale.

Current Behavior

It returns gettext keys even if default locale exists.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Create ru locale with pybabel
  2. Add I18nMiddleware to dispatcher with default='ru'
  3. Send message to bot from user with English locale
  4. User gets plain gettext keys instead of Russian text
@r4rdsn
Copy link
Author

r4rdsn commented Apr 11, 2021

@evgfilim1 evgfilim1 added the bug Something is wrong with the framework label Apr 30, 2021
JrooTJunior added a commit that referenced this issue Jul 5, 2021
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
r4rdsn added a commit to fincubator/cradlex that referenced this issue Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong with the framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants