Conversation
|
Hi @ramiy Nice one! Thank you. |
class-tgm-plugin-activation.php
Outdated
There was a problem hiding this comment.
As this 'string' is so generic, should it not have a translators comment and a context through _x ?
There was a problem hiding this comment.
The context is used to describe the entire string, translators comment are used to describe specific placeholders like %s, %1$s, %2$s and others.
In this case, translators comment are needed because we have two placeholders in this string.
As for the context, I'm not sure. We can set "Install/Update Status" as a context, but It's not providing more information than the translator comment.
There was a problem hiding this comment.
In this case, I'd prefer to have both the translators comment and the context. The TGMPA library is included in themes as well as plugins and in the case of wp.org hosted themes, the text-domain is replaced by the theme text-domain.
If, for whatever reason, the theme would have the same generic string in use, things could become very confusing for translators.
For the other strings, I'd think that to be far less likely.
There was a problem hiding this comment.
It's a very good point. I agree with you.
|
I'm +1 for everything happening here. I was aware that |
class-tgm-plugin-activation.php
Outdated
There was a problem hiding this comment.
Considering that the strings are now concatenated and all individual bits are escaped, I think we can get rid of the wp_kses_post() wrapper.
There was a problem hiding this comment.
Awesome! Thanks. If you could squash the commits, I'll merge it.
There was a problem hiding this comment.
As all the changes in the PR are related, it makes more sense, having one commit containing them all, then having four different commits for it.
Squashing is a way to achive that.
See: http://makandracards.com/makandra/527-squash-several-git-commits-into-a-single-commit
There was a problem hiding this comment.
Hi @ramiy I'd really like to merge this. Any chance you can do the squash in the near future ? Thanks!
Let me know if you need any help with that.
There was a problem hiding this comment.
@jrfnl can't squash this. I use SourceTree for windows, It does not support squash, only the mac version allow the squash.
Does it really matter if you merge one commit or four different commits?
There was a problem hiding this comment.
Do it on the command line then: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
There was a problem hiding this comment.
Hi @ramiy Sorry to hear you're having trouble with this. The link I send you originally also contains a step by step example of how to do this manually if squash is not supported. Maybe that can help ?


In WordPress 4.4 we fixed many translation functions in the core. The same coding standards should be implemented in TGM too.