From 8b2dfd492713853c39ec01073efa4059ce54e99e Mon Sep 17 00:00:00 2001 From: Marco Almeida Date: Wed, 14 Aug 2024 10:26:10 +0100 Subject: [PATCH 1/6] Fix "Enable/Disable" logging description string Fix "Enable/Disable" logging description string to make it easier to translate --- admin/partials/nginx-helper-general-options.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/admin/partials/nginx-helper-general-options.php b/admin/partials/nginx-helper-general-options.php index a91eb53f..3b17a1e9 100644 --- a/admin/partials/nginx-helper-general-options.php +++ b/admin/partials/nginx-helper-general-options.php @@ -620,14 +620,15 @@ } printf( - '

(%1$s: %2$s %3$s %4$s NGINX_HELPER_LOG constant %5$s %6$s %7$s wp-config.php)

', - 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' ) + '

(%s)

', + 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) */ + __( 'NOTE: To %1$s the logging feature, you must define the NGINX_HELPER_LOG constant as %2$s in your wp-config.php file', 'nginx-helper' ) + ), + esc_html( $setting_message_detail['status'] ), + esc_html( $setting_message_detail['value'] ) + ) ); } ?> From 4cee08c684d75f107ae32a6a2568927a593b729a Mon Sep 17 00:00:00 2001 From: Marco Almeida Date: Wed, 14 Aug 2024 10:40:30 +0100 Subject: [PATCH 2/6] Fix "Posted date/time" string Fix "Posted date/time" string to make it comply with translatable strings best practices --- admin/class-nginx-helper-admin.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index f91289a7..6f3cbe8c 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -434,7 +434,13 @@ public function nginx_helper_get_feeds() { printf( '%s', esc_url( $item->get_permalink() ), - esc_attr__( 'Posted ', 'nginx-helper' ) . esc_attr( $item->get_date( 'j F Y | g:i a' ) ), + 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() ) ); ?> From 3b8c8022d01b25fe0c6d8ec9e693c823d3b1ce84 Mon Sep 17 00:00:00 2001 From: Marco Almeida Date: Wed, 14 Aug 2024 10:44:24 +0100 Subject: [PATCH 3/6] Fix placeholders on translatable strings Fix placeholders on translatable strings to make it comply with best practices --- admin/class-purger.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/admin/class-purger.php b/admin/class-purger.php index ee07019e..141401a0 100644 --- a/admin/class-purger.php +++ b/admin/class-purger.php @@ -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 + ) + ); } From 8ea5c94fbc041d01b376c73192ba81ba5097b39e Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Fri, 4 Apr 2025 11:54:27 +0530 Subject: [PATCH 4/6] doc: add url structure support for fastcgi cache. --- README.md | 4 ++++ readme.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 73e58a2b..7a5dc36a 100644 --- a/README.md +++ b/README.md @@ -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?** diff --git a/readme.txt b/readme.txt index d3b41976..345cbcca 100644 --- a/readme.txt +++ b/readme.txt @@ -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?** From 1b1ed9f139e11f2c64fc88b990eadf1a643165b7 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Mon, 24 Mar 2025 19:31:45 +0530 Subject: [PATCH 5/6] doc: add contributor name. --- README.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a5dc36a..e668bcf7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/readme.txt b/readme.txt index 345cbcca..a3e1117c 100644 --- a/readme.txt +++ b/readme.txt @@ -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 From ee6a054f2e83922b46f03ddf1db204ded5b60be0 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Mon, 7 Apr 2025 12:15:56 +0530 Subject: [PATCH 6/6] doc: capitalize third party service name. --- README.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e668bcf7..83143561 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ To purge a page immediately, follow these instructions: **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. +Yes. When setting the URL structure in Nginx configuration file a trailing slash should always be added. ### FAQ - Nginx Redis Cache ### diff --git a/readme.txt b/readme.txt index a3e1117c..b905cfa2 100644 --- a/readme.txt +++ b/readme.txt @@ -95,7 +95,7 @@ To purge a page immediately, follow these instructions: **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. +Yes. When setting the URL structure in Nginx configuration file a trailing slash should always be added. = FAQ - Nginx Redis Cache =