-bugfix
-use ngettext for plurals
This commit is contained in:
2024-12-12 10:16:51 +01:00
parent 9665a355be
commit f056c8a9a0
4 changed files with 197 additions and 118 deletions

View File

@@ -178,6 +178,7 @@ try {
$count = $stmt->fetchColumn(34); // total => 35
$stmt->execute(array($perpage, $offset));
if (empty($_POST)) {
echo '<h3 class="greenstyle">' . count($dir) . gettext(' images found in folder') . ' <i><a href="photos/img/">photos/img/</a></i> ...</h3>';
// Display request !!
@@ -193,7 +194,9 @@ try {
}
else {
echo '<h3 class="greenstyle">' . $count . gettext(' images founds with the following request:') . '</h3>';
$found = sprintf(ngettext("%d image found with the following query:","%d images found with the following query:", $count), $count);
echo '<h3 class="greenstyle">' . $found . '</h3>';
//echo '<h3 class="greenstyle">' . $count . gettext(' images founds with the following request:') . '</h3>';
// Display request !!
echo '<pre><code>' . $query2 . '</code></pre>';
}
@@ -397,7 +400,7 @@ try {
$result = $stmt->fetch(PDO::FETCH_ASSOC);
$numRows = $result['count'];
$stmt = $conn->reset();
//$stmt = $conn->reset();
$conn = null;
}