From 50b1f00c1703a5055c1d9343137479b0d2f1f994 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 10 Feb 2017 23:30:55 +0100 Subject: [PATCH 01/25] Add ability to protect download with a password --- cpanfile | 1 + cpanfile.snapshot | 33 +++++++++ lib/Lufi.pm | 35 ++++++--- lib/Lufi/Controller/Files.pm | 63 +++++++++++----- lib/Lufi/File.pm | 3 + lib/LufiDB.pm | 3 +- lufi.conf.template | 4 + themes/default/lib/Lufi/I18N/en.po | 98 +++++++++++++------------ themes/default/lib/Lufi/I18N/fr.po | 98 +++++++++++++------------ themes/default/lib/Lufi/I18N/it.po | 98 +++++++++++++------------ themes/default/lib/Lufi/I18N/oc.po | 98 +++++++++++++------------ themes/default/public/css/lufi.css | 5 ++ themes/default/public/js/lufi-down.js | 46 ++++++++++-- themes/default/public/js/lufi-up.js | 6 ++ themes/default/templates/index.html.ep | 8 ++ themes/default/templates/render.html.ep | 12 ++- 16 files changed, 388 insertions(+), 223 deletions(-) diff --git a/cpanfile b/cpanfile index b006806..358d0d4 100644 --- a/cpanfile +++ b/cpanfile @@ -15,3 +15,4 @@ requires 'Filesys::DfPortable'; requires 'Switch'; requires 'Data::Entropy'; requires 'Net::LDAP'; +requires 'Crypt::SaltedHash'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 38d6810..dd257b8 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -65,6 +65,15 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.006 + Crypt-SaltedHash-0.09 + pathname: G/GS/GSHANK/Crypt-SaltedHash-0.09.tar.gz + provides: + Crypt::SaltedHash 0.09 + requirements: + Digest 0 + ExtUtils::MakeMaker 6.30 + Test::Fatal 0 + Test::More 0 DBD-SQLite-1.48 pathname: I/IS/ISHIGAKI/DBD-SQLite-1.48.tar.gz provides: @@ -893,6 +902,18 @@ DISTRIBUTIONS Text::Balanced 2 if 0 perl 5.005 + Test-Fatal-0.014 + pathname: R/RJ/RJBS/Test-Fatal-0.014.tar.gz + provides: + Test::Fatal 0.014 + requirements: + Carp 0 + Exporter 5.57 + ExtUtils::MakeMaker 0 + Test::Builder 0 + Try::Tiny 0.07 + strict 0 + warnings 0 Test-Script-1.10 pathname: P/PL/PLICEASE/Test-Script-1.10.tar.gz provides: @@ -969,6 +990,18 @@ DISTRIBUTIONS Time::Zone 2.24 requirements: ExtUtils::MakeMaker 0 + Try-Tiny-0.28 + pathname: E/ET/ETHER/Try-Tiny-0.28.tar.gz + provides: + Try::Tiny 0.28 + requirements: + Carp 0 + Exporter 5.57 + ExtUtils::MakeMaker 0 + constant 0 + perl 5.006 + strict 0 + warnings 0 URI-1.71 pathname: E/ET/ETHER/URI-1.71.tar.gz provides: diff --git a/lib/Lufi.pm b/lib/Lufi.pm index a27b00f..5374754 100644 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -13,20 +13,21 @@ sub startup { my $config = $self->plugin('Config' => { default => { - provisioning => 100, - provis_step => 5, - length => 10, - token_length => 32, - secrets => ['hfudsifdsih'], - default_delay => 0, - max_delay => 0, - mail => { + provisioning => 100, + provis_step => 5, + length => 10, + token_length => 32, + secrets => ['hfudsifdsih'], + default_delay => 0, + max_delay => 0, + mail => { how => 'sendmail' }, - mail_sender => 'no-reply@lufi.io', - theme => 'default', - upload_dir => 'files', - session_duration => 3600, + mail_sender => 'no-reply@lufi.io', + theme => 'default', + upload_dir => 'files', + session_duration => 3600, + allow_pwd_on_files => 0, } }); @@ -229,6 +230,16 @@ sub startup { mkdir($self->config('upload_dir'), 0700) unless (-d $self->config('upload_dir')); die ('The upload directory ('.$self->config('upload_dir').') is not writable') unless (-w $self->config('upload_dir')); + # SQLite database migration if needed + my $columns = LufiDB::Files->table_info; + my $pwd_col = 0; + foreach my $col (@{$columns}) { + $pwd_col = 1 if $col->{name} eq 'passwd'; + } + unless ($pwd_col) { + LufiDB->do('ALTER TABLE files ADD COLUMN passwd TEXT;'); + } + # Default layout $self->defaults(layout => 'default'); diff --git a/lib/Lufi/Controller/Files.pm b/lib/Lufi/Controller/Files.pm index a56b01a..b25bca6 100644 --- a/lib/Lufi/Controller/Files.pm +++ b/lib/Lufi/Controller/Files.pm @@ -9,6 +9,7 @@ use Lufi::Slice; use File::Spec::Functions; use Number::Bytes::Human qw(format_bytes); use Filesys::DfPortable; +use Crypt::SaltedHash; sub upload { my $c = shift; @@ -98,6 +99,14 @@ sub upload { unless (defined $delay) { $delay = (($json->{delay} > 0 && $json->{delay} <= $c->max_delay) || $c->max_delay == 0) ? $json->{delay} : $c->max_delay; } + # If we have a password + my $salted_pwd; + if ($c->config('allow_pwd_on_files') && defined($json->{file_pwd}) && $json->{file_pwd} ne '') { + my $csh = Crypt::SaltedHash->new(algorithm => 'SHA-256', salt_len => 8); + $csh->add($json->{file_pwd}); + + $salted_pwd = $csh->generate(); + } my $creator = $c->ip; if (defined($c->config('ldap'))) { @@ -112,7 +121,8 @@ sub upload { filename => $json->{name}, filesize => $json->{size}, nbslices => $json->{total}, - mod_token => $c->shortener($c->config('token_length')) + mod_token => $c->shortener($c->config('token_length')), + passwd => $salted_pwd ); $f->write; } @@ -228,29 +238,41 @@ sub download { message => sub { my ($ws, $json) = @_; $json = decode_json $json; - if (defined($json->{part})) { - # Make $num an integer instead of a string - my $num = $json->{part} + 0; - # Get the slice - my $e = $f->slices->[$num]; - my $text = slurp $e->path; + # Do we need a password? + my $valid = 1; + if ($c->config('allow_pwd_on_files') && defined($f->{passwd})) { + my $pwd = $json->{file_pwd}; + $valid = Crypt::SaltedHash->validate($f->{passwd}, $json->{file_pwd}, 8); + } - my ($json2) = split('XXMOJOXX', $text, 2); - $json2 = decode 'UTF-8', $json2; - $text =~ s/^.*?XXMOJOXX/${json2}XXMOJOXX/; + if ($valid) { + if (defined($json->{part})) { + # Make $num an integer instead of a string + my $num = $json->{part} + 0; - # Send the slice - $c->send($text); - } elsif (defined($json->{ended}) && $json->{ended}) { - $f->counter($f->counter + 1); - $f->last_access_at(time); + # Get the slice + my $e = $f->slices->[$num]; + my $text = slurp $e->path; - if ($f->delete_at_first_view) { - $f->delete; - } else { - $f->write; + my ($json2) = split('XXMOJOXX', $text, 2); + $json2 = decode 'UTF-8', $json2; + $text =~ s/^.*?XXMOJOXX/${json2}XXMOJOXX/; + + # Send the slice + $c->send($text); + } elsif (defined($json->{ended}) && $json->{ended}) { + $f->counter($f->counter + 1); + $f->last_access_at(time); + + if ($f->delete_at_first_view) { + $f->delete; + } else { + $f->write; + } } + } else { + $c->send(encode_json({msg => $c->l('Your password is not valid. Please refresh the page to retry.')})); } } ); @@ -291,7 +313,8 @@ sub r { my $f = Lufi::File->new(record => $records[0]); return $c->render( template => 'render', - f => $f + f => $f, + file_pwd => ($c->config('allow_pwd_on_files') && defined($records[0]->{passwd})) ); } else { return $c->render( diff --git a/lib/Lufi/File.pm b/lib/Lufi/File.pm index 584eda4..ddc3613 100644 --- a/lib/Lufi/File.pm +++ b/lib/Lufi/File.pm @@ -25,6 +25,7 @@ has 'complete' => 0; has 'slices' => sub { return Mojo::Collection->new(); }; +has 'passwd'; sub new { my $c = shift; @@ -53,6 +54,7 @@ sub write { mod_token => $c->mod_token, nbslices => $c->nbslices, complete => $c->complete, + passwd => $c->passwd, ); return $c; @@ -89,6 +91,7 @@ sub _slurp { $c->mod_token($c->record->mod_token) if defined $c->record->mod_token; $c->nbslices($c->record->nbslices) if defined $c->record->nbslices; $c->complete($c->record->complete) if defined $c->record->complete; + $c->passwd($c->record->passwd) if defined $c->record->passwd; my @slices = LufiDB::Slices->select('WHERE short = ? ORDER BY j ASC', $c->short); diff --git a/lib/LufiDB.pm b/lib/LufiDB.pm index 6d35470..1bb66f4 100644 --- a/lib/LufiDB.pm +++ b/lib/LufiDB.pm @@ -37,7 +37,8 @@ use ORLite { last_access_at INTEGER, mod_token TEXT, nbslices INTEGER, - complete INTEGER)' + complete INTEGER, + passwd TEXT)' ); $dbh->do( 'CREATE TABLE slices ( diff --git a/lufi.conf.template b/lufi.conf.template index a337d1c..33aefac 100644 --- a/lufi.conf.template +++ b/lufi.conf.template @@ -137,6 +137,10 @@ # optional, default is 3600 #session_duration => 3600, + # allow to add a password on files, asked before allowing to download files + # optional, default to 0 + #allow_pwd_on_files => 0, + ######################### # Lufi cron jobs settings ######################### diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index d3bdec0..f4d7548 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -37,7 +37,7 @@ msgstr "" msgid "A thank you with a photo of kitten on Diaspora* or Twitter is cool too ;-)" msgstr "" -#: themes/default/templates/render.html.ep:34 +#: themes/default/templates/render.html.ep:42 msgid "Abort" msgstr "" @@ -45,12 +45,16 @@ msgstr "" msgid "About" msgstr "" +#: themes/default/templates/index.html.ep:71 +msgid "Add a password to file(s)" +msgstr "" + #: themes/default/templates/about.html.ep:18 msgid "As Lufi is a free software licensed under of the terms of the AGPLv3, you can install it on you own server. Have a look on the Wiki for the procedure." msgstr "" #. (stash('f') -#: themes/default/templates/render.html.ep:44 +#: themes/default/templates/render.html.ep:52 msgid "Asking for file part XX1 of %1" msgstr "" @@ -62,11 +66,11 @@ msgstr "" msgid "Bad CSRF token!" msgstr "" -#: themes/default/templates/render.html.ep:40 +#: themes/default/templates/render.html.ep:48 msgid "Click here to refresh the page and restart the download." msgstr "" -#: themes/default/templates/index.html.ep:72 +#: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" msgstr "" @@ -78,23 +82,23 @@ msgstr "" msgid "Comma-separated email addresses" msgstr "" -#: themes/default/templates/index.html.ep:92 +#: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" msgstr "" -#: themes/default/templates/index.html.ep:95 +#: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" msgstr "" -#: lib/Lufi/Controller/Files.pm:396 +#: lib/Lufi/Controller/Files.pm:422 msgid "Could not delete the file. You are not authenticated." msgstr "" -#: lib/Lufi/Controller/Files.pm:380 +#: lib/Lufi/Controller/Files.pm:406 msgid "Could not find the file. Are you sure of the URL and the token?" msgstr "" -#: lib/Lufi/Controller/Files.pm:296 +#: lib/Lufi/Controller/Files.pm:322 msgid "Could not find the file. Are you sure of the URL?" msgstr "" @@ -106,7 +110,7 @@ msgstr "" msgid "Delete at first download?" msgstr "" -#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:96 +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "" @@ -114,15 +118,15 @@ msgstr "" msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file." msgstr "" -#: themes/default/templates/index.html.ep:98 +#: themes/default/templates/index.html.ep:106 themes/default/templates/render.html.ep:28 msgid "Download" msgstr "" -#: themes/default/templates/render.html.ep:39 +#: themes/default/templates/render.html.ep:47 msgid "Download aborted." msgstr "" -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:97 +#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "" @@ -130,7 +134,7 @@ msgstr "" msgid "Drag and drop files in the appropriate area or use the traditional way to send files and the files will be chunked, encrypted and sent to the server. You will get two links per file: a download link, that you give to the people you want to share the file with and a deletion link, allowing you to delete the file whenever you want." msgstr "" -#: themes/default/templates/index.html.ep:69 +#: themes/default/templates/index.html.ep:77 msgid "Drop files here" msgstr "" @@ -146,23 +150,23 @@ msgstr "" msgid "Emails" msgstr "" -#: themes/default/templates/index.html.ep:99 +#: themes/default/templates/index.html.ep:107 msgid "Encrypting part XX1 of XX2" msgstr "" -#: lib/Lufi/Controller/Files.pm:216 +#: lib/Lufi/Controller/Files.pm:229 msgid "Error: the file existed but was deleted." msgstr "" -#: lib/Lufi/Controller/Files.pm:266 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:301 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "" -#: themes/default/templates/index.html.ep:100 +#: themes/default/templates/index.html.ep:108 msgid "Expiration:" msgstr "" @@ -174,7 +178,7 @@ msgstr "" msgid "Export localStorage data" msgstr "" -#: lib/Lufi/Controller/Files.pm:364 +#: lib/Lufi/Controller/Files.pm:390 msgid "File deleted" msgstr "" @@ -182,7 +186,7 @@ msgstr "" msgid "File name" msgstr "" -#: themes/default/templates/render.html.ep:43 +#: themes/default/templates/render.html.ep:51 msgid "Get the file" msgstr "" @@ -198,11 +202,11 @@ msgstr "" msgid "Here's some files" msgstr "" -#: themes/default/templates/index.html.ep:102 +#: themes/default/templates/index.html.ep:110 msgid "Hit Enter, then Ctrl+C to copy all the download links" msgstr "" -#: themes/default/templates/index.html.ep:101 +#: themes/default/templates/index.html.ep:109 msgid "Hit Enter, then Ctrl+C to copy the download link" msgstr "" @@ -238,7 +242,7 @@ msgstr "" msgid "Information about delays" msgstr "" -#: themes/default/templates/render.html.ep:41 +#: themes/default/templates/render.html.ep:49 msgid "It seems that the key in your URL is incorrect. Please, verify your URL." msgstr "" @@ -263,11 +267,11 @@ msgid "My files" msgstr "" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:68 +#: lib/Lufi/Controller/Files.pm:69 msgid "No enough space available on the server for this file (size: %1)." msgstr "" -#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:104 +#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "" @@ -275,7 +279,7 @@ msgstr "" msgid "Only the files sent with this browser will be listed here. This list is stored in localStorage: if you delete your localStorage data, you'll lose this list." msgstr "" -#: themes/default/templates/login.html.ep:21 +#: themes/default/templates/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" msgstr "" @@ -284,7 +288,7 @@ msgstr "" msgid "Please contact the administrator: %1" msgstr "" -#: themes/default/templates/render.html.ep:25 +#: themes/default/templates/render.html.ep:33 msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "" @@ -300,7 +304,7 @@ msgstr "" msgid "Rows in red mean that the files have expired and are no longer available." msgstr "" -#: themes/default/templates/index.html.ep:103 +#: themes/default/templates/index.html.ep:111 msgid "Send all links by email" msgstr "" @@ -312,7 +316,7 @@ msgstr "" msgid "Send with your own mail software" msgstr "" -#: themes/default/templates/index.html.ep:105 +#: themes/default/templates/index.html.ep:113 msgid "Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move." msgstr "" @@ -329,7 +333,7 @@ msgstr "" msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "" -#: lib/Lufi/Controller/Files.pm:42 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "" @@ -349,7 +353,7 @@ msgstr "" msgid "The email subject can't be empty." msgstr "" -#: lib/Lufi/Controller/Files.pm:361 +#: lib/Lufi/Controller/Files.pm:387 msgid "The file has already been deleted" msgstr "" @@ -362,7 +366,7 @@ msgstr "" msgid "The following email addresses are not valid: %1" msgstr "" -#: themes/default/templates/index.html.ep:93 +#: themes/default/templates/index.html.ep:101 msgid "The link(s) has been copied to your clipboard" msgstr "" @@ -374,7 +378,7 @@ msgstr "" msgid "The original (and only for now) author is Luc Didry. If you want to support him, you can do it via Tipeee or via Liberapay." msgstr "" -#: lib/Lufi/Controller/Files.pm:168 +#: lib/Lufi/Controller/Files.pm:181 msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." msgstr "" @@ -382,22 +386,22 @@ msgstr "" msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:" msgstr "" -#: themes/default/templates/index.html.ep:94 +#: themes/default/templates/index.html.ep:102 msgid "Unable to copy the link(s) to your clipboard" msgstr "" #. ($short) -#: lib/Lufi/Controller/Files.pm:334 +#: lib/Lufi/Controller/Files.pm:360 msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage." msgstr "" #. ($short) -#: lib/Lufi/Controller/Files.pm:324 +#: lib/Lufi/Controller/Files.pm:350 msgid "Unable to get counter for %1. The token is invalid." msgstr "" #. ($short) -#: lib/Lufi/Controller/Files.pm:344 +#: lib/Lufi/Controller/Files.pm:370 msgid "Unable to get counter for %1. You are not authenticated." msgstr "" @@ -409,11 +413,11 @@ msgstr "" msgid "Uploaded at" msgstr "" -#: themes/default/templates/index.html.ep:77 +#: themes/default/templates/index.html.ep:85 msgid "Uploaded files" msgstr "" -#: themes/default/templates/index.html.ep:106 +#: themes/default/templates/index.html.ep:114 msgid "Websocket communication error" msgstr "" @@ -433,15 +437,15 @@ msgstr "" msgid "You don't need to register yourself to upload files but be aware that, for legal reasons, your IP address will be stored when you send a file. Don't panic, this is normally the case for all sites on which you send files." msgstr "" -#: themes/default/templates/render.html.ep:45 +#: themes/default/templates/render.html.ep:53 msgid "You don't seem to have a key in your URL. You won't be able to decrypt the file. Download canceled." msgstr "" -#: themes/default/templates/render.html.ep:42 +#: themes/default/templates/render.html.ep:50 msgid "You have attempted to leave this page. The download will be canceled. Are you sure?" msgstr "" -#: themes/default/templates/index.html.ep:91 +#: themes/default/templates/index.html.ep:99 msgid "You have attempted to leave this page. The upload will be canceled. Are you sure?" msgstr "" @@ -454,10 +458,14 @@ msgid "You must give email addresses." msgstr "" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:55 +#: lib/Lufi/Controller/Files.pm:56 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "" +#: lib/Lufi/Controller/Files.pm:275 +msgid "Your password is not valid. Please refresh the page to retry." +msgstr "" + #. (format_bytes($keys[$i]) #: themes/default/templates/delays.html.ep:20 msgid "between %1 and %2, the file will be kept %3 day(s)." @@ -486,6 +494,6 @@ msgstr "" msgid "no time limit" msgstr "" -#: themes/default/templates/index.html.ep:70 +#: themes/default/templates/index.html.ep:78 msgid "or" msgstr "" diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index 4f4e386..f299514 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -39,7 +39,7 @@ msgstr " :" msgid "A thank you with a photo of kitten on Diaspora* or Twitter is cool too ;-)" msgstr "Un merci avec une photo de chaton sur Diaspora* ou Twitter fait aussi l’affaire ;-)" -#: themes/default/templates/render.html.ep:34 +#: themes/default/templates/render.html.ep:42 msgid "Abort" msgstr "Abandonner" @@ -47,12 +47,16 @@ msgstr "Abandonner" msgid "About" msgstr "À propos" +#: themes/default/templates/index.html.ep:71 +msgid "Add a password to file(s)" +msgstr "Ajouter un mot de passe au(x) fichier(s)" + #: themes/default/templates/about.html.ep:18 msgid "As Lufi is a free software licensed under of the terms of the AGPLv3, you can install it on you own server. Have a look on the Wiki for the procedure." msgstr "Comme Lufi est un logiciel libre soumis aux termes de la license AGPLv3, vous pouvez l’installer sur votre propre serveur. Veuillez consulter le Wiki pour voir la procédure." #. (stash('f') -#: themes/default/templates/render.html.ep:44 +#: themes/default/templates/render.html.ep:52 msgid "Asking for file part XX1 of %1" msgstr "Demande de récupération du fragment de fichier XX1 sur %1" @@ -64,11 +68,11 @@ msgstr "Retour à la page d’accueil" msgid "Bad CSRF token!" msgstr "Mauvais jeton CSRF !" -#: themes/default/templates/render.html.ep:40 +#: themes/default/templates/render.html.ep:48 msgid "Click here to refresh the page and restart the download." msgstr "Cliquez ici pour rafraîchir la page et redémarrer le téléchargement." -#: themes/default/templates/index.html.ep:72 +#: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" msgstr "Cliquez pour ouvrir le navigateur de fichiers" @@ -80,23 +84,23 @@ msgstr "Fermer" msgid "Comma-separated email addresses" msgstr "Adresses mails séparées par des virgules" -#: themes/default/templates/index.html.ep:92 +#: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" msgstr "Copier tous les liens dans le presse-papier" -#: themes/default/templates/index.html.ep:95 +#: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" msgstr "Copier dans le presse-papier" -#: lib/Lufi/Controller/Files.pm:396 +#: lib/Lufi/Controller/Files.pm:422 msgid "Could not delete the file. You are not authenticated." msgstr "Impossible de supprimer le fichier. Vous n’êtes pas connecté·e." -#: lib/Lufi/Controller/Files.pm:380 +#: lib/Lufi/Controller/Files.pm:406 msgid "Could not find the file. Are you sure of the URL and the token?" msgstr "Impossible de retrouver le fichier. Êtes-vous sûr(e) que l’URL et le jeton sont les bons ?" -#: lib/Lufi/Controller/Files.pm:296 +#: lib/Lufi/Controller/Files.pm:322 msgid "Could not find the file. Are you sure of the URL?" msgstr "Impossible de retrouver le fichier. Êtes-vous sûr(e) que l’URL est la bonne ?" @@ -108,7 +112,7 @@ msgstr "Compteur" msgid "Delete at first download?" msgstr "Supprimer après le premier téléchargement ?" -#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:96 +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Lien de suppression" @@ -116,15 +120,15 @@ msgstr "Lien de suppression" msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file." msgstr "Ne vous inquiétez pas : si un utilisateur commence à télécharger le fichier avant son expiration et que le téléchargement se termine après l’expiration, l’utilisateur pourra quand même récupérer le fichier." -#: themes/default/templates/index.html.ep:98 +#: themes/default/templates/index.html.ep:106 themes/default/templates/render.html.ep:28 msgid "Download" msgstr "Télécharger" -#: themes/default/templates/render.html.ep:39 +#: themes/default/templates/render.html.ep:47 msgid "Download aborted." msgstr "Téléchargement abandonné." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:97 +#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Lien de téléchargement" @@ -132,7 +136,7 @@ msgstr "Lien de téléchargement" msgid "Drag and drop files in the appropriate area or use the traditional way to send files and the files will be chunked, encrypted and sent to the server. You will get two links per file: a download link, that you give to the people you want to share the file with and a deletion link, allowing you to delete the file whenever you want." msgstr "Faites glisser des fichiers dans la zone prévue à cet effet ou sélectionnez un fichier de façon classique et les fichiers seront découpés en morceaux, chiffrés et envoyés au serveur. Vous récupérerez deux liens par fichier : un lien de téléchargement et un lien pour supprimer le fichier quand vous le souhaitez." -#: themes/default/templates/index.html.ep:69 +#: themes/default/templates/index.html.ep:77 msgid "Drop files here" msgstr "Glissez vos fichiers ici" @@ -148,23 +152,23 @@ msgstr "Sujet du mail" msgid "Emails" msgstr "Mails" -#: themes/default/templates/index.html.ep:99 +#: themes/default/templates/index.html.ep:107 msgid "Encrypting part XX1 of XX2" msgstr "Chiffrement du fragment XX1 sur XX2" -#: lib/Lufi/Controller/Files.pm:216 +#: lib/Lufi/Controller/Files.pm:229 msgid "Error: the file existed but was deleted." msgstr "Erreur : le fichier existait mais a été supprimé" -#: lib/Lufi/Controller/Files.pm:266 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "Erreur : le fichier n’a pas été envoyé dans son intégralité" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:301 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "Erreur : impossible de retrouver le fichier. Êtes-vous sûr(e) de l’URL ?" -#: themes/default/templates/index.html.ep:100 +#: themes/default/templates/index.html.ep:108 msgid "Expiration:" msgstr "Expiration :" @@ -176,7 +180,7 @@ msgstr "Expire le" msgid "Export localStorage data" msgstr "Exporter les données localStorage" -#: lib/Lufi/Controller/Files.pm:364 +#: lib/Lufi/Controller/Files.pm:390 msgid "File deleted" msgstr "Fichier supprimé" @@ -184,7 +188,7 @@ msgstr "Fichier supprimé" msgid "File name" msgstr "Nom du fichier" -#: themes/default/templates/render.html.ep:43 +#: themes/default/templates/render.html.ep:51 msgid "Get the file" msgstr "Récupérer le fichier" @@ -200,11 +204,11 @@ msgstr "Bonjour,\\n\\nVoici quelques fichiers que je souhaite partager avec toi msgid "Here's some files" msgstr "Voici quelques fichiers" -#: themes/default/templates/index.html.ep:102 +#: themes/default/templates/index.html.ep:110 msgid "Hit Enter, then Ctrl+C to copy all the download links" msgstr "Appuyez sur la touche Entrée puis faites Ctrl+C pour copier tous les liens de téléchargement" -#: themes/default/templates/index.html.ep:101 +#: themes/default/templates/index.html.ep:109 msgid "Hit Enter, then Ctrl+C to copy the download link" msgstr "Appuyez sur la touche Entrée puis faites Ctrl+C pour copier le lien de téléchargement" @@ -240,7 +244,7 @@ msgstr "Important : plus d’informations sur les délais" msgid "Information about delays" msgstr "Information sur les délais" -#: themes/default/templates/render.html.ep:41 +#: themes/default/templates/render.html.ep:49 msgid "It seems that the key in your URL is incorrect. Please, verify your URL." msgstr "Il semble que la clé dans votre URL soit incorrecte. Veuillez vérifier votre URL." @@ -265,11 +269,11 @@ msgid "My files" msgstr "Mes fichiers" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:68 +#: lib/Lufi/Controller/Files.pm:69 msgid "No enough space available on the server for this file (size: %1)." msgstr "Espace disque insuffisant sur le serveur pour ce fichier (taille du fichier : %1)." -#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:104 +#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Pas de délai d’expiration" @@ -277,7 +281,7 @@ msgstr "Pas de délai d’expiration" msgid "Only the files sent with this browser will be listed here. This list is stored in localStorage: if you delete your localStorage data, you'll lose this list." msgstr "Seuls les fichiers envoyés avec ce navigateur web sont listés ici. Les informations sont stockées en localStorage : si vous supprimez vos données localStorage, vous perdrez ces informations." -#: themes/default/templates/login.html.ep:21 +#: themes/default/templates/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" msgstr "Mot de passe" @@ -286,7 +290,7 @@ msgstr "Mot de passe" msgid "Please contact the administrator: %1" msgstr "Veuillez contacter l’administrateur : %1" -#: themes/default/templates/render.html.ep:25 +#: themes/default/templates/render.html.ep:33 msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Veuillez patientez pendant la récupération de votre fichier. Nous devons d’abord récupérer et déchiffrer tous les fragments avant que vous puissiez le télécharger." @@ -302,7 +306,7 @@ msgstr "Supprimer du localStorage les fichiers expirés" msgid "Rows in red mean that the files have expired and are no longer available." msgstr "Les lignes en rouge indiquent que le fichier a expiré et n’est plus disponible." -#: themes/default/templates/index.html.ep:103 +#: themes/default/templates/index.html.ep:111 msgid "Send all links by email" msgstr "Envoyer tous les liens par mail" @@ -314,7 +318,7 @@ msgstr "Envoyer avec ce serveur" msgid "Send with your own mail software" msgstr "Envoyer avec votre propre logiciel de mail" -#: themes/default/templates/index.html.ep:105 +#: themes/default/templates/index.html.ep:113 msgid "Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move." msgstr "Envoi du fragment XX1 sur XX2. Veuillez patienter, la barre de progression peut mettre du temps avant d’avancer." @@ -331,7 +335,7 @@ msgstr "Connexion" msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "Désolé, l’envoi de fichier est actuellement désactivé. Veuillez réessayer plus tard." -#: lib/Lufi/Controller/Files.pm:42 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "Désolé, l’envoi de fichier est désactivé." @@ -351,7 +355,7 @@ msgstr "Le corps du mail ne peut être vide." msgid "The email subject can't be empty." msgstr "Le sujet du mail ne peut être vide." -#: lib/Lufi/Controller/Files.pm:361 +#: lib/Lufi/Controller/Files.pm:387 msgid "The file has already been deleted" msgstr "Le fichier a déjà été supprimé" @@ -364,7 +368,7 @@ msgstr "Les fichiers envoyés sur une instance de Lufi sont chiffrés avant l’ msgid "The following email addresses are not valid: %1" msgstr "Les adresses mail suivantes ne sont pas valides : %1" -#: themes/default/templates/index.html.ep:93 +#: themes/default/templates/index.html.ep:101 msgid "The link(s) has been copied to your clipboard" msgstr "Le(s) lien(s) a/ont été copié dans votre presse-papier" @@ -376,7 +380,7 @@ msgstr "Le mail a été envoyé." msgid "The original (and only for now) author is Luc Didry. If you want to support him, you can do it via Tipeee or via Liberapay." msgstr "L’auteur originel (et pour l’instant, le seul) est Luc Didry. Si vous avez envie de le supporter, vous pouvez le faire via Tipeee ou via Liberapay." -#: lib/Lufi/Controller/Files.pm:168 +#: lib/Lufi/Controller/Files.pm:181 msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." msgstr "Le serveur a été incapable de retrouver l’enregistrement du fichier auquel ajouter votre fragment de fichier. Veuillez contacter l’administrateur." @@ -384,22 +388,22 @@ msgstr "Le serveur a été incapable de retrouver l’enregistrement du fichier msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:" msgstr "Ce serveur impose des limitations selon la taille des fichiers. Le délai d’expiration de votre fichier sera le minimum entre ce que vous avez choisi et les limites suivantes :" -#: themes/default/templates/index.html.ep:94 +#: themes/default/templates/index.html.ep:102 msgid "Unable to copy the link(s) to your clipboard" msgstr "Impossible de copier le(s) lien(s) dans votre presse-papier" #. ($short) -#: lib/Lufi/Controller/Files.pm:334 +#: lib/Lufi/Controller/Files.pm:360 msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage." msgstr "Impossible de récupérer le compteur pour %1. Le fichier n’existe pas. Il va être supprimé de votre localStorage." #. ($short) -#: lib/Lufi/Controller/Files.pm:324 +#: lib/Lufi/Controller/Files.pm:350 msgid "Unable to get counter for %1. The token is invalid." msgstr "Impossible de récupérer le compteur pour %1. Le jeton est invalide." #. ($short) -#: lib/Lufi/Controller/Files.pm:344 +#: lib/Lufi/Controller/Files.pm:370 msgid "Unable to get counter for %1. You are not authenticated." msgstr "Impossible de récupérer le compteur pour %1. Vous n’êtes pas connecté·e." @@ -411,11 +415,11 @@ msgstr "Envoyer des fichiers" msgid "Uploaded at" msgstr "Envoyé le" -#: themes/default/templates/index.html.ep:77 +#: themes/default/templates/index.html.ep:85 msgid "Uploaded files" msgstr "Fichiers envoyés" -#: themes/default/templates/index.html.ep:106 +#: themes/default/templates/index.html.ep:114 msgid "Websocket communication error" msgstr "Erreur de communication WebSocket" @@ -435,15 +439,15 @@ msgstr "Vous pouvez voir la liste de vos fichiers en cliquant sur le lien « Mes msgid "You don't need to register yourself to upload files but be aware that, for legal reasons, your IP address will be stored when you send a file. Don't panic, this is normally the case for all sites on which you send files." msgstr "Vous n’avez pas besoin de vous enregistrer pour envoyer des fichiers mais notez que, pour des raisons légales, votre adresse IP sera enregistrée quand vous envoyez un fichier. Ne paniquez pas, c’est normalement le cas pour tous les sites où vous envoyez des fichiers." -#: themes/default/templates/render.html.ep:45 +#: themes/default/templates/render.html.ep:53 msgid "You don't seem to have a key in your URL. You won't be able to decrypt the file. Download canceled." msgstr "Il semble que vous n’ayez pas de clé dans votre URL. Vous ne serez pas capable de déchiffrer le fichier. Téléchargement annulé." -#: themes/default/templates/render.html.ep:42 +#: themes/default/templates/render.html.ep:50 msgid "You have attempted to leave this page. The download will be canceled. Are you sure?" msgstr "Vous essayez de quitter la page. Le téléchargement sera annulé. Êtes-vous sûr(e) ?" -#: themes/default/templates/index.html.ep:91 +#: themes/default/templates/index.html.ep:99 msgid "You have attempted to leave this page. The upload will be canceled. Are you sure?" msgstr "Vous essayez de quitter la page. L’envoi sera annulé. Êtes-vous sûr(e) ?" @@ -456,10 +460,14 @@ msgid "You must give email addresses." msgstr "Vous devez envoyer des adresses mail." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:55 +#: lib/Lufi/Controller/Files.pm:56 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "Votre fichier est trop volumineux : %1 (la taille maximum autorisée est %2)" +#: lib/Lufi/Controller/Files.pm:275 +msgid "Your password is not valid. Please refresh the page to retry." +msgstr "Votre mot de passe est invalide. Veuillez rafraîchir la page pour réessayer." + #. (format_bytes($keys[$i]) #: themes/default/templates/delays.html.ep:20 msgid "between %1 and %2, the file will be kept %3 day(s)." @@ -488,6 +496,6 @@ msgstr "pour %1 et plus, le fichier sera conservé indéfiniment." msgid "no time limit" msgstr "Pas de délai d'expiration" -#: themes/default/templates/index.html.ep:70 +#: themes/default/templates/index.html.ep:78 msgid "or" msgstr "ou" diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index 9432e61..6e598da 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -39,7 +39,7 @@ msgstr " :" msgid "A thank you with a photo of kitten on Diaspora* or Twitter is cool too ;-)" msgstr "Un grazie con una foto di un gattino sur Diaspora* o Twitter è forte;-)" -#: themes/default/templates/render.html.ep:34 +#: themes/default/templates/render.html.ep:42 msgid "Abort" msgstr "Annulla" @@ -47,12 +47,16 @@ msgstr "Annulla" msgid "About" msgstr "A proposito" +#: themes/default/templates/index.html.ep:71 +msgid "Add a password to file(s)" +msgstr "" + #: themes/default/templates/about.html.ep:18 msgid "As Lufi is a free software licensed under of the terms of the AGPLv3, you can install it on you own server. Have a look on the Wiki for the procedure." msgstr "Poiché Lufi è un software libero soggetto ai termini della licenza AGPLv3, potete installarlo sul vostro server. Si consulti Wiki per vedere la procedura." #. (stash('f') -#: themes/default/templates/render.html.ep:44 +#: themes/default/templates/render.html.ep:52 msgid "Asking for file part XX1 of %1" msgstr "Recupero della porzione del file XX1 su %1" @@ -64,11 +68,11 @@ msgstr "Ritorna all'homepage" msgid "Bad CSRF token!" msgstr "Torken CSRF errato!" -#: themes/default/templates/render.html.ep:40 +#: themes/default/templates/render.html.ep:48 msgid "Click here to refresh the page and restart the download." msgstr "Click qui per aggiornare la pagina e ricominciare il download." -#: themes/default/templates/index.html.ep:72 +#: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" msgstr "Click per aprire il file browser" @@ -80,23 +84,23 @@ msgstr "Chiudi" msgid "Comma-separated email addresses" msgstr "Indirizzi email separati da virgole" -#: themes/default/templates/index.html.ep:92 +#: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" msgstr "Copiare tutti i link negli appunti" -#: themes/default/templates/index.html.ep:95 +#: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" msgstr "Copiare negli appunti" -#: lib/Lufi/Controller/Files.pm:396 +#: lib/Lufi/Controller/Files.pm:422 msgid "Could not delete the file. You are not authenticated." msgstr "Impossibile cancellare il file. Non siete autenticati." -#: lib/Lufi/Controller/Files.pm:380 +#: lib/Lufi/Controller/Files.pm:406 msgid "Could not find the file. Are you sure of the URL and the token?" msgstr "Impossibile trovare il file. Sei sicuro che URL e token siano corretti ?" -#: lib/Lufi/Controller/Files.pm:296 +#: lib/Lufi/Controller/Files.pm:322 msgid "Could not find the file. Are you sure of the URL?" msgstr "Impossibile trovare il file. Sei sicuro che l'URL sia corretto?" @@ -108,7 +112,7 @@ msgstr "Contatore" msgid "Delete at first download?" msgstr "Cancellare al primo download?" -#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:96 +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Link per l'eliminazione" @@ -116,15 +120,15 @@ msgstr "Link per l'eliminazione" msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file." msgstr "Non preoccuparti: se un utente cominciasse il download del file prima della scadenza ed il download terminasse dopo la scadenza, potrebbe ottenere il file." -#: themes/default/templates/index.html.ep:98 +#: themes/default/templates/index.html.ep:106 themes/default/templates/render.html.ep:28 msgid "Download" msgstr "Download" -#: themes/default/templates/render.html.ep:39 +#: themes/default/templates/render.html.ep:47 msgid "Download aborted." msgstr "Download annullato." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:97 +#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Link per il download" @@ -132,7 +136,7 @@ msgstr "Link per il download" msgid "Drag and drop files in the appropriate area or use the traditional way to send files and the files will be chunked, encrypted and sent to the server. You will get two links per file: a download link, that you give to the people you want to share the file with and a deletion link, allowing you to delete the file whenever you want." msgstr "Trascinare e lasciare il file nell'are prevista o selezionare i file nel modo classico ed i file saranno divisi,cifrati ed inviati al server. Otterrete 2 link per ogni file : uno per il download ed uno per eliminare il file quando vorrete." -#: themes/default/templates/index.html.ep:69 +#: themes/default/templates/index.html.ep:77 msgid "Drop files here" msgstr "Lasciare i file qui" @@ -148,23 +152,23 @@ msgstr "Oggetto dell'email" msgid "Emails" msgstr "Email" -#: themes/default/templates/index.html.ep:99 +#: themes/default/templates/index.html.ep:107 msgid "Encrypting part XX1 of XX2" msgstr "Cifratura della parte XX1 di XX2" -#: lib/Lufi/Controller/Files.pm:216 +#: lib/Lufi/Controller/Files.pm:229 msgid "Error: the file existed but was deleted." msgstr "Errore: il file esisteva ma è stato eliminato" -#: lib/Lufi/Controller/Files.pm:266 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "Errore: il file non è stato inviato completamente" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:301 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "Errore: impossibile trovare il file. Sei certo dell'URL ?" -#: themes/default/templates/index.html.ep:100 +#: themes/default/templates/index.html.ep:108 msgid "Expiration:" msgstr "Scadenza:" @@ -176,7 +180,7 @@ msgstr "Scade il" msgid "Export localStorage data" msgstr "Esportare i dati del localStorage" -#: lib/Lufi/Controller/Files.pm:364 +#: lib/Lufi/Controller/Files.pm:390 msgid "File deleted" msgstr "File cancellato" @@ -184,7 +188,7 @@ msgstr "File cancellato" msgid "File name" msgstr "Nome del file" -#: themes/default/templates/render.html.ep:43 +#: themes/default/templates/render.html.ep:51 msgid "Get the file" msgstr "Ottenere il file" @@ -200,11 +204,11 @@ msgstr "Buongiorno,\\n\\necco qualche file che vorrei condividere con te:\\n" msgid "Here's some files" msgstr "Ecco qualche file" -#: themes/default/templates/index.html.ep:102 +#: themes/default/templates/index.html.ep:110 msgid "Hit Enter, then Ctrl+C to copy all the download links" msgstr "Premere Enter, poi Ctrl+C per copiare tutti i link di download" -#: themes/default/templates/index.html.ep:101 +#: themes/default/templates/index.html.ep:109 msgid "Hit Enter, then Ctrl+C to copy the download link" msgstr "Premere Enter, poi Ctrl+C per copiare il link di download" @@ -240,7 +244,7 @@ msgstr "Importante : più informazioni sulle scadenze" msgid "Information about delays" msgstr "Informazione sulle scadenze" -#: themes/default/templates/render.html.ep:41 +#: themes/default/templates/render.html.ep:49 msgid "It seems that the key in your URL is incorrect. Please, verify your URL." msgstr "Sembra che la chiave nel tuo URL sia errata. Controllare il tuo URL." @@ -265,11 +269,11 @@ msgid "My files" msgstr "I miei file" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:68 +#: lib/Lufi/Controller/Files.pm:69 msgid "No enough space available on the server for this file (size: %1)." msgstr "Spazio disco insufficiente sul server per questo file (dimensione: %1)." -#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:104 +#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Nessun ritardo per la scadenza" @@ -277,7 +281,7 @@ msgstr "Nessun ritardo per la scadenza" msgid "Only the files sent with this browser will be listed here. This list is stored in localStorage: if you delete your localStorage data, you'll lose this list." msgstr "Solo i file inviati con questo browser web sono nella lista. Le informazioni sono memorizzate nel localStorage: se cancellaste i dati dal vostro localStorage, perdereste questa lista." -#: themes/default/templates/login.html.ep:21 +#: themes/default/templates/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" msgstr "Password" @@ -286,7 +290,7 @@ msgstr "Password" msgid "Please contact the administrator: %1" msgstr "Contattare l'amministratore : %1" -#: themes/default/templates/render.html.ep:25 +#: themes/default/templates/render.html.ep:33 msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Attendere mentre otteniamo il vostro file. Dobbiamo prima scaricare e decifrare tutte le parti prima che possiate averlo." @@ -302,7 +306,7 @@ msgstr "Eliminare dal localStorage i file scaduti" msgid "Rows in red mean that the files have expired and are no longer available." msgstr "Le righe in rosso indicano che il file è scaduto e non è più disponibile." -#: themes/default/templates/index.html.ep:103 +#: themes/default/templates/index.html.ep:111 msgid "Send all links by email" msgstr "Inviare tutti i link tramite email" @@ -314,7 +318,7 @@ msgstr "Inviare tramite questo server" msgid "Send with your own mail software" msgstr "Inviare tramite il vostro programma di posta" -#: themes/default/templates/index.html.ep:105 +#: themes/default/templates/index.html.ep:113 msgid "Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move." msgstr "Invio della parte XX1 su XX2. Prego attendere, la barra di avanzamento può impiagare del tempo prima di avanzare." @@ -331,7 +335,7 @@ msgstr "Autenticazione" msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "L'invio del file è attualemente disattivato. Riprovare più tardi." -#: lib/Lufi/Controller/Files.pm:42 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "L'invio del file è attualemente disattivato." @@ -351,7 +355,7 @@ msgstr "Il corpo dell'email non può essere vuoto." msgid "The email subject can't be empty." msgstr "Il soggetto dell'email non può essere vuoto." -#: lib/Lufi/Controller/Files.pm:361 +#: lib/Lufi/Controller/Files.pm:387 msgid "The file has already been deleted" msgstr "Il file è già stato cancellato" @@ -364,7 +368,7 @@ msgstr "I file inviati su un istanza di Lufi sono cifrati prima dell'invio al se msgid "The following email addresses are not valid: %1" msgstr "I seguenti indirizzi email non sono validi: %1" -#: themes/default/templates/index.html.ep:93 +#: themes/default/templates/index.html.ep:101 msgid "The link(s) has been copied to your clipboard" msgstr "I link sono stati copiati negli appunti" @@ -376,7 +380,7 @@ msgstr "Email inviata." msgid "The original (and only for now) author is Luc Didry. If you want to support him, you can do it via Tipeee or via Liberapay." msgstr "L'autore ( e per ora l'unico) è Luc Didry. Se aveste voglia di aiutarlo, potreste farlo tramite Tipeee ou via Liberapay." -#: lib/Lufi/Controller/Files.pm:168 +#: lib/Lufi/Controller/Files.pm:181 msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." msgstr "Il server non è stato in grado di trovare il file record a cui aggiungere la vostra porzione di file. Prego contattare l'amministratore." @@ -384,22 +388,22 @@ msgstr "Il server non è stato in grado di trovare il file record a cui aggiunge msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:" msgstr "Questo server pone delle limitazioni in base alla dimensione del file.La data di scadenza del tuo file sarà la minore tra quella scelta e queste limitazioni:" -#: themes/default/templates/index.html.ep:94 +#: themes/default/templates/index.html.ep:102 msgid "Unable to copy the link(s) to your clipboard" msgstr "Impossibile copiare i link negli appunti" #. ($short) -#: lib/Lufi/Controller/Files.pm:334 +#: lib/Lufi/Controller/Files.pm:360 msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage." msgstr "Impossibile recuperare il contatore per %1. Il file non esiste. Il file sarà eliminato dal tuo localStorage." #. ($short) -#: lib/Lufi/Controller/Files.pm:324 +#: lib/Lufi/Controller/Files.pm:350 msgid "Unable to get counter for %1. The token is invalid." msgstr "Impossibile recuperare il contatore per %1. Il token non è valido." #. ($short) -#: lib/Lufi/Controller/Files.pm:344 +#: lib/Lufi/Controller/Files.pm:370 msgid "Unable to get counter for %1. You are not authenticated." msgstr "Impossibile recuperare il contatore per %1. Non sei autenticato." @@ -411,11 +415,11 @@ msgstr "Invio dei file" msgid "Uploaded at" msgstr "Invio il" -#: themes/default/templates/index.html.ep:77 +#: themes/default/templates/index.html.ep:85 msgid "Uploaded files" msgstr "File inviati" -#: themes/default/templates/index.html.ep:106 +#: themes/default/templates/index.html.ep:114 msgid "Websocket communication error" msgstr "Errore di comunicazione WebSocket" @@ -435,15 +439,15 @@ msgstr "Puoi consultare la lista dei vostri file cliccando sul link « I miei fi msgid "You don't need to register yourself to upload files but be aware that, for legal reasons, your IP address will be stored when you send a file. Don't panic, this is normally the case for all sites on which you send files." msgstr "Non hai bisogno di registrarti per inviare i file ma devi essere consapevole che, per motivi legali, il tuo indirizzo IP sarà registrato quando invierai un file. Non ti preoccupare, avviene in tutti i siti su cui invii dei file." -#: themes/default/templates/render.html.ep:45 +#: themes/default/templates/render.html.ep:53 msgid "You don't seem to have a key in your URL. You won't be able to decrypt the file. Download canceled." msgstr "Sembra che non ci sia una chiave nel tuo URL. Non sarai in grado di decifrare il file. Download annullato." -#: themes/default/templates/render.html.ep:42 +#: themes/default/templates/render.html.ep:50 msgid "You have attempted to leave this page. The download will be canceled. Are you sure?" msgstr "Hai cercato di uscire da questa pagina. Il download sarà cancellato. Sei sicuro?" -#: themes/default/templates/index.html.ep:91 +#: themes/default/templates/index.html.ep:99 msgid "You have attempted to leave this page. The upload will be canceled. Are you sure?" msgstr "Hai cercato di uscire da questa pagina. L'invio sarà cancellato. Sei sicuro?" @@ -456,10 +460,14 @@ msgid "You must give email addresses." msgstr "Devi fornire gli indirizzi email." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:55 +#: lib/Lufi/Controller/Files.pm:56 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "Il vostro file è troppo grande : %1 (la dimensione massima permessa è %2)" +#: lib/Lufi/Controller/Files.pm:275 +msgid "Your password is not valid. Please refresh the page to retry." +msgstr "" + #. (format_bytes($keys[$i]) #: themes/default/templates/delays.html.ep:20 msgid "between %1 and %2, the file will be kept %3 day(s)." @@ -488,6 +496,6 @@ msgstr "per %1 e più, il file sarà conservato per sempre." msgid "no time limit" msgstr "nessuna limitazione temporale" -#: themes/default/templates/index.html.ep:70 +#: themes/default/templates/index.html.ep:78 msgid "or" msgstr "o" diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index c9fdfa7..82266a0 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -39,7 +39,7 @@ msgstr " :" msgid "A thank you with a photo of kitten on Diaspora* or Twitter is cool too ;-)" msgstr "Un mercé amb una foto de caton sus Diaspora* o Twitter conven tanben ;-)" -#: themes/default/templates/render.html.ep:34 +#: themes/default/templates/render.html.ep:42 msgid "Abort" msgstr "Anullar" @@ -47,12 +47,16 @@ msgstr "Anullar" msgid "About" msgstr "A prepaus" +#: themes/default/templates/index.html.ep:71 +msgid "Add a password to file(s)" +msgstr "" + #: themes/default/templates/about.html.ep:18 msgid "As Lufi is a free software licensed under of the terms of the AGPLv3, you can install it on you own server. Have a look on the Wiki for the procedure." msgstr "Ja que Lufi es un logicial liure somés als tèrmes de la licéncia AGPLv3, podètz l’installer sus vòstre pròpri servidor. Mercés de consultar lo Wiki per veire la procedura." #. (stash('f') -#: themes/default/templates/render.html.ep:44 +#: themes/default/templates/render.html.ep:52 msgid "Asking for file part XX1 of %1" msgstr "Demanda del tròç XX1 sus %1 del fichièr" @@ -64,11 +68,11 @@ msgstr "Retorn a la pagina d’acuèlh" msgid "Bad CSRF token!" msgstr "Marrit geton CSRF !" -#: themes/default/templates/render.html.ep:40 +#: themes/default/templates/render.html.ep:48 msgid "Click here to refresh the page and restart the download." msgstr "Clicatz aquí per actualizar la pagina e tornar començar lo telecargament." -#: themes/default/templates/index.html.ep:72 +#: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" msgstr "Clicatz per dobrir lo navigador de fichièr" @@ -80,23 +84,23 @@ msgstr "Tampar" msgid "Comma-separated email addresses" msgstr "Adreças de corrièl separadas per de virgulas" -#: themes/default/templates/index.html.ep:92 +#: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" msgstr "Copiar totes los ligams dins lo quichapapièrs" -#: themes/default/templates/index.html.ep:95 +#: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" msgstr "Copiar dins lo quichapapièrs" -#: lib/Lufi/Controller/Files.pm:396 +#: lib/Lufi/Controller/Files.pm:422 msgid "Could not delete the file. You are not authenticated." msgstr "Impossible de suprimir lo fichièr. Sètz pas connectat-ada." -#: lib/Lufi/Controller/Files.pm:380 +#: lib/Lufi/Controller/Files.pm:406 msgid "Could not find the file. Are you sure of the URL and the token?" msgstr "Impossible de trobar lo fichièr. Sètz segur-a que l’URL e lo geton son bons ?" -#: lib/Lufi/Controller/Files.pm:296 +#: lib/Lufi/Controller/Files.pm:322 msgid "Could not find the file. Are you sure of the URL?" msgstr "Impossible de trobar lo fichièr. Sètz segur-a que l’URL es bona ?" @@ -108,7 +112,7 @@ msgstr "Comptador" msgid "Delete at first download?" msgstr "Suprimir aprèp lo primièr telecargament ?" -#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:96 +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Ligam de supression" @@ -116,15 +120,15 @@ msgstr "Ligam de supression" msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file." msgstr "Vos copetz pas lo cap : se un utilizaire comença a telecagar lo fichièr abans son expiracion e que lo telecargament s’acaba aprèp l’expiracion, utilizaire poirà recuperar lo fichièr." -#: themes/default/templates/index.html.ep:98 +#: themes/default/templates/index.html.ep:106 themes/default/templates/render.html.ep:28 msgid "Download" msgstr "Telecargar" -#: themes/default/templates/render.html.ep:39 +#: themes/default/templates/render.html.ep:47 msgid "Download aborted." msgstr "Telecargament abandonat." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:97 +#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Ligam de telecargament" @@ -132,7 +136,7 @@ msgstr "Ligam de telecargament" msgid "Drag and drop files in the appropriate area or use the traditional way to send files and the files will be chunked, encrypted and sent to the server. You will get two links per file: a download link, that you give to the people you want to share the file with and a deletion link, allowing you to delete the file whenever you want." msgstr "Fasètz lisar de fichièrs dins la zòna prevista per aquò far o seleccionatz un fichièr de faiçon classica e los fichièrs seràn decopats a tròces, chifrats e mandats al servidor. Recuperaretz dos ligams per fichièr : un ligam de telecargament e un ligam per suprimir lo fichièr quand o volètz." -#: themes/default/templates/index.html.ep:69 +#: themes/default/templates/index.html.ep:77 msgid "Drop files here" msgstr "Lisatz vòstres fichièrs aquí" @@ -148,23 +152,23 @@ msgstr "Subjècte del mail" msgid "Emails" msgstr "Corrièl" -#: themes/default/templates/index.html.ep:99 +#: themes/default/templates/index.html.ep:107 msgid "Encrypting part XX1 of XX2" msgstr "Chiframent del tròç XX1 sus XX2" -#: lib/Lufi/Controller/Files.pm:216 +#: lib/Lufi/Controller/Files.pm:229 msgid "Error: the file existed but was deleted." msgstr "Error : lo fichièr existissiá mas es estat suprimit" -#: lib/Lufi/Controller/Files.pm:266 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "Error : lo fichièr es pas estat mandat completament" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:301 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "Error : impossible de trobar lo fichièr. Sètz segur-a de l’URL ?" -#: themes/default/templates/index.html.ep:100 +#: themes/default/templates/index.html.ep:108 msgid "Expiration:" msgstr "Expiracion :" @@ -176,7 +180,7 @@ msgstr "Expira lo" msgid "Export localStorage data" msgstr "Exportar las donadas localStorage" -#: lib/Lufi/Controller/Files.pm:364 +#: lib/Lufi/Controller/Files.pm:390 msgid "File deleted" msgstr "Fichièr suprimit" @@ -184,7 +188,7 @@ msgstr "Fichièr suprimit" msgid "File name" msgstr "Nom del fichièr" -#: themes/default/templates/render.html.ep:43 +#: themes/default/templates/render.html.ep:51 msgid "Get the file" msgstr "Recuperar lo fichièr" @@ -200,11 +204,11 @@ msgstr "Bonjorn,\\n\\nVaquí qualques fichièrs que desiri partejar amb tu :\\n" msgid "Here's some files" msgstr "Vaquí qualques fichièrs" -#: themes/default/templates/index.html.ep:102 +#: themes/default/templates/index.html.ep:110 msgid "Hit Enter, then Ctrl+C to copy all the download links" msgstr "Picatz sus Entrada puèi fasètz Ctrl+C per copiar totes los ligams per telecargar" -#: themes/default/templates/index.html.ep:101 +#: themes/default/templates/index.html.ep:109 msgid "Hit Enter, then Ctrl+C to copy the download link" msgstr "Picatz sus Entrada puèi fasètz Ctrl+C per copiar lo ligam per telecargar" @@ -240,7 +244,7 @@ msgstr "Important : mai d’informacions suls relambis" msgid "Information about delays" msgstr "Informacion suls relambis" -#: themes/default/templates/render.html.ep:41 +#: themes/default/templates/render.html.ep:49 msgid "It seems that the key in your URL is incorrect. Please, verify your URL." msgstr "Sembla que la clau dins vòstra URL siá incorrècta. Mercés de verificar vòstra URL." @@ -265,11 +269,11 @@ msgid "My files" msgstr "Mos fichièrs" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:68 +#: lib/Lufi/Controller/Files.pm:69 msgid "No enough space available on the server for this file (size: %1)." msgstr "Espaci disc insufisent sul servidor per aqueste fichièr (talha del fichièr : \"%1)." -#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:104 +#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Pas cap de relambi d’expiracion" @@ -277,7 +281,7 @@ msgstr "Pas cap de relambi d’expiracion" msgid "Only the files sent with this browser will be listed here. This list is stored in localStorage: if you delete your localStorage data, you'll lose this list." msgstr "Sols los fichièrs mandats amb aqueste navigador web son listats aicí. Las informacions son gardadas en localStorage : se suprimissètz vòstras donadas localStorage, perdretz aquelas informacions." -#: themes/default/templates/login.html.ep:21 +#: themes/default/templates/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" msgstr "Senhal" @@ -286,7 +290,7 @@ msgstr "Senhal" msgid "Please contact the administrator: %1" msgstr "Mercés de contactar l’administrator : %1" -#: themes/default/templates/render.html.ep:25 +#: themes/default/templates/render.html.ep:33 msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Mercés d’esperar pendent la recuperacion de vòstre fichièr. Nos cal d’en primièr recuperar e deschifrar totes los fragaments abans que poscatz o telecargar." @@ -302,7 +306,7 @@ msgstr "Suprimir del localStorage los fichièrs expirats" msgid "Rows in red mean that the files have expired and are no longer available." msgstr "Las linhas en roge indican que lo fichièr a expirat e es pas mai disponible." -#: themes/default/templates/index.html.ep:103 +#: themes/default/templates/index.html.ep:111 msgid "Send all links by email" msgstr "Mandar totes los ligams per corrièl" @@ -314,7 +318,7 @@ msgstr "Mandar amb aqueste servidor" msgid "Send with your own mail software" msgstr "Mandar amb vòstre pròpri logicial de corrièl" -#: themes/default/templates/index.html.ep:105 +#: themes/default/templates/index.html.ep:113 msgid "Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move." msgstr "Mandadís del fragment XX1 sus XX2. Pacientatz, la barra de progression pòt metre de temps abans d’avançar." @@ -331,7 +335,7 @@ msgstr "Connexion" msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "O planhèm, la foncion per mandar de fichièr es desactivada pel moment. Mercés de tornar ensajar mai tard." -#: lib/Lufi/Controller/Files.pm:42 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "O planhèm, la foncion per mandar de fichièr es desactivada." @@ -351,7 +355,7 @@ msgstr "Lo contengut del corrièl pòt pas èsser void." msgid "The email subject can't be empty." msgstr "Lo sujècte del corrièl pòt pas èsser void." -#: lib/Lufi/Controller/Files.pm:361 +#: lib/Lufi/Controller/Files.pm:387 msgid "The file has already been deleted" msgstr "Lo fichièr es ja estat suprimit" @@ -364,7 +368,7 @@ msgstr "Los fichièrs mandats amb una instància Lufi son chifrats abans la mand msgid "The following email addresses are not valid: %1" msgstr "Las adreças de corrièl seguentas son pas validas : %1" -#: themes/default/templates/index.html.ep:93 +#: themes/default/templates/index.html.ep:101 msgid "The link(s) has been copied to your clipboard" msgstr "Lo(s) ligam(s) es/son estat(s) copiat(s) dins vòstre quichapapièrs" @@ -376,7 +380,7 @@ msgstr "Lo corrièl es estat mandat." msgid "The original (and only for now) author is Luc Didry. If you want to support him, you can do it via Tipeee or via Liberapay." msgstr "L’autor original (e pel moment, lo sol) es Luc Didry. S’avètz enveja de lo sostenir, podètz o far via Tipeee o via Liberapay." -#: lib/Lufi/Controller/Files.pm:168 +#: lib/Lufi/Controller/Files.pm:181 msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." msgstr "Lo servidor es pas estat capable de retrobar l’enregistrament del fichièr que li cal ajustar vòstre tròç de fichièr. Mercés de contactar l’administrator." @@ -384,22 +388,22 @@ msgstr "Lo servidor es pas estat capable de retrobar l’enregistrament del fich msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:" msgstr "Aqueste servidor impausa de limitacions segon la tailha dels fichièrs. Lo relambi d’expiracion de vòstre fichièr serà lo minimum entre çò qu’avètz causit e los limits seguents :" -#: themes/default/templates/index.html.ep:94 +#: themes/default/templates/index.html.ep:102 msgid "Unable to copy the link(s) to your clipboard" msgstr "Impossible de copiar lo(s) ligams(s) dins vòstre quichapapièrs" #. ($short) -#: lib/Lufi/Controller/Files.pm:334 +#: lib/Lufi/Controller/Files.pm:360 msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage." msgstr "Impossible de recuperar lo comptador per %1. Lo fichièr existís pas. Serà levat de vòstre localStorage." #. ($short) -#: lib/Lufi/Controller/Files.pm:324 +#: lib/Lufi/Controller/Files.pm:350 msgid "Unable to get counter for %1. The token is invalid." msgstr "Impossible de recuperar lo comptador per %1. Lo geton es invalid." #. ($short) -#: lib/Lufi/Controller/Files.pm:344 +#: lib/Lufi/Controller/Files.pm:370 msgid "Unable to get counter for %1. You are not authenticated." msgstr "Impossible de recuperar lo comptador per %1. Sètz pas connectat·ada." @@ -411,11 +415,11 @@ msgstr "Mandar de fichièrs" msgid "Uploaded at" msgstr "Mandat lo" -#: themes/default/templates/index.html.ep:77 +#: themes/default/templates/index.html.ep:85 msgid "Uploaded files" msgstr "Fichièrs mandats" -#: themes/default/templates/index.html.ep:106 +#: themes/default/templates/index.html.ep:114 msgid "Websocket communication error" msgstr "Error de comunicacion WebSocket" @@ -435,15 +439,15 @@ msgstr "Podètz veire la lista de vòstres fichièrs en clicant sul ligam « Mos msgid "You don't need to register yourself to upload files but be aware that, for legal reasons, your IP address will be stored when you send a file. Don't panic, this is normally the case for all sites on which you send files." msgstr "Avètz pas besonh de vos enregistrar per mandar de fichièrs mas notatz que, per de rasons legalas, vòstra adreça IP serà enregistrada quand mandatz un fichièr. Paniquetz pas, es normalament lo cas per totes los sites ont mandatz de fichièrs." -#: themes/default/templates/render.html.ep:45 +#: themes/default/templates/render.html.ep:53 msgid "You don't seem to have a key in your URL. You won't be able to decrypt the file. Download canceled." msgstr "Sembla qu’avètz pas la bona clau dins l’URL. Poiretz pas deschifrar lo fichièr. Telecargament anullat." -#: themes/default/templates/render.html.ep:42 +#: themes/default/templates/render.html.ep:50 msgid "You have attempted to leave this page. The download will be canceled. Are you sure?" msgstr "Ensajatz de partir de la pagina. Lo telecargament serà anullat. Sètz segur-a ?" -#: themes/default/templates/index.html.ep:91 +#: themes/default/templates/index.html.ep:99 msgid "You have attempted to leave this page. The upload will be canceled. Are you sure?" msgstr "Ensajatz de partir de la pagina. Lo mandadís serà anullat. Sètz segur-a ?" @@ -456,10 +460,14 @@ msgid "You must give email addresses." msgstr "Vos cal donar d’adreças." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:55 +#: lib/Lufi/Controller/Files.pm:56 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "Vòstre fichièr es tròp voluminós : %1 (la talha maximum autorizada es %2)" +#: lib/Lufi/Controller/Files.pm:275 +msgid "Your password is not valid. Please refresh the page to retry." +msgstr "" + #. (format_bytes($keys[$i]) #: themes/default/templates/delays.html.ep:20 msgid "between %1 and %2, the file will be kept %3 day(s)." @@ -488,6 +496,6 @@ msgstr "per %1 e mai, lo fichièr serà gardat per totjorn." msgid "no time limit" msgstr "Pas cap de relambi d’expiracion" -#: themes/default/templates/index.html.ep:70 +#: themes/default/templates/index.html.ep:78 msgid "or" msgstr "o" diff --git a/themes/default/public/css/lufi.css b/themes/default/public/css/lufi.css index 9506862..70604d8 100644 --- a/themes/default/public/css/lufi.css +++ b/themes/default/public/css/lufi.css @@ -86,3 +86,8 @@ a.classic:focus { .hiddendiv.common { min-height: 170px; } +.title-filename { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/themes/default/public/js/lufi-down.js b/themes/default/public/js/lufi-down.js index 62405e1..1af603d 100644 --- a/themes/default/public/js/lufi-down.js +++ b/themes/default/public/js/lufi-down.js @@ -35,7 +35,7 @@ function base64ToArrayBuffer(base64) { function addAlert(msg) { $('#please-wait').remove(); - var pbd = $('#pbd'); + var pbd = $('.file-progress'); pbd.attr('role', 'alert'); pbd.removeClass('progress'); pbd.html(['
', @@ -53,7 +53,11 @@ function spawnWebsocket(pa) { var l = $('#loading'); l.html(i18n.loading.replace(/XX1/, (pa + 1))); - window.ws.send('{"part":'+pa+'}'); + if ($('#file_pwd').length === 1) { + window.ws.send('{"part":'+pa+', "file_pwd": "'+$('#file_pwd').val()+'"}'); + } else { + window.ws.send('{"part":'+pa+'}'); + } }; ws.onclose = function() { console.log('Connection is closed'); @@ -70,6 +74,9 @@ function spawnWebsocket(pa) { if (data.msg !== undefined) { addAlert(data.msg); console.log(data.msg); + if ($('#file_pwd').length === 1) { + $('.file-abort').addClass('hide'); + } window.onbeforeunload = null; } else { console.log('Getting slice '+(data.part + 1)+' of '+data.total); @@ -102,7 +109,11 @@ function spawnWebsocket(pa) { } pbd.html(innerHTML.join('')); - window.ws.send('{"ended":true}'); + if ($('#file_pwd').length === 1) { + window.ws.send('{"ended":true, "file_pwd": "'+$('#file_pwd').val()+'"}'); + } else { + window.ws.send('{"ended":true}'); + } window.onbeforeunload = null; window.completed = true; $('#abort').remove(); @@ -123,7 +134,11 @@ function spawnWebsocket(pa) { console.log('Error. Retrying to get slice '+(data.part + 1)); window.ws = spawnWebsocket(data.part + 1); }; - window.ws.send('{"part":'+(data.part + 1)+'}'); + if ($('#file_pwd').length === 1) { + window.ws.send('{"part":'+(data.part + 1)+', "file_pwd": "'+$('#file_pwd').val()+'"}'); + } else { + window.ws.send('{"part":'+(data.part + 1)+'}'); + } } } } catch(err) { @@ -157,11 +172,26 @@ $(document).ready(function(){ window.completed = false; if (key !== '=') { - // Set websocket - window.ws = spawnWebsocket(0); + var go = true; + if ($('#file_pwd').length === 1) { + go = false; + $('#go').click(function() { + $('.file-progress, .file-abort').removeClass('hide'); + $('#file_pwd').parent().parent().addClass('hide'); + // Set websocket + window.ws = spawnWebsocket(0); - // Prevent exiting page before full download - window.onbeforeunload = confirmExit; + // Prevent exiting page before full download + window.onbeforeunload = confirmExit; + }); + } + if (go) { + // Set websocket + window.ws = spawnWebsocket(0); + + // Prevent exiting page before full download + window.onbeforeunload = confirmExit; + } } else { addAlert(i18n.nokey); } diff --git a/themes/default/public/js/lufi-up.js b/themes/default/public/js/lufi-up.js index dee8184..51c8903 100644 --- a/themes/default/public/js/lufi-up.js +++ b/themes/default/public/js/lufi-up.js @@ -196,6 +196,12 @@ function sliceAndUpload(randomkey, i, parts, j, delay, del_at_first_view, short) id: short, i: i }; + if ($('#file_pwd').length === 1) { + var pwd = $('#file_pwd').val(); + if (pwd !== undefined && pwd !== null && pwd !== '') { + data['file_pwd'] = $('#file_pwd').val(); + } + } data = JSON.stringify(data); console.log('sending slice '+(j + 1)+'/'+parts+' of file '+file.name); diff --git a/themes/default/templates/index.html.ep b/themes/default/templates/index.html.ep index f632d7f..7e98932 100644 --- a/themes/default/templates/index.html.ep +++ b/themes/default/templates/index.html.ep @@ -64,6 +64,14 @@

+ % if (config('allow_pwd_on_files')) { +
+
+ + +
+
+ % }

<%= l('Drop files here') %>

diff --git a/themes/default/templates/render.html.ep b/themes/default/templates/render.html.ep index b57bc8b..7c757ad 100644 --- a/themes/default/templates/render.html.ep +++ b/themes/default/templates/render.html.ep @@ -10,7 +10,7 @@
% } else { -

<%= stash('f')->filename %>

+

<%= stash('f')->filename %>

% if (defined(stash('msg'))) {
@@ -20,7 +20,15 @@
% } else { + % if (stash('file_pwd')) {
+
+ +
+ <%= l('Download') %> +
+ % } +

<%= l('Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it.') %>

@@ -30,7 +38,7 @@
-
+ %= javascript begin From dbdaff9421e2b6142a0d280f3ef0da7e71a491f5 Mon Sep 17 00:00:00 2001 From: Yann Date: Thu, 24 Nov 2016 20:29:09 +0100 Subject: [PATCH 02/25] Add htpasswd file support for user authentication Fixes based on merge request discussion by Luc Didry: https://framagit.org/luc/lufi/merge_requests/7 Coding style --- cpanfile | 1 + lib/Lufi.pm | 78 +++++++++++-------- lib/Lufi/Controller/Files.pm | 8 +- lufi.conf.template | 4 + .../default/templates/layouts/default.html.ep | 8 +- 5 files changed, 59 insertions(+), 40 deletions(-) mode change 100644 => 100755 lib/Lufi.pm mode change 100644 => 100755 lufi.conf.template diff --git a/cpanfile b/cpanfile index 358d0d4..3502780 100644 --- a/cpanfile +++ b/cpanfile @@ -16,3 +16,4 @@ requires 'Switch'; requires 'Data::Entropy'; requires 'Net::LDAP'; requires 'Crypt::SaltedHash'; +requires 'Apache::Htpasswd'; diff --git a/lib/Lufi.pm b/lib/Lufi.pm old mode 100644 new mode 100755 index 5374754..d53e842 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -4,6 +4,7 @@ use Mojo::Base 'Mojolicious'; use LufiDB; use Data::Entropy qw(entropy_source); use Net::LDAP; +use Apache::Htpasswd; $ENV{MOJO_MAX_WEBSOCKET_SIZE} = 100485760; # 10 * 1024 * 1024 = 10MiB @@ -62,6 +63,9 @@ sub startup { # Debug $self->plugin('DebugDumperHelper'); + # Check htpasswd file existence + die 'Unable to read '.$self->config('htpasswd') if (defined($self->config('htpasswd')) && !-r $self->config('htpasswd')); + # Authentication (if configured) $self->plugin('authentication' => { @@ -75,41 +79,51 @@ sub startup { validate_user => sub { my ($c, $username, $password, $extradata) = @_; - my $ldap = Net::LDAP->new($c->config->{ldap}->{uri}); - my $mesg = $ldap->bind($c->config->{ldap}->{bind_user}.$c->config->{ldap}->{bind_dn}, - password => $c->config->{ldap}->{bind_pwd} - ); - - $mesg->code && die $mesg->error; - - $mesg = $ldap->search( - base => $c->config->{ldap}->{user_tree}, - filter => "(&(uid=$username)".$c->config->{ldap}->{user_filter}.")" - ); - - if ($mesg->code) { - $c->app->log->error($mesg->error); - return undef; + if (defined($c->config('ldap'))) { + my $ldap = Net::LDAP->new($c->config->{ldap}->{uri}); + my $mesg = $ldap->bind($c->config->{ldap}->{bind_user}.$c->config->{ldap}->{bind_dn}, + password => $c->config->{ldap}->{bind_pwd} + ); + + $mesg->code && die $mesg->error; + + $mesg = $ldap->search( + base => $c->config->{ldap}->{user_tree}, + filter => "(&(uid=$username)".$c->config->{ldap}->{user_filter}.")" + ); + + if ($mesg->code) { + $c->app->log->error($mesg->error); + return undef; + } + + # Now we know that the user exists + $mesg = $ldap->bind('uid='.$username.$c->config->{ldap}->{bind_dn}, + password => $password + ); + + if ($mesg->code) { + $c->app->log->info("[LDAP authentication failed] login: $username, IP: ".$c->ip); + $c->app->log->error("[LDAP authentication failed] ".$mesg->error); + return undef; + } + + $c->app->log->info("[LDAP authentication successful] login: $username, IP: ".$c->ip); + } elsif (defined($c->config('htpasswd'))) { + my $htpasswd = new Apache::Htpasswd({passwdFile => $c->config->{htpasswd}, + ReadOnly => 1} + ); + if (!$htpasswd->htCheckPassword($username, $password)) { + return undef; + } + $c->app->log->info("[Simple authentication successful] login: $username, IP: ".$c->ip); } - # Now we know that the user exists - $mesg = $ldap->bind('uid='.$username.$c->config->{ldap}->{bind_dn}, - password => $password - ); - - if ($mesg->code) { - $c->app->log->info("[LDAP authentication failed] login: $username, IP: ".$c->ip); - $c->app->log->error("[LDAP authentication failed] ".$mesg->error); - return undef; - } - - $c->app->log->info("[LDAP authentication successful] login: $username, IP: ".$c->ip); - return $username; } } ); - if (defined($self->config('ldap'))) { + if (defined($self->config('ldap')) || defined($self->config('htpasswd'))) { $self->app->sessions->default_expiration($self->config('session_duration')); } @@ -249,14 +263,14 @@ sub startup { # Page for files uploading $r->get('/' => sub { my $c = shift; - if (!defined($c->config('ldap')) || $c->is_user_authenticated) { + if ((!defined($c->config('ldap')) && !defined($c->config('htpasswd'))) || $c->is_user_authenticated) { $c->render(template => 'index'); } else { $c->redirect_to('login'); } })->name('index'); - if (defined $self->config('ldap')) { + if (defined $self->config('ldap') || defined $self->config('htpasswd')) { # Login page $r->get('/login' => sub { my $c = shift; @@ -302,7 +316,7 @@ sub startup { # List of files (use localstorage, so the server know nothing about files) $r->get('/files' => sub { my $c = shift; - if (!defined($c->config('ldap')) || $c->is_user_authenticated) { + if ((!defined($c->config('ldap')) && !defined($c->config('htpasswd'))) || $c->is_user_authenticated) { $c->render(template => 'files'); } else { $c->redirect_to('login'); diff --git a/lib/Lufi/Controller/Files.pm b/lib/Lufi/Controller/Files.pm index b25bca6..614693b 100644 --- a/lib/Lufi/Controller/Files.pm +++ b/lib/Lufi/Controller/Files.pm @@ -14,7 +14,7 @@ use Crypt::SaltedHash; sub upload { my $c = shift; - if (!defined($c->config('ldap')) || $c->is_user_authenticated) { + if ((!defined($c->config('ldap')) && !defined($c->config('htpasswd'))) || $c->is_user_authenticated) { $c->inactivity_timeout(30000000); $c->app->log->debug('Client connected'); @@ -109,7 +109,7 @@ sub upload { } my $creator = $c->ip; - if (defined($c->config('ldap'))) { + if (defined($c->config('ldap')) || defined($c->config('htpasswd'))) { $creator = 'User: '.$c->current_user.', IP: '.$creator; } $f = Lufi::File->new( @@ -329,7 +329,7 @@ sub get_counter { my $short = $c->param('short'); my $token = $c->param('token'); - if (!defined($c->config('ldap')) || $c->is_user_authenticated) { + if ((!defined($c->config('ldap')) && !defined($c->config('htpasswd'))) || $c->is_user_authenticated) { my @records = LufiDB::Files->select('WHERE short = ?', $short); if (scalar(@records)) { if ($records[0]->mod_token eq $token) { @@ -378,7 +378,7 @@ sub delete { my $short = $c->param('short'); my $token = $c->param('token'); - if (!defined($c->config('ldap')) || $c->is_user_authenticated) { + if ((!defined($c->config('ldap')) && !defined($c->config('htpasswd'))) || $c->is_user_authenticated) { my @records = LufiDB::Files->select('WHERE short = ? AND mod_token = ?', ($short, $token)); if (scalar(@records)) { my $f = Lufi::File->new(record => $records[0]); diff --git a/lufi.conf.template b/lufi.conf.template old mode 100644 new mode 100755 index 33aefac..56bda8f --- a/lufi.conf.template +++ b/lufi.conf.template @@ -132,6 +132,10 @@ # user_filter => '!(uid=ldap_user)' #}, + # set `htpasswd` if you want to use an htpasswd file instead of ldap + # see 'man htpasswd' to know how to create such file + #htpasswd => 'lufi.passwd', + # if you've set ldap above, the session will last `session_duration` seconds before # the user needs to reauthenticate # optional, default is 3600 diff --git a/themes/default/templates/layouts/default.html.ep b/themes/default/templates/layouts/default.html.ep index 67b7ddc..faf03be 100644 --- a/themes/default/templates/layouts/default.html.ep +++ b/themes/default/templates/layouts/default.html.ep @@ -31,26 +31,26 @@ From 20c51e076838fc6d2eea0d904a3bed72b10f3d4d Mon Sep 17 00:00:00 2001 From: Yann Date: Tue, 14 Feb 2017 11:34:50 +0100 Subject: [PATCH 03/25] Update AUTHORS.md for commit d4afe13f --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 0c699f2..5deb664 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -11,3 +11,4 @@ * Sébastien Duthil (fix english translation) * Armando Lüscher, https://noplanman.ch/ (fix css) * Quentin Pagès (occitan translation) +* Yann Le Brech (htpasswd file support) From bc451afd5e9b8d07cd77590425c97dbabb4770fd Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 10 Mar 2017 17:59:50 +0100 Subject: [PATCH 04/25] Add portuguese translation Fix #81 --- AUTHORS.md | 1 + themes/default/lib/Lufi/I18N/pt.po | 494 +++++++++++++++++++++++++++++ 2 files changed, 495 insertions(+) create mode 100644 themes/default/lib/Lufi/I18N/pt.po diff --git a/AUTHORS.md b/AUTHORS.md index 5deb664..c252548 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -12,3 +12,4 @@ * Armando Lüscher, https://noplanman.ch/ (fix css) * Quentin Pagès (occitan translation) * Yann Le Brech (htpasswd file support) +* Jéssica Da Cunha (portuguese translation) diff --git a/themes/default/lib/Lufi/I18N/pt.po b/themes/default/lib/Lufi/I18N/pt.po new file mode 100644 index 0000000..e449e96 --- /dev/null +++ b/themes/default/lib/Lufi/I18N/pt.po @@ -0,0 +1,494 @@ +# Lufi PT translation +# Copyright (C) 2015 Luc Didry +# This file is distributed under the same license as the Lufi package. +# Luc Didry , 2015. +# Jéssica Da Cunha , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2017-03-01 14:00+0100\n" +"PO-Revision-Date: 2017-03-01 14:00+0100\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" +"X-Generator: Poedit 1.8.5\n" +"Last-Translator: Jéssica Da Cunha \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt\n" + +#. ($delay) +#. (max_delay) +#: themes/default/templates/index.html.ep:40 themes/default/templates/index.html.ep:49 themes/default/templates/index.html.ep:50 +msgid "%1 days" +msgstr "%1 dias" + +#: themes/default/templates/index.html.ep:5 +msgid "1 year" +msgstr "1 ano" + +#: themes/default/templates/index.html.ep:4 themes/default/templates/index.html.ep:49 +msgid "24 hours" +msgstr "24 horas" + +#: themes/default/templates/mail.html.ep:83 +msgid ":" +msgstr " :" + +#: themes/default/templates/about.html.ep:16 +msgid "A thank you with a photo of kitten on Diaspora* or Twitter is cool too ;-)" +msgstr "Um obrigado com a foto de um gatinho no Diaspora* ou Twitter é também porreiro ;-)" + +#: themes/default/templates/render.html.ep:34 +msgid "Abort" +msgstr "Interromper" + +#: themes/default/templates/layouts/default.html.ep:40 themes/default/templates/layouts/default.html.ep:52 +msgid "About" +msgstr "Sobre" + +#: themes/default/templates/about.html.ep:18 +msgid "As Lufi is a free software licensed under of the terms of the AGPLv3, you can install it on you own server. Have a look on the Wiki for the procedure." +msgstr "Como Lufi é um programa livre sob os termos da licença AGPLv3, pode instalar-lo no seu prórpio servidor. Para saber mais clique aqui Wiki para ver o procedimento." + +#. (stash('f') +#: themes/default/templates/render.html.ep:44 +msgid "Asking for file part XX1 of %1" +msgstr "Pedido de recuperação de um fragmento do ficheiro XX1 de %1" + +#: themes/default/templates/about.html.ep:21 +msgid "Back to homepage" +msgstr "Voltar à página inicial" + +#: lib/Lufi/Controller/Mail.pm:20 +msgid "Bad CSRF token!" +msgstr "Símbolo errado CSRF !" + +#: themes/default/templates/render.html.ep:40 +msgid "Click here to refresh the page and restart the download." +msgstr "Clique aqui para atualizar a página e começar o download." + +#: themes/default/templates/index.html.ep:72 +msgid "Click to open the file browser" +msgstr "Clique para abrir o navegador de ficheiros" + +#: themes/default/templates/delays.html.ep:38 +msgid "Close" +msgstr "Fechar" + +#: themes/default/templates/mail.html.ep:22 +msgid "Comma-separated email addresses" +msgstr "Os e-mails devem ser separados por vírgulas" + +#: themes/default/templates/index.html.ep:92 +msgid "Copy all links to clipboard" +msgstr "Copiar todos os links para a área de transferência" + +#: themes/default/templates/index.html.ep:95 +msgid "Copy to clipboard" +msgstr "Copiar para a área de transferência" + +#: lib/Lufi/Controller/Files.pm:396 +msgid "Could not delete the file. You are not authenticated." +msgstr "Impossível apagar o ficheiro. Não está conectado." + +#: lib/Lufi/Controller/Files.pm:380 +msgid "Could not find the file. Are you sure of the URL and the token?" +msgstr "Impossível encontrar o ficheiro.Tem a certeza que o URL e os símbolos estão corretos?" + +#: lib/Lufi/Controller/Files.pm:296 +msgid "Could not find the file. Are you sure of the URL?" +msgstr "Impossível encontar o ficheiro. Tem a certeza de que o URL está correto?" + +#: themes/default/templates/files.html.ep:26 +msgid "Counter" +msgstr "Contador" + +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +msgid "Delete at first download?" +msgstr "Apagar após o primeiro download?" + +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:96 +msgid "Deletion link" +msgstr "Eliminar o link" + +#: themes/default/templates/delays.html.ep:8 +msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file." +msgstr "Não se preocupe: se um utilizador começa a descarregar um ficheiro antes a sua expiração e que o descarregamento acaba após a sua expiração, o utilizador pode ainda assim recuperar o ficheiro." + +#: themes/default/templates/index.html.ep:98 +msgid "Download" +msgstr "Download" + +#: themes/default/templates/render.html.ep:39 +msgid "Download aborted." +msgstr "Download interrompido." + +#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:97 +msgid "Download link" +msgstr "Link para o download" + +#: themes/default/templates/about.html.ep:10 +msgid "Drag and drop files in the appropriate area or use the traditional way to send files and the files will be chunked, encrypted and sent to the server. You will get two links per file: a download link, that you give to the people you want to share the file with and a deletion link, allowing you to delete the file whenever you want." +msgstr "Deslize os ficheiros na zona própria e esse efeito ou selecione um ficheiro de forma tradicional, e os ficheiros serão fragmentados, codificados e enviados ao servidor. Vai receber dois links por ficheiro: um é de download e o outro para poder apagar o ficheiro quando quiser." + +#: themes/default/templates/index.html.ep:69 +msgid "Drop files here (max. 4 Gb/file)" +msgstr "Deslize os ficheiros aqui (max. 4 Gb/ficheiro)" + +#: themes/default/templates/mail.html.ep:38 +msgid "Email body" +msgstr "Conteúdo do e-mail" + +#: themes/default/templates/mail.html.ep:30 +msgid "Email subject" +msgstr "Assunto do e-mail" + +#: themes/default/templates/mail.html.ep:24 themes/default/templates/mail.html.ep:26 +msgid "Emails" +msgstr "E-mails" + +#: themes/default/templates/index.html.ep:99 +msgid "Encrypting part XX1 of XX2" +msgstr "Codificação do fragmento XX1 de XX2" + +#: lib/Lufi/Controller/Files.pm:216 +msgid "Error: the file existed but was deleted." +msgstr "Erro: o ficheiro existia mas foi apagado." + +#: lib/Lufi/Controller/Files.pm:266 +msgid "Error: the file has not been sent entirely." +msgstr "Erro: o ficheiro não foi enviado na totalidade." + +#: lib/Lufi/Controller/Files.pm:276 +msgid "Error: unable to find the file. Are you sure of your URL?" +msgstr "Erro: impossível encontrar o ficheiro. Tem a certeza do URL?" + +#: themes/default/templates/index.html.ep:100 +msgid "Expiration:" +msgstr "Expiração:" + +#: themes/default/templates/files.html.ep:29 +msgid "Expires at" +msgstr "Expira no" + +#: themes/default/templates/files.html.ep:12 +msgid "Export localStorage data" +msgstr "Exportar os dados localStorage" + +#: lib/Lufi/Controller/Files.pm:364 +msgid "File deleted" +msgstr "Ficheiro apagado" + +#: themes/default/templates/files.html.ep:24 +msgid "File name" +msgstr "Nome do ficheiro" + +#: themes/default/templates/render.html.ep:43 +msgid "Get the file" +msgstr "Recuperar o ficheiro" + +#: themes/default/templates/about.html.ep:19 +msgid "Get the source code on the official repository or on its Github mirror" +msgstr "Recupere o código-fonte no o depósito oficial ou então réplicas Github." + +#: themes/default/templates/mail.html.ep:78 +msgid "Hello,\\n\\nHere's some files I want to share with you:\\n" +msgstr "Olá,\\n\\nAqui estão alguns ficheiros que gostaria de partilhar contigo:\\n" + +#: themes/default/templates/mail.html.ep:34 +msgid "Here's some files" +msgstr "Aqui estão alguns ficheiros" + +#: themes/default/templates/index.html.ep:102 +msgid "Hit Enter, then Ctrl+C to copy all the download links" +msgstr "Clique no Enter e depois Ctrl+C para copiar todos os links de download" + +#: themes/default/templates/index.html.ep:101 +msgid "Hit Enter, then Ctrl+C to copy the download link" +msgstr "Clique no Enter e depois Ctrl+C para copiar o link de download" + +#: themes/default/templates/about.html.ep:9 +msgid "How does it work?" +msgstr "Como funciona?" + +#: themes/default/templates/about.html.ep:17 +msgid "How to install Lufi on my server?" +msgstr "Como instalar Lufi no meu servidor?" + +#: themes/default/templates/about.html.ep:12 +msgid "How to report an illegal file?" +msgstr "Como assinalar um ficheiro ilegal?" + +#: themes/default/templates/delays.html.ep:7 +msgid "If you choose a delay, the file will be deleted after that delay." +msgstr "Se escolher um prazo, o ficheiro será apagado após esse prazo." + +#: themes/default/templates/mail.html.ep:15 +msgid "If you send the mail from this server, the links will be sent to the server, which may lower your privacy protection." +msgstr "Se enviar um e-mail a partir deste servidor, os links serão enviados ao servidor, o que poderá diminuir a proteção da confidencia." + +#: themes/default/templates/files.html.ep:14 +msgid "Import localStorage data" +msgstr "Importar os dados localStorage" + +#: themes/default/templates/index.html.ep:37 +msgid "Important: more information on delays" +msgstr "Importante: mais informações sobre os prazos" + +#: themes/default/templates/delays.html.ep:5 +msgid "Information about delays" +msgstr "Informação sobre os prazos" + +#: themes/default/templates/render.html.ep:41 +msgid "It seems that the key in your URL is incorrect. Please, verify your URL." +msgstr "Parece que a chave do seu URL está incorreta.Por favor, verifique o seu URL." + +#: themes/default/templates/index.html.ep:12 +msgid "Javascript is disabled. You won't be able to use Lufi." +msgstr "Javascript está desativado. Lufi não funcionará." + +#: themes/default/templates/login.html.ep:15 +msgid "Login" +msgstr "Utilizador" + +#: themes/default/templates/layouts/default.html.ep:42 themes/default/templates/layouts/default.html.ep:54 +msgid "Logout" +msgstr "Encerrar sessão" + +#: themes/default/templates/about.html.ep:4 +msgid "Lufi is a free (as in free speech) file hosting software." +msgstr "Lufi é um programa de reserva gratuita (como na liberdade de expressão) de ficheiros." + +#: themes/default/templates/files.html.ep:3 themes/default/templates/layouts/default.html.ep:36 themes/default/templates/layouts/default.html.ep:48 +msgid "My files" +msgstr "Meus ficheiros" + +#. (format_bytes($json->{size}) +#: lib/Lufi/Controller/Files.pm:68 +msgid "No enough space available on the server for this file (size: %1)." +msgstr "O servidor não tem espaço suficiente para este ficheiro (tamanho: %1)." + +#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:104 +msgid "No expiration delay" +msgstr "Não tem prazo de expiração" + +#: themes/default/templates/files.html.ep:8 +msgid "Only the files sent with this browser will be listed here. This list is stored in localStorage: if you delete your localStorage data, you'll lose this list." +msgstr "Apenas os ficheiros enviados com este navegador web estão listados aqui. As informações são armazenadas no localStorage : se apagar os seus dados no LocalStorage, poedrá perder essa informação." + +#: themes/default/templates/login.html.ep:21 +msgid "Password" +msgstr "Palavra-passe" + +#. (config('contact') +#: themes/default/templates/about.html.ep:13 +msgid "Please contact the administrator: %1" +msgstr "Contacte o administrador: %1" + +#: themes/default/templates/render.html.ep:25 +msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." +msgstr "Por favor aguarde durante a recuperação do seu ficheiro. Primeiro devemos recuperar e descodificar todos os fragmentos e depois poderá descarregar o ficheiro." + +#: themes/default/templates/about.html.ep:5 +msgid "Privacy" +msgstr "Privacidade" + +#: themes/default/templates/files.html.ep:13 +msgid "Purge expired files from localStorage" +msgstr "Apagar do localStorage os ficheiros expirados" + +#: themes/default/templates/files.html.ep:9 +msgid "Rows in red mean that the files have expired and are no longer available." +msgstr "As linhas a vermelho indicam que o ficheiro expirou e já não está disponível." + +#: themes/default/templates/index.html.ep:103 +msgid "Send all links by email" +msgstr "Enviar todos os links por e-mail" + +#: themes/default/templates/mail.html.ep:45 +msgid "Send with this server" +msgstr "Enviar com este servidor" + +#: themes/default/templates/mail.html.ep:46 +msgid "Send with your own mail software" +msgstr "Enviar com o seu e-mail pessoal" + +#: themes/default/templates/index.html.ep:105 +msgid "Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move." +msgstr "Envio do fragmento XX1 de XX2. Por favor aguarde, a barra de progressão pode levar algum tempo antes de avançar." + +#. (url_for('/') +#: themes/default/templates/mail.html.ep:91 +msgid "Share your files in total privacy on %1" +msgstr "Partilhe os seus ficheiros com toda a privacidade em %1" + +#: themes/default/templates/layouts/default.html.ep:38 themes/default/templates/layouts/default.html.ep:50 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 +msgid "Signin" +msgstr "Conexão" + +#: themes/default/templates/index.html.ep:30 +msgid "Sorry, the uploading is currently disabled. Please try again later." +msgstr "Desculpe, o envio do ficheiro está atualmente desativado. Tente mais tarde." + +#: lib/Lufi/Controller/Files.pm:42 +msgid "Sorry, uploading is disabled." +msgstr "Desculpe, o envio do ficheiro está desativado." + +#: themes/default/templates/about.html.ep:7 +msgid "The administrator can only see the file's name, its size and its mimetype (what kind of file it is: video, text, etc.)." +msgstr "O administrador pode apenas ver o nome do ficheiro, o seu tamanho e o tipo de mime (o tipo de ficheiro: texto, vídeo, etc.)." + +#: themes/default/templates/files.html.ep:43 +msgid "The data has been successfully imported." +msgstr "Os dados foram importados com sucesso." + +#: lib/Lufi/Controller/Mail.pm:42 +msgid "The email body can't be empty." +msgstr "A mensagem do e-mail não pode estar vazia." + +#: lib/Lufi/Controller/Mail.pm:41 +msgid "The email subject can't be empty." +msgstr "O assunto do e-mail não pode estar vazio." + +#: lib/Lufi/Controller/Files.pm:361 +msgid "The file has already been deleted" +msgstr "O ficheiro já foi apagado" + +#: themes/default/templates/about.html.ep:6 +msgid "The files uploaded on a Lufi instance are encrypted before the upload to the server: the administrator of the server can not see the file's content." +msgstr "Os ficheiros enviados no Lufi são codificados antes de serem enviados ao servidor: o administrador do servidor não pode ver o conteúdo dos ficheiros." + +#. (join(', ', @bad) +#: lib/Lufi/Controller/Mail.pm:37 +msgid "The following email addresses are not valid: %1" +msgstr "Os e-mails seguintes não são válidos: %1" + +#: themes/default/templates/index.html.ep:93 +msgid "The link(s) has been copied to your clipboard" +msgstr "O(s) link(s) foi/foram copiados para a área de transferência" + +#: lib/Lufi/Controller/Mail.pm:65 +msgid "The mail has been sent." +msgstr "O e-mail foi enviado." + +#: themes/default/templates/about.html.ep:15 +msgid "The original (and only for now) author is Luc Didry. If you want to support him, you can do it via Tipeee or via Liberapay." +msgstr "O autor original (e por agora, o único) é Luc Didry. Se o desejar apoiar pode fazer-lo via Tipeee ou via Liberapay." + +#: lib/Lufi/Controller/Files.pm:168 +msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." +msgstr "O servidor foi incapaz de encontrar o registo do ficheiro no qual devia-se juntar o fragmento do seu ficheiro. Contacte o administrador." + +#: themes/default/templates/delays.html.ep:10 +msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:" +msgstr "O servidor exige limites segundo o tamanho dos ficheiros. O prazo de expiração dos seu ficheiro sera o minimo entre o que você escolheu e os limites seguintes:" + +#: themes/default/templates/index.html.ep:94 +msgid "Unable to copy the link(s) to your clipboard" +msgstr "Impossível copiar o(s) link(s) na sua área de transferência" + +#. ($short) +#: lib/Lufi/Controller/Files.pm:334 +msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage." +msgstr "Impossível recuperar o contador para %1. O ficheiro não existe. Isso vai apagar a sua localStorage." + +#. ($short) +#: lib/Lufi/Controller/Files.pm:324 +msgid "Unable to get counter for %1. The token is invalid." +msgstr "Impossível recuperar o contador para %1. O símbolo é inválido." + +#. ($short) +#: lib/Lufi/Controller/Files.pm:344 +msgid "Unable to get counter for %1. You are not authenticated." +msgstr "Impossível recuperar o contador para %1. Não está conectado." + +#: themes/default/templates/layouts/default.html.ep:35 themes/default/templates/layouts/default.html.ep:47 +msgid "Upload files" +msgstr "Enviar os ficheiros" + +#: themes/default/templates/files.html.ep:28 +msgid "Uploaded at" +msgstr "Enviar a" + +#: themes/default/templates/index.html.ep:77 +msgid "Uploaded files" +msgstr "Ficheiros enviados" + +#: themes/default/templates/index.html.ep:106 +msgid "Websocket communication error" +msgstr "Erro de comunicação com WebSocket" + +#: themes/default/templates/about.html.ep:3 +msgid "What is Lufi?" +msgstr "O que é o Lufi?" + +#: themes/default/templates/about.html.ep:14 +msgid "Who wrote Lufi?" +msgstr "Quem escreveu Lufi?" + +#: themes/default/templates/about.html.ep:11 +msgid "You can see the list of your files by clicking on the \"My files\" link at the top right of this page." +msgstr "Pode ver a lista dos seus ficheiros clicando no link « Meus ficheiros » em cima da página à direita." + +#: themes/default/templates/about.html.ep:8 +msgid "You don't need to register yourself to upload files but be aware that, for legal reasons, your IP address will be stored when you send a file. Don't panic, this is normally the case for all sites on which you send files." +msgstr "Não precisa registar-se para enviar ficheiros mas saiba que, por razões legais, o seu endereço IP ficará registrado quando envia um ficheiro. Não entre em pânico, é algo comum a todos os sites onde envia ficheiros." + +#: themes/default/templates/render.html.ep:45 +msgid "You don't seem to have a key in your URL. You won't be able to decrypt the file. Download canceled." +msgstr "Parece que não tem a chave no seu URL. Não poderá descodificar o ficheiro. Download anulado." + +#: themes/default/templates/render.html.ep:42 +msgid "You have attempted to leave this page. The download will be canceled. Are you sure?" +msgstr "Está a tentar sair da página. O download será anulado. Tem a certeza?" + +#: themes/default/templates/index.html.ep:91 +msgid "You have attempted to leave this page. The upload will be canceled. Are you sure?" +msgstr "Está a tentar sair da página. O envio será anulado. Tem a certeza?" + +#: themes/default/templates/logout.html.ep:5 +msgid "You have been successfully logged out." +msgstr "Foi desconectado com sucesso." + +#: lib/Lufi/Controller/Mail.pm:40 +msgid "You must give email addresses." +msgstr "Deve escrever os e-mails." + +#. (format_bytes($json->{size}) +#: lib/Lufi/Controller/Files.pm:55 +msgid "Your file is too big: %1 (maximum size allowed: %2)" +msgstr "O seu ficheiro é grande de mais: %1 (o tamanho máximo autorizado é de %2)" + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:20 +msgid "between %1 and %2, the file will be kept %3 day(s)." +msgstr "entre %1 e %2, o ficheiro será conservado %3 dia(s) ;" + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:22 +msgid "between %1 and %2, the file will be kept forever." +msgstr "entre %1 e %2, o ficheiro será conservado por um tempo indeterminado." + +#: themes/default/templates/mail.html.ep:85 +msgid "deadline: " +msgstr "Data-limite: " + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:26 +msgid "for %1 and more, the file will be kept %2 day(s)" +msgstr "para %1 e mais, o ficheiro será conservado %2 dia(s)." + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:28 +msgid "for %1 and more, the file will be kept forever." +msgstr "para %1 e mais, o ficheiro será conservado por um tempo indeterminado." + +#: themes/default/templates/index.html.ep:3 +msgid "no time limit" +msgstr "Não tem limite de expiração" + +#: themes/default/templates/index.html.ep:70 +msgid "or" +msgstr "ou" From f2433c30b4ff08c6ddaa6d96d231a8804b9a1a91 Mon Sep 17 00:00:00 2001 From: juju4 Date: Mon, 8 May 2017 21:05:49 -0400 Subject: [PATCH 05/25] issue #86 --- lib/Lufi.pm | 8 ++++---- lib/Mounter.pm | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Lufi.pm b/lib/Lufi.pm index d53e842..44d8c4f 100755 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -38,12 +38,12 @@ sub startup { shift @{$self->renderer->paths}; shift @{$self->static->paths}; if ($config->{theme} ne 'default') { - my $theme = $self->home->rel_dir('themes/'.$config->{theme}); + my $theme = $self->home->rel_file('themes/'.$config->{theme}); push @{$self->renderer->paths}, $theme.'/templates' if -d $theme.'/templates'; push @{$self->static->paths}, $theme.'/public' if -d $theme.'/public'; } - push @{$self->renderer->paths}, $self->home->rel_dir('themes/default/templates'); - push @{$self->static->paths}, $self->home->rel_dir('themes/default/public'); + push @{$self->renderer->paths}, $self->home->rel_file('themes/default/templates'); + push @{$self->static->paths}, $self->home->rel_file('themes/default/public'); # Mail config my $mail_config = { @@ -56,7 +56,7 @@ sub startup { $self->plugin('Mail' => $mail_config); # Internationalization - my $lib = $self->home->rel_dir('themes/'.$config->{theme}.'/lib'); + my $lib = $self->home->rel_file('themes/'.$config->{theme}.'/lib'); eval qq(use lib "$lib"); $self->plugin('I18N'); diff --git a/lib/Mounter.pm b/lib/Mounter.pm index 58f350e..9860253 100644 --- a/lib/Mounter.pm +++ b/lib/Mounter.pm @@ -22,10 +22,10 @@ sub startup { # Themes handling shift @{$self->static->paths}; if ($config->{theme} ne 'default') { - my $theme = $self->home->rel_dir('themes/'.$config->{theme}); + my $theme = $self->home->rel_file('themes/'.$config->{theme}); push @{$self->static->paths}, $theme.'/public' if -d $theme.'/public'; } - push @{$self->static->paths}, $self->home->rel_dir('themes/default/public'); + push @{$self->static->paths}, $self->home->rel_file('themes/default/public'); $self->plugin('Mount' => {$config->{prefix} => File::Spec->catfile($Bin, '..', 'script', 'application')}); } From 9959005a89417aa846a767ca06bfd73cdcbd76ee Mon Sep 17 00:00:00 2001 From: Framasoft Date: Fri, 26 May 2017 06:28:36 +0000 Subject: [PATCH 06/25] =?UTF-8?q?Primera=20versi=C3=B3.=20Falta=20traduir?= =?UTF-8?q?=20t=C3=ADtol=20de=20p=C3=A0gina=20i=20l'apostrof=20del=20cos?= =?UTF-8?q?=20dell=20correu=20no=20surt=20b=C3=A9=20a=20l'editor.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/default/lib/Lufi/I18N/ca.po | 631 +++++++++++++++++++++++++++++ 1 file changed, 631 insertions(+) create mode 100644 themes/default/lib/Lufi/I18N/ca.po diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po new file mode 100644 index 0000000..d5602b3 --- /dev/null +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -0,0 +1,631 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# xd , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: Lufi 0.01\n" +"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2017-05-26 06:23-0000\n" +"Last-Translator: xd \n" +"Language-Team: català; valencià <>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.6.10\n" +"Language: ca\n" + +#. ($delay) +#. (max_delay) +#: themes/default/templates/index.html.ep:40 +#: themes/default/templates/index.html.ep:49 +#: themes/default/templates/index.html.ep:50 +msgid "%1 days" +msgstr "%1 dies" + +#: themes/default/templates/index.html.ep:5 +msgid "1 year" +msgstr "1 any" + +#: themes/default/templates/index.html.ep:4 +#: themes/default/templates/index.html.ep:49 +msgid "24 hours" +msgstr "24 hores" + +#: themes/default/templates/mail.html.ep:83 +msgid ":" +msgstr ":" + +#: themes/default/templates/about.html.ep:16 +msgid "" +"A thank you with a photo of kitten on Diaspora* or " +"Twitter is " +"cool too ;-)" +msgstr "" +"Un agraïment amb la foto d'un gatet a Diaspora* o " +"a Twitter " +"també fa goig ;-)" + +#: themes/default/templates/render.html.ep:34 +msgid "Abort" +msgstr "Avorta" + +#: themes/default/templates/layouts/default.html.ep:40 +#: themes/default/templates/layouts/default.html.ep:52 +msgid "About" +msgstr "Quant a" + +#: themes/default/templates/about.html.ep:18 +msgid "" +"As Lufi is a free software licensed under of the terms of the AGPLv3, you can " +"install it on you own server. Have a look on the Wiki for the procedure." +msgstr "" +"Com que Lufi és programari lliure, autoritzat sota els termes de l'AGPLv3, el " +"podeu instal·lar al vostre propi servidor. Pel que fa a com fer-ho, feu un " +"cop d'ull al Wiki." + +#. (stash('f') +#: themes/default/templates/render.html.ep:44 +msgid "Asking for file part XX1 of %1" +msgstr "Demanem la part XX1 de %1 del fitxer" + +#: themes/default/templates/about.html.ep:21 +msgid "Back to homepage" +msgstr "Retorna a la pàgina d'inici" + +#: lib/Lufi/Controller/Mail.pm:20 +msgid "Bad CSRF token!" +msgstr "Mal testimoni CSRF!" + +#: themes/default/templates/render.html.ep:40 +msgid "Click here to refresh the page and restart the download." +msgstr "Premeu aquí per tal de refrescar la pàgina i reiniciar la descàrrega" + +#: themes/default/templates/index.html.ep:72 +msgid "Click to open the file browser" +msgstr "Premeu per obrir la selecció de fitxer." + +#: themes/default/templates/delays.html.ep:38 +msgid "Close" +msgstr "Tanca" + +#: themes/default/templates/mail.html.ep:22 +msgid "Comma-separated email addresses" +msgstr "Adreces de correu electrònic separades per comes" + +#: themes/default/templates/index.html.ep:92 +msgid "Copy all links to clipboard" +msgstr "Copia tots els enllaços al porta-retalls" + +#: themes/default/templates/index.html.ep:95 +msgid "Copy to clipboard" +msgstr "Copia al porta-retalls" + +#: lib/Lufi/Controller/Files.pm:396 +msgid "Could not delete the file. You are not authenticated." +msgstr "No es pot esborrar el fitxer. No esteu autenticat." + +#: lib/Lufi/Controller/Files.pm:380 +msgid "Could not find the file. Are you sure of the URL and the token?" +msgstr "No es troba el fitxer. Esteu segur de la URL i el testimoni?" + +#: lib/Lufi/Controller/Files.pm:296 +msgid "Could not find the file. Are you sure of the URL?" +msgstr "No trobo el fitxer. Esteu segurs de la URL?" + +#: themes/default/templates/files.html.ep:26 +msgid "Counter" +msgstr "Comptador" + +#: themes/default/templates/files.html.ep:27 +#: themes/default/templates/index.html.ep:64 +msgid "Delete at first download?" +msgstr "Eliminar-lo a la primera descàrrega?" + +#: themes/default/templates/files.html.ep:30 +#: themes/default/templates/index.html.ep:96 +msgid "Deletion link" +msgstr "Enllaç per a eliminació" + +#: themes/default/templates/delays.html.ep:8 +msgid "" +"Don't worry: if a user begins to download the file before the expiration and " +"the download ends after the expiration, he will be able to get the file." +msgstr "" +"No patiu per si un usuari comença a descarregar el fitxer abans de " +"l'expiració i la descàrrega acaba després de l'expiració, encara podrà " +"obtenir el fitxer." + +#: themes/default/templates/index.html.ep:98 +msgid "Download" +msgstr "Descàrrega" + +#: themes/default/templates/render.html.ep:39 +msgid "Download aborted." +msgstr "Descàrrega avortada." + +#: themes/default/templates/files.html.ep:25 +#: themes/default/templates/index.html.ep:97 +msgid "Download link" +msgstr "Enllaç per a descàrrega" + +#: themes/default/templates/about.html.ep:10 +msgid "" +"Drag and drop files in the appropriate area or use the traditional way to " +"send files and the files will be chunked, encrypted and sent to the server. " +"You will get two links per file: a download link, that you give to the " +"people you want to share the file with and a deletion link, allowing you to " +"delete the file whenever you want." +msgstr "" +"Arrossegueu i deixeu anar fitxers a l'àrea apropiada o useu el sistema " +"tradicional per enviar fitxers, i seran trossejats, xifrats i enviats al " +"servidor. Obtindreu dos enllaços per a cada fitxer: un enllaç per a la " +"descàrrega, que doneu a la gent amb qui voleu compartir el fitxer, i un " +"enllaç per a l'eliminació, que us permet eliminar el fitxer del servidor " +"quan vulgueu. " + +#: themes/default/templates/index.html.ep:69 +msgid "Drop files here" +msgstr "Deixeu anar aquí fitxers." + +#: themes/default/templates/mail.html.ep:38 +msgid "Email body" +msgstr "Cos del correu electrònic" + +#: themes/default/templates/mail.html.ep:30 +msgid "Email subject" +msgstr "Assumpte del correu electrònic" + +#: themes/default/templates/mail.html.ep:24 +#: themes/default/templates/mail.html.ep:26 +msgid "Emails" +msgstr "correus electrònics" + +#: themes/default/templates/index.html.ep:99 +msgid "Encrypting part XX1 of XX2" +msgstr "S'està xifrant la part XX1 de XX2" + +#: lib/Lufi/Controller/Files.pm:216 +msgid "Error: the file existed but was deleted." +msgstr "Error: el fitxer existia però va ser eliminat." + +#: lib/Lufi/Controller/Files.pm:266 +msgid "Error: the file has not been sent entirely." +msgstr "Error: el fitxer no s'ha enviat del tot." + +#: lib/Lufi/Controller/Files.pm:276 +msgid "Error: unable to find the file. Are you sure of your URL?" +msgstr "Error: no trobo el fitxer. Esteu segur de la URL ?" + +#: themes/default/templates/index.html.ep:100 +msgid "Expiration:" +msgstr "Expiració:" + +#: themes/default/templates/files.html.ep:29 +msgid "Expires at" +msgstr "Expira el" + +#: themes/default/templates/files.html.ep:12 +msgid "Export localStorage data" +msgstr "Exporta dades a l'emmagatzematge local" + +#: lib/Lufi/Controller/Files.pm:364 +msgid "File deleted" +msgstr "Fitxer eliminat" + +#: themes/default/templates/files.html.ep:24 +msgid "File name" +msgstr "Nom de fitxer" + +#: themes/default/templates/render.html.ep:43 +msgid "Get the file" +msgstr "Obté el fitxer" + +#: themes/default/templates/about.html.ep:19 +msgid "" +"Get the source code on the official repository or on its Github mirror" +msgstr "" +"Obteniu el codi font al repositori oficial o a la seva rèplica a Github" + +#: themes/default/templates/mail.html.ep:78 +msgid "Hello,\\n\\nHere's some files I want to share with you:\\n" +msgstr "Hola,\\n\\nVe't aquí uns fitxers que vull compartir amb tu:" + +#: themes/default/templates/mail.html.ep:34 +msgid "Here's some files" +msgstr "Ve't aquí uns fitxers" + +#: themes/default/templates/index.html.ep:102 +msgid "Hit Enter, then Ctrl+C to copy all the download links" +msgstr "" +"Prem Retorn, i després Ctrl+C per copiar tots els enllaços de descàrrega" + +#: themes/default/templates/index.html.ep:101 +msgid "Hit Enter, then Ctrl+C to copy the download link" +msgstr "Prem Retorn, i després Ctrl+C per copiar l'enllaç de descàrrega" + +#: themes/default/templates/about.html.ep:9 +msgid "How does it work?" +msgstr "Com funciona?" + +#: themes/default/templates/about.html.ep:17 +msgid "How to install the software on my server?" +msgstr "Com instal·lo el programari al meu servidor?" + +#: themes/default/templates/about.html.ep:12 +msgid "How to report an illegal file?" +msgstr "Com informo d'un fitxer iŀlegal?" + +# delay=temps/retard/dilació/demora/moratòria ? +#: themes/default/templates/delays.html.ep:7 +msgid "If you choose a delay, the file will be deleted after that delay." +msgstr "" +"Si seleccioneu una moratòria, el fitxer s'eliminarà passada la moratòria." + +#: themes/default/templates/mail.html.ep:15 +msgid "" +"If you send the mail from this server, the links will be sent to the server, " +"which may lower your privacy protection." +msgstr "" +"Si envieu el correu des d'aquest servidor, els enllaços s'enviaran al " +"servidor, i això pot minvar la protecció de la vostra privacitat." + +#: themes/default/templates/files.html.ep:14 +msgid "Import localStorage data" +msgstr "Importar dades de l'emmagatzematge local" + +#: themes/default/templates/index.html.ep:37 +msgid "Important: more information on delays" +msgstr "Importat: més informació sobre moratòries" + +#: themes/default/templates/delays.html.ep:5 +msgid "Information about delays" +msgstr "Informació sobre moratòries" + +#: themes/default/templates/render.html.ep:41 +msgid "" +"It seems that the key in your URL is incorrect. Please, verify your URL." +msgstr "" +"Sembla que la clau a l'URL és incorrecta. Si us plau, verifiqueu l'URL." + +#: themes/default/templates/index.html.ep:12 +msgid "Javascript is disabled. You won't be able to use Lufi." +msgstr "Teniu el javascript deactivat. No podreu usar Lufi." + +#: themes/default/templates/login.html.ep:15 +msgid "Login" +msgstr "Entrada" + +#: themes/default/templates/layouts/default.html.ep:42 +#: themes/default/templates/layouts/default.html.ep:54 +msgid "Logout" +msgstr "Sortida" + +#: themes/default/templates/about.html.ep:4 +msgid "Lufi is a free (as in free speech) file hosting software." +msgstr "Lufi és programari lliure d'allotjament de fitxers." + +#: themes/default/templates/files.html.ep:3 +#: themes/default/templates/layouts/default.html.ep:36 +#: themes/default/templates/layouts/default.html.ep:48 +msgid "My files" +msgstr "Els meus fitxers" + +#. (format_bytes($json->{size}) +#: lib/Lufi/Controller/Files.pm:68 +msgid "No enough space available on the server for this file (size: %1)." +msgstr "No hi ha prou espai al servidor per a aquest fitxer (mida: %1)" + +#: themes/default/templates/files.html.ep:42 +#: themes/default/templates/index.html.ep:104 +msgid "No expiration delay" +msgstr "Sense moratòria d'expiració" + +#: themes/default/templates/files.html.ep:8 +msgid "" +"Only the files sent with this browser will be listed here. This list is " +"stored in localStorage: if you delete your localStorage data, you'll lose " +"this list." +msgstr "" +"Aquí només apareixen els fitxers enviats amb aquest navegador. La llista es " +"desa en emmagatzematge local: si netegeu l'emmagatzematge local perdreu " +"aquesta llista." + +#: themes/default/templates/login.html.ep:21 +msgid "Password" +msgstr "Contrasenya" + +#. (config('contact') +#: themes/default/templates/about.html.ep:13 +msgid "Please contact the administrator: %1" +msgstr "Si us plau contacteu amb l'administrador: %1" + +#: themes/default/templates/render.html.ep:25 +msgid "" +"Please wait while we are getting your file. We first need to download and " +"decrypt all parts before you can get it." +msgstr "" +"Si us plau, espereu mentre obtenim el fitxer. Abans que el tingueu " +"disponible primer cal descarregar i desxifrar tots els trossos." + +#: themes/default/templates/about.html.ep:5 +msgid "Privacy" +msgstr "Privacitat" + +#: themes/default/templates/files.html.ep:13 +msgid "Purge expired files from localStorage" +msgstr "Netegeu els fitxers expirats de l'emmagatzematge local." + +#: themes/default/templates/files.html.ep:9 +msgid "" +"Rows in red mean that the files have expired and are no longer available." +msgstr "" +"Les files en vermell indiquen que els fitxers han expirat i ja no són " +"disponibles." + +#: themes/default/templates/index.html.ep:103 +msgid "Send all links by email" +msgstr "Envia tots els enllaços per correu electrònic" + +#: themes/default/templates/mail.html.ep:45 +msgid "Send with this server" +msgstr "Envia amb aquest servidor" + +#: themes/default/templates/mail.html.ep:46 +msgid "Send with your own mail software" +msgstr "Envia amb el vostre propi programa de correu" + +#: themes/default/templates/index.html.ep:105 +msgid "" +"Sending part XX1 of XX2. Please, be patient, the progress bar can take a " +"while to move." +msgstr "" +"S'està enviant el tros XX1 de XX2. Si us plau, paciència; la barra de " +"progrés pot trigar una mica a bellugar-se. " + +#. (url_for('/') +#: themes/default/templates/mail.html.ep:91 +msgid "Share your files in total privacy on %1" +msgstr "Compartiu fitxers amb total privacitat a %1" + +#: themes/default/templates/layouts/default.html.ep:38 +#: themes/default/templates/layouts/default.html.ep:50 +#: themes/default/templates/login.html.ep:26 +#: themes/default/templates/logout.html.ep:8 +msgid "Signin" +msgstr "Autenticació" + +#: themes/default/templates/index.html.ep:30 +msgid "Sorry, the uploading is currently disabled. Please try again later." +msgstr "" +"Disculpeu, les pujades estan actualment desactivades. Si us plau proveu-ho " +"més tard." + +#: lib/Lufi/Controller/Files.pm:42 +msgid "Sorry, uploading is disabled." +msgstr "Disculpeu, les pujades estan deshabilitades" + +#: themes/default/templates/about.html.ep:7 +msgid "" +"The administrator can only see the file's name, its size and its mimetype " +"(what kind of file it is: video, text, etc.)." +msgstr "" +"L'administrador només pot veure el nom del fitxer, la seva mida i el seu\n" +"mimetype (quina mena de fitxer és: vídeo, text, etc.)" + +#: themes/default/templates/files.html.ep:43 +msgid "The data has been successfully imported." +msgstr "La importació de les dades ha reeixit." + +#: lib/Lufi/Controller/Mail.pm:42 +msgid "The email body can't be empty." +msgstr "El cos del correu no pot estar buit." + +#: lib/Lufi/Controller/Mail.pm:41 +msgid "The email subject can't be empty." +msgstr "L'assumpte dle correu no pot estar buit." + +#: lib/Lufi/Controller/Files.pm:361 +msgid "The file has already been deleted" +msgstr "El fitxer ja ha estat esborrat" + +#: themes/default/templates/about.html.ep:6 +msgid "" +"The files uploaded on a Lufi instance are encrypted before the upload to the " +"server: the administrator of the server can not see the file's content." +msgstr "" +"Els fitxers que es pugen a una instaŀlació de Lufi són xifrats abans de " +"pujar-los al servidor i l'administrador del servidor no pot veure el " +"contingut del fitxer." + +#. (join(', ', @bad) +#: lib/Lufi/Controller/Mail.pm:37 +msgid "The following email addresses are not valid: %1" +msgstr "Les següents adreces de correu electrònic no són vàlides: %1" + +#: themes/default/templates/index.html.ep:93 +msgid "The link(s) has been copied to your clipboard" +msgstr "L'enllaç/ els enllaços ja estan copiats al portaretalls" + +#: lib/Lufi/Controller/Mail.pm:65 +msgid "The mail has been sent." +msgstr "El correu ja està enviat." + +#: themes/default/templates/about.html.ep:15 +msgid "" +"The original (and only for now) author is Luc Didry. If you want to support him, you can do it " +"via Tipeee " +"or via Liberapay." +msgstr "" +"L'autor original (i per ara l'únic) és Luc Didry. Si voleu fer una contribució podeu fer-ho via Tipeee o via " +"Liberapay." + +#: lib/Lufi/Controller/Files.pm:168 +msgid "" +"The server was unable to find the file record to add your file part to. " +"Please, contact the administrator." +msgstr "" +"El servidor no ha pogut trobar el registre del fitxer per afegir-hi el tros " +"del fitxer. Si us plau, contacteu l'administrador." + +#: themes/default/templates/delays.html.ep:10 +msgid "" +"This server sets limitations according to the file size. The expiration " +"delay of your file will be the minimum between what you choose and the " +"following limitations:" +msgstr "" +"Aquest servidor estableix limitacions segons la mida del fitxer. La " +"moratòria d'expiració del fitxer serà el mínim de l'escollida i aquestes " +"limitacions:" + +#: themes/default/templates/index.html.ep:94 +msgid "Unable to copy the link(s) to your clipboard" +msgstr "No s'han pogut copiar l'enllaç o els enllaços al porta-retalls." + +#. ($short) +#: lib/Lufi/Controller/Files.pm:334 +msgid "" +"Unable to get counter for %1. The file does not exists. It will be removed " +"from your localStorage." +msgstr "" +"No he pogut obtenir el comptador de %1. El fitxer no existeix. Serà eliminat " +"del teu emmagatzematge local." + +#. ($short) +#: lib/Lufi/Controller/Files.pm:324 +msgid "Unable to get counter for %1. The token is invalid." +msgstr "No he pogut obtenir el comptador de %1. El testimoni no és vàlid." + +#. ($short) +#: lib/Lufi/Controller/Files.pm:344 +msgid "Unable to get counter for %1. You are not authenticated." +msgstr "No he pogut obtenir el comptador de %1. No esteu autenticat." + +#: themes/default/templates/layouts/default.html.ep:35 +#: themes/default/templates/layouts/default.html.ep:47 +msgid "Upload files" +msgstr "Pujar fitxers" + +#: themes/default/templates/files.html.ep:28 +msgid "Uploaded at" +msgstr "Pujat a les" + +#: themes/default/templates/index.html.ep:77 +msgid "Uploaded files" +msgstr "Fitxers pujats" + +#: themes/default/templates/index.html.ep:106 +msgid "Websocket communication error" +msgstr "Error de comunicacions del websocket" + +#: themes/default/templates/about.html.ep:3 +msgid "What is Lufi?" +msgstr "Què és Lufi?" + +#: themes/default/templates/about.html.ep:14 +msgid "Who wrote this software?" +msgstr "Qui va escriure aquest programa?" + +#: themes/default/templates/about.html.ep:11 +msgid "" +"You can see the list of your files by clicking on the \"My files\" link at " +"the top right of this page." +msgstr "" +"Podeu veure la llista dels vostres fitxers amb a l'enllaç \"Els meus fitxers" +"\" a dalt a la dreta d'aquesta pàgina." + +#: themes/default/templates/about.html.ep:8 +msgid "" +"You don't need to register yourself to upload files but be aware that, for " +"legal reasons, your IP address will be stored when you send a file. Don't " +"panic, this is normally the case for all sites on which you send files." +msgstr "" +"No cal que us inscriviu per a pujar fitxers però tingueu en compte, que per " +"raons legals, s'enregistrarà la vostra adreça IP quan envieu un fitxer. No " +"us espanteu, això és el que normalment passa a tots els webs on pugeu " +"fitxers." + +#: themes/default/templates/render.html.ep:45 +msgid "" +"You don't seem to have a key in your URL. You won't be able to decrypt the " +"file. Download canceled." +msgstr "" +"No sembla que hi hagi una clau a la URL. No podreu desxifrar el fitxer. " +"Descàrrega canceŀlada." + +#: themes/default/templates/render.html.ep:42 +msgid "" +"You have attempted to leave this page. The download will be canceled. Are " +"you sure?" +msgstr "" +"Heu intentat deixar aquesta pàgina. Es canceŀlarà la descàrrega. N'esteu " +"segur?" + +#: themes/default/templates/index.html.ep:91 +msgid "" +"You have attempted to leave this page. The upload will be canceled. Are you " +"sure?" +msgstr "" +"Heu intentat deixar aquesta pàgina. Es canceŀlarà la pujada. N'esteu segur?" + +#: themes/default/templates/logout.html.ep:5 +msgid "You have been successfully logged out." +msgstr "Heu sortit correctament." + +#: lib/Lufi/Controller/Mail.pm:40 +msgid "You must give email addresses." +msgstr "Heu de donar l'adreça de correu electrònic." + +#. (format_bytes($json->{size}) +#: lib/Lufi/Controller/Files.pm:55 +msgid "Your file is too big: %1 (maximum size allowed: %2)" +msgstr "El fitxer és massa gran: %1 (mida màxima admesa: %2)" + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:20 +msgid "between %1 and %2, the file will be kept %3 day(s)." +msgstr "entre %1 i %2, el fitxer es mantindrà %3 dia/es al servidor." + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:22 +msgid "between %1 and %2, the file will be kept forever." +msgstr "entre %1 i %2, el fitxer es mantindrà per sempre al servidor." + +#: themes/default/templates/mail.html.ep:85 +msgid "deadline: " +msgstr "termini:" + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:26 +msgid "for %1 and more, the file will be kept %2 day(s)" +msgstr "a partir de %1, el fitxer es mantindrà %2 dia/es al servidor " + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:28 +msgid "for %1 and more, the file will be kept forever." +msgstr "a partir de %1, el fitxer es mantindrà per sempre al servidor." + +#: themes/default/templates/index.html.ep:3 +msgid "no time limit" +msgstr "no hi ha límit de temps" + +#: themes/default/templates/index.html.ep:70 +msgid "or" +msgstr "o" From 49a0b3a40db2b944ba4f79062a0b546839ba7aaa Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 15 Jun 2017 16:50:58 +0200 Subject: [PATCH 07/25] Limit Mojolicious version --- cpanfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpanfile b/cpanfile index 3502780..1ed3b9d 100644 --- a/cpanfile +++ b/cpanfile @@ -1,6 +1,6 @@ -requires "Mojolicious"; -requires "ORLite"; -requires "Mojolicious::Plugin::DebugDumperHelper"; +requires 'Mojolicious', '< 7.31'; +requires 'ORLite'; +requires 'Mojolicious::Plugin::DebugDumperHelper'; requires 'Mojolicious::Plugin::I18N'; requires 'Mojolicious::Plugin::Mail'; requires 'Mojolicious::Plugin::Authentication'; From 598c7c1e981257f601c4d5370eb8475b422621b8 Mon Sep 17 00:00:00 2001 From: popi Date: Thu, 22 Jun 2017 23:05:17 +0200 Subject: [PATCH 08/25] fix ldap filtering --- lib/Lufi.pm | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/Lufi.pm b/lib/Lufi.pm index 44d8c4f..ac49347 100755 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -11,6 +11,7 @@ $ENV{MOJO_MAX_WEBSOCKET_SIZE} = 100485760; # 10 * 1024 * 1024 = 10MiB # This method will run once at server start sub startup { my $self = shift; + my $entry = undef; my $config = $self->plugin('Config' => { default => { @@ -96,8 +97,15 @@ sub startup { $c->app->log->error($mesg->error); return undef; } - - # Now we know that the user exists + + # we filtered out, but did we actually get a non-empty result? + $entry = $mesg->shift_entry; + if (!defined $entry) { + $c->app->log->info("[LDAP authentication failed] - User $username filtered out, IP: ".$c->ip); + return undef; + } + + # Now we know that the user exists, and that he is authorized by the filter $mesg = $ldap->bind('uid='.$username.$c->config->{ldap}->{bind_dn}, password => $password ); @@ -111,7 +119,7 @@ sub startup { $c->app->log->info("[LDAP authentication successful] login: $username, IP: ".$c->ip); } elsif (defined($c->config('htpasswd'))) { my $htpasswd = new Apache::Htpasswd({passwdFile => $c->config->{htpasswd}, - ReadOnly => 1} + ReadOnly => 1} ); if (!$htpasswd->htCheckPassword($username, $password)) { return undef; @@ -288,9 +296,12 @@ sub startup { if($c->authenticate($login, $pwd)) { $c->redirect_to('index'); - } else { - $c->stash(msg => $c->l('Please, check your credentials: unable to authenticate.')); - $c->render(template => 'login'); + } elsif (defined $entry) { + $c->stash(msg => $c->l('Please, check your credentials: unable to authenticate.')); + $c->render(template => 'login'); + } else { + $c->stash(msg => $c->l('Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there\'s a glitch in the matrix.')); + $c->render(template => 'login'); } }); # Logout page From 0050db6cb376a40d930f2460f568d7ac8363d0ca Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:11:50 +0200 Subject: [PATCH 09/25] Aesthetic code changes --- lib/Lufi.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Lufi.pm b/lib/Lufi.pm index ac49347..dd0e878 100755 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -11,7 +11,7 @@ $ENV{MOJO_MAX_WEBSOCKET_SIZE} = 100485760; # 10 * 1024 * 1024 = 10MiB # This method will run once at server start sub startup { my $self = shift; - my $entry = undef; + my $entry; my $config = $self->plugin('Config' => { default => { @@ -85,14 +85,14 @@ sub startup { my $mesg = $ldap->bind($c->config->{ldap}->{bind_user}.$c->config->{ldap}->{bind_dn}, password => $c->config->{ldap}->{bind_pwd} ); - + $mesg->code && die $mesg->error; - + $mesg = $ldap->search( base => $c->config->{ldap}->{user_tree}, filter => "(&(uid=$username)".$c->config->{ldap}->{user_filter}.")" ); - + if ($mesg->code) { $c->app->log->error($mesg->error); return undef; @@ -104,18 +104,18 @@ sub startup { $c->app->log->info("[LDAP authentication failed] - User $username filtered out, IP: ".$c->ip); return undef; } - + # Now we know that the user exists, and that he is authorized by the filter $mesg = $ldap->bind('uid='.$username.$c->config->{ldap}->{bind_dn}, password => $password ); - + if ($mesg->code) { $c->app->log->info("[LDAP authentication failed] login: $username, IP: ".$c->ip); $c->app->log->error("[LDAP authentication failed] ".$mesg->error); return undef; } - + $c->app->log->info("[LDAP authentication successful] login: $username, IP: ".$c->ip); } elsif (defined($c->config('htpasswd'))) { my $htpasswd = new Apache::Htpasswd({passwdFile => $c->config->{htpasswd}, @@ -296,7 +296,7 @@ sub startup { if($c->authenticate($login, $pwd)) { $c->redirect_to('index'); - } elsif (defined $entry) { + } elsif (defined $entry) { $c->stash(msg => $c->l('Please, check your credentials: unable to authenticate.')); $c->render(template => 'login'); } else { From b8e58d6d511c5be08eda6dd1843adb02b6cc53fe Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:17:31 +0200 Subject: [PATCH 10/25] Update locales --- themes/default/lib/Lufi/I18N/en.po | 8 ++++++++ themes/default/lib/Lufi/I18N/fr.po | 8 ++++++++ themes/default/lib/Lufi/I18N/it.po | 8 ++++++++ themes/default/lib/Lufi/I18N/oc.po | 8 ++++++++ utilities/locales_files.txt | 1 + 5 files changed, 33 insertions(+) diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index f4d7548..a7bfd75 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -292,6 +292,10 @@ msgstr "" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "" +#: lib/Lufi.pm:300 +msgid "Please, check your credentials: unable to authenticate." +msgstr "" + #: themes/default/templates/about.html.ep:5 msgid "Privacy" msgstr "" @@ -329,6 +333,10 @@ msgstr "" msgid "Signin" msgstr "" +#: lib/Lufi.pm:303 +msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." +msgstr "" + #: themes/default/templates/index.html.ep:30 msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index f299514..d2ef61d 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -294,6 +294,10 @@ msgstr "Veuillez contacter l’administrateur : %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Veuillez patientez pendant la récupération de votre fichier. Nous devons d’abord récupérer et déchiffrer tous les fragments avant que vous puissiez le télécharger." +#: lib/Lufi.pm:300 +msgid "Please, check your credentials: unable to authenticate." +msgstr "Veuillez vérifier vos identifiants : impossible de vous authentifier." + #: themes/default/templates/about.html.ep:5 msgid "Privacy" msgstr "Confidentialité" @@ -331,6 +335,10 @@ msgstr "Partagez vos fichiers en toute confidentialité sur %1" msgid "Signin" msgstr "Connexion" +#: lib/Lufi.pm:303 +msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." +msgstr "Désolé, vous n’êtes pas autorisé à utiliser ce service. Contactez votre administrateur si vous pensez qu’il s’agit d’une erreur." + #: themes/default/templates/index.html.ep:30 msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "Désolé, l’envoi de fichier est actuellement désactivé. Veuillez réessayer plus tard." diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index 6e598da..66e28a7 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -294,6 +294,10 @@ msgstr "Contattare l'amministratore : %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Attendere mentre otteniamo il vostro file. Dobbiamo prima scaricare e decifrare tutte le parti prima che possiate averlo." +#: lib/Lufi.pm:300 +msgid "Please, check your credentials: unable to authenticate." +msgstr "" + #: themes/default/templates/about.html.ep:5 msgid "Privacy" msgstr "Riservatezza" @@ -331,6 +335,10 @@ msgstr "Condividi tutti i file in totale riservatezza su %1" msgid "Signin" msgstr "Autenticazione" +#: lib/Lufi.pm:303 +msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." +msgstr "" + #: themes/default/templates/index.html.ep:30 msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "L'invio del file è attualemente disattivato. Riprovare più tardi." diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index 82266a0..62c3c83 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -294,6 +294,10 @@ msgstr "Mercés de contactar l’administrator : %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Mercés d’esperar pendent la recuperacion de vòstre fichièr. Nos cal d’en primièr recuperar e deschifrar totes los fragaments abans que poscatz o telecargar." +#: lib/Lufi.pm:300 +msgid "Please, check your credentials: unable to authenticate." +msgstr "" + #: themes/default/templates/about.html.ep:5 msgid "Privacy" msgstr "Confidencialitat" @@ -331,6 +335,10 @@ msgstr "Partejatz vòstres fichièrs en tota confidencialitat sus %1" msgid "Signin" msgstr "Connexion" +#: lib/Lufi.pm:303 +msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." +msgstr "" + #: themes/default/templates/index.html.ep:30 msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "O planhèm, la foncion per mandar de fichièr es desactivada pel moment. Mercés de tornar ensajar mai tard." diff --git a/utilities/locales_files.txt b/utilities/locales_files.txt index dd95bb9..4627896 100644 --- a/utilities/locales_files.txt +++ b/utilities/locales_files.txt @@ -10,3 +10,4 @@ themes/default/templates/login.html.ep themes/default/templates/logout.html.ep lib/Lufi/Controller/Files.pm lib/Lufi/Controller/Mail.pm +lib/Lufi.pm From 7624f415c3829f95947be4c0969442035e9799f7 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:24:33 +0200 Subject: [PATCH 11/25] Add languages ca and pt to the Makefile --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 76d377b..55a9e55 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ EN=themes/default/lib/Lufi/I18N/en.po FR=themes/default/lib/Lufi/I18N/fr.po IT=themes/default/lib/Lufi/I18N/it.po OC=themes/default/lib/Lufi/I18N/oc.po +CA=themes/default/lib/Lufi/I18N/ca.po +PT=themes/default/lib/Lufi/I18N/pt.po XGETTEXT=carton exec local/bin/xgettext.pl CARTON=carton exec REAL_LUFI=script/application @@ -13,6 +15,8 @@ locales: $(XGETTEXT) -f $(EXTRACTFILES) -o $(FR) 2>/dev/null $(XGETTEXT) -f $(EXTRACTFILES) -o $(IT) 2>/dev/null $(XGETTEXT) -f $(EXTRACTFILES) -o $(OC) 2>/dev/null + $(XGETTEXT) -f $(EXTRACTFILES) -o $(CA) 2>/dev/null + $(XGETTEXT) -f $(EXTRACTFILES) -o $(PT) 2>/dev/null test: $(CARTON) $(REAL_LUFI) test From a94dd8e18e0731e006c3a71f2416600ae0599f38 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:25:46 +0200 Subject: [PATCH 12/25] Extract locales from dir, not specified files --- Makefile | 14 +++++++------- utilities/locales_files.txt | 13 ------------- 2 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 utilities/locales_files.txt diff --git a/Makefile b/Makefile index 55a9e55..55a282a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -EXTRACTFILES=utilities/locales_files.txt +EXTRACTDIR=-D lib -D themes/default/templates EN=themes/default/lib/Lufi/I18N/en.po FR=themes/default/lib/Lufi/I18N/fr.po IT=themes/default/lib/Lufi/I18N/it.po @@ -11,12 +11,12 @@ REAL_LUFI=script/application LUFI=script/lufi locales: - $(XGETTEXT) -f $(EXTRACTFILES) -o $(EN) 2>/dev/null - $(XGETTEXT) -f $(EXTRACTFILES) -o $(FR) 2>/dev/null - $(XGETTEXT) -f $(EXTRACTFILES) -o $(IT) 2>/dev/null - $(XGETTEXT) -f $(EXTRACTFILES) -o $(OC) 2>/dev/null - $(XGETTEXT) -f $(EXTRACTFILES) -o $(CA) 2>/dev/null - $(XGETTEXT) -f $(EXTRACTFILES) -o $(PT) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(EN) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(FR) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(IT) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(OC) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(CA) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(PT) 2>/dev/null test: $(CARTON) $(REAL_LUFI) test diff --git a/utilities/locales_files.txt b/utilities/locales_files.txt deleted file mode 100644 index 4627896..0000000 --- a/utilities/locales_files.txt +++ /dev/null @@ -1,13 +0,0 @@ -themes/default/templates/layouts/default.html.ep -themes/default/templates/index.html.ep -themes/default/templates/delays.html.ep -themes/default/templates/files.html.ep -themes/default/templates/mail.html.ep -themes/default/templates/msg.html.ep -themes/default/templates/render.html.ep -themes/default/templates/about.html.ep -themes/default/templates/login.html.ep -themes/default/templates/logout.html.ep -lib/Lufi/Controller/Files.pm -lib/Lufi/Controller/Mail.pm -lib/Lufi.pm From f34b7c214aba2b77865e129bf760e5e7af020f9d Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Wed, 12 Jul 2017 09:46:08 +0200 Subject: [PATCH 13/25] change #files input for IE11 drag and drop. --- themes/default/public/css/lufi.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/themes/default/public/css/lufi.css b/themes/default/public/css/lufi.css index 70604d8..3f11875 100644 --- a/themes/default/public/css/lufi.css +++ b/themes/default/public/css/lufi.css @@ -17,7 +17,16 @@ cursor: pointer; } #files input { - display:none; + width: 100%; + background: rgba(150,225,150,0.0); + vertical-align: middle; + text-align: center; + padding: 0 50%; + margin-top: -206px; + color: #FFF; + font-weight: bold; + font-size: 200px; + opacity: 0; } .progress-info { text-shadow: initial; From afa1597ae5290c4b4115ea3ca5d8582a1c70f52f Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Wed, 12 Jul 2017 09:48:02 +0200 Subject: [PATCH 14/25] Update files.html.ep to mail from "My files" --- themes/default/templates/files.html.ep | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/default/templates/files.html.ep b/themes/default/templates/files.html.ep index 213364e..cb96a84 100644 --- a/themes/default/templates/files.html.ep +++ b/themes/default/templates/files.html.ep @@ -28,6 +28,7 @@ <%= l('Uploaded at') %> <%= l('Expires at') %> <%= l('Deletion link') %> + <%= l('Mail') %> From 50982d48db5197352816ec144a58d3e1fd7536be Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Wed, 12 Jul 2017 09:50:00 +0200 Subject: [PATCH 15/25] Update lufi-files.js to mail from "My files" page --- themes/default/public/js/lufi-files.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/themes/default/public/js/lufi-files.js b/themes/default/public/js/lufi-files.js index c24ea82..74e7719 100644 --- a/themes/default/public/js/lufi-files.js +++ b/themes/default/public/js/lufi-files.js @@ -145,6 +145,9 @@ function populateFilesTable() { '', '', '', + '', + '', + '', ''].join('')); $('#myfiles').append(tr); From 99f8e1ad0389abf37a327038c78bd8f6a01da646 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Wed, 12 Jul 2017 09:51:57 +0200 Subject: [PATCH 16/25] Update en.po for Mail from "My Files" page --- themes/default/lib/Lufi/I18N/en.po | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index a7bfd75..f86904a 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -505,3 +505,7 @@ msgstr "" #: themes/default/templates/index.html.ep:78 msgid "or" msgstr "" + +#: themes/default/templates/files.html.ep:32 +msgid "Mail" +msgstr "" From 33adb4c607dff40f9e846ac38f0c80c769da7448 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Wed, 12 Jul 2017 14:06:55 +0200 Subject: [PATCH 17/25] Update mail.html.ep --- themes/default/templates/mail.html.ep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/templates/mail.html.ep b/themes/default/templates/mail.html.ep index 78e063e..bdd677f 100644 --- a/themes/default/templates/mail.html.ep +++ b/themes/default/templates/mail.html.ep @@ -67,7 +67,7 @@ var subject = document.getElementById('subject'); var text = document.getElementById('body'); - btn.href = 'mailto:'+encodeURIComponent(emails.value)+'?subject='+encodeURIComponent(subject.value)+'&body='+encodeURIComponent(body.value); + btn.href = 'mailto:'+encodeURIComponent(emails.value)+'?subject='+encodeURIComponent(subject.value)+'&body='+encodeURIComponent(text.value); } function populateBody() { var links = [ From c6cdf2354f84b988d50c63e647d38d19631b4ba3 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Thu, 13 Jul 2017 15:09:04 +0200 Subject: [PATCH 18/25] Make binary upload possible for IE11 --- themes/default/public/js/lufi-up.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/themes/default/public/js/lufi-up.js b/themes/default/public/js/lufi-up.js index 51c8903..3fd1909 100644 --- a/themes/default/public/js/lufi-up.js +++ b/themes/default/public/js/lufi-up.js @@ -174,8 +174,12 @@ function sliceAndUpload(randomkey, i, parts, j, delay, del_at_first_view, short) fr.onloadend = function() { var sl = $('#parts-'+window.fc); - // Get the binary result - var bin = fr.result; + // Get the binary result, different result in IE browsers (see default.html.ep line 27:48) + if (isIE == true){ + var bin = fr.content; + } else { + var bin = fr.result; + } // Transform it in base64 var b = window.btoa(bin); From 6889b0eccc553e8a9465f1952d733f1d28f966a9 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Thu, 13 Jul 2017 15:14:55 +0200 Subject: [PATCH 19/25] Add readAsBinaryString function to IE11 --- .../default/templates/layouts/default.html.ep | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/themes/default/templates/layouts/default.html.ep b/themes/default/templates/layouts/default.html.ep index faf03be..cae09a9 100644 --- a/themes/default/templates/layouts/default.html.ep +++ b/themes/default/templates/layouts/default.html.ep @@ -22,6 +22,32 @@ console.log(i18n.confirmExit); return i18n.confirmExit; } + + // Is the browser IE? + var isIE = /*@cc_on!@*/false || !!document.documentMode; + + // If the browser is IE, add readAsBinaryString function and store the data +if (isIE == true){ + if (FileReader.prototype.readAsBinaryString === undefined) { + FileReader.prototype.readAsBinaryString = function (fileData) { + var binary = ""; + var pt = this; + var reader = new FileReader(); + reader.onload = function (e) { + var bytes = new Uint8Array(reader.result); + var length = bytes.byteLength; + for (var i = 0; i < length; i++) { + binary += String.fromCharCode(bytes[i]); + } + //pt.result - readonly so assign content to another property + pt.content = binary; + $(pt).trigger('onloadend'); + } + reader.readAsArrayBuffer(fileData); + } + } +} + % end From ef7306bd9af9dcc202cc764f3bfdfb20e1f9d70a Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Thu, 13 Jul 2017 15:51:06 +0200 Subject: [PATCH 20/25] Update AUTHORS.md --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index c252548..69dc57d 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -13,3 +13,4 @@ * Quentin Pagès (occitan translation) * Yann Le Brech (htpasswd file support) * Jéssica Da Cunha (portuguese translation) +* Ilker Kulgu (fix IE11 compatibility) \ No newline at end of file From 08f8baa43aaae111b802672183d094667df7c850 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Thu, 13 Jul 2017 15:57:09 +0200 Subject: [PATCH 21/25] Add new file --- themes/default/lib/Lufi/I18N/nl.po | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 themes/default/lib/Lufi/I18N/nl.po diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po new file mode 100644 index 0000000..e69de29 From d92c524a7e69e8ad7e7335477ecbddafd1a50e10 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Thu, 13 Jul 2017 16:26:31 +0200 Subject: [PATCH 22/25] Update nl.po --- themes/default/lib/Lufi/I18N/nl.po | 495 +++++++++++++++++++++++++++++ 1 file changed, 495 insertions(+) diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po index e69de29..6f8843c 100644 --- a/themes/default/lib/Lufi/I18N/nl.po +++ b/themes/default/lib/Lufi/I18N/nl.po @@ -0,0 +1,495 @@ +# Lufi Dutch translation. +# Copyright (C) 2015 Luc Didry +# This file is distributed under the same license as the LUFI package. +# Ilker Kulgu , 2017. +# + +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. ($delay) +#. (max_delay) +#: themes/default/templates/index.html.ep:40 themes/default/templates/index.html.ep:49 themes/default/templates/index.html.ep:50 +msgid "%1 days" +msgstr "%1 dagen" + +#: themes/default/templates/index.html.ep:5 +msgid "1 year" +msgstr "1 jaar" + +#: themes/default/templates/index.html.ep:4 themes/default/templates/index.html.ep:49 +msgid "24 hours" +msgstr "24 uur" + +#: themes/default/templates/mail.html.ep:83 +msgid ":" +msgstr ":" + +#: themes/default/templates/about.html.ep:16 +msgid "A thank you with a photo of kitten on Diaspora* or Twitter is cool too ;-)" +msgstr "Een bedankt foto met een katje op Diaspora* of Twitter is ook goed ;-)" + +#: themes/default/templates/render.html.ep:34 +msgid "Abort" +msgstr "Annuleren" + +#: themes/default/templates/layouts/default.html.ep:40 themes/default/templates/layouts/default.html.ep:52 +msgid "About" +msgstr "Over" + +#: themes/default/templates/about.html.ep:18 +msgid "As Lufi is a free software licensed under of the terms of the AGPLv3, you can install it on you own server. Have a look on the Wiki for the procedure." +msgstr "Aangezien Lufi een gratis software id die gelicentieerd staat onder de voorwaarden van AGPLv3, kan je het installeren op je eigen server. Bekijk Wiki voor de procedure." + +#. (stash('f') +#: themes/default/templates/render.html.ep:44 +msgid "Asking for file part XX1 of %1" +msgstr "Deel XX1 van %1 wordt opgehaald" + +#: themes/default/templates/about.html.ep:21 +msgid "Back to homepage" +msgstr "Terug naar home" + +#: lib/Lufi/Controller/Mail.pm:20 +msgid "Bad CSRF token!" +msgstr "Verkeerde CSRF token!" + +#: themes/default/templates/render.html.ep:40 +msgid "Click here to refresh the page and restart the download." +msgstr "Klik hier om de pagina te verversen en opnieuw te downloaden." + +#: themes/default/templates/index.html.ep:72 +msgid "Click to open the file browser" +msgstr "Klik voor bestandbrowser" + +#: themes/default/templates/delays.html.ep:38 +msgid "Close" +msgstr "Sluiten" + +#: themes/default/templates/mail.html.ep:22 +msgid "Comma-separated email addresses" +msgstr "Komma gescheiden email adressen" + +#: themes/default/templates/index.html.ep:92 +msgid "Copy all links to clipboard" +msgstr "Kopieer alle links naar klembord" + +#: themes/default/templates/index.html.ep:95 +msgid "Copy to clipboard" +msgstr "Kopieer naar klembord" + +#: lib/Lufi/Controller/Files.pm:396 +msgid "Could not delete the file. You are not authenticated." +msgstr "Kan het bestand niet verwijderen. Je bent niet geautoriseerd." + +#: lib/Lufi/Controller/Files.pm:380 +msgid "Could not find the file. Are you sure of the URL and the token?" +msgstr "Kan het bestand niet vinden. Klopt de URL en token wel?" + +#: lib/Lufi/Controller/Files.pm:296 +msgid "Could not find the file. Are you sure of the URL?" +msgstr "Kan het bestand niet vinden. Klopt de URL?" + +#: themes/default/templates/files.html.ep:26 +msgid "Counter" +msgstr "Teller" + +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +msgid "Delete at first download?" +msgstr "Verwijder na eerste download?" + +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:96 +msgid "Deletion link" +msgstr "Verwijderingslink" + +#: themes/default/templates/delays.html.ep:8 +msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file." +msgstr "Geen zorgen: als een gebruiker de download start voor de vervaldatum, dan zal die het bestand kunnen binnenhalen." + +#: themes/default/templates/index.html.ep:98 +msgid "Download" +msgstr "Download" + +#: themes/default/templates/render.html.ep:39 +msgid "Download aborted." +msgstr "Download geannuleerd." + +#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:97 +msgid "Download link" +msgstr "Download link" + +#: themes/default/templates/about.html.ep:10 +msgid "Drag and drop files in the appropriate area or use the traditional way to send files and the files will be chunked, encrypted and sent to the server. You will get two links per file: a download link, that you give to the people you want to share the file with and a deletion link, allowing you to delete the file whenever you want." +msgstr "Drag and drop bestanden in de daarvoor bestemde locatie of gebruik de traditionele weg om bestanden encrypted op te sturen naar server. Je zal 2 linkjes per bestand krijgen: een download link, die stuur je naar personen waarmee je het bestand wilt delen en een verwijderings link, waarmee je het bestand kan verwijderen wanneer je dat wilt." + +#: themes/default/templates/index.html.ep:69 +msgid "Drop files here" +msgstr "Sleep bestand(en) naar dit venster" + +#: themes/default/templates/mail.html.ep:38 +msgid "Email body" +msgstr "Email inhoud" + +#: themes/default/templates/mail.html.ep:30 +msgid "Email subject" +msgstr "Onderwerp" + +#: themes/default/templates/mail.html.ep:24 themes/default/templates/mail.html.ep:26 +msgid "Emails" +msgstr "Emails" + +#: themes/default/templates/index.html.ep:99 +msgid "Encrypting part XX1 of XX2" +msgstr "Encrypten deel XX1 van XX2 " + +#: lib/Lufi/Controller/Files.pm:216 +msgid "Error: the file existed but was deleted." +msgstr "Fout: het bestand bestond wel maar is verwijderd." + +#: lib/Lufi/Controller/Files.pm:266 +msgid "Error: the file has not been sent entirely." +msgstr "Fout: het bestand is niet volledig opgestuurd." + +#: lib/Lufi/Controller/Files.pm:276 +msgid "Error: unable to find the file. Are you sure of your URL?" +msgstr "Fout: kan het bestand niet vinden. Is de URL juist?" + +#: themes/default/templates/index.html.ep:100 +msgid "Expiration:" +msgstr "Vervaldatum:" + +#: themes/default/templates/files.html.ep:29 +msgid "Expires at" +msgstr "Vervalt op" + +#: themes/default/templates/files.html.ep:12 +msgid "Export localStorage data" +msgstr "Exporteer opgeslagen data" + +#: lib/Lufi/Controller/Files.pm:364 +msgid "File deleted" +msgstr "Bestand verwijderd" + +#: themes/default/templates/files.html.ep:24 +msgid "File name" +msgstr "Bestandsnaam" + +#: themes/default/templates/render.html.ep:43 +msgid "Get the file" +msgstr "Download bestand" + +#: themes/default/templates/about.html.ep:19 +msgid "Get the source code on the official repository or on its Github mirror" +msgstr "Krijg de broncode op de officiële repository of op Github mirror" + +#: themes/default/templates/mail.html.ep:78 +msgid "Hello,\\n\\nHere's some files I want to share with you:\\n" +msgstr "Hallo,\\n\\nHier zijn enkele bestanden die ik met je wil delen:\\n\\n" + +#: themes/default/templates/mail.html.ep:34 +msgid "Here's some files" +msgstr "Hier zijn enkele bestanden" + +#: themes/default/templates/index.html.ep:102 +msgid "Hit Enter, then Ctrl+C to copy all the download links" +msgstr "Druk Enter, vervolgens CTRL+C om alle download links te kopieeren" + +#: themes/default/templates/index.html.ep:101 +msgid "Hit Enter, then Ctrl+C to copy the download link" +msgstr "Druk Enter, vervolgens CTRL+C om de download link te kopieeren" + +#: themes/default/templates/about.html.ep:9 +msgid "How does it work?" +msgstr "Hoe werkt het?" + +#: themes/default/templates/about.html.ep:17 +msgid "How to install the software on my server?" +msgstr "Hoe installeer ik de software op mijn server?" + +#: themes/default/templates/about.html.ep:12 +msgid "How to report an illegal file?" +msgstr "Hoe rapporteer ik een verdachte bestand?" + +#: themes/default/templates/delays.html.ep:7 +msgid "If you choose a delay, the file will be deleted after that delay." +msgstr "Als je een uitstel kiest, zal het bestand na die uitstel tijd verwijderd worden." + +#: themes/default/templates/mail.html.ep:15 +msgid "If you send the mail from this server, the links will be sent to the server, which may lower your privacy protection." +msgstr "Als je een mail via de server verstuurt, zullen links naar de server verstuurd worden waardoor je lagere privacy protection zal hebben." + +#: themes/default/templates/files.html.ep:14 +msgid "Import localStorage data" +msgstr "Importeer opgeslagen data" + +#: themes/default/templates/index.html.ep:37 +msgid "Important: more information on delays" +msgstr "Belangrijk: meer informatie over uitstel" + +#: themes/default/templates/delays.html.ep:5 +msgid "Information about delays" +msgstr "Informatie over uitstel" + +#: themes/default/templates/render.html.ep:41 +msgid "It seems that the key in your URL is incorrect. Please, verify your URL." +msgstr "Het lijkt er op dat de sleutel in je URL niet klopt. Controleer je URL." + +#: themes/default/templates/index.html.ep:12 +msgid "Javascript is disabled. You won't be able to use Lufi." +msgstr "Javascript is uitgeschakeld. Je kan geen gebruik maken van Lufi." + +#: themes/default/templates/login.html.ep:15 +msgid "Login" +msgstr "Login" + +#: themes/default/templates/layouts/default.html.ep:42 themes/default/templates/layouts/default.html.ep:54 +msgid "Logout" +msgstr "Logout" + +#: themes/default/templates/about.html.ep:4 +msgid "Lufi is a free (as in free speech) file hosting software." +msgstr "Lufi is een gratis bestand hosting software." + +#: themes/default/templates/files.html.ep:3 themes/default/templates/layouts/default.html.ep:36 themes/default/templates/layouts/default.html.ep:48 +msgid "My files" +msgstr "Mijn bestanden" + +#. (format_bytes($json->{size}) +#: lib/Lufi/Controller/Files.pm:68 +msgid "No enough space available on the server for this file (size: %1)." +msgstr "Geen genoeg ruimte op de server voor deze bestand (grootte: %1)." + +#: themes/default/templates/files.html.ep:42 themes/default/templates/index.html.ep:104 +msgid "No expiration delay" +msgstr "Geen verloop uitstel" + +#: themes/default/templates/files.html.ep:8 +msgid "Only the files sent with this browser will be listed here. This list is stored in localStorage: if you delete your localStorage data, you'll lose this list." +msgstr "Alleen bestanden die via deze browser zijn verstuurd zijn hier zichtbaar. Deze lijst is opgeslagen: als je opgeslagen data verwijderd, zal je deze lijst verlizen." + +#: themes/default/templates/login.html.ep:21 +msgid "Password" +msgstr "Wachtwoord" + +#. (config('contact') +#: themes/default/templates/about.html.ep:13 +msgid "Please contact the administrator: %1" +msgstr "Neem contact op met administrator: %1" + +#: themes/default/templates/render.html.ep:25 +msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." +msgstr "Een ogenblik geduld, we pakken je bestand er bij. We moeten alle delen downloaden en decrypten voordat je het kan downloaden." + +#: themes/default/templates/about.html.ep:5 +msgid "Privacy" +msgstr "Privacy" + +#: themes/default/templates/files.html.ep:13 +msgid "Purge expired files from localStorage" +msgstr "Verwijder verlopen data" + +#: themes/default/templates/files.html.ep:9 +msgid "Rows in red mean that the files have expired and are no longer available." +msgstr "Rode rijen betekenen dat deze bestanden verlopen en verwijderd zijn." + +#: themes/default/templates/index.html.ep:103 +msgid "Send all links by email" +msgstr "Verstuur alle links via mail" + +#: themes/default/templates/mail.html.ep:45 +msgid "Send with this server" +msgstr "Verstuur via deze server" + +#: themes/default/templates/mail.html.ep:46 +msgid "Send with your own mail software" +msgstr "Verstuur via eigen mail software" + +#: themes/default/templates/index.html.ep:105 +msgid "Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move." +msgstr "Versturen deel XX1 van XX2. Een ogenblik geduld..." + +#. (url_for('/') +#: themes/default/templates/mail.html.ep:91 +msgid "Share your files in total privacy on %1" +msgstr "Deel je bestanden met volledige privacy op %1" + +#: themes/default/templates/layouts/default.html.ep:38 themes/default/templates/layouts/default.html.ep:50 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 +msgid "Signin" +msgstr "Inloggen" + +#: themes/default/templates/layouts/default.html.ep:38 +msgid "Register" +msgstr "Registreer" + +#: themes/default/templates/index.html.ep:30 +msgid "Sorry, the uploading is currently disabled. Please try again later." +msgstr "Sorry, uploaden is momenteel uitgeschakeld. Probeer het later nogmaals." + +#: lib/Lufi/Controller/Files.pm:42 +msgid "Sorry, uploading is disabled." +msgstr "SOrry, uploaden is uitgeschakeld." + +#: themes/default/templates/about.html.ep:7 +msgid "The administrator can only see the file's name, its size and its mimetype (what kind of file it is: video, text, etc.)." +msgstr "Beheerders zien alleen bestandsnamen, grootte en mimetype (wat voor soort bestand het is: video, tekst etc.)." + +#: themes/default/templates/files.html.ep:43 +msgid "The data has been successfully imported." +msgstr "Data is succesvol geimporteerd." + +#: lib/Lufi/Controller/Mail.pm:42 +msgid "The email body can't be empty." +msgstr "Mail inhoud kan niet leeg zijn." + +#: lib/Lufi/Controller/Mail.pm:41 +msgid "The email subject can't be empty." +msgstr "Onderwerp kan niet leeg zijn." + +#: lib/Lufi/Controller/Files.pm:361 +msgid "The file has already been deleted" +msgstr "Bestand is reeds verwijderd" + +#: themes/default/templates/about.html.ep:6 +msgid "The files uploaded on a Lufi instance are encrypted before the upload to the server: the administrator of the server can not see the file's content." +msgstr "Bestanden die geupload zijn naar Lufi worden voor de upload versleuteld: beheerders van de server kunnen de inhoud van het bestand niet zien." + +#. (join(', ', @bad) +#: lib/Lufi/Controller/Mail.pm:37 +msgid "The following email addresses are not valid: %1" +msgstr "Volgende email adressen zijn niet geldig: %1" + +#: themes/default/templates/index.html.ep:93 +msgid "The link(s) has been copied to your clipboard" +msgstr "De link is gekopieerd naar je klembord" + +#: lib/Lufi/Controller/Mail.pm:65 +msgid "The mail has been sent." +msgstr "Email is verzonden." + +#: themes/default/templates/about.html.ep:15 +msgid "The original (and only for now) author is Luc Didry. If you want to support him, you can do it via Tipeee or via Liberapay." +msgstr "De oorspronkelijke auteur is Luc Didry. Als je hem wilt ondersteunen, dan kan dat via Tipeee of via Liberapay." + +#: lib/Lufi/Controller/Files.pm:168 +msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." +msgstr "Server kon een deel van het bestand niet vinden. Neem contact op met beheerder." + +#: themes/default/templates/delays.html.ep:10 +msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:" +msgstr "Deze server stelt beperkingen vast volgens de bestandsgrootte. De vervaldatum van uw bestand zal het minimum zijn tussen wat u kiest en de volgende beperkingen:" + +#: themes/default/templates/index.html.ep:94 +msgid "Unable to copy the link(s) to your clipboard" +msgstr "Kan de link(s) niet naar je klembord kopieeren" + +#. ($short) +#: lib/Lufi/Controller/Files.pm:334 +msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage." +msgstr "Kan geen teller verkrijgen voor %1. Bestand bestaat niet. Het zal verwijderd worden van opgeslagen data." + +#. ($short) +#: lib/Lufi/Controller/Files.pm:324 +msgid "Unable to get counter for %1. The token is invalid." +msgstr "Kan geen teller verkrijgen voor %1. De token is ongeldig." + +#. ($short) +#: lib/Lufi/Controller/Files.pm:344 +msgid "Unable to get counter for %1. You are not authenticated." +msgstr "Kan geen teller verkrijgen voor %1. Je bent niet geauthenticeerd." + +#: themes/default/templates/layouts/default.html.ep:35 themes/default/templates/layouts/default.html.ep:47 +msgid "Upload files" +msgstr "Upload bestanden" + +#: themes/default/templates/files.html.ep:28 +msgid "Uploaded at" +msgstr "Geupload op" + +#: themes/default/templates/index.html.ep:77 +msgid "Uploaded files" +msgstr "Geuploade bestanden" + +#: themes/default/templates/index.html.ep:106 +msgid "Websocket communication error" +msgstr "Websocket communicatie fout" + +#: themes/default/templates/about.html.ep:3 +msgid "What is Lufi?" +msgstr "Wat is Lufi?" + +#: themes/default/templates/about.html.ep:14 +msgid "Who wrote this software?" +msgstr "Wie heeft deze software geschreven?" + +#: themes/default/templates/about.html.ep:11 +msgid "You can see the list of your files by clicking on the \"My files\" link at the top right of this page." +msgstr "Je kan een lijst van je eigen bestanden zien door op \"Mijn bestanden\" link rechts boven te klikken." + +#: themes/default/templates/about.html.ep:8 +msgid "You don't need to register yourself to upload files but be aware that, for legal reasons, your IP address will be stored when you send a file. Don't panic, this is normally the case for all sites on which you send files." +msgstr "U hoeft zich niet te registreren om bestanden te uploaden, maar wees ervan bewust dat uw IP-adres om juridische redenen zal worden opgeslagen wanneer u een bestand verzendt. Geen paniek, dit is normaal gesproken het geval voor alle sites waarnaar u bestanden verzendt." + +#: themes/default/templates/render.html.ep:45 +msgid "You don't seem to have a key in your URL. You won't be able to decrypt the file. Download canceled." +msgstr "Je hebt geen sleutel in je URL. Je kan het bestand niet decrypten. Download geannuleerd." + +#: themes/default/templates/render.html.ep:42 +msgid "You have attempted to leave this page. The download will be canceled. Are you sure?" +msgstr "Je verlaat deze pagina. Download zal geannuleerd worden. Weet je het zeker?" + +#: themes/default/templates/index.html.ep:91 +msgid "You have attempted to leave this page. The upload will be canceled. Are you sure?" +msgstr "Je verlaat deze pagina. Upload zal geannuleerd worden. Weet je het zeker? " + +#: themes/default/templates/logout.html.ep:5 +msgid "You have been successfully logged out." +msgstr "Je bent succesvol uitgelogd." + +#: lib/Lufi/Controller/Mail.pm:40 +msgid "You must give email addresses." +msgstr "Je moet een mail adres opgeven." + +#. (format_bytes($json->{size}) +#: lib/Lufi/Controller/Files.pm:55 +msgid "Your file is too big: %1 (maximum size allowed: %2)" +msgstr "Je bestand is te groot: %1 (max: %2)" + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:20 +msgid "between %1 and %2, the file will be kept %3 day(s)." +msgstr "tussen %1 en %1, bestand zal bewaard worden voor %3 dag(en)." + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:22 +msgid "between %1 and %2, the file will be kept forever." +msgstr "tussen %1 en %2, bestand zal voor altijd bewaard worden." + +#: themes/default/templates/mail.html.ep:85 +msgid "deadline: " +msgstr "deadline: " + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:26 +msgid "for %1 and more, the file will be kept %2 day(s)" +msgstr "voor %1 en meer, bestand zal bewaard worden voor %2 dag(en)" + +#. (format_bytes($keys[$i]) +#: themes/default/templates/delays.html.ep:28 +msgid "for %1 and more, the file will be kept forever." +msgstr "voor %1 en meer, bestand zal voor altijd bewaard worden." + +#: themes/default/templates/index.html.ep:3 +msgid "no time limit" +msgstr "geen tijdslimiet" + +#: themes/default/templates/index.html.ep:70 +msgid "or" +msgstr "of" From 92a0e1021fe77ae6fe3632cc78ca0fe48d103d40 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Thu, 13 Jul 2017 16:30:28 +0200 Subject: [PATCH 23/25] Update AUTHORS.md --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 69dc57d..4f3ce89 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -13,4 +13,4 @@ * Quentin Pagès (occitan translation) * Yann Le Brech (htpasswd file support) * Jéssica Da Cunha (portuguese translation) -* Ilker Kulgu (fix IE11 compatibility) \ No newline at end of file +* Ilker Kulgu (fix IE11 compatibility, Dutch translation) \ No newline at end of file From 6316f777912cd24a1f9d30b72b202842d60a5f22 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:33:18 +0200 Subject: [PATCH 24/25] Add nl language in Makefile --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 55a282a..aedffd9 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ IT=themes/default/lib/Lufi/I18N/it.po OC=themes/default/lib/Lufi/I18N/oc.po CA=themes/default/lib/Lufi/I18N/ca.po PT=themes/default/lib/Lufi/I18N/pt.po +NL=themes/default/lib/Lufi/I18N/nl.po XGETTEXT=carton exec local/bin/xgettext.pl CARTON=carton exec REAL_LUFI=script/application @@ -17,6 +18,7 @@ locales: $(XGETTEXT) $(EXTRACTDIR) -o $(OC) 2>/dev/null $(XGETTEXT) $(EXTRACTDIR) -o $(CA) 2>/dev/null $(XGETTEXT) $(EXTRACTDIR) -o $(PT) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(NL) 2>/dev/null test: $(CARTON) $(REAL_LUFI) test From dbd31f22c69e97881b01c8c0d8579b2803bbcfa3 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 15 Jul 2017 13:59:09 +0200 Subject: [PATCH 25/25] CSS correction --- themes/default/public/css/lufi.css | 1 - 1 file changed, 1 deletion(-) diff --git a/themes/default/public/css/lufi.css b/themes/default/public/css/lufi.css index 3f11875..9d1f347 100644 --- a/themes/default/public/css/lufi.css +++ b/themes/default/public/css/lufi.css @@ -6,7 +6,6 @@ color: #888; } #files label { - background-color: #5A7BC2; padding: 6px 0; color: #FFF; font-weight: bold;