From cdfeef2adec54da3b2ee391191b0db98e0a7ebf7 Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Thu, 23 Nov 2023 16:04:06 +0000 Subject: [PATCH] Add plural translation to %s seconds --- inc/class-snitch-cpt.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/inc/class-snitch-cpt.php b/inc/class-snitch-cpt.php index c543301..ec16b98 100644 --- a/inc/class-snitch-cpt.php +++ b/inc/class-snitch-cpt.php @@ -640,10 +640,17 @@ private static function _html_code( $post_id ) { private static function _html_duration( $post_id ) { $duration = self::_get_meta( $post_id, 'duration' ); if ( $duration ) { - echo sprintf( - /* translators: duration in seconds */ - esc_html__( '%s seconds', 'snitch' ), - esc_html( $duration ) + echo esc_html( + sprintf( + /* translators: duration in seconds */ + _n( + '%s second', + '%s seconds', + $duration, + 'snitch' + ), + $duration + ) ); } }