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: width field #97
Comments
I'll look into this today. |
I checked. python-format (which is what I think you're using here) doesn't support padding. More formally, on this page: https://docs.python.org/2/library/stdtypes.html#string-formatting-operations it doesn't support 3, 4, 5 and 6. I think when I originally implemented this, I wanted to discourage those bits in the actual translation strings since our translators would often mess it up. Plus I wasn't sure how to handle them in the lint rules. Is it ok to change the justification when switching between LTR and RTL languages? Does that inherently change the token? Is it ok to change the precision? Etc. Looking at your |
Yes indeed, we use mainly We have very few strings using formats that are not supported in Python, so I think we can get away by disabling linting on those specific strings, until Dennis has the support. Thanks again for the answer, and looking forward to seeing more formats in Dennis. Should I rename the issue to mention |
Hello, I am facing a false positive occurrence when using Dennis to check the translations of 0 A.D..
We have one place where we use the format
%(name)4s
to pad the result to at least 4 characters. Dennis throws a 'type missing' error when reading that.You can reproduce it with http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/l10n/ar.public-gui-other.po
Thanks for the work on Dennis, it's a very nice tool! 😃
The text was updated successfully, but these errors were encountered: