-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
rule for detecting format error in gettext translations #3294
Comments
Is the error that you're supposed to leave the parameters unfilled? |
(Seems like a reasonable rule, I'm just not familiar with the API.) |
The error is that you're supposed to use constant strings, not dynamic ones as that passed string is used as a key during the lookup in message catalog. I think that ideally this should support not just the most basic gettext call accepting a single argument but also calls to gettext, ngettext, and so on: |
thanks for the feedback, I clarified the initial description. |
Thank you! |
those 3 cases should be detected in a new rule:
→ calls to
_
(the conventional name of gettext) should only be done with a contant string as argument.The text was updated successfully, but these errors were encountered: