-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
False positive in FormattingPlaceable #3368
Comments
This class handles sprintf, a space here is perfectly valid according to sprintf. Likely you don't want to use that type of placeable in a context that isn't using printf style C variables. Correctly space is only valid if the conversion specifier is in (a, A, d, e, E, f, F, g, G, or i). So that could be an improvement to prevent that being detected. Patches gladly accepted. |
Perhaps addressed in PR #3375 |
No, not addressed in #3375 since that is about checks, not placeables. |
This fix prevents from detecting strings like "% s" to be format placeholders. Fixes translate#3368.
This fix prevents from detecting strings like "% s" to be format placeholders. Fixes translate#3368.
This fix prevents from detecting strings like "% s" to be format placeholders. Fixes translate#3368.
This fix prevents from detecting strings like "% s" to be format placeholders. Fixes translate#3368.
In the following example, "% s" is detected as a placeable:
"xx% support a Web" -> "xx% support a Web"
The regex should be able to detect the whitespace between % and s and abort.
More specifically, the bug is probably in:
https://github.com/translate/translate/blob/master/translate/storage/placeables/general.py#L150
The text was updated successfully, but these errors were encountered: