-
Notifications
You must be signed in to change notification settings - Fork 8
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
I18n: various fixes #59
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The text-domain for WordPress itself is `default`, not `wordpress`.
Includes minor efficiency fix for `sprintf()`: when using numbered replacements, you can use the same replacement twice, so no need to have `'</a>'` twice in the replacement list.
AFAIK WHIP is intended to also be usable by other (non-Yoast) plugins/themes. There were currently two phrases which made this awkward. This PR changes those. For the first phrase, I've chosen to change `WordPress and Yoast SEO` to `WordPress and all it's plugins and themes`. This incidentally fixes issue 35. If it is preferred that `Yoast SEO` not be removed, I would suggest the following: * Move the name out of the text string and put it back in using `sprintf()`. * Make the name filterable to allow other plugins to pass in their plugin name. - Potentially, it could even be turned into an array which could be passed into the string using `implode()` to allow for a number of plugins to be mentioned. For the second phrase, just changing the `our` in `vetted by our Yoast support team` to `the` improves the re-usability. Fixes 35
jdevalk
approved these changes
Mar 27, 2018
@@ -35,11 +35,12 @@ public function body() { | |||
$message = array(); | |||
|
|||
$message[] = Whip_MessageFormatter::strongParagraph( __( 'Your site could be faster and more secure with a newer PHP version.', $textdomain ) ) . '<br />'; | |||
$message[] = Whip_MessageFormatter::paragraph( __( 'Hey, we\'ve noticed that you\'re running an outdated version of PHP. PHP is the programming language that WordPress and Yoast SEO are built on. The version that is currently used for your site is no longer supported. Newer versions of PHP are both faster and more secure. In fact, your version of PHP no longer receives security updates, which is why we\'re sending you to this notice.', $textdomain ) ); | |||
$message[] = Whip_MessageFormatter::paragraph( __( 'Hey, we\'ve noticed that you\'re running an outdated version of PHP. PHP is the programming language that WordPress and all it\'s plugins and themes are built on. The version that is currently used for your site is no longer supported. Newer versions of PHP are both faster and more secure. In fact, your version of PHP no longer receives security updates, which is why we\'re sending you to this notice.', $textdomain ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its, not it's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I18n: fix incorrect text-domain
The text-domain for WordPress itself is
default
, notwordpress
.I18n: add missing translators comments
Includes minor efficiency fix for
sprintf()
: when using numbered replacements, you can use the same replacement twice, so no need to have'</a>'
twice in the replacement list.I18n: Make the text slightly more plugin agnostic
AFAIK WHIP is intended to also be usable by other (non-Yoast) plugins/themes.
There were currently two phrases which made this awkward.
This PR changes those.
For the first phrase, I've chosen to change
WordPress and Yoast SEO
toWordPress and all it's plugins and themes
. This incidentally fixes issue #35. /cc @aferciaIf it is preferred that
Yoast SEO
not be removed, I would suggest the following:sprintf()
.implode()
to allow for a number of plugins to be mentioned.For the second phrase, just changing the
our
invetted by our Yoast support team
tothe
improves the re-usability.Fixes #35