-
Notifications
You must be signed in to change notification settings - Fork 52
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
Dont apply translators comments multiple times again #338
Comments
This is an ambiguous case, because it's not clear whether the translator comment is meant for the first call or the second. What if both your I'd recommend writing these statements on multiple lines. This will help both developers and tools like this CLI command. |
Even then, translators comments should not be applied to multiple strings.
Apply the translators comments in the order they appear to the strings in the order they appear. If I have x translators comments, but x+y strings, then apply the translators comments in the order they appear but skip strings that do not match the placeholders (and apply the translators comment to the next string where the placeholders match).
See #154 (comment) (and the previous one) |
There will always be ambiguity when there are multiple i18n functions on a single line, because there can only be 1 preceeding translator comment on the line before. Using multi-line statements is a reasonable workaround to avoid all potential issues. Have you tried that? |
Translators comments should still only be applied once.
Yes, in some cases that isn't possible though, as it would make maintenance much harder. |
Bug Report
WP-CLI 2.7.0-alpha-9fcc59a
#154 is partially back (or maybe never fully fixed?)
Will give error:
in the .pot I see:
Issues:
The text was updated successfully, but these errors were encountered: