Skip to content

Fix small issues with translatable strings #349

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

Merged
merged 9 commits into from
Apr 22, 2025
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Nginx Helper #
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

**Contributors:** rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane, stefanfisk, SGr33n
**Contributors:** rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane, stefanfisk, SGr33n, agvs

**Tags:** nginx, cache-purge, fastcgi, permalinks, redis-cache

Expand Down Expand Up @@ -99,6 +99,10 @@ To purge a page immediately, follow these instructions:
* Just open this in a browser and the page will be purged instantly.
* Needless to say, this won't work, if you have a page or taxonomy called 'purge'.

**Q. Does it need any kind of URL structure?**

Yes. When setting the URL structure in Nginx configuration file a trailing slash should always be added.

### FAQ - Nginx Redis Cache ###

**Q. Can I override the redis hostname, port and prefix?**
Expand Down
26 changes: 16 additions & 10 deletions admin/class-nginx-helper-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,16 +474,22 @@ public function nginx_helper_get_feeds() {
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) {
?>
<li role="listitem">
<?php
printf(
'<a href="%s" title="%s">%s</a>',
esc_url( $item->get_permalink() ),
esc_attr__( 'Posted ', 'nginx-helper' ) . esc_attr( $item->get_date( 'j F Y | g:i a' ) ),
esc_html( $item->get_title() )
);
?>
</li>
<li role="listitem">
<?php
printf(
'<a href="%s" title="%s">%s</a>',
esc_url( $item->get_permalink() ),
esc_attr(
sprintf(
/* translators: %s: date/time the feed item as been posted */
__( 'Posted %s', 'nginx-helper' ),
$item->get_date( 'j F Y | g:i a' )
)
),
esc_html( $item->get_title() )
);
?>
</li>
<?php
}
}
Expand Down
16 changes: 14 additions & 2 deletions admin/class-purger.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,24 @@ private function _purge_homepage() {
if ( function_exists( 'icl_get_home_url' ) ) {

$homepage_url = trailingslashit( icl_get_home_url() );
$this->log( sprintf( __( 'Purging homepage (WPML) ', 'nginx-helper' ) . '%s', $homepage_url ) );
$this->log(
sprintf(
/* translators: %s homepage URL */
__( 'Purging homepage (WPML) %s', 'nginx-helper' ),
$homepage_url
)
);

} else {

$homepage_url = trailingslashit( home_url() );
$this->log( sprintf( __( 'Purging homepage ', 'nginx-helper' ) . '%s', $homepage_url ) );
$this->log(
sprintf(
/* translators: %s homepage URL */
__( 'Purging homepage %s', 'nginx-helper' ),
$homepage_url
)
);

}

Expand Down
17 changes: 9 additions & 8 deletions admin/partials/nginx-helper-general-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,15 @@
}

printf(
'<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>',
esc_html__( 'NOTE', 'nginx-helper' ),
esc_html__( 'To', 'nginx-helper' ),
esc_html( $setting_message_detail['status'] ),
esc_html__( 'the logging feature, you must define', 'nginx-helper' ),
esc_html__( 'as', 'nginx-helper' ),
esc_html( $setting_message_detail['value'] ),
esc_html__( 'in your', 'nginx-helper' )
'<p class="enable-logging-message">(%s)</p>',
sprintf(
wp_kses_post(
/* translators: %1$s: status to change to (enable or disable), %2$s: bool value to set the NGINX_HELPER_LOG as (true or false) */
__( '<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' )
),
esc_html( $setting_message_detail['status'] ),
esc_html( $setting_message_detail['value'] )
)
);
}
?>
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=== Nginx Helper ===
Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane
Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane, agvs
Unlinked Contributors: stefanfisk,SGr33n
Donate Link: http://rt.cx/eedonate/
Tags: nginx, cache-purge, fastcgi, permalinks, redis-cache
Expand Down Expand Up @@ -93,6 +93,10 @@ To purge a page immediately, follow these instructions:
* Just open this in a browser and the page will be purged instantly.
* Needless to say, this won't work, if you have a page or taxonomy called 'purge'.

**Q. Does it need any kind of URL structure?**

Yes. When setting the URL structure in Nginx configuration file a trailing slash should always be added.

= FAQ - Nginx Redis Cache =

**Q. Can I override the redis hostname, port and prefix?**
Expand Down