mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-07-02 16:02:07 +02:00
Fix #27 Handle too much images in zip download URL
This commit is dedicated to Schoumi, who is supporting me on Tipeee. Many thanks :-)
This commit is contained in:
@@ -41,6 +41,7 @@ sub startup {
|
||||
thumbnail_size => 100,
|
||||
theme => 'default',
|
||||
dbtype => 'sqlite',
|
||||
max_files_in_zip => 15,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+98
-80
@@ -1,7 +1,7 @@
|
||||
# vim:set sw=4 ts=4 sts=4 expandtab:
|
||||
package Lutim::Controller;
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
use Mojo::Util qw(url_unescape b64_encode);
|
||||
use Mojo::Util qw(url_escape url_unescape b64_encode);
|
||||
use Mojo::Asset::Memory;
|
||||
use Mojo::JSON qw(true false);
|
||||
use Lutim::DB::Image;
|
||||
@@ -625,101 +625,119 @@ sub zip {
|
||||
my $c = shift;
|
||||
my $imgs = $c->every_param('i');
|
||||
|
||||
my $zip = Archive::Zip->new();
|
||||
my $img_nb = scalar(@{$imgs});
|
||||
my $max_zip = $c->config('max_files_in_zip');
|
||||
|
||||
# We HAVE to add a png file at the beginning, otherwise the $zip
|
||||
# could use the mimetype of an SVG file if it's the first file asked.
|
||||
$zip->addFile('themes/default/public/img/favicon.png', 'hosted_with_lutim.png');
|
||||
if ($img_nb <= $max_zip) {
|
||||
my $zip = Archive::Zip->new();
|
||||
|
||||
$zip->addDirectory('images/');
|
||||
for my $img (@{$imgs}) {
|
||||
my ($short, $key) = split('/', $img);
|
||||
if (defined $key) {
|
||||
$key =~ s/\.[^.]*//;
|
||||
} else {
|
||||
$short =~ s/\.[^.]*//;
|
||||
}
|
||||
my $image = Lutim::DB::Image->new(app => $c->app, short => $short);
|
||||
# We HAVE to add a png file at the beginning, otherwise the $zip
|
||||
# could use the mimetype of an SVG file if it's the first file asked.
|
||||
$zip->addFile('themes/default/public/img/favicon.png', 'hosted_with_lutim.png');
|
||||
|
||||
if ($image->enabled && $image->path) {
|
||||
my $filename = $image->filename;
|
||||
if($image->delete_at_day && $image->created_at + $image->delete_at_day * 86400 <= time()) {
|
||||
# Log deletion
|
||||
$c->app->log->info('[DELETION] someone tried to view '.$image->filename.' but it has been removed by expiration (path: '.$image->path.')');
|
||||
|
||||
# Delete image
|
||||
$c->delete_image($image);
|
||||
|
||||
# Warn user
|
||||
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
|
||||
next;
|
||||
}
|
||||
|
||||
# Delete image if needed
|
||||
if ($image->delete_at_first_view && $image->counter >= 1) {
|
||||
# Log deletion
|
||||
$c->app->log->info('[DELETION] someone made '.$image->filename.' removed (path: '.$image->path.')');
|
||||
|
||||
# Delete image
|
||||
$c->delete_image($image);
|
||||
|
||||
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
|
||||
next;
|
||||
$zip->addDirectory('images/');
|
||||
for my $img (@{$imgs}) {
|
||||
my ($short, $key) = split('/', $img);
|
||||
if (defined $key) {
|
||||
$key =~ s/\.[^.]*//;
|
||||
} else {
|
||||
my $expires = ($image->delete_at_day) ? $image->delete_at_day : 360;
|
||||
my $dt = DateTime->from_epoch( epoch => $expires * 86400 + $image->created_at);
|
||||
$dt->set_time_zone('GMT');
|
||||
$expires = $dt->strftime("%a, %d %b %Y %H:%M:%S GMT");
|
||||
$short =~ s/\.[^.]*//;
|
||||
}
|
||||
my $image = Lutim::DB::Image->new(app => $c->app, short => $short);
|
||||
|
||||
my $path = $image->path;
|
||||
unless ( -f $path && -r $path ) {
|
||||
$c->app->log->error("Cannot read file [$path]. error [$!]");
|
||||
if ($image->enabled && $image->path) {
|
||||
my $filename = $image->filename;
|
||||
if($image->delete_at_day && $image->created_at + $image->delete_at_day * 86400 <= time()) {
|
||||
# Log deletion
|
||||
$c->app->log->info('[DELETION] someone tried to view '.$image->filename.' but it has been removed by expiration (path: '.$image->path.')');
|
||||
|
||||
# Delete image
|
||||
$c->delete_image($image);
|
||||
|
||||
# Warn user
|
||||
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
|
||||
next;
|
||||
}
|
||||
|
||||
if ($key) {
|
||||
$zip->addString($c->decrypt($key, $path)->slurp, "images/$filename");
|
||||
# Delete image if needed
|
||||
if ($image->delete_at_first_view && $image->counter >= 1) {
|
||||
# Log deletion
|
||||
$c->app->log->info('[DELETION] someone made '.$image->filename.' removed (path: '.$image->path.')');
|
||||
|
||||
# Delete image
|
||||
$c->delete_image($image);
|
||||
|
||||
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
|
||||
next;
|
||||
} else {
|
||||
$zip->addFile($path, "images/$filename");
|
||||
my $expires = ($image->delete_at_day) ? $image->delete_at_day : 360;
|
||||
my $dt = DateTime->from_epoch( epoch => $expires * 86400 + $image->created_at);
|
||||
$dt->set_time_zone('GMT');
|
||||
$expires = $dt->strftime("%a, %d %b %Y %H:%M:%S GMT");
|
||||
|
||||
my $path = $image->path;
|
||||
unless ( -f $path && -r $path ) {
|
||||
$c->app->log->error("Cannot read file [$path]. error [$!]");
|
||||
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
|
||||
next;
|
||||
}
|
||||
|
||||
if ($key) {
|
||||
$zip->addString($c->decrypt($key, $path)->slurp, "images/$filename");
|
||||
} else {
|
||||
$zip->addFile($path, "images/$filename");
|
||||
}
|
||||
|
||||
# Log access
|
||||
$c->app->log->info('[VIEW] someone viewed '.$image->filename.' (path: '.$image->path.')');
|
||||
# Update counter and record
|
||||
$image->counter($image->counter + 1)
|
||||
->last_access_at(time)
|
||||
->write;
|
||||
}
|
||||
} elsif ($image->path && !$image->enabled) {
|
||||
# Log access try
|
||||
$c->app->log->info('[NOT FOUND] someone tried to view '.$short.' but it does\'nt exist anymore.');
|
||||
|
||||
# Log access
|
||||
$c->app->log->info('[VIEW] someone viewed '.$image->filename.' (path: '.$image->path.')');
|
||||
# Update counter and record
|
||||
$image->counter($image->counter + 1)
|
||||
->last_access_at(time)
|
||||
->write;
|
||||
# Warn user
|
||||
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$image->filename.'.txt');
|
||||
next;
|
||||
} else {
|
||||
$zip->addString($c->l('Image not found.'), 'images/'.$short.'.txt');
|
||||
next;
|
||||
}
|
||||
} elsif ($image->path && !$image->enabled) {
|
||||
# Log access try
|
||||
$c->app->log->info('[NOT FOUND] someone tried to view '.$short.' but it does\'nt exist anymore.');
|
||||
|
||||
# Warn user
|
||||
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$image->filename.'.txt');
|
||||
next;
|
||||
} else {
|
||||
$zip->addString($c->l('Image not found.'), 'images/'.$short.'.txt');
|
||||
next;
|
||||
}
|
||||
}
|
||||
my ($fh, $zipfile) = Archive::Zip::tempFile();
|
||||
unless ($zip->writeToFileNamed($zipfile) == AZ_OK) {
|
||||
$c->flash(
|
||||
msg => $c->l('Something went wrong when creating the zip file. Try again later or contact the administrator (%1).', $c->config('contact'))
|
||||
my ($fh, $zipfile) = Archive::Zip::tempFile();
|
||||
unless ($zip->writeToFileNamed($zipfile) == AZ_OK) {
|
||||
$c->flash(
|
||||
msg => $c->l('Something went wrong when creating the zip file. Try again later or contact the administrator (%1).', $c->config('contact'))
|
||||
);
|
||||
return $c->redirect_to('/');
|
||||
}
|
||||
$c->res->content->headers->content_type('application/zip;name=images.zip');
|
||||
$c->res->content->headers->content_disposition('attachment;filename=images.zip');;
|
||||
|
||||
my $asset = Mojo::Asset::File->new(path => $zipfile);
|
||||
$c->res->content->asset($asset);
|
||||
$c->res->content->headers->content_length($asset->size);
|
||||
|
||||
unlink $zipfile;
|
||||
|
||||
return $c->rendered(200);
|
||||
} else {
|
||||
my $i = -1;
|
||||
my @urls = ();
|
||||
my @esc_imgs = map { my $e = $_; $e = url_escape($e); $e =~ s#%2F#/#g; $e } @{$imgs};
|
||||
while (++$i < $img_nb) {
|
||||
my $stop = ($i + $max_zip - 1 < $img_nb) ? $i + $max_zip - 1 : $img_nb - 1;
|
||||
push @urls, $c->url_for('/zip')->to_abs->to_string.'?i='.join('&i=', @esc_imgs[$i..$stop]);
|
||||
$i = $stop;
|
||||
}
|
||||
$c->render(
|
||||
template => 'zip',
|
||||
urls => \@urls
|
||||
);
|
||||
return $c->redirect_to('/');
|
||||
}
|
||||
$c->res->content->headers->content_type('application/zip;name=images.zip');
|
||||
$c->res->content->headers->content_disposition('attachment;filename=images.zip');;
|
||||
|
||||
my $asset = Mojo::Asset::File->new(path => $zipfile);
|
||||
$c->res->content->asset($asset);
|
||||
$c->res->content->headers->content_length($asset->size);
|
||||
|
||||
unlink $zipfile;
|
||||
|
||||
return $c->rendered(200);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -138,6 +138,14 @@
|
||||
# optional, default is 100 (pixels)
|
||||
#thumbnail_size => 100,
|
||||
|
||||
# maximum number of files that can be downloaded as a single zip archive
|
||||
# if too many files are asked, it results a timeout, so Lutim split the zip URL
|
||||
# in multiple URLs, each with max_file_size images.
|
||||
# timeout behavior depends heavily on your server ressources (CPU) and if images
|
||||
# are encrypted
|
||||
# optional, default is 15
|
||||
#max_files_in_zip => 15,
|
||||
|
||||
##########################
|
||||
# Lutim cron jobs settings
|
||||
##########################
|
||||
|
||||
@@ -55,6 +55,10 @@ msgstr ""
|
||||
msgid "An error occured while downloading the image."
|
||||
msgstr "Beim Herunterladen des Bildes ist ein Fehler aufgetreten."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:2
|
||||
msgid "Archives download"
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
|
||||
msgid "Back to homepage"
|
||||
msgstr "Zurück zur Hauptseite"
|
||||
@@ -187,7 +191,7 @@ msgstr "Bild-URL"
|
||||
msgid "Image delay"
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim/Controller.pm:702
|
||||
#: lib/Lutim/Controller.pm:706
|
||||
msgid "Image not found."
|
||||
msgstr "Bild nicht gefunden"
|
||||
|
||||
@@ -235,6 +239,10 @@ msgstr "Lizenz:"
|
||||
msgid "Link for share on social networks"
|
||||
msgstr "Links zum teilen auf sozialen Netzwerken"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:7
|
||||
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:4
|
||||
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
|
||||
msgstr ""
|
||||
@@ -269,6 +277,10 @@ msgstr "Nur die Bilder, die über diesen Browser versendet wurden, werden hier a
|
||||
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
|
||||
msgstr "Nur der Hochladende (natürlich nur, wenn er vorher auch Rechteinhaber des Bildes war)"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:12
|
||||
msgid "Please click on each URL to download the different zip files."
|
||||
msgstr ""
|
||||
|
||||
#. (config('contact')
|
||||
#: themes/default/templates/about.html.ep:19
|
||||
msgid "Please contact the administrator: %1"
|
||||
@@ -295,7 +307,7 @@ msgid "Something bad happened"
|
||||
msgstr "Es ist ein Fehler aufgetreten"
|
||||
|
||||
#. ($c->config('contact')
|
||||
#: lib/Lutim/Controller.pm:709
|
||||
#: lib/Lutim/Controller.pm:713
|
||||
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
|
||||
msgstr "Es ist ein Fehler aufgetreten. Versuche es erneut oder kontaktiere den Administrator (%1)."
|
||||
|
||||
@@ -319,6 +331,10 @@ msgstr "Lutim ist <a href=\"https://de.wikipedia.org/wiki/Freie_Software\">freie
|
||||
msgid "The URL is not valid."
|
||||
msgstr "Die URL ist nicht gültig."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:16
|
||||
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
|
||||
msgid "The delete token is invalid."
|
||||
msgstr "Das Token zum Löschen ist ungültig."
|
||||
@@ -383,7 +399,7 @@ msgstr "Twittere es!"
|
||||
msgid "Unable to find the image %1."
|
||||
msgstr "Konnte das Bild %1 nicht finden."
|
||||
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:658 lib/Lutim/Controller.pm:670 lib/Lutim/Controller.pm:681 lib/Lutim/Controller.pm:703 lib/Lutim/Plugin/Helpers.pm:61
|
||||
msgid "Unable to find the image: it has been deleted."
|
||||
msgstr "Dieses Bild wurde gelöscht."
|
||||
|
||||
@@ -436,6 +452,10 @@ msgstr "Ja, ist es! Auf der anderen Seite wird deine IP-Adresse, wegen rechtlich
|
||||
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
msgstr "Ja, ist es! Auf der anderen Seite kannst du den Entwickler via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> oder <a href=\"https://liberapay.com/sky/\">Liberapay</a> unterstützen."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:6
|
||||
msgid "You asked to download a zip archive for too much files."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:8
|
||||
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
|
||||
msgstr "Du kannst Bilder, die du auf Lutim hochlädst, entweder nach dem ernsten Ansehen (oder Herunterladen) oder nach einem der vorgeschlagenen Zeiten löschen lassen."
|
||||
|
||||
@@ -53,6 +53,10 @@ msgstr ""
|
||||
msgid "An error occured while downloading the image."
|
||||
msgstr "An error occured while downloading the image."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:2
|
||||
msgid "Archives download"
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
|
||||
msgid "Back to homepage"
|
||||
msgstr "Back to homepage"
|
||||
@@ -185,7 +189,7 @@ msgstr "Image URL"
|
||||
msgid "Image delay"
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim/Controller.pm:702
|
||||
#: lib/Lutim/Controller.pm:706
|
||||
msgid "Image not found."
|
||||
msgstr ""
|
||||
|
||||
@@ -233,6 +237,10 @@ msgstr "License:"
|
||||
msgid "Link for share on social networks"
|
||||
msgstr "Link for share on social networks"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:7
|
||||
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:4
|
||||
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
|
||||
msgstr "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
|
||||
@@ -265,6 +273,10 @@ msgstr ""
|
||||
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
|
||||
msgstr "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:12
|
||||
msgid "Please click on each URL to download the different zip files."
|
||||
msgstr ""
|
||||
|
||||
#. (config('contact')
|
||||
#: themes/default/templates/about.html.ep:19
|
||||
msgid "Please contact the administrator: %1"
|
||||
@@ -291,7 +303,7 @@ msgid "Something bad happened"
|
||||
msgstr "Something bad happened"
|
||||
|
||||
#. ($c->config('contact')
|
||||
#: lib/Lutim/Controller.pm:709
|
||||
#: lib/Lutim/Controller.pm:713
|
||||
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
|
||||
msgstr ""
|
||||
|
||||
@@ -315,6 +327,10 @@ msgstr "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_soft
|
||||
msgid "The URL is not valid."
|
||||
msgstr "The URL is not valid."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:16
|
||||
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
|
||||
msgid "The delete token is invalid."
|
||||
msgstr "The delete token is invalid."
|
||||
@@ -379,7 +395,7 @@ msgstr "Tweet it!"
|
||||
msgid "Unable to find the image %1."
|
||||
msgstr "Unable to find the image %1."
|
||||
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:658 lib/Lutim/Controller.pm:670 lib/Lutim/Controller.pm:681 lib/Lutim/Controller.pm:703 lib/Lutim/Plugin/Helpers.pm:61
|
||||
msgid "Unable to find the image: it has been deleted."
|
||||
msgstr "Unable to find the image: it has been deleted."
|
||||
|
||||
@@ -436,6 +452,10 @@ msgstr "Yes, it is! On the other side, if you want to support the developer, you
|
||||
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/zip.html.ep:6
|
||||
msgid "You asked to download a zip archive for too much files."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:8
|
||||
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
|
||||
msgstr "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
|
||||
|
||||
@@ -55,6 +55,10 @@ msgstr ""
|
||||
msgid "An error occured while downloading the image."
|
||||
msgstr "Error al intentar modificar la imagen."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:2
|
||||
msgid "Archives download"
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
|
||||
msgid "Back to homepage"
|
||||
msgstr "Volver a la página inicial"
|
||||
@@ -187,7 +191,7 @@ msgstr "URL de la imagen"
|
||||
msgid "Image delay"
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim/Controller.pm:702
|
||||
#: lib/Lutim/Controller.pm:706
|
||||
msgid "Image not found."
|
||||
msgstr "Imagen no encontrada."
|
||||
|
||||
@@ -235,6 +239,10 @@ msgstr "Licencia:"
|
||||
msgid "Link for share on social networks"
|
||||
msgstr "Enlace para compartir en redes sociales"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:7
|
||||
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:4
|
||||
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
|
||||
msgstr "Lutim es un servicio de alojamiento de imágenes anónimo y gratuito. También es el nombre del software libre que proporciona este servicio."
|
||||
@@ -267,6 +275,10 @@ msgstr "Sólo se enumeran aquí las imágenes enviadas con este navegador. Las i
|
||||
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
|
||||
msgstr "¡Sólo el usuario! (bueno, sólo si él/ela es el único titular de los derechos de las imágenes antes de subirlas)"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:12
|
||||
msgid "Please click on each URL to download the different zip files."
|
||||
msgstr ""
|
||||
|
||||
#. (config('contact')
|
||||
#: themes/default/templates/about.html.ep:19
|
||||
msgid "Please contact the administrator: %1"
|
||||
@@ -293,7 +305,7 @@ msgid "Something bad happened"
|
||||
msgstr "Algo malo ha pasado"
|
||||
|
||||
#. ($c->config('contact')
|
||||
#: lib/Lutim/Controller.pm:709
|
||||
#: lib/Lutim/Controller.pm:713
|
||||
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
|
||||
msgstr "Algo malo ha pasado. Inténtelo de nuevo más tarde o contacte con el administrador (%1)."
|
||||
|
||||
@@ -317,6 +329,10 @@ msgstr "El software Lutim es <a href=\"http://es.wikipedia.org/wiki/Software_lib
|
||||
msgid "The URL is not valid."
|
||||
msgstr "La URL no es válida."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:16
|
||||
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
|
||||
msgid "The delete token is invalid."
|
||||
msgstr "El código de borrado no es válido."
|
||||
@@ -381,7 +397,7 @@ msgstr "¡Tuitéalo!"
|
||||
msgid "Unable to find the image %1."
|
||||
msgstr "No se ha podido encontrar la imagen %1."
|
||||
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:658 lib/Lutim/Controller.pm:670 lib/Lutim/Controller.pm:681 lib/Lutim/Controller.pm:703 lib/Lutim/Plugin/Helpers.pm:61
|
||||
msgid "Unable to find the image: it has been deleted."
|
||||
msgstr "No se ha podido encontrar la imagen: ha sido borrada."
|
||||
|
||||
@@ -434,6 +450,10 @@ msgstr "¡Sí, lo es! Por otro lado, por razones legales, se almacena la direcci
|
||||
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
msgstr "¡Sí, lo es! Por otro lado, si quiere ayudar a apoyar al desarrollador, puede hacerlo vía <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> o con <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:6
|
||||
msgid "You asked to download a zip archive for too much files."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:8
|
||||
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
|
||||
msgstr "Puede, opcionalmente, solicitar que la imagen publicada en Lutim se elimine con la primera vista (o descarga) o tras un tiempo seleccionado de entre varios propuestos."
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Lutim\n"
|
||||
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: 2015-09-17 22:02+0000\n"
|
||||
"PO-Revision-Date: 2017-06-05 15:54+0000\n"
|
||||
"Last-Translator: Luc Didry <luc@didry.org>\n"
|
||||
"Language-Team: French (http://www.transifex.com/fiat-tux/lutim/language/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -55,6 +55,10 @@ msgstr "Images actives"
|
||||
msgid "An error occured while downloading the image."
|
||||
msgstr "Une erreur est survenue lors du téléchargement de l’image."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:2
|
||||
msgid "Archives download"
|
||||
msgstr "Téléchargement d’archives"
|
||||
|
||||
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
|
||||
msgid "Back to homepage"
|
||||
msgstr "Retour à la page d’accueil"
|
||||
@@ -187,7 +191,7 @@ msgstr "URL de l’image"
|
||||
msgid "Image delay"
|
||||
msgstr "Durée de rétention de l’image"
|
||||
|
||||
#: lib/Lutim/Controller.pm:702
|
||||
#: lib/Lutim/Controller.pm:706
|
||||
msgid "Image not found."
|
||||
msgstr "Image non trouvée."
|
||||
|
||||
@@ -235,6 +239,10 @@ msgstr "Licence :"
|
||||
msgid "Link for share on social networks"
|
||||
msgstr "Lien pour partager sur les réseaux sociaux"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:7
|
||||
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
|
||||
msgstr "Lutim ne peut zipper autant d’images à la fois, votre demande a donc été découpée en plusieurs URL."
|
||||
|
||||
#: themes/default/templates/about.html.ep:4
|
||||
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
|
||||
msgstr "Lutim est un service gratuit et anonyme d’hébergement d’images. Il s’agit aussi du nom du logiciel (libre) qui fournit ce service."
|
||||
@@ -267,6 +275,10 @@ msgstr "Seules les images envoyées avec ce navigateur seront listées ici. Les
|
||||
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
|
||||
msgstr "Seulement l’envoyeur ! (enfin, seulement s’il possède des droits exclusifs sur les images avant de les envoyer)"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:12
|
||||
msgid "Please click on each URL to download the different zip files."
|
||||
msgstr "Veuillez cliquer sur chaque URL pour télécharger les différents fichiers zip."
|
||||
|
||||
#. (config('contact')
|
||||
#: themes/default/templates/about.html.ep:19
|
||||
msgid "Please contact the administrator: %1"
|
||||
@@ -293,7 +305,7 @@ msgid "Something bad happened"
|
||||
msgstr "Un problème est survenu"
|
||||
|
||||
#. ($c->config('contact')
|
||||
#: lib/Lutim/Controller.pm:709
|
||||
#: lib/Lutim/Controller.pm:713
|
||||
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
|
||||
msgstr "Quelque chose s’est mal passé lors de la création de l’archive. Veuillez réessayer plus tard ou contactez l’administrateur (%1)."
|
||||
|
||||
@@ -319,6 +331,10 @@ msgstr "Le logiciel Lutim est un <a href=\"https://fr.wikipedia.org/wiki/Logicie
|
||||
msgid "The URL is not valid."
|
||||
msgstr "L’URL n’est pas valide."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:16
|
||||
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
|
||||
msgstr "Le processus de téléchargement automatique va ouvrir un onglet dans votre navigateur pour chaque lien. Vous devez autoriser les fenêtres popup pour Lutim."
|
||||
|
||||
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
|
||||
msgid "The delete token is invalid."
|
||||
msgstr "Le jeton de suppression est invalide."
|
||||
@@ -383,7 +399,7 @@ msgstr "Tweetez !"
|
||||
msgid "Unable to find the image %1."
|
||||
msgstr "Impossible de trouver l’image %1."
|
||||
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:658 lib/Lutim/Controller.pm:670 lib/Lutim/Controller.pm:681 lib/Lutim/Controller.pm:703 lib/Lutim/Plugin/Helpers.pm:61
|
||||
msgid "Unable to find the image: it has been deleted."
|
||||
msgstr "Impossible de trouver l’image : elle a été supprimée."
|
||||
|
||||
@@ -436,6 +452,10 @@ msgstr "Oui, ça l’est ! Par contre, pour des raisons légales, votre adresse
|
||||
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
msgstr "Oui, ça l’est ! Par contre, si vous avez envie de soutenir le développeur, vous pouvez faire un microdon avec <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> ou via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:6
|
||||
msgid "You asked to download a zip archive for too much files."
|
||||
msgstr "Vous avez demandé de télécharger une archive zip pour trop de fichiers."
|
||||
|
||||
#: themes/default/templates/about.html.ep:8
|
||||
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
|
||||
msgstr "Vous pouvez, de façon facultative, demander à ce que la ou les images déposées sur Lutim soient supprimées après leur premier affichage (ou téléchargement) ou au bout d’un délai choisi parmi ceux proposés."
|
||||
|
||||
@@ -54,6 +54,10 @@ msgstr "Imatges actius"
|
||||
msgid "An error occured while downloading the image."
|
||||
msgstr "Una error es apareguda pendent lo telecargament de l'imatge."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:2
|
||||
msgid "Archives download"
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
|
||||
msgid "Back to homepage"
|
||||
msgstr "Tornar a la pagina d'acuèlh"
|
||||
@@ -186,7 +190,7 @@ msgstr "URL de l'imatge"
|
||||
msgid "Image delay"
|
||||
msgstr "Delai de l'imatge"
|
||||
|
||||
#: lib/Lutim/Controller.pm:702
|
||||
#: lib/Lutim/Controller.pm:706
|
||||
msgid "Image not found."
|
||||
msgstr "Imatge pas trobat."
|
||||
|
||||
@@ -234,6 +238,10 @@ msgstr "Licéncia :"
|
||||
msgid "Link for share on social networks"
|
||||
msgstr "Ligam per partejar suls malhums socials"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:7
|
||||
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:4
|
||||
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
|
||||
msgstr "Lutim es un servici gratuit e anonim d’albergament d’imatges. S’agís tanben del nom del logicial (liure) que fornís aqueste servici."
|
||||
@@ -266,6 +274,10 @@ msgstr "Solament los imatges mandats amb aqueste navigador seràn listats aquí.
|
||||
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
|
||||
msgstr "Solament lo qu'a mandat ! (ben, solament se ten los dreits exclusius dels imatges abans de los mandar)"
|
||||
|
||||
#: themes/default/templates/zip.html.ep:12
|
||||
msgid "Please click on each URL to download the different zip files."
|
||||
msgstr ""
|
||||
|
||||
#. (config('contact')
|
||||
#: themes/default/templates/about.html.ep:19
|
||||
msgid "Please contact the administrator: %1"
|
||||
@@ -292,7 +304,7 @@ msgid "Something bad happened"
|
||||
msgstr "Un problèma es aparegut"
|
||||
|
||||
#. ($c->config('contact')
|
||||
#: lib/Lutim/Controller.pm:709
|
||||
#: lib/Lutim/Controller.pm:713
|
||||
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
|
||||
msgstr "Quicòm a trucat pendent la creacion de l'archiu. Mercés de tornar ensajar pus tard o de contactar l'administrator (%1)."
|
||||
|
||||
@@ -316,6 +328,10 @@ msgstr "Lo logicial Lutim es un <a href=\"https://oc.wikipedia.org/wiki/Logicial
|
||||
msgid "The URL is not valid."
|
||||
msgstr "L'URL n'es pas valida."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:16
|
||||
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
|
||||
msgid "The delete token is invalid."
|
||||
msgstr "Lo geton de supression es invalida."
|
||||
@@ -380,7 +396,7 @@ msgstr "Tweetejatz !"
|
||||
msgid "Unable to find the image %1."
|
||||
msgstr "Impossible de trobar l'imatge %1."
|
||||
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61
|
||||
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:658 lib/Lutim/Controller.pm:670 lib/Lutim/Controller.pm:681 lib/Lutim/Controller.pm:703 lib/Lutim/Plugin/Helpers.pm:61
|
||||
msgid "Unable to find the image: it has been deleted."
|
||||
msgstr "Impossible de trobar l'imatge : es estat suprimit."
|
||||
|
||||
@@ -433,6 +449,10 @@ msgstr "Òc, es aquò ! Al contrari, per de rasons legalas, vòstra adreça IP s
|
||||
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
msgstr "Òc, o es ! Al contrari, s'avètz enveja de sosténer lo desvolopaire, podètz far un microdon amb <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> o via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
|
||||
|
||||
#: themes/default/templates/zip.html.ep:6
|
||||
msgid "You asked to download a zip archive for too much files."
|
||||
msgstr ""
|
||||
|
||||
#: themes/default/templates/about.html.ep:8
|
||||
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
|
||||
msgstr "Podètz, d'un biais facultatiu, demandar que l'imatge o los imatges depausats sus Lutim sián suprimits aprèp lor primièr afichatge (o telecargament) o al cap d'un delai causit entre las prepausadas."
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
% # vim:set sts=4 sw=4 ts=4 ft=html.epl expandtab:
|
||||
<h4><%= l('Archives download') %></h4>
|
||||
<hr>
|
||||
<div>
|
||||
<p>
|
||||
<%= l('You asked to download a zip archive for too much files.') %>
|
||||
<%= l('Lutim can\'t zip so many images at once, so it splitted your demand in multiple URLs.') %>
|
||||
</p>
|
||||
</div>
|
||||
<noscript>
|
||||
<div>
|
||||
<p><%= l('Please click on each URL to download the different zip files.') %></p>
|
||||
</div>
|
||||
</noscript>
|
||||
<div class="jsonly">
|
||||
<p><%= l('The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim.') %></p>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
% for my $i (@{$urls}) {
|
||||
<li><a href="<%== $i %>" class="dl-zip" target="_blank"><%= $i %></a></li>
|
||||
% }
|
||||
</ul>
|
||||
%= javascript begin
|
||||
$(document).ready(function() {
|
||||
$('.jsononly').show();
|
||||
$('.dl-zip').each(function(index) {
|
||||
this.click();
|
||||
});
|
||||
});
|
||||
% end
|
||||
Reference in New Issue
Block a user