Skip to content

Commit

Permalink
update strings from 3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrisrp committed Jun 12, 2023
1 parent 15c8db0 commit 28bc479
Show file tree
Hide file tree
Showing 3 changed files with 215 additions and 118 deletions.
28 changes: 21 additions & 7 deletions inc/Addon/Cloudflare/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,13 @@ public function purge_cache_no_die() {
if ( is_wp_error( $connection ) ) {
$cf_purge_result = [
'result' => 'error',
// translators: %s = CloudFare API return message.
'message' => sprintf( __( '<strong>WP Rocket:</strong> %s', 'rocket' ), $connection->get_error_message() ),
// translators: %1$s = <strong>, %2$s = </strong>, %3$s = CloudFare API return message.
'message' => sprintf(
__( '%1$sWP Rocket:%2$s %3$s', 'rocket' ),
'<strong>',
'</strong>',
$connection->get_error_message()
),
];

set_transient( get_current_user_id() . '_cloudflare_purge_result', $cf_purge_result );
Expand All @@ -232,14 +237,24 @@ public function purge_cache_no_die() {
$cf_purge = $this->cloudflare->purge_cloudflare();
$cf_purge_result = [
'result' => 'success',
'message' => __( '<strong>WP Rocket:</strong> Cloudflare cache successfully purged.', 'rocket' ),
// translators: %1$s = <strong>, %2$s = </strong>.
'message' => sprintf(
__( '%1$sWP Rocket:%2$s Cloudflare cache successfully purged.', 'rocket' ),
'<strong>',
'</strong>',
),
];

if ( is_wp_error( $cf_purge ) ) {
$cf_purge_result = [
'result' => 'error',
// translators: %s = CloudFare API return message.
'message' => sprintf( __( '<strong>WP Rocket:</strong> %s', 'rocket' ), $cf_purge->get_error_message() ),
// translators: %1$s = <strong>, %2$s = </strong>, %3$s = CloudFare API return message.
'message' => sprintf(
__( '%1$sWP Rocket:%2$s %3$s', 'rocket' ),
'<strong>',
'</strong>',
$connection->get_error_message()
),
];
}

Expand Down Expand Up @@ -448,8 +463,7 @@ public function update_dev_mode( $old_value, $value ) {

$result = [
'pre' => sprintf(
// translators: %1$s = strong opening tag, %2$s = strong closing tag.
__( '%1$sWP Rocket:%2$s', 'rocket' ),
'%1$sWP Rocket:%2$s',
'<strong>',
'</strong>&nbsp;'
),
Expand Down
4 changes: 2 additions & 2 deletions inc/ThirdParty/Plugins/CDN/Cloudflare.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function display_apo_cookies_notice() {

$message = sprintf(
// Translators: %1$s = strong opening tag, %2$s = strong closing tag.
__( '%1$sWP Rocket:%2$sYou are using "Dynamic Cookies Cache". Cloudflare APO is not yet compatible with that feature.', 'rocket' ) . '<br>',
__( '%1$sWP Rocket:%2$s You are using "Dynamic Cookies Cache". Cloudflare APO is not yet compatible with that feature.', 'rocket' ) . '<br>',
'<strong>',
'</strong>'
);
Expand Down Expand Up @@ -277,7 +277,7 @@ public function display_apo_cache_notice() {
'status' => 'warning',
'message' => sprintf(
// Translators: %1$s = strong opening tag, %2$s = strong closing tag.
__( '%1$sWP Rocket:%2$sYou have "Cache by Device Type" enabled on Cloudflare APO. If you judge it necessary for the website to have a different cache on mobile and desktop, we suggest you enable our “Separate Cache Files for Mobiles Devices” to ensure the generated cache is accurate.', 'rocket' ),
__( '%1$sWP Rocket:%2$s You have "Cache by Device Type" enabled on Cloudflare APO. If you judge it necessary for the website to have a different cache on mobile and desktop, we suggest you enable our “Separate Cache Files for Mobiles Devices” to ensure the generated cache is accurate.', 'rocket' ),
'<strong>',
'</strong>'
),
Expand Down
Loading

0 comments on commit 28bc479

Please sign in to comment.