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

Avoid converting f-strings within Django gettext calls #7898

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

charliermarsh
Copy link
Member

Summary

Django's gettext doesn't support f-strings, so we should avoid translating .format calls in those cases.

Closes #7891.

@charliermarsh
Copy link
Member Author

Some more resources:

@charliermarsh charliermarsh enabled auto-merge (squash) October 10, 2023 16:27
@charliermarsh charliermarsh merged commit 090c1a4 into main Oct 10, 2023
31 checks passed
@charliermarsh charliermarsh deleted the charlie/f-string-django branch October 10, 2023 16:31
@github-actions
Copy link
Contributor

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

konstin pushed a commit that referenced this pull request Oct 11, 2023
## Summary

Django's `gettext` doesn't support f-strings, so we should avoid
translating `.format` calls in those cases.

Closes #7891.
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.

ruff fix on UP032 breaks applied code when f-string is too long
1 participant