-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Change string formatting #147
Conversation
I have tried with flynt but it did not catch all strings. Do not know why ! |
@steko So looking at gettext and translation, F-Strings can not be used as-is. If we want to stick to F-Strings, a workaround is here https://stackoverflow.com/a/56264202 and we can modify our |
You did a huge work! The straightforward approach seems to use f-strings everywhere, except where gettext is needed, and use Or we could standardize on using But most importantly we need to move away from implicit conversion and formatting. |
I thought of using |
You did a huge work! The straightforward approach seems to use f-strings everywhere, except where gettext is needed, and use Or we could standardize on using But most importantly we need to move away from implicit type conversion and formatting, adopting a consistent code style. |
On a second thought, perhaps the easiest solution is to use f-strings in the |
So I revert scripts files ? |
@psolyca what do you think about the documentation I added? I thought it was important to document what we had decided and you implemented in this PR. |
Yes, good for me. I was surprised by the "user-facing" term as I am more used to front-end but it is a legit term. I let you review this PR, I won't do it, it is not fair :p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok good to go.
When you do not read everything, you are one step behind ^^;
Strings formatting changes :
"" + ""
) to F-Strings%
) to F-Strings.format()
) to F-Strings