Skip to content

Commit

Permalink
Add plural translation to %s seconds (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-mendonca committed Nov 25, 2023
1 parent 51da0fd commit ce33ab7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions inc/class-snitch-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
);
}
}
Expand Down

0 comments on commit ce33ab7

Please sign in to comment.