Bugfix
-bugfix -use ngettext for plurals
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$ids[] = $row['id'];
|
||||
|
||||
$file = $row['filename'];
|
||||
if (file_exists($file)) {
|
||||
$files[] = realpath('.') . "/" . $file;
|
||||
}
|
||||
@@ -154,6 +155,7 @@ if (($req_suppress != "") and ($req_delete == "")) {
|
||||
echo '</thead>';
|
||||
echo '<tbody>';
|
||||
|
||||
$nRows = 0;
|
||||
while ($row = $stmt3->fetch(PDO::FETCH_ASSOC)) {
|
||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
$full = host() . $row['filename'];
|
||||
@@ -179,11 +181,13 @@ if (($req_suppress != "") and ($req_delete == "")) {
|
||||
echo '<td><input type="text" id="legende" name="legende[]" value="' . $row['legende'] . '" size=""></td></tr>';
|
||||
|
||||
echo '<input type="hidden" id="id" name="id[]" value="' . $row['id'] . '">';
|
||||
$nRows++;
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
|
||||
echo '<p class="alert">' . gettext('Clic on <b>Delete</b> button will delete the images in the database and the files on the server.') . '</p>';
|
||||
|
||||
echo '<p class="alert">' . ngettext("Clic on <b>Delete</b> button will delete the image in the database and the file on the server.", "Clic on <b>Delete</b> button will delete the images in the database and the files on the server.", $nRows) . '</p>';
|
||||
echo '<button type="submit" name="delete" value="delete" class="myButton all">' . gettext('Delete') . '</button>';
|
||||
echo '</form>';
|
||||
|
||||
@@ -198,8 +202,7 @@ if (($req_suppress != "") and ($req_delete == "")) {
|
||||
|
||||
if ($req_delete != "") {
|
||||
|
||||
//$msg = sprintf("Updated %d rows with following request:", $count);
|
||||
$msg = sprintf(gettext("%d rows deleted and the following files:"), $count);
|
||||
$msg = sprintf(ngettext("%d row deleted and the following file:","%d rows deleted and the following files:", $count), $count);
|
||||
//$msg = $count . gettext(" rows deleted and the following files:");
|
||||
echo '<h3 class="greenstyle">' . $msg . '</h3>';
|
||||
echo '<h3>' . nl2br($files_deleted) . '</h3>';
|
||||
|
||||
Reference in New Issue
Block a user