Closed yoavf closed 7 years ago
Sample comments are visible here: https://github.com/Automattic/wp-calypso/pull/10527
Very nice, it's something that makes a lot of sense to enforce. I wouldn't display the message though if it actually matches an existing translation (with context), then I think it's ok to assume that this was a deliberate use of context.
I wouldn't display the message though if it actually matches an existing translation (with context)
Do you mean this one?
- If a context is added when the string already exists without a context. This is a good use case, but only if the meaning is different.
No, I am referring to the case when a context is specified but also has already existing translations (for example because the dev was following a suggestion).
Adding a context to a string makes it a separate entry as far as Gettext is concerned. While there are some good use cases of contexts, they are few, and context are often abused.
This PR will add a GH comment to almost string with a context. The possible messages (by priority):
The only case where a comment won't be posted is if a context is specifically added. This is probably a good use case.
This might end up being too opinionated, but we'll see :)