Skip to content

Commit 5a0f27a

Browse files
Merge pull request #349 from webdados/master
Fix small issues with translatable strings
2 parents 478c8dc + 204d98d commit 5a0f27a

File tree

3 files changed

+39
-20
lines changed

3 files changed

+39
-20
lines changed

admin/class-nginx-helper-admin.php

+16-10
Original file line numberDiff line numberDiff line change
@@ -474,16 +474,22 @@ public function nginx_helper_get_feeds() {
474474
// Loop through each feed item and display each item as a hyperlink.
475475
foreach ( $rss_items as $item ) {
476476
?>
477-
<li role="listitem">
478-
<?php
479-
printf(
480-
'<a href="%s" title="%s">%s</a>',
481-
esc_url( $item->get_permalink() ),
482-
esc_attr__( 'Posted ', 'nginx-helper' ) . esc_attr( $item->get_date( 'j F Y | g:i a' ) ),
483-
esc_html( $item->get_title() )
484-
);
485-
?>
486-
</li>
477+
<li role="listitem">
478+
<?php
479+
printf(
480+
'<a href="%s" title="%s">%s</a>',
481+
esc_url( $item->get_permalink() ),
482+
esc_attr(
483+
sprintf(
484+
/* translators: %s: date/time the feed item as been posted */
485+
__( 'Posted %s', 'nginx-helper' ),
486+
$item->get_date( 'j F Y | g:i a' )
487+
)
488+
),
489+
esc_html( $item->get_title() )
490+
);
491+
?>
492+
</li>
487493
<?php
488494
}
489495
}

admin/class-purger.php

+14-2
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,24 @@ private function _purge_homepage() {
688688
if ( function_exists( 'icl_get_home_url' ) ) {
689689

690690
$homepage_url = trailingslashit( icl_get_home_url() );
691-
$this->log( sprintf( __( 'Purging homepage (WPML) ', 'nginx-helper' ) . '%s', $homepage_url ) );
691+
$this->log(
692+
sprintf(
693+
/* translators: %s homepage URL */
694+
__( 'Purging homepage (WPML) %s', 'nginx-helper' ),
695+
$homepage_url
696+
)
697+
);
692698

693699
} else {
694700

695701
$homepage_url = trailingslashit( home_url() );
696-
$this->log( sprintf( __( 'Purging homepage ', 'nginx-helper' ) . '%s', $homepage_url ) );
702+
$this->log(
703+
sprintf(
704+
/* translators: %s homepage URL */
705+
__( 'Purging homepage %s', 'nginx-helper' ),
706+
$homepage_url
707+
)
708+
);
697709

698710
}
699711

admin/partials/nginx-helper-general-options.php

+9-8
Original file line numberDiff line numberDiff line change
@@ -746,14 +746,15 @@
746746
}
747747

748748
printf(
749-
'<p class="enable-logging-message">(<b>%1$s:</b> %2$s %3$s %4$s <b>NGINX_HELPER_LOG</b> constant %5$s <b>%6$s</b> %7$s <b>wp-config.php</b>)</p>',
750-
esc_html__( 'NOTE', 'nginx-helper' ),
751-
esc_html__( 'To', 'nginx-helper' ),
752-
esc_html( $setting_message_detail['status'] ),
753-
esc_html__( 'the logging feature, you must define', 'nginx-helper' ),
754-
esc_html__( 'as', 'nginx-helper' ),
755-
esc_html( $setting_message_detail['value'] ),
756-
esc_html__( 'in your', 'nginx-helper' )
749+
'<p class="enable-logging-message">(%s)</p>',
750+
sprintf(
751+
wp_kses_post(
752+
/* translators: %1$s: status to change to (enable or disable), %2$s: bool value to set the NGINX_HELPER_LOG as (true or false) */
753+
__( '<strong>NOTE:</strong> To %1$s the logging feature, you must define the <strong>NGINX_HELPER_LOG</strong> constant as <strong>%2$s</strong> in your <strong>wp-config.php</strong> file', 'nginx-helper' )
754+
),
755+
esc_html( $setting_message_detail['status'] ),
756+
esc_html( $setting_message_detail['value'] )
757+
)
757758
);
758759
}
759760
?>

0 commit comments

Comments
 (0)