Modifiy nicetime function to avoid plural if term ending by s.

This commit is contained in:
Adrien Ponchelet 2016-08-31 12:01:27 +02:00
parent b15dae8b82
commit ed402e896f

View file

@ -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');
?>
?>