pluriel occurence

This commit is contained in:
Fred Tempez 2020-08-19 15:27:23 +02:00
parent 6a075b9880
commit 3731ef209a

View File

@ -213,7 +213,8 @@ class search extends common {
$t = preg_replace($motclef, '<span class="searchKeyword">\1</span>',$t); $t = preg_replace($motclef, '<span class="searchKeyword">\1</span>',$t);
// Sauver résultat // Sauver résultat
$resultat .= '<p class="searchResult">'.$t.'...</p>'; $resultat .= '<p class="searchResult">'.$t.'...</p>';
$resultat .= '<p class="searchTitle">'.count($matches[0]) . ' occurence(s)<p>'; $o = count($matches[0]) === 1 ? ' occurence<p>' : ' occurences<p>';
$resultat .= '<p class="searchTitle">'.count($matches[0]) . $o;
//} //}
return ([ return ([
'matches' => count($matches[0]), 'matches' => count($matches[0]),