From ed402e896f06b996740861b02bc86a981e189640 Mon Sep 17 00:00:00 2001 From: Adrien Ponchelet Date: Wed, 31 Aug 2016 12:01:27 +0200 Subject: [PATCH] Modifiy nicetime function to avoid plural if term ending by s. --- upload/includes/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/upload/includes/functions.php b/upload/includes/functions.php index eac91f1c..d9bbe5ca 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -2552,7 +2552,10 @@ $difference = round($difference); if($difference != 1) { - $periods[$j].= "s"; + // *** Dont apply plural if terms ending by a "s". Typically, french word for "month" is "mois". + if(substr($periods[$j], -1) != "s") { + $periods[$j].= "s"; + } } return sprintf(lang($tense),$difference,$periods[$j]); } @@ -5692,4 +5695,4 @@ include( 'functions_photo.php' ); include('functions_actions.php'); include('functions_playlist.php'); -?> \ No newline at end of file +?>