From 14cc832552e9cde1a06631aaf534b5afdfcaeed7 Mon Sep 17 00:00:00 2001 From: popi Date: Thu, 22 Jun 2017 23:05:17 +0200 Subject: [PATCH 01/53] 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 f489373..4ca9945 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 => { @@ -95,8 +96,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 ); @@ -110,7 +118,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; @@ -277,9 +285,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 50b1f00c1703a5055c1d9343137479b0d2f1f994 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 10 Feb 2017 23:30:55 +0100 Subject: [PATCH 02/53] 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('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 03/53] 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 04/53] 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 05/53] 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 06/53] 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 07/53] =?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 08/53] 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 09/53] 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 10/53] 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 11/53] 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 12/53] 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 13/53] 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 14/53] 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 15/53] 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 16/53] 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 17/53] 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 18/53] 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 19/53] 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 20/53] 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 21/53] 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 22/53] 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 23/53] 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 24/53] 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 25/53] 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 26/53] 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; From e65ee8dc9a640bbfd2574cdc63e7f8d960a27893 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:11:50 +0200 Subject: [PATCH 27/53] 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 4ca9945..92ba6af 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 => { @@ -84,14 +84,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; @@ -103,18 +103,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}, @@ -285,7 +285,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 e10eb0107e23a5cbca6ef650fcf2f4ef7992285a Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:17:31 +0200 Subject: [PATCH 28/53] 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 d3bdec0..65e23eb 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -288,6 +288,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 "" @@ -325,6 +329,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 4f4e386..c8b8089 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -290,6 +290,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é" @@ -327,6 +331,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 9432e61..6b5aea6 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -290,6 +290,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" @@ -327,6 +331,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 c9fdfa7..bbb2d7b 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -290,6 +290,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" @@ -327,6 +331,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 e660f80c079b3c9669718e5f8e95accbf97a4372 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:24:33 +0200 Subject: [PATCH 29/53] 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 ad228fd5c2e9ea16e54bdc283cfabdfe4f0a3b9f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 14 Jul 2017 12:25:46 +0200 Subject: [PATCH 30/53] 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 1fbe93a71ccc7fd975bfeb18a5cefac0922ac5e8 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 15 Jul 2017 14:25:44 +0200 Subject: [PATCH 31/53] Update Mojolicious version (use Mojo::File instead of Mojo::Util spurt/slurp) --- cpanfile | 2 +- cpanfile.snapshot | 474 ++++++++++++++++------------- lib/Lufi/Controller/Files.pm | 7 +- themes/default/lib/Lufi/I18N/ca.po | 354 ++++++++------------- themes/default/lib/Lufi/I18N/en.po | 54 ++-- themes/default/lib/Lufi/I18N/fr.po | 50 +-- themes/default/lib/Lufi/I18N/it.po | 50 +-- themes/default/lib/Lufi/I18N/nl.po | 171 +++++++---- themes/default/lib/Lufi/I18N/oc.po | 50 +-- themes/default/lib/Lufi/I18N/pt.po | 138 +++++---- 10 files changed, 678 insertions(+), 672 deletions(-) diff --git a/cpanfile b/cpanfile index 1ed3b9d..421f77b 100644 --- a/cpanfile +++ b/cpanfile @@ -1,4 +1,4 @@ -requires 'Mojolicious', '< 7.31'; +requires 'Mojolicious', '>= 7.31'; requires 'ORLite'; requires 'Mojolicious::Plugin::DebugDumperHelper'; requires 'Mojolicious::Plugin::I18N'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index dd257b8..030f516 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1,5 +1,14 @@ # carton snapshot format: version 1.0 DISTRIBUTIONS + Apache-Htpasswd-1.9 + pathname: K/KM/KMELTZ/Apache-Htpasswd-1.9.tar.gz + provides: + Apache::Htpasswd 1.9 + requirements: + Crypt::PasswdMD5 0 + Digest::SHA 2 + ExtUtils::MakeMaker 0 + MIME::Base64 0 Authen-SASL-2.16 pathname: G/GB/GBARR/Authen-SASL-2.16.tar.gz provides: @@ -21,35 +30,27 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.42 Test::More 0 perl 5.005 - CPAN-Meta-2.150005 - pathname: D/DA/DAGOLDEN/CPAN-Meta-2.150005.tar.gz + Canary-Stability-2012 + pathname: M/ML/MLEHMANN/Canary-Stability-2012.tar.gz provides: - CPAN::Meta 2.150005 - CPAN::Meta::Converter 2.150005 - CPAN::Meta::Feature 2.150005 - CPAN::Meta::History 2.150005 - CPAN::Meta::Merge 2.150005 - CPAN::Meta::Prereqs 2.150005 - CPAN::Meta::Spec 2.150005 - CPAN::Meta::Validator 2.150005 - requirements: - CPAN::Meta::Requirements 2.121 - CPAN::Meta::YAML 0.008 - Carp 0 - ExtUtils::MakeMaker 6.17 - JSON::PP 2.27200 - Parse::CPAN::Meta 1.4414 - Scalar::Util 0 - perl 5.008 - strict 0 - version 0.88 - warnings 0 - Canary-Stability-2006 - pathname: M/ML/MLEHMANN/Canary-Stability-2006.tar.gz - provides: - Canary::Stability 2006 + Canary::Stability 2012 requirements: ExtUtils::MakeMaker 0 + Capture-Tiny-0.46 + pathname: D/DA/DAGOLDEN/Capture-Tiny-0.46.tar.gz + provides: + Capture::Tiny 0.46 + requirements: + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 6.17 + File::Spec 0 + File::Temp 0 + IO::Handle 0 + Scalar::Util 0 + perl 5.006 + strict 0 + warnings 0 Convert-ASN1-0.27 pathname: G/GB/GBARR/Convert-ASN1-0.27.tar.gz provides: @@ -58,6 +59,16 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.30 Math::BigInt 1.997 Test::More 0.90 + Crypt-PasswdMD5-1.40 + pathname: R/RS/RSAVAGE/Crypt-PasswdMD5-1.40.tgz + provides: + Crypt::PasswdMD5 1.40 + requirements: + Digest::MD5 2.53 + Module::Build 0 + Test::More 0.94 + strict 0 + warnings 0 Crypt-Rijndael-1.13 pathname: L/LE/LEONT/Crypt-Rijndael-1.13.tar.gz provides: @@ -74,13 +85,13 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.30 Test::Fatal 0 Test::More 0 - DBD-SQLite-1.48 - pathname: I/IS/ISHIGAKI/DBD-SQLite-1.48.tar.gz + DBD-SQLite-1.54 + pathname: I/IS/ISHIGAKI/DBD-SQLite-1.54.tar.gz provides: - DBD::SQLite 1.48 + DBD::SQLite 1.54 DBD::SQLite::Constants undef - DBD::SQLite::VirtualTable 1.48 - DBD::SQLite::VirtualTable::Cursor 1.48 + DBD::SQLite::VirtualTable 1.54 + DBD::SQLite::VirtualTable::Cursor 1.54 DBD::SQLite::VirtualTable::FileContent undef DBD::SQLite::VirtualTable::FileContent::Cursor undef DBD::SQLite::VirtualTable::PerlData undef @@ -93,8 +104,8 @@ DISTRIBUTIONS Test::More 0.47 Tie::Hash 0 perl 5.006 - DBI-1.634 - pathname: T/TI/TIMB/DBI-1.634.tar.gz + DBI-1.636 + pathname: T/TI/TIMB/DBI-1.636.tar.gz provides: Bundle::DBI 12.008696 DBD::DBM 0.08 @@ -143,7 +154,7 @@ DISTRIBUTIONS DBD::Sponge::dr 12.010003 DBD::Sponge::st 12.010003 DBDI 12.015129 - DBI 1.634 + DBI 1.636 DBI::Const::GetInfo::ANSI 2.008697 DBI::Const::GetInfo::ODBC 2.011374 DBI::Const::GetInfoReturn 2.008697 @@ -160,7 +171,6 @@ DISTRIBUTIONS DBI::DBD::SqlEngine::db 0.06 DBI::DBD::SqlEngine::dr 0.06 DBI::DBD::SqlEngine::st 0.06 - DBI::FAQ 1.014935 DBI::Gofer::Execute 0.014283 DBI::Gofer::Request 0.012537 DBI::Gofer::Response 0.011566 @@ -184,7 +194,7 @@ DISTRIBUTIONS DBI::SQL::Nano::Table_ 1.015544 DBI::Util::CacheMemory 0.010315 DBI::Util::_accessor 0.009479 - DBI::common 1.634 + DBI::common 1.636 requirements: ExtUtils::MakeMaker 6.48 Test::Simple 0.90 @@ -261,10 +271,10 @@ DISTRIBUTIONS Time::Local 0 strict 0 warnings 0 - Email-Valid-1.200 - pathname: R/RJ/RJBS/Email-Valid-1.200.tar.gz + Email-Valid-1.202 + pathname: R/RJ/RJBS/Email-Valid-1.202.tar.gz provides: - Email::Valid 1.200 + Email::Valid 1.202 requirements: ExtUtils::MakeMaker 0 Mail::Address 0 @@ -293,26 +303,31 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 HTTP::Date 6 perl 5.006002 - File-Remove-1.52 - pathname: A/AD/ADAMK/File-Remove-1.52.tar.gz + File-Remove-1.57 + pathname: S/SH/SHLOMIF/File-Remove-1.57.tar.gz provides: - File::Remove 1.52 + File::Remove 1.57 requirements: Cwd 3.29 - ExtUtils::MakeMaker 6.36 + ExtUtils::MakeMaker 0 + File::Glob 0 + File::Path 0 File::Spec 3.29 - Test::More 0.42 - perl 5.00503 + constant 0 + perl 5.006 + strict 0 + vars 0 + warnings 0 Filesys-DfPortable-0.85 pathname: I/IG/IGUTHRIE/Filesys-DfPortable-0.85.tar.gz provides: Filesys::DfPortable 0.85 requirements: ExtUtils::MakeMaker 0 - Filesys-DiskUsage-0.08 - pathname: S/SZ/SZABGAB/Filesys-DiskUsage-0.08.tar.gz + Filesys-DiskUsage-0.10 + pathname: M/MA/MANWAR/Filesys-DiskUsage-0.10.tar.gz provides: - Filesys::DiskUsage 0.08 + Filesys::DiskUsage 0.10 requirements: ExtUtils::MakeMaker 0 File::Basename 0 @@ -320,6 +335,7 @@ DISTRIBUTIONS File::Temp 0 Test::More 0 Test::Warn 0 + perl 5.006 HTML-Parser-3.72 pathname: G/GA/GAAS/HTML-Parser-3.72.tar.gz provides: @@ -341,18 +357,23 @@ DISTRIBUTIONS HTML::Tagset 3.20 requirements: ExtUtils::MakeMaker 0 - HTTP-Cookies-6.01 - pathname: G/GA/GAAS/HTTP-Cookies-6.01.tar.gz + HTTP-Cookies-6.03 + pathname: O/OA/OALDERS/HTTP-Cookies-6.03.tar.gz provides: - HTTP::Cookies 6.01 - HTTP::Cookies::Microsoft 6.00 - HTTP::Cookies::Netscape 6.00 + HTTP::Cookies 6.03 + HTTP::Cookies::Microsoft 6.03 + HTTP::Cookies::Netscape 6.03 requirements: + Carp 0 ExtUtils::MakeMaker 0 HTTP::Date 6 HTTP::Headers::Util 6 + HTTP::Request 0 Time::Local 0 + locale 0 perl 5.008001 + strict 0 + vars 0 HTTP-Daemon-6.01 pathname: G/GA/GAAS/HTTP-Daemon-6.01.tar.gz provides: @@ -387,20 +408,21 @@ DISTRIBUTIONS perl 5.005 strict 0 warnings 0 - HTTP-Message-6.11 - pathname: E/ET/ETHER/HTTP-Message-6.11.tar.gz + HTTP-Message-6.13 + pathname: O/OA/OALDERS/HTTP-Message-6.13.tar.gz provides: - HTTP::Config 6.11 - HTTP::Headers 6.11 - HTTP::Headers::Auth 6.11 - HTTP::Headers::ETag 6.11 - HTTP::Headers::Util 6.11 - HTTP::Message 6.11 - HTTP::Request 6.11 - HTTP::Request::Common 6.11 - HTTP::Response 6.11 - HTTP::Status 6.11 + HTTP::Config 6.13 + HTTP::Headers 6.13 + HTTP::Headers::Auth 6.13 + HTTP::Headers::ETag 6.13 + HTTP::Headers::Util 6.13 + HTTP::Message 6.13 + HTTP::Request 6.13 + HTTP::Request::Common 6.13 + HTTP::Response 6.13 + HTTP::Status 6.13 requirements: + Carp 0 Compress::Raw::Zlib 0 Encode 2.21 Encode::Locale 1 @@ -418,8 +440,12 @@ DISTRIBUTIONS LWP::MediaTypes 6 MIME::Base64 2.1 MIME::QuotedPrint 0 + Storable 0 URI 1.10 + base 0 perl 5.008001 + strict 0 + warnings 0 HTTP-Negotiate-6.01 pathname: G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz provides: @@ -437,44 +463,28 @@ DISTRIBUTIONS Encode 2.10 Exporter 5.57 ExtUtils::MakeMaker 6.30 - IO-Socket-IP-0.37 - pathname: P/PE/PEVANS/IO-Socket-IP-0.37.tar.gz + IO-Socket-SSL-2.049 + pathname: S/SU/SULLR/IO-Socket-SSL-2.049.tar.gz provides: - IO::Socket::IP 0.37 - requirements: - IO::Socket 0 - Socket 1.97 - Test::More 0.88 - IO-Socket-SSL-2.027 - pathname: S/SU/SULLR/IO-Socket-SSL-2.027.tar.gz - provides: - IO::Socket::SSL 2.027 + IO::Socket::SSL 2.049 IO::Socket::SSL::Intercept 2.014 - IO::Socket::SSL::OCSP_Cache 2.027 - IO::Socket::SSL::OCSP_Resolver 2.027 + IO::Socket::SSL::OCSP_Cache 2.049 + IO::Socket::SSL::OCSP_Resolver 2.049 IO::Socket::SSL::PublicSuffix undef - IO::Socket::SSL::SSL_Context 2.027 - IO::Socket::SSL::SSL_HANDLE 2.027 - IO::Socket::SSL::Session_Cache 2.027 + IO::Socket::SSL::SSL_Context 2.049 + IO::Socket::SSL::SSL_HANDLE 2.049 + IO::Socket::SSL::Session_Cache 2.049 IO::Socket::SSL::Utils 2.014 requirements: ExtUtils::MakeMaker 0 + Mozilla::CA 0 Net::SSLeay 1.46 Scalar::Util 0 - IPC-Run3-0.048 - pathname: R/RJ/RJBS/IPC-Run3-0.048.tar.gz + JSON-2.94 + pathname: I/IS/ISHIGAKI/JSON-2.94.tar.gz provides: - IPC::Run3 0.048 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0.31 - Time::HiRes 0 - JSON-2.90 - pathname: M/MA/MAKAMAKA/JSON-2.90.tar.gz - provides: - JSON 2.90 - JSON::Backend::PP 2.90 - JSON::Boolean 2.90 + JSON 2.94 + JSON::Backend::PP 2.94 requirements: ExtUtils::MakeMaker 0 Test::More 0 @@ -513,10 +523,10 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 6.30 Locale::Maketext 1.17 - MIME-Charset-1.012 - pathname: N/NE/NEZUMI/MIME-Charset-1.012.tar.gz + MIME-Charset-1.012.2 + pathname: N/NE/NEZUMI/MIME-Charset-1.012.2.tar.gz provides: - MIME::Charset 1.012 + MIME::Charset v1.12.2 requirements: CPAN 0 Encode 1.98 @@ -549,43 +559,43 @@ DISTRIBUTIONS File::Basename 0 File::Spec 0 MIME::Types 1.28 - MIME-Types-2.11 - pathname: M/MA/MARKOV/MIME-Types-2.11.tar.gz + MIME-Types-2.13 + pathname: M/MA/MARKOV/MIME-Types-2.13.tar.gz provides: - MIME::Type 2.11 - MIME::Types 2.11 - MojoX::MIME::Types 2.11 + MIME::Type 2.13 + MIME::Types 2.13 + MojoX::MIME::Types 2.13 requirements: ExtUtils::MakeMaker 0 File::Basename 0 File::Spec 0 List::Util 0 Test::More 0.47 - MailTools-2.14 - pathname: M/MA/MARKOV/MailTools-2.14.tar.gz + MailTools-2.18 + pathname: M/MA/MARKOV/MailTools-2.18.tar.gz provides: Mail undef - Mail::Address 2.14 - Mail::Cap 2.14 - Mail::Field 2.14 - Mail::Field::AddrList 2.14 - Mail::Field::Date 2.14 - Mail::Field::Generic 2.14 - Mail::Filter 2.14 - Mail::Header 2.14 - Mail::Internet 2.14 - Mail::Mailer 2.14 - Mail::Mailer::qmail 2.14 - Mail::Mailer::rfc822 2.14 - Mail::Mailer::sendmail 2.14 - Mail::Mailer::smtp 2.14 - Mail::Mailer::smtp::pipe 2.14 - Mail::Mailer::smtps 2.14 - Mail::Mailer::smtps::pipe 2.14 - Mail::Mailer::testfile 2.14 - Mail::Mailer::testfile::pipe 2.14 - Mail::Send 2.14 - Mail::Util 2.14 + Mail::Address 2.18 + Mail::Cap 2.18 + Mail::Field 2.18 + Mail::Field::AddrList 2.18 + Mail::Field::Date 2.18 + Mail::Field::Generic 2.18 + Mail::Filter 2.18 + Mail::Header 2.18 + Mail::Internet 2.18 + Mail::Mailer 2.18 + Mail::Mailer::qmail 2.18 + Mail::Mailer::rfc822 2.18 + Mail::Mailer::sendmail 2.18 + Mail::Mailer::smtp 2.18 + Mail::Mailer::smtp::pipe 2.18 + Mail::Mailer::smtps 2.18 + Mail::Mailer::smtps::pipe 2.18 + Mail::Mailer::testfile 2.18 + Mail::Mailer::testfile::pipe 2.18 + Mail::Send 2.18 + Mail::Util 2.18 requirements: Date::Format 0 Date::Parse 0 @@ -594,28 +604,28 @@ DISTRIBUTIONS Net::Domain 1.05 Net::SMTP 1.03 Test::More 0 - Module-Build-0.4214 - pathname: L/LE/LEONT/Module-Build-0.4214.tar.gz + Module-Build-0.4224 + pathname: L/LE/LEONT/Module-Build-0.4224.tar.gz provides: - Module::Build 0.4214 - Module::Build::Base 0.4214 - Module::Build::Compat 0.4214 - Module::Build::Config 0.4214 - Module::Build::Cookbook 0.4214 - Module::Build::Dumper 0.4214 - Module::Build::Notes 0.4214 - Module::Build::PPMMaker 0.4214 - Module::Build::Platform::Default 0.4214 - Module::Build::Platform::MacOS 0.4214 - Module::Build::Platform::Unix 0.4214 - Module::Build::Platform::VMS 0.4214 - Module::Build::Platform::VOS 0.4214 - Module::Build::Platform::Windows 0.4214 - Module::Build::Platform::aix 0.4214 - Module::Build::Platform::cygwin 0.4214 - Module::Build::Platform::darwin 0.4214 - Module::Build::Platform::os2 0.4214 - Module::Build::PodParser 0.4214 + Module::Build 0.4224 + Module::Build::Base 0.4224 + Module::Build::Compat 0.4224 + Module::Build::Config 0.4224 + Module::Build::Cookbook 0.4224 + Module::Build::Dumper 0.4224 + Module::Build::Notes 0.4224 + Module::Build::PPMMaker 0.4224 + Module::Build::Platform::Default 0.4224 + Module::Build::Platform::MacOS 0.4224 + Module::Build::Platform::Unix 0.4224 + Module::Build::Platform::VMS 0.4224 + Module::Build::Platform::VOS 0.4224 + Module::Build::Platform::Windows 0.4224 + Module::Build::Platform::aix 0.4224 + Module::Build::Platform::cygwin 0.4224 + Module::Build::Platform::darwin 0.4224 + Module::Build::Platform::os2 0.4224 + Module::Build::PodParser 0.4224 requirements: CPAN::Meta 2.142060 CPAN::Meta::YAML 0.003 @@ -638,14 +648,14 @@ DISTRIBUTIONS Parse::CPAN::Meta 1.4401 Perl::OSType 1 Pod::Man 2.17 - Test::Harness 3.16 + TAP::Harness 3.29 Test::More 0.49 Text::Abbrev 0 Text::ParseWords 0 - perl 5.008000 + perl 5.006001 version 0.87 - Mojolicious-6.62 - pathname: S/SR/SRI/Mojolicious-6.62.tar.gz + Mojolicious-7.36 + pathname: S/SR/SRI/Mojolicious-7.36.tar.gz provides: Mojo undef Mojo::Asset undef @@ -667,6 +677,7 @@ DISTRIBUTIONS Mojo::Date undef Mojo::EventEmitter undef Mojo::Exception undef + Mojo::File undef Mojo::Headers undef Mojo::HelloWorld undef Mojo::Home undef @@ -675,6 +686,8 @@ DISTRIBUTIONS Mojo::IOLoop::Delay undef Mojo::IOLoop::Server undef Mojo::IOLoop::Stream undef + Mojo::IOLoop::Subprocess undef + Mojo::IOLoop::TLS undef Mojo::JSON undef Mojo::JSON::Pointer undef Mojo::Loader undef @@ -692,6 +705,8 @@ DISTRIBUTIONS Mojo::Server::Daemon undef Mojo::Server::Hypnotoad undef Mojo::Server::Morbo undef + Mojo::Server::Morbo::Backend undef + Mojo::Server::Morbo::Backend::Poll undef Mojo::Server::PSGI undef Mojo::Server::PSGI::_IO undef Mojo::Server::Prefork undef @@ -708,7 +723,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 6.62 + Mojolicious 7.36 Mojolicious::Command undef Mojolicious::Command::cgi undef Mojolicious::Command::cpanify undef @@ -730,7 +745,6 @@ DISTRIBUTIONS Mojolicious::Controller undef Mojolicious::Lite undef Mojolicious::Plugin undef - Mojolicious::Plugin::Charset undef Mojolicious::Plugin::Config undef Mojolicious::Plugin::Config::Sandbox undef Mojolicious::Plugin::DefaultHelpers undef @@ -760,19 +774,21 @@ DISTRIBUTIONS JSON::PP 2.27103 Pod::Simple 3.09 Time::Local 1.2 - Mojolicious-Plugin-Authentication-1.29 - pathname: M/MA/MADCAT/Mojolicious-Plugin-Authentication-1.29.tar.gz + perl 5.010001 + Mojolicious-Plugin-Authentication-1.32 + pathname: J/JJ/JJATRIA/Mojolicious-Plugin-Authentication-1.32.tar.gz provides: - Mojolicious::Plugin::Authentication 1.29 + Mojolicious::Plugin::Authentication 1.32 requirements: ExtUtils::MakeMaker 0 Mojo::Base 0 + perl 5.010 strict 0 warnings 0 - Mojolicious-Plugin-DebugDumperHelper-0.02 - pathname: L/LD/LDIDRY/Mojolicious-Plugin-DebugDumperHelper-0.02.tar.gz + Mojolicious-Plugin-DebugDumperHelper-0.03 + pathname: L/LD/LDIDRY/Mojolicious-Plugin-DebugDumperHelper-0.03.tar.gz provides: - Mojolicious::Plugin::DebugDumperHelper 0.02 + Mojolicious::Plugin::DebugDumperHelper 0.03 requirements: ExtUtils::MakeMaker 0 Mojolicious 6.11 @@ -797,35 +813,47 @@ DISTRIBUTIONS Mojolicious 5 Test::More 0 perl 5.001001 - Net-HTTP-6.09 - pathname: E/ET/ETHER/Net-HTTP-6.09.tar.gz + Mozilla-CA-20160104 + pathname: A/AB/ABH/Mozilla-CA-20160104.tar.gz provides: - Net::HTTP 6.09 - Net::HTTP::Methods 6.09 - Net::HTTP::NB 6.09 - Net::HTTPS 6.09 + Mozilla::CA 20160104 requirements: + ExtUtils::MakeMaker 0 + Test 0 + perl 5.006 + Net-HTTP-6.16 + pathname: O/OA/OALDERS/Net-HTTP-6.16.tar.gz + provides: + Net::HTTP 6.16 + Net::HTTP::Methods 6.16 + Net::HTTP::NB 6.16 + Net::HTTPS 6.16 + requirements: + Carp 0 Compress::Raw::Zlib 0 ExtUtils::MakeMaker 0 - IO::Select 0 IO::Socket::INET 0 IO::Uncompress::Gunzip 0 URI 0 + base 0 perl 5.006002 - Net-SSLeay-1.74 - pathname: M/MI/MIKEM/Net-SSLeay-1.74.tar.gz + strict 0 + vars 0 + warnings 0 + Net-SSLeay-1.81 + pathname: M/MI/MIKEM/Net-SSLeay-1.81.tar.gz provides: - Net::SSLeay 1.74 + Net::SSLeay 1.81 Net::SSLeay::Handle 0.61 requirements: ExtUtils::MakeMaker 6.36 MIME::Base64 0 Test::More 0.60_01 perl 5.005 - Number-Bytes-Human-0.10 - pathname: D/DA/DAGOBERT/Number-Bytes-Human-0.10.tar.gz + Number-Bytes-Human-0.11 + pathname: F/FE/FERREIRA/Number-Bytes-Human-0.11.tar.gz provides: - Number::Bytes::Human 0.10 + Number::Bytes::Human 0.11 requirements: Carp 0 ExtUtils::MakeMaker 0 @@ -881,10 +909,10 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.30 File::Spec 0 strict 0 - Sub-Uplevel-0.25 - pathname: D/DA/DAGOLDEN/Sub-Uplevel-0.25.tar.gz + Sub-Uplevel-0.2800 + pathname: D/DA/DAGOLDEN/Sub-Uplevel-0.2800.tar.gz provides: - Sub::Uplevel 0.25 + Sub::Uplevel 0.2800 requirements: Carp 0 ExtUtils::MakeMaker 6.17 @@ -914,31 +942,30 @@ DISTRIBUTIONS Try::Tiny 0.07 strict 0 warnings 0 - Test-Script-1.10 - pathname: P/PL/PLICEASE/Test-Script-1.10.tar.gz + Test-Script-1.20 + pathname: P/PL/PLICEASE/Test-Script-1.20.tar.gz provides: - Test::Script 1.10 + Test::Script 1.20 requirements: + Capture::Tiny 0 ExtUtils::MakeMaker 0 File::Spec 0.80 - IPC::Run3 0.034 + IO::Handle 0 Probe::Perl 0.01 Test::Builder 0.32 Test::More 0.96 - perl 5.006 - Test-Warn-0.30 - pathname: C/CH/CHORNY/Test-Warn-0.30.tar.gz + perl 5.008001 + Test-Warn-0.32 + pathname: B/BI/BIGJ/Test-Warn-0.32.tar.gz provides: - Test::Warn 0.30 - Test::Warn::Categorization 0.30 + Test::Warn 0.32 + Test::Warn::Categorization 0.32 requirements: Carp 1.22 ExtUtils::MakeMaker 0 - File::Spec 0 Sub::Uplevel 0.12 Test::Builder 0.13 Test::Builder::Tester 1.02 - Test::More 0 perl 5.006 Text-Soundex-3.05 pathname: R/RJ/RJBS/Text-Soundex-3.05.tar.gz @@ -1078,50 +1105,52 @@ DISTRIBUTIONS Fcntl 0 URI 1.10 perl 5.008001 - XML-SAX-Base-1.08 - pathname: G/GR/GRANTM/XML-SAX-Base-1.08.tar.gz + XML-SAX-Base-1.09 + pathname: G/GR/GRANTM/XML-SAX-Base-1.09.tar.gz provides: - XML::SAX::Base 1.08 - XML::SAX::Base::NoHandler 1.08 - XML::SAX::Exception 1.08 + XML::SAX::Base 1.09 + XML::SAX::Base::NoHandler 1.09 + XML::SAX::Exception 1.09 requirements: - ExtUtils::MakeMaker 6.31 - Test::More 0.88 + ExtUtils::MakeMaker 0 + perl 5.008 common-sense-3.74 pathname: M/ML/MLEHMANN/common-sense-3.74.tar.gz provides: common::sense 3.74 requirements: ExtUtils::MakeMaker 0 - libwww-perl-6.15 - pathname: E/ET/ETHER/libwww-perl-6.15.tar.gz + libwww-perl-6.26 + pathname: O/OA/OALDERS/libwww-perl-6.26.tar.gz provides: - LWP 6.15 - LWP::Authen::Basic undef - LWP::Authen::Digest undef - LWP::Authen::Ntlm 6.15 - LWP::ConnCache 6.15 - LWP::Debug undef - LWP::DebugFile undef - LWP::MemberMixin undef - LWP::Protocol 6.15 - LWP::Protocol::GHTTP undef - LWP::Protocol::MyFTP undef - LWP::Protocol::cpan undef - LWP::Protocol::data undef - LWP::Protocol::file undef - LWP::Protocol::ftp undef - LWP::Protocol::gopher undef - LWP::Protocol::http undef - LWP::Protocol::http::Socket undef - LWP::Protocol::http::SocketMethods undef - LWP::Protocol::loopback undef - LWP::Protocol::mailto undef - LWP::Protocol::nntp undef - LWP::Protocol::nogo undef - LWP::RobotUA 6.15 - LWP::Simple 6.15 - LWP::UserAgent 6.15 + LWP 6.26 + LWP::Authen::Basic 6.26 + LWP::Authen::Digest 6.26 + LWP::Authen::Ntlm 6.26 + LWP::ConnCache 6.26 + LWP::Debug 6.26 + LWP::Debug::TraceHTTP 6.26 + LWP::Debug::TraceHTTP::Socket 6.26 + LWP::DebugFile 6.26 + LWP::MemberMixin 6.26 + LWP::Protocol 6.26 + LWP::Protocol::MyFTP 6.26 + LWP::Protocol::cpan 6.26 + LWP::Protocol::data 6.26 + LWP::Protocol::file 6.26 + LWP::Protocol::ftp 6.26 + LWP::Protocol::gopher 6.26 + LWP::Protocol::http 6.26 + LWP::Protocol::http::Socket 6.26 + LWP::Protocol::http::SocketMethods 6.26 + LWP::Protocol::loopback 6.26 + LWP::Protocol::mailto 6.26 + LWP::Protocol::nntp 6.26 + LWP::Protocol::nogo 6.26 + LWP::RobotUA 6.26 + LWP::Simple 6.26 + LWP::UserAgent 6.26 + libwww::perl undef requirements: Digest::MD5 0 Encode 2.12 @@ -1146,10 +1175,15 @@ DISTRIBUTIONS MIME::Base64 2.1 Net::FTP 2.58 Net::HTTP 6.07 + Scalar::Util 0 + Try::Tiny 0 URI 1.10 URI::Escape 0 WWW::RobotRules 6 + base 0 perl 5.008001 + strict 0 + warnings 0 perl-ldap-0.65 pathname: M/MA/MARSCHAP/perl-ldap-0.65.tar.gz provides: diff --git a/lib/Lufi/Controller/Files.pm b/lib/Lufi/Controller/Files.pm index 614693b..db3f723 100644 --- a/lib/Lufi/Controller/Files.pm +++ b/lib/Lufi/Controller/Files.pm @@ -2,7 +2,8 @@ package Lufi::Controller::Files; use Mojo::Base 'Mojolicious::Controller'; use Mojo::JSON qw(encode_json decode_json to_json true false); -use Mojo::Util qw(slurp spurt encode decode); +use Mojo::Util qw(encode decode); +use Mojo::File; use LufiDB; use Lufi::File; use Lufi::Slice; @@ -144,7 +145,7 @@ sub upload { j => $json->{part}, path => $file ); - spurt $text, $file; + Mojo::File->new($file)->spurt($text); push @{$f->slices}, $s; $s->write; @@ -253,7 +254,7 @@ sub download { # Get the slice my $e = $f->slices->[$num]; - my $text = slurp $e->path; + my $text = Mojo::File->new($e->path)->slurp; my ($json2) = split('XXMOJOXX', $text, 2); $json2 = decode 'UTF-8', $json2; diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po index d5602b3..86bd4a9 100644 --- a/themes/default/lib/Lufi/I18N/ca.po +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -20,9 +20,7 @@ msgstr "" #. ($delay) #. (max_delay) -#: themes/default/templates/index.html.ep:40 -#: themes/default/templates/index.html.ep:49 -#: themes/default/templates/index.html.ep:50 +#: 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" @@ -30,8 +28,7 @@ msgstr "%1 dies" msgid "1 year" msgstr "1 any" -#: themes/default/templates/index.html.ep:4 -#: themes/default/templates/index.html.ep:49 +#: themes/default/templates/index.html.ep:4 themes/default/templates/index.html.ep:49 msgid "24 hours" msgstr "24 hores" @@ -40,41 +37,27 @@ 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 ;-)" +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 +#: themes/default/templates/render.html.ep:42 msgid "Abort" msgstr "Avorta" -#: themes/default/templates/layouts/default.html.ep:40 -#: themes/default/templates/layouts/default.html.ep:52 +#: themes/default/templates/layouts/default.html.ep:66 themes/default/templates/layouts/default.html.ep:78 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." +#: themes/default/templates/index.html.ep:71 +msgid "Add a password to file(s)" 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." + +#: 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 +#: themes/default/templates/render.html.ep:52 msgid "Asking for file part XX1 of %1" msgstr "Demanem la part XX1 de %1 del fitxer" @@ -86,11 +69,11 @@ msgstr "Retorna a la pàgina d'inici" msgid "Bad CSRF token!" msgstr "Mal testimoni 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 "Premeu aquí per tal de refrescar la pàgina i reiniciar la descàrrega" -#: themes/default/templates/index.html.ep:72 +#: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" msgstr "Premeu per obrir la selecció de fitxer." @@ -102,23 +85,23 @@ msgstr "Tanca" msgid "Comma-separated email addresses" msgstr "Adreces de correu electrònic separades per comes" -#: themes/default/templates/index.html.ep:92 +#: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" msgstr "Copia tots els enllaços al porta-retalls" -#: themes/default/templates/index.html.ep:95 +#: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" msgstr "Copia al porta-retalls" -#: lib/Lufi/Controller/Files.pm:396 +#: lib/Lufi/Controller/Files.pm:423 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 +#: lib/Lufi/Controller/Files.pm:407 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 +#: lib/Lufi/Controller/Files.pm:323 msgid "Could not find the file. Are you sure of the URL?" msgstr "No trobo el fitxer. Esteu segurs de la URL?" @@ -126,54 +109,35 @@ msgstr "No trobo el fitxer. Esteu segurs de la URL?" msgid "Counter" msgstr "Comptador" -#: themes/default/templates/files.html.ep:27 -#: themes/default/templates/index.html.ep:64 +#: 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 +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 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." +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 +#: themes/default/templates/index.html.ep:106 themes/default/templates/render.html.ep:28 msgid "Download" msgstr "Descàrrega" -#: themes/default/templates/render.html.ep:39 +#: themes/default/templates/render.html.ep:47 msgid "Download aborted." msgstr "Descàrrega avortada." -#: 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 "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. " +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 +#: themes/default/templates/index.html.ep:77 msgid "Drop files here" msgstr "Deixeu anar aquí fitxers." @@ -185,28 +149,27 @@ msgstr "Cos del correu electrònic" msgid "Email subject" msgstr "Assumpte del correu electrònic" -#: themes/default/templates/mail.html.ep:24 -#: themes/default/templates/mail.html.ep:26 +#: 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 +#: themes/default/templates/index.html.ep:107 msgid "Encrypting part XX1 of XX2" msgstr "S'està xifrant la part XX1 de XX2" -#: lib/Lufi/Controller/Files.pm:216 +#: lib/Lufi/Controller/Files.pm:230 msgid "Error: the file existed but was deleted." msgstr "Error: el fitxer existia però va ser eliminat." -#: lib/Lufi/Controller/Files.pm:266 +#: lib/Lufi/Controller/Files.pm:292 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 +#: lib/Lufi/Controller/Files.pm:302 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 +#: themes/default/templates/index.html.ep:108 msgid "Expiration:" msgstr "Expiració:" @@ -218,7 +181,7 @@ msgstr "Expira el" msgid "Export localStorage data" msgstr "Exporta dades a l'emmagatzematge local" -#: lib/Lufi/Controller/Files.pm:364 +#: lib/Lufi/Controller/Files.pm:391 msgid "File deleted" msgstr "Fitxer eliminat" @@ -226,19 +189,13 @@ msgstr "Fitxer eliminat" msgid "File name" msgstr "Nom de fitxer" -#: themes/default/templates/render.html.ep:43 +#: themes/default/templates/render.html.ep:51 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" +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" @@ -248,12 +205,11 @@ msgstr "Hola,\\n\\nVe't aquí uns fitxers que vull compartir amb tu:" msgid "Here's some files" msgstr "Ve't aquí uns fitxers" -#: 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 "" -"Prem Retorn, i després Ctrl+C per copiar tots els enllaços de descàrrega" +msgstr "Prem Retorn, i després Ctrl+C per copiar tots els enllaços de descàrrega" -#: 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 "Prem Retorn, i després Ctrl+C per copiar l'enllaç de descàrrega" @@ -272,16 +228,11 @@ 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." +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." +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" @@ -295,11 +246,9 @@ msgstr "Importat: més informació sobre moratòries" 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/render.html.ep:49 +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." @@ -309,8 +258,7 @@ msgstr "Teniu el javascript deactivat. No podreu usar Lufi." msgid "Login" msgstr "Entrada" -#: themes/default/templates/layouts/default.html.ep:42 -#: themes/default/templates/layouts/default.html.ep:54 +#: themes/default/templates/layouts/default.html.ep:68 themes/default/templates/layouts/default.html.ep:80 msgid "Logout" msgstr "Sortida" @@ -318,33 +266,28 @@ msgstr "Sortida" 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 +#: themes/default/templates/files.html.ep:31 +msgid "Mail" +msgstr "" + +#: themes/default/templates/files.html.ep:3 themes/default/templates/layouts/default.html.ep:62 themes/default/templates/layouts/default.html.ep:74 msgid "My files" msgstr "Els meus fitxers" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:68 +#: lib/Lufi/Controller/Files.pm:70 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 +#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 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." +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 +#: themes/default/templates/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" msgstr "Contrasenya" @@ -353,13 +296,13 @@ msgstr "Contrasenya" 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." +#: 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 "Si us plau, espereu mentre obtenim el fitxer. Abans que el tingueu disponible primer cal descarregar i desxifrar tots els trossos." + +#: lib/Lufi.pm:300 +msgid "Please, check your credentials: unable to authenticate." 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" @@ -370,13 +313,10 @@ 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." +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 +#: themes/default/templates/index.html.ep:111 msgid "Send all links by email" msgstr "Envia tots els enllaços per correu electrònic" @@ -388,45 +328,38 @@ msgstr "Envia amb aquest servidor" 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. " +#: 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 "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 +#: themes/default/templates/layouts/default.html.ep:64 themes/default/templates/layouts/default.html.ep:76 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 msgid "Signin" msgstr "Autenticació" +#: 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 "" -"Disculpeu, les pujades estan actualment desactivades. Si us plau proveu-ho " -"més tard." +msgstr "Disculpeu, les pujades estan actualment desactivades. Si us plau proveu-ho més tard." -#: lib/Lufi/Controller/Files.pm:42 +#: lib/Lufi/Controller/Files.pm:44 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.)." +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 +#: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." msgstr "La importació de les dades ha reeixit." @@ -438,25 +371,20 @@ msgstr "El cos del correu no pot estar buit." msgid "The email subject can't be empty." msgstr "L'assumpte dle correu no pot estar buit." -#: lib/Lufi/Controller/Files.pm:361 +#: lib/Lufi/Controller/Files.pm:388 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." +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 +#: themes/default/templates/index.html.ep:101 msgid "The link(s) has been copied to your clipboard" msgstr "L'enllaç/ els enllaços ja estan copiats al portaretalls" @@ -465,61 +393,37 @@ 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." +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." +#: lib/Lufi/Controller/Files.pm:182 +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:" +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 +#: themes/default/templates/index.html.ep:102 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." +#: lib/Lufi/Controller/Files.pm:361 +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 +#: lib/Lufi/Controller/Files.pm:351 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 +#: lib/Lufi/Controller/Files.pm:371 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 +#: themes/default/templates/layouts/default.html.ep:61 themes/default/templates/layouts/default.html.ep:73 msgid "Upload files" msgstr "Pujar fitxers" @@ -527,11 +431,11 @@ msgstr "Pujar fitxers" msgid "Uploaded at" msgstr "Pujat a les" -#: themes/default/templates/index.html.ep:77 +#: themes/default/templates/index.html.ep:85 msgid "Uploaded files" msgstr "Fitxers pujats" -#: themes/default/templates/index.html.ep:106 +#: themes/default/templates/index.html.ep:114 msgid "Websocket communication error" msgstr "Error de comunicacions del websocket" @@ -544,46 +448,24 @@ 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." +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." +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: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 "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/render.html.ep:50 +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/index.html.ep:99 +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." @@ -594,10 +476,14 @@ 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 +#: lib/Lufi/Controller/Files.pm:57 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "El fitxer és massa gran: %1 (mida màxima admesa: %2)" +#: lib/Lufi/Controller/Files.pm:276 +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)." @@ -626,6 +512,6 @@ msgstr "a partir de %1, el fitxer es mantindrà per sempre al servidor." msgid "no time limit" msgstr "no hi ha límit de temps" -#: 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/en.po b/themes/default/lib/Lufi/I18N/en.po index f86904a..876e2f9 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -41,7 +41,7 @@ msgstr "" msgid "Abort" msgstr "" -#: themes/default/templates/layouts/default.html.ep:40 themes/default/templates/layouts/default.html.ep:52 +#: themes/default/templates/layouts/default.html.ep:66 themes/default/templates/layouts/default.html.ep:78 msgid "About" msgstr "" @@ -90,15 +90,15 @@ msgstr "" msgid "Copy to clipboard" msgstr "" -#: lib/Lufi/Controller/Files.pm:422 +#: lib/Lufi/Controller/Files.pm:423 msgid "Could not delete the file. You are not authenticated." msgstr "" -#: lib/Lufi/Controller/Files.pm:406 +#: lib/Lufi/Controller/Files.pm:407 msgid "Could not find the file. Are you sure of the URL and the token?" msgstr "" -#: lib/Lufi/Controller/Files.pm:322 +#: lib/Lufi/Controller/Files.pm:323 msgid "Could not find the file. Are you sure of the URL?" msgstr "" @@ -154,15 +154,15 @@ msgstr "" msgid "Encrypting part XX1 of XX2" msgstr "" -#: lib/Lufi/Controller/Files.pm:229 +#: lib/Lufi/Controller/Files.pm:230 msgid "Error: the file existed but was deleted." msgstr "" -#: lib/Lufi/Controller/Files.pm:291 +#: lib/Lufi/Controller/Files.pm:292 msgid "Error: the file has not been sent entirely." msgstr "" -#: lib/Lufi/Controller/Files.pm:301 +#: lib/Lufi/Controller/Files.pm:302 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "" @@ -178,7 +178,7 @@ msgstr "" msgid "Export localStorage data" msgstr "" -#: lib/Lufi/Controller/Files.pm:390 +#: lib/Lufi/Controller/Files.pm:391 msgid "File deleted" msgstr "" @@ -254,7 +254,7 @@ msgstr "" msgid "Login" msgstr "" -#: themes/default/templates/layouts/default.html.ep:42 themes/default/templates/layouts/default.html.ep:54 +#: themes/default/templates/layouts/default.html.ep:68 themes/default/templates/layouts/default.html.ep:80 msgid "Logout" msgstr "" @@ -262,16 +262,20 @@ msgstr "" msgid "Lufi is a free (as in free speech) file hosting software." msgstr "" -#: themes/default/templates/files.html.ep:3 themes/default/templates/layouts/default.html.ep:36 themes/default/templates/layouts/default.html.ep:48 +#: themes/default/templates/files.html.ep:31 +msgid "Mail" +msgstr "" + +#: themes/default/templates/files.html.ep:3 themes/default/templates/layouts/default.html.ep:62 themes/default/templates/layouts/default.html.ep:74 msgid "My files" msgstr "" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:69 +#: lib/Lufi/Controller/Files.pm:70 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:112 +#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "" @@ -329,7 +333,7 @@ msgstr "" msgid "Share your files in total privacy on %1" msgstr "" -#: 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 +#: themes/default/templates/layouts/default.html.ep:64 themes/default/templates/layouts/default.html.ep:76 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 msgid "Signin" msgstr "" @@ -341,7 +345,7 @@ msgstr "" msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "" -#: lib/Lufi/Controller/Files.pm:43 +#: lib/Lufi/Controller/Files.pm:44 msgid "Sorry, uploading is disabled." msgstr "" @@ -349,7 +353,7 @@ msgstr "" 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 "" -#: themes/default/templates/files.html.ep:43 +#: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." msgstr "" @@ -361,7 +365,7 @@ msgstr "" msgid "The email subject can't be empty." msgstr "" -#: lib/Lufi/Controller/Files.pm:387 +#: lib/Lufi/Controller/Files.pm:388 msgid "The file has already been deleted" msgstr "" @@ -386,7 +390,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:181 +#: lib/Lufi/Controller/Files.pm:182 msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." msgstr "" @@ -399,21 +403,21 @@ msgid "Unable to copy the link(s) to your clipboard" msgstr "" #. ($short) -#: lib/Lufi/Controller/Files.pm:360 +#: lib/Lufi/Controller/Files.pm:361 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:350 +#: lib/Lufi/Controller/Files.pm:351 msgid "Unable to get counter for %1. The token is invalid." msgstr "" #. ($short) -#: lib/Lufi/Controller/Files.pm:370 +#: lib/Lufi/Controller/Files.pm:371 msgid "Unable to get counter for %1. You are not authenticated." msgstr "" -#: themes/default/templates/layouts/default.html.ep:35 themes/default/templates/layouts/default.html.ep:47 +#: themes/default/templates/layouts/default.html.ep:61 themes/default/templates/layouts/default.html.ep:73 msgid "Upload files" msgstr "" @@ -466,11 +470,11 @@ msgid "You must give email addresses." msgstr "" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:56 +#: lib/Lufi/Controller/Files.pm:57 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "" -#: lib/Lufi/Controller/Files.pm:275 +#: lib/Lufi/Controller/Files.pm:276 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" @@ -505,7 +509,3 @@ msgstr "" #: themes/default/templates/index.html.ep:78 msgid "or" msgstr "" - -#: themes/default/templates/files.html.ep:32 -msgid "Mail" -msgstr "" diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index d2ef61d..08c7e3a 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -43,7 +43,7 @@ msgstr "Un merci avec une photo de chaton sur {size}) -#: lib/Lufi/Controller/Files.pm:69 +#: lib/Lufi/Controller/Files.pm:70 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:112 +#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Pas de délai d’expiration" @@ -331,7 +335,7 @@ msgstr "Envoi du fragment XX1 sur XX2. Veuillez patienter, la barre de progressi msgid "Share your files in total privacy on %1" msgstr "Partagez vos fichiers en toute confidentialité sur %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 +#: themes/default/templates/layouts/default.html.ep:64 themes/default/templates/layouts/default.html.ep:76 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 msgid "Signin" msgstr "Connexion" @@ -343,7 +347,7 @@ msgstr "Désolé, vous n’êtes pas autorisé à utiliser ce service. Contactez 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:43 +#: lib/Lufi/Controller/Files.pm:44 msgid "Sorry, uploading is disabled." msgstr "Désolé, l’envoi de fichier est désactivé." @@ -351,7 +355,7 @@ msgstr "Désolé, l’envoi de fichier est désactivé." 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’administrateur ne peut voir que le nom du fichier, sa taille et son type mime (son type de fichier : vidéo, texte, etc.)." -#: themes/default/templates/files.html.ep:43 +#: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." msgstr "Les données ont été importées avec succès." @@ -363,7 +367,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:387 +#: lib/Lufi/Controller/Files.pm:388 msgid "The file has already been deleted" msgstr "Le fichier a déjà été supprimé" @@ -388,7 +392,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:181 +#: lib/Lufi/Controller/Files.pm:182 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." @@ -401,21 +405,21 @@ 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:360 +#: lib/Lufi/Controller/Files.pm:361 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:350 +#: lib/Lufi/Controller/Files.pm:351 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:370 +#: lib/Lufi/Controller/Files.pm:371 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." -#: themes/default/templates/layouts/default.html.ep:35 themes/default/templates/layouts/default.html.ep:47 +#: themes/default/templates/layouts/default.html.ep:61 themes/default/templates/layouts/default.html.ep:73 msgid "Upload files" msgstr "Envoyer des fichiers" @@ -468,11 +472,11 @@ msgid "You must give email addresses." msgstr "Vous devez envoyer des adresses mail." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:56 +#: lib/Lufi/Controller/Files.pm:57 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 +#: lib/Lufi/Controller/Files.pm:276 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." diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index 66e28a7..cfa410a 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -43,7 +43,7 @@ msgstr "Un grazie con una foto di un gattino sur {size}) -#: lib/Lufi/Controller/Files.pm:69 +#: lib/Lufi/Controller/Files.pm:70 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:112 +#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Nessun ritardo per la scadenza" @@ -331,7 +335,7 @@ msgstr "Invio della parte XX1 su XX2. Prego attendere, la barra di avanzamento p msgid "Share your files in total privacy on %1" msgstr "Condividi tutti i file in totale riservatezza su %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 +#: themes/default/templates/layouts/default.html.ep:64 themes/default/templates/layouts/default.html.ep:76 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 msgid "Signin" msgstr "Autenticazione" @@ -343,7 +347,7 @@ msgstr "" 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:43 +#: lib/Lufi/Controller/Files.pm:44 msgid "Sorry, uploading is disabled." msgstr "L'invio del file è attualemente disattivato." @@ -351,7 +355,7 @@ msgstr "L'invio del file è attualemente disattivato." 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'amministratore pu vedere solo il nome del file, la sua dimensione e il suo mimetype (video, testo, etc.)." -#: themes/default/templates/files.html.ep:43 +#: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." msgstr "I dati sono stati importati correttamente." @@ -363,7 +367,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:387 +#: lib/Lufi/Controller/Files.pm:388 msgid "The file has already been deleted" msgstr "Il file è già stato cancellato" @@ -388,7 +392,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:181 +#: lib/Lufi/Controller/Files.pm:182 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." @@ -401,21 +405,21 @@ msgid "Unable to copy the link(s) to your clipboard" msgstr "Impossibile copiare i link negli appunti" #. ($short) -#: lib/Lufi/Controller/Files.pm:360 +#: lib/Lufi/Controller/Files.pm:361 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:350 +#: lib/Lufi/Controller/Files.pm:351 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:370 +#: lib/Lufi/Controller/Files.pm:371 msgid "Unable to get counter for %1. You are not authenticated." msgstr "Impossibile recuperare il contatore per %1. Non sei autenticato." -#: themes/default/templates/layouts/default.html.ep:35 themes/default/templates/layouts/default.html.ep:47 +#: themes/default/templates/layouts/default.html.ep:61 themes/default/templates/layouts/default.html.ep:73 msgid "Upload files" msgstr "Invio dei file" @@ -468,11 +472,11 @@ msgid "You must give email addresses." msgstr "Devi fornire gli indirizzi email." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:56 +#: lib/Lufi/Controller/Files.pm:57 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 +#: lib/Lufi/Controller/Files.pm:276 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po index 6f8843c..93189a3 100644 --- a/themes/default/lib/Lufi/I18N/nl.po +++ b/themes/default/lib/Lufi/I18N/nl.po @@ -4,17 +4,6 @@ # 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 @@ -37,20 +26,24 @@ msgstr ":" 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 +#: themes/default/templates/render.html.ep:42 msgid "Abort" msgstr "Annuleren" -#: themes/default/templates/layouts/default.html.ep:40 themes/default/templates/layouts/default.html.ep:52 +#: themes/default/templates/layouts/default.html.ep:66 themes/default/templates/layouts/default.html.ep:78 msgid "About" msgstr "Over" +#: 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 "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 +#: themes/default/templates/render.html.ep:52 msgid "Asking for file part XX1 of %1" msgstr "Deel XX1 van %1 wordt opgehaald" @@ -62,11 +55,11 @@ msgstr "Terug naar home" msgid "Bad CSRF token!" msgstr "Verkeerde CSRF token!" -#: 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 "Klik hier om de pagina te verversen en opnieuw te downloaden." -#: themes/default/templates/index.html.ep:72 +#: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" msgstr "Klik voor bestandbrowser" @@ -78,23 +71,23 @@ msgstr "Sluiten" msgid "Comma-separated email addresses" msgstr "Komma gescheiden email adressen" -#: themes/default/templates/index.html.ep:92 +#: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" msgstr "Kopieer alle links naar klembord" -#: themes/default/templates/index.html.ep:95 +#: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" msgstr "Kopieer naar klembord" -#: lib/Lufi/Controller/Files.pm:396 +#: lib/Lufi/Controller/Files.pm:423 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 +#: lib/Lufi/Controller/Files.pm:407 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 +#: lib/Lufi/Controller/Files.pm:323 msgid "Could not find the file. Are you sure of the URL?" msgstr "Kan het bestand niet vinden. Klopt de URL?" @@ -106,7 +99,7 @@ msgstr "Teller" msgid "Delete at first download?" msgstr "Verwijder na eerste 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 "Verwijderingslink" @@ -114,15 +107,15 @@ msgstr "Verwijderingslink" 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 +#: 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 geannuleerd." -#: 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 "Download link" @@ -130,7 +123,7 @@ msgstr "Download link" 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 +#: themes/default/templates/index.html.ep:77 msgid "Drop files here" msgstr "Sleep bestand(en) naar dit venster" @@ -146,23 +139,23 @@ msgstr "Onderwerp" msgid "Emails" msgstr "Emails" -#: themes/default/templates/index.html.ep:99 +#: themes/default/templates/index.html.ep:107 msgid "Encrypting part XX1 of XX2" msgstr "Encrypten deel XX1 van XX2 " -#: lib/Lufi/Controller/Files.pm:216 +#: lib/Lufi/Controller/Files.pm:230 msgid "Error: the file existed but was deleted." msgstr "Fout: het bestand bestond wel maar is verwijderd." -#: lib/Lufi/Controller/Files.pm:266 +#: lib/Lufi/Controller/Files.pm:292 msgid "Error: the file has not been sent entirely." msgstr "Fout: het bestand is niet volledig opgestuurd." -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:302 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 +#: themes/default/templates/index.html.ep:108 msgid "Expiration:" msgstr "Vervaldatum:" @@ -174,7 +167,7 @@ msgstr "Vervalt op" msgid "Export localStorage data" msgstr "Exporteer opgeslagen data" -#: lib/Lufi/Controller/Files.pm:364 +#: lib/Lufi/Controller/Files.pm:391 msgid "File deleted" msgstr "Bestand verwijderd" @@ -182,7 +175,7 @@ msgstr "Bestand verwijderd" msgid "File name" msgstr "Bestandsnaam" -#: themes/default/templates/render.html.ep:43 +#: themes/default/templates/render.html.ep:51 msgid "Get the file" msgstr "Download bestand" @@ -198,11 +191,11 @@ msgstr "Hallo,\\n\\nHier zijn enkele bestanden die ik met je wil delen:\\n\\n" msgid "Here's some files" msgstr "Hier zijn enkele bestanden" -#: 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 "Druk Enter, vervolgens CTRL+C om alle download links te kopieeren" -#: 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 "Druk Enter, vervolgens CTRL+C om de download link te kopieeren" @@ -238,7 +231,7 @@ msgstr "Belangrijk: meer informatie over uitstel" msgid "Information about delays" msgstr "Informatie over uitstel" -#: 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 "Het lijkt er op dat de sleutel in je URL niet klopt. Controleer je URL." @@ -250,7 +243,7 @@ msgstr "Javascript is uitgeschakeld. Je kan geen gebruik maken van Lufi." msgid "Login" msgstr "Login" -#: themes/default/templates/layouts/default.html.ep:42 themes/default/templates/layouts/default.html.ep:54 +#: themes/default/templates/layouts/default.html.ep:68 themes/default/templates/layouts/default.html.ep:80 msgid "Logout" msgstr "Logout" @@ -258,16 +251,20 @@ msgstr "Logout" 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 +#: themes/default/templates/files.html.ep:31 +msgid "Mail" +msgstr "" + +#: themes/default/templates/files.html.ep:3 themes/default/templates/layouts/default.html.ep:62 themes/default/templates/layouts/default.html.ep:74 msgid "My files" msgstr "Mijn bestanden" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:68 +#: lib/Lufi/Controller/Files.pm:70 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 +#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Geen verloop uitstel" @@ -275,7 +272,7 @@ msgstr "Geen verloop uitstel" 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 +#: themes/default/templates/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" msgstr "Wachtwoord" @@ -284,10 +281,14 @@ msgstr "Wachtwoord" msgid "Please contact the administrator: %1" msgstr "Neem contact op met 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 "Een ogenblik geduld, we pakken je bestand er bij. We moeten alle delen downloaden en decrypten voordat je het kan downloaden." +#: lib/Lufi.pm:300 +msgid "Please, check your credentials: unable to authenticate." +msgstr "" + #: themes/default/templates/about.html.ep:5 msgid "Privacy" msgstr "Privacy" @@ -296,11 +297,15 @@ msgstr "Privacy" msgid "Purge expired files from localStorage" msgstr "Verwijder verlopen data" +#: +msgid "Register" +msgstr "Registreer" + #: 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 +#: themes/default/templates/index.html.ep:111 msgid "Send all links by email" msgstr "Verstuur alle links via mail" @@ -312,7 +317,7 @@ msgstr "Verstuur via deze server" msgid "Send with your own mail software" msgstr "Verstuur via eigen mail software" -#: 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 "Versturen deel XX1 van XX2. Een ogenblik geduld..." @@ -321,19 +326,19 @@ msgstr "Versturen deel XX1 van XX2. Een ogenblik geduld..." 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 +#: themes/default/templates/layouts/default.html.ep:64 themes/default/templates/layouts/default.html.ep:76 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" +#: 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 "Sorry, uploaden is momenteel uitgeschakeld. Probeer het later nogmaals." -#: lib/Lufi/Controller/Files.pm:42 +#: lib/Lufi/Controller/Files.pm:44 msgid "Sorry, uploading is disabled." msgstr "SOrry, uploaden is uitgeschakeld." @@ -341,7 +346,7 @@ msgstr "SOrry, uploaden is uitgeschakeld." 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 +#: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." msgstr "Data is succesvol geimporteerd." @@ -353,7 +358,7 @@ msgstr "Mail inhoud kan niet leeg zijn." msgid "The email subject can't be empty." msgstr "Onderwerp kan niet leeg zijn." -#: lib/Lufi/Controller/Files.pm:361 +#: lib/Lufi/Controller/Files.pm:388 msgid "The file has already been deleted" msgstr "Bestand is reeds verwijderd" @@ -366,7 +371,7 @@ msgstr "Bestanden die geupload zijn naar Lufi worden voor de upload versleuteld: msgid "The following email addresses are not valid: %1" msgstr "Volgende email adressen zijn niet geldig: %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 "De link is gekopieerd naar je klembord" @@ -378,7 +383,7 @@ msgstr "Email is verzonden." 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 +#: lib/Lufi/Controller/Files.pm:182 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." @@ -386,26 +391,26 @@ msgstr "Server kon een deel van het bestand niet vinden. Neem contact op met beh 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 +#: themes/default/templates/index.html.ep:102 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 +#: lib/Lufi/Controller/Files.pm:361 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 +#: lib/Lufi/Controller/Files.pm:351 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 +#: lib/Lufi/Controller/Files.pm:371 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 +#: themes/default/templates/layouts/default.html.ep:61 themes/default/templates/layouts/default.html.ep:73 msgid "Upload files" msgstr "Upload bestanden" @@ -413,11 +418,11 @@ msgstr "Upload bestanden" msgid "Uploaded at" msgstr "Geupload op" -#: themes/default/templates/index.html.ep:77 +#: themes/default/templates/index.html.ep:85 msgid "Uploaded files" msgstr "Geuploade bestanden" -#: themes/default/templates/index.html.ep:106 +#: themes/default/templates/index.html.ep:114 msgid "Websocket communication error" msgstr "Websocket communicatie fout" @@ -437,15 +442,15 @@ msgstr "Je kan een lijst van je eigen bestanden zien door op \"Mijn bestanden\" 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 +#: 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 "Je hebt geen sleutel in je URL. Je kan het bestand niet decrypten. Download geannuleerd." -#: 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 "Je verlaat deze pagina. Download zal geannuleerd worden. Weet je het zeker?" -#: 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 "Je verlaat deze pagina. Upload zal geannuleerd worden. Weet je het zeker? " @@ -458,10 +463,46 @@ msgid "You must give email addresses." msgstr "Je moet een mail adres opgeven." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:55 +#: lib/Lufi/Controller/Files.pm:57 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "Je bestand is te groot: %1 (max: %2)" +#: lib/Lufi/Controller/Files.pm:276 +msgid "Your password is not valid. Please refresh the page to retry." +msgstr "" + +#: +msgid "__Content-Transfer-Encoding" +msgstr "8bit" + +#: +msgid "__Content-Type" +msgstr "text/plain; charset=utf8" + +#: +msgid "__Language-Team" +msgstr "LANGUAGE " + +#: +msgid "__Last-Translator" +msgstr "FULL NAME " + +#: +msgid "__MIME-Version" +msgstr "1.0" + +#: +msgid "__PO-Revision-Date" +msgstr "YEAR-MO-DA HO:MI+ZONE" + +#: +msgid "__POT-Creation-Date" +msgstr "YEAR-MO-DA HO:MI+ZONE" + +#: +msgid "__Project-Id-Version" +msgstr "PACKAGE VERSION" + #. (format_bytes($keys[$i]) #: themes/default/templates/delays.html.ep:20 msgid "between %1 and %2, the file will be kept %3 day(s)." @@ -490,6 +531,6 @@ msgstr "voor %1 en meer, bestand zal voor altijd bewaard worden." msgid "no time limit" msgstr "geen tijdslimiet" -#: themes/default/templates/index.html.ep:70 +#: themes/default/templates/index.html.ep:78 msgid "or" msgstr "of" diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index 62c3c83..f787473 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -43,7 +43,7 @@ msgstr "Un mercé amb una foto de caton sus {size}) -#: lib/Lufi/Controller/Files.pm:69 +#: lib/Lufi/Controller/Files.pm:70 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:112 +#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Pas cap de relambi d’expiracion" @@ -331,7 +335,7 @@ msgstr "Mandadís del fragment XX1 sus XX2. Pacientatz, la barra de progression msgid "Share your files in total privacy on %1" msgstr "Partejatz vòstres fichièrs en tota confidencialitat sus %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 +#: themes/default/templates/layouts/default.html.ep:64 themes/default/templates/layouts/default.html.ep:76 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 msgid "Signin" msgstr "Connexion" @@ -343,7 +347,7 @@ msgstr "" 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:43 +#: lib/Lufi/Controller/Files.pm:44 msgid "Sorry, uploading is disabled." msgstr "O planhèm, la foncion per mandar de fichièr es desactivada." @@ -351,7 +355,7 @@ msgstr "O planhèm, la foncion per mandar de fichièr es desactivada." 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’administrator pòt pas que veire lo nom del fichièr, sa talha e son mimetype (Quina mena de fichièr es : vidèo, tèxte, etc.)." -#: themes/default/templates/files.html.ep:43 +#: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." msgstr "Las donadas son ben estadas importadas." @@ -363,7 +367,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:387 +#: lib/Lufi/Controller/Files.pm:388 msgid "The file has already been deleted" msgstr "Lo fichièr es ja estat suprimit" @@ -388,7 +392,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:181 +#: lib/Lufi/Controller/Files.pm:182 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." @@ -401,21 +405,21 @@ 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:360 +#: lib/Lufi/Controller/Files.pm:361 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:350 +#: lib/Lufi/Controller/Files.pm:351 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:370 +#: lib/Lufi/Controller/Files.pm:371 msgid "Unable to get counter for %1. You are not authenticated." msgstr "Impossible de recuperar lo comptador per %1. Sètz pas connectat·ada." -#: themes/default/templates/layouts/default.html.ep:35 themes/default/templates/layouts/default.html.ep:47 +#: themes/default/templates/layouts/default.html.ep:61 themes/default/templates/layouts/default.html.ep:73 msgid "Upload files" msgstr "Mandar de fichièrs" @@ -468,11 +472,11 @@ msgid "You must give email addresses." msgstr "Vos cal donar d’adreças." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:56 +#: lib/Lufi/Controller/Files.pm:57 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 +#: lib/Lufi/Controller/Files.pm:276 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/pt.po b/themes/default/lib/Lufi/I18N/pt.po index e449e96..35d0d0d 100644 --- a/themes/default/lib/Lufi/I18N/pt.po +++ b/themes/default/lib/Lufi/I18N/pt.po @@ -40,20 +40,24 @@ msgstr " :" 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 +#: themes/default/templates/render.html.ep:42 msgid "Abort" msgstr "Interromper" -#: themes/default/templates/layouts/default.html.ep:40 themes/default/templates/layouts/default.html.ep:52 +#: themes/default/templates/layouts/default.html.ep:66 themes/default/templates/layouts/default.html.ep:78 msgid "About" msgstr "Sobre" +#: 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 "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 +#: themes/default/templates/render.html.ep:52 msgid "Asking for file part XX1 of %1" msgstr "Pedido de recuperação de um fragmento do ficheiro XX1 de %1" @@ -65,11 +69,11 @@ msgstr "Voltar à página inicial" msgid "Bad CSRF token!" msgstr "Símbolo errado 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 "Clique aqui para atualizar a página e começar o download." -#: themes/default/templates/index.html.ep:72 +#: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" msgstr "Clique para abrir o navegador de ficheiros" @@ -81,23 +85,23 @@ msgstr "Fechar" msgid "Comma-separated email addresses" msgstr "Os e-mails devem ser separados por vírgulas" -#: themes/default/templates/index.html.ep:92 +#: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" msgstr "Copiar todos os links para a área de transferência" -#: themes/default/templates/index.html.ep:95 +#: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" msgstr "Copiar para a área de transferência" -#: lib/Lufi/Controller/Files.pm:396 +#: lib/Lufi/Controller/Files.pm:423 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 +#: lib/Lufi/Controller/Files.pm:407 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 +#: lib/Lufi/Controller/Files.pm:323 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?" @@ -109,7 +113,7 @@ msgstr "Contador" 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 +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Eliminar o link" @@ -117,15 +121,15 @@ msgstr "Eliminar o link" 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 +#: 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 interrompido." -#: 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 para o download" @@ -133,7 +137,11 @@ msgstr "Link para o 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 "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 +#: themes/default/templates/index.html.ep:77 +msgid "Drop files here" +msgstr "" + +#: msgid "Drop files here (max. 4 Gb/file)" msgstr "Deslize os ficheiros aqui (max. 4 Gb/ficheiro)" @@ -149,23 +157,23 @@ msgstr "Assunto do e-mail" msgid "Emails" msgstr "E-mails" -#: themes/default/templates/index.html.ep:99 +#: themes/default/templates/index.html.ep:107 msgid "Encrypting part XX1 of XX2" msgstr "Codificação do fragmento XX1 de XX2" -#: lib/Lufi/Controller/Files.pm:216 +#: lib/Lufi/Controller/Files.pm:230 msgid "Error: the file existed but was deleted." msgstr "Erro: o ficheiro existia mas foi apagado." -#: lib/Lufi/Controller/Files.pm:266 +#: lib/Lufi/Controller/Files.pm:292 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 +#: lib/Lufi/Controller/Files.pm:302 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 +#: themes/default/templates/index.html.ep:108 msgid "Expiration:" msgstr "Expiração:" @@ -177,7 +185,7 @@ msgstr "Expira no" msgid "Export localStorage data" msgstr "Exportar os dados localStorage" -#: lib/Lufi/Controller/Files.pm:364 +#: lib/Lufi/Controller/Files.pm:391 msgid "File deleted" msgstr "Ficheiro apagado" @@ -185,7 +193,7 @@ msgstr "Ficheiro apagado" msgid "File name" msgstr "Nome do ficheiro" -#: themes/default/templates/render.html.ep:43 +#: themes/default/templates/render.html.ep:51 msgid "Get the file" msgstr "Recuperar o ficheiro" @@ -201,11 +209,11 @@ msgstr "Olá,\\n\\nAqui estão alguns ficheiros que gostaria de partilhar contig msgid "Here's some files" msgstr "Aqui estão alguns ficheiros" -#: 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 "Clique no Enter e depois Ctrl+C para copiar todos os links de 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 "Clique no Enter e depois Ctrl+C para copiar o link de download" @@ -213,10 +221,14 @@ msgstr "Clique no Enter e depois Ctrl+C para copiar o link de download" 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:17 +msgid "How to install the software on my server?" +msgstr "" + #: themes/default/templates/about.html.ep:12 msgid "How to report an illegal file?" msgstr "Como assinalar um ficheiro ilegal?" @@ -241,7 +253,7 @@ msgstr "Importante: mais informações sobre os prazos" msgid "Information about delays" msgstr "Informação sobre os prazos" -#: 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 "Parece que a chave do seu URL está incorreta.Por favor, verifique o seu URL." @@ -253,7 +265,7 @@ msgstr "Javascript está desativado. Lufi não funcionará." msgid "Login" msgstr "Utilizador" -#: themes/default/templates/layouts/default.html.ep:42 themes/default/templates/layouts/default.html.ep:54 +#: themes/default/templates/layouts/default.html.ep:68 themes/default/templates/layouts/default.html.ep:80 msgid "Logout" msgstr "Encerrar sessão" @@ -261,16 +273,20 @@ msgstr "Encerrar sessão" 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 +#: themes/default/templates/files.html.ep:31 +msgid "Mail" +msgstr "" + +#: themes/default/templates/files.html.ep:3 themes/default/templates/layouts/default.html.ep:62 themes/default/templates/layouts/default.html.ep:74 msgid "My files" msgstr "Meus ficheiros" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:68 +#: lib/Lufi/Controller/Files.pm:70 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 +#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Não tem prazo de expiração" @@ -278,7 +294,7 @@ msgstr "Não tem prazo de expiração" 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 +#: themes/default/templates/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" msgstr "Palavra-passe" @@ -287,10 +303,14 @@ msgstr "Palavra-passe" msgid "Please contact the administrator: %1" msgstr "Contacte o administrador: %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 "Por favor aguarde durante a recuperação do seu ficheiro. Primeiro devemos recuperar e descodificar todos os fragmentos e depois poderá descarregar o ficheiro." +#: lib/Lufi.pm:300 +msgid "Please, check your credentials: unable to authenticate." +msgstr "" + #: themes/default/templates/about.html.ep:5 msgid "Privacy" msgstr "Privacidade" @@ -303,7 +323,7 @@ msgstr "Apagar do localStorage os ficheiros expirados" 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 +#: themes/default/templates/index.html.ep:111 msgid "Send all links by email" msgstr "Enviar todos os links por e-mail" @@ -315,7 +335,7 @@ msgstr "Enviar com este servidor" msgid "Send with your own mail software" msgstr "Enviar com o seu e-mail pessoal" -#: 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 "Envio do fragmento XX1 de XX2. Por favor aguarde, a barra de progressão pode levar algum tempo antes de avançar." @@ -324,15 +344,19 @@ msgstr "Envio do fragmento XX1 de XX2. Por favor aguarde, a barra de progressão 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 +#: themes/default/templates/layouts/default.html.ep:64 themes/default/templates/layouts/default.html.ep:76 themes/default/templates/login.html.ep:26 themes/default/templates/logout.html.ep:8 msgid "Signin" msgstr "Conexão" +#: 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 "Desculpe, o envio do ficheiro está atualmente desativado. Tente mais tarde." -#: lib/Lufi/Controller/Files.pm:42 +#: lib/Lufi/Controller/Files.pm:44 msgid "Sorry, uploading is disabled." msgstr "Desculpe, o envio do ficheiro está desativado." @@ -340,7 +364,7 @@ msgstr "Desculpe, o envio do ficheiro está desativado." 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 +#: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." msgstr "Os dados foram importados com sucesso." @@ -352,7 +376,7 @@ msgstr "A mensagem do e-mail não pode estar vazia." 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 +#: lib/Lufi/Controller/Files.pm:388 msgid "The file has already been deleted" msgstr "O ficheiro já foi apagado" @@ -365,7 +389,7 @@ msgstr "Os ficheiros enviados no Lufi são codificados antes de serem enviados a 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 +#: themes/default/templates/index.html.ep:101 msgid "The link(s) has been copied to your clipboard" msgstr "O(s) link(s) foi/foram copiados para a área de transferência" @@ -377,7 +401,7 @@ msgstr "O e-mail foi enviado." 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 +#: lib/Lufi/Controller/Files.pm:182 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." @@ -385,26 +409,26 @@ msgstr "O servidor foi incapaz de encontrar o registo do ficheiro no qual devia- 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 +#: themes/default/templates/index.html.ep:102 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 +#: lib/Lufi/Controller/Files.pm:361 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 +#: lib/Lufi/Controller/Files.pm:351 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 +#: lib/Lufi/Controller/Files.pm:371 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 +#: themes/default/templates/layouts/default.html.ep:61 themes/default/templates/layouts/default.html.ep:73 msgid "Upload files" msgstr "Enviar os ficheiros" @@ -412,11 +436,11 @@ msgstr "Enviar os ficheiros" msgid "Uploaded at" msgstr "Enviar a" -#: themes/default/templates/index.html.ep:77 +#: themes/default/templates/index.html.ep:85 msgid "Uploaded files" msgstr "Ficheiros enviados" -#: themes/default/templates/index.html.ep:106 +#: themes/default/templates/index.html.ep:114 msgid "Websocket communication error" msgstr "Erro de comunicação com WebSocket" @@ -424,10 +448,14 @@ msgstr "Erro de comunicação com WebSocket" 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:14 +msgid "Who wrote this software?" +msgstr "" + #: 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." @@ -436,15 +464,15 @@ msgstr "Pode ver a lista dos seus ficheiros clicando no link « Meus ficheiros 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 +#: 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 "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 +#: themes/default/templates/render.html.ep:50 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 +#: themes/default/templates/index.html.ep:99 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?" @@ -457,10 +485,14 @@ msgid "You must give email addresses." msgstr "Deve escrever os e-mails." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:55 +#: lib/Lufi/Controller/Files.pm:57 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)" +#: lib/Lufi/Controller/Files.pm:276 +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)." @@ -489,6 +521,6 @@ msgstr "para %1 e mais, o ficheiro será conservado por um tempo indeterminado." msgid "no time limit" msgstr "Não tem limite de expiração" -#: themes/default/templates/index.html.ep:70 +#: themes/default/templates/index.html.ep:78 msgid "or" msgstr "ou" From 1c2cee539d46e01b597770b8724598fe74dbb7ba Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 17 Jul 2017 22:23:38 +0200 Subject: [PATCH 32/53] Add instance statistics at /fullstats --- lib/Lufi.pm | 5 +++++ lib/Lufi/Controller/Misc.pm | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 lib/Lufi/Controller/Misc.pm diff --git a/lib/Lufi.pm b/lib/Lufi.pm index dd0e878..ffce232 100755 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -319,6 +319,11 @@ sub startup { shift->render(template => 'about'); })->name('about'); + # Get instance stats + $r->get('/fullstats') + ->to('Misc#fullstats') + ->name('fullstats'); + # Get a file $r->get('/r/:short')-> to('Files#r')-> diff --git a/lib/Lufi/Controller/Misc.pm b/lib/Lufi/Controller/Misc.pm new file mode 100644 index 0000000..a688559 --- /dev/null +++ b/lib/Lufi/Controller/Misc.pm @@ -0,0 +1,26 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lufi::Controller::Misc; +use Mojo::Base 'Mojolicious::Controller'; +use Mojo::File; +use LufiDB; +use Lufi::File; +use Lufi::Slice; + +sub fullstats { + my $c = shift; + + my $files = LufiDB::Files->count('WHERE created_at IS NOT null AND deleted = 0'); + my $deleted = LufiDB::Files->count('WHERE created_at IS NOT null AND deleted = 1'); + my $empty = LufiDB::Files->count('WHERE created_at IS null'); + + return $c->render( + json => { + files => $files, + deleted => $deleted, + empty => $empty, + timestamp => time, + } + ); +} + +1; From abebf608617812b3dee3119b57f484a4bba06adc Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 19 Jul 2017 20:26:26 +0200 Subject: [PATCH 33/53] respond_to correction --- lib/Lufi/Controller/Files.pm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/Lufi/Controller/Files.pm b/lib/Lufi/Controller/Files.pm index db3f723..7a783a8 100644 --- a/lib/Lufi/Controller/Files.pm +++ b/lib/Lufi/Controller/Files.pm @@ -392,8 +392,10 @@ sub delete { } return $c->respond_to( json => { - success => true, - msg => $msg + json => { + success => true, + msg => $msg + } }, any => sub { $c->render( @@ -407,8 +409,10 @@ sub delete { my $msg = $c->l('Could not find the file. Are you sure of the URL and the token?'); return $c->respond_to( json => { - success => false, - msg => $msg + json => { + success => false, + msg => $msg + } }, any => sub { $c->render( @@ -423,8 +427,10 @@ sub delete { my $msg = $c->l('Could not delete the file. You are not authenticated.'); return $c->respond_to( json => { - success => false, - msg => $msg + json => { + success => false, + msg => $msg + } }, any => sub { $c->render( From 4c41cb6375e1cb6c57afc088bfaa48f7814f8d3d Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 19 Jul 2017 21:34:07 +0200 Subject: [PATCH 34/53] Add lufi-cli mention to the README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 076e6a3..d66722a 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ However please note that some metadata are sent unencrypted: * its size * its mimetype +## Client + +There is the web interface, but you can use a CLI client too! Have a look at or install it directly with `sudo npm install -g lufi-cli`. + ## Internationalization Lufi comes with English and French languages. It will choose the language to display from the browser's settings. From 5684cbe17f5707c52de505c99ea2da3aeba1de2f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 20 Jul 2017 18:01:47 +0200 Subject: [PATCH 35/53] Put helpers in a plugin --- lib/Lufi.pm | 111 +----------------------------------- lib/Lufi/Plugin/Helpers.pm | 114 +++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 110 deletions(-) create mode 100644 lib/Lufi/Plugin/Helpers.pm diff --git a/lib/Lufi.pm b/lib/Lufi.pm index ffce232..e48d4ce 100755 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -2,7 +2,6 @@ package Lufi; use Mojo::Base 'Mojolicious'; use LufiDB; -use Data::Entropy qw(entropy_source); use Net::LDAP; use Apache::Htpasswd; @@ -139,105 +138,7 @@ sub startup { $self->secrets($self->config('secrets')); # Helpers - $self->helper( - provisioning => sub { - my $c = shift; - - # Create some short patterns for provisioning - if (LufiDB::Files->count('WHERE created_at IS NULL') < $c->config('provisioning')) { - for (my $i = 0; $i < $c->config('provis_step'); $i++) { - if (LufiDB->begin) { - my $short; - do { - $short= $c->shortener($c->config('length')); - } while (LufiDB::Files->count('WHERE short = ?', $short)); - - LufiDB::Files->create( - short => $short - ); - LufiDB->commit; - } - } - } - } - ); - - $self->helper( - get_empty => sub { - my $c = shift; - - my @records = LufiDB::Files->select('WHERE created_at IS NULL LIMIT 1'); - return $records[0]; - } - ); - - $self->helper( - shortener => sub { - my $c = shift; - my $length = shift; - - my @chars = ('a'..'z','A'..'Z','0'..'9', '-', '_'); - my $result = ''; - foreach (1..$length) { - $result .= $chars[entropy_source->get_int(scalar(@chars))]; - } - return $result; - } - ); - - $self->helper( - ip => sub { - my $c = shift; - my $proxy = $c->req->headers->header('X-Forwarded-For'); - my $ip = ($proxy) ? $proxy : $c->tx->remote_address; - my $remote_port = (defined($c->req->headers->header('X-Remote-Port'))) ? $c->req->headers->header('X-Remote-Port') : $c->tx->remote_port; - - return "$ip remote port:$remote_port"; - } - ); - - $self->helper( - default_delay => sub { - my $c = shift; - - return $c->config('default_delay') if ($c->config('default_delay') >= 0); - - warn "default_delay set to a negative value. Default to 0."; - return 0; - } - ); - - $self->helper( - max_delay => sub { - my $c = shift; - - return $c->config('max_delay') if ($c->config('max_delay') >= 0); - - warn "max_delay set to a negative value. Default to 0."; - return 0; - } - ); - - $self->helper( - is_selected => sub { - my $c = shift; - my $num = shift; - - return ($num == $c->max_delay) ? 'selected="selected"' : '' if ($c->max_delay && !$c->default_delay); - return ($num == $c->default_delay) ? 'selected="selected"' : ''; - } - ); - - $self->helper( - stop_upload => sub { - my $c = shift; - - if (-f 'stop-upload' || -f 'stop-upload.manual') { - return 1; - } - return 0; - } - ); + $self->plugin('Lufi::Plugin::Helpers'); # Hooks $self->hook( after_dispatch => sub { @@ -252,16 +153,6 @@ 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/Plugin/Helpers.pm b/lib/Lufi/Plugin/Helpers.pm new file mode 100644 index 0000000..cda1381 --- /dev/null +++ b/lib/Lufi/Plugin/Helpers.pm @@ -0,0 +1,114 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lufi::Plugin::Helpers; +use Mojo::Base 'Mojolicious::Plugin'; +use Data::Entropy qw(entropy_source); +use LufiDB; + +sub register { + my ($self, $app) = @_; + + # 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;'); + } + + $app->helper(provisioning => \&_provisioning); + $app->helper(get_empty => \&_get_empty); + $app->helper(shortener => \&_shortener); + $app->helper(ip => \&_ip); + $app->helper(default_delay => \&_default_delay); + $app->helper(max_delay => \&_max_delay); + $app->helper(is_selected => \&_is_selected); + $app->helper(stop_upload => \&_stop_upload); +} + +sub _provisioning { + my $c = shift; + + # Create some short patterns for provisioning + if (LufiDB::Files->count('WHERE created_at IS NULL') < $c->config('provisioning')) { + for (my $i = 0; $i < $c->config('provis_step'); $i++) { + if (LufiDB->begin) { + my $short; + do { + $short= $c->shortener($c->config('length')); + } while (LufiDB::Files->count('WHERE short = ?', $short)); + + LufiDB::Files->create( + short => $short + ); + LufiDB->commit; + } + } + } +} + +sub _get_empty { + my $c = shift; + + my @records = LufiDB::Files->select('WHERE created_at IS NULL LIMIT 1'); + return $records[0]; +} + +sub _shortener { + my $c = shift; + my $length = shift; + + my @chars = ('a'..'z','A'..'Z','0'..'9', '-', '_'); + my $result = ''; + foreach (1..$length) { + $result .= $chars[entropy_source->get_int(scalar(@chars))]; + } + return $result; +} + +sub _ip { + my $c = shift; + my $proxy = $c->req->headers->header('X-Forwarded-For'); + my $ip = ($proxy) ? $proxy : $c->tx->remote_address; + my $remote_port = (defined($c->req->headers->header('X-Remote-Port'))) ? $c->req->headers->header('X-Remote-Port') : $c->tx->remote_port; + + return "$ip remote port:$remote_port"; +} + +sub _default_delay { + my $c = shift; + + return $c->config('default_delay') if ($c->config('default_delay') >= 0); + + warn "default_delay set to a negative value. Default to 0."; + return 0; +} + +sub _max_delay { + my $c = shift; + + return $c->config('max_delay') if ($c->config('max_delay') >= 0); + + warn "max_delay set to a negative value. Default to 0."; + return 0; +} + +sub _is_selected { + my $c = shift; + my $num = shift; + + return ($num == $c->max_delay) ? 'selected="selected"' : '' if ($c->max_delay && !$c->default_delay); + return ($num == $c->default_delay) ? 'selected="selected"' : ''; +} + +sub _stop_upload { + my $c = shift; + + if (-f 'stop-upload' || -f 'stop-upload.manual') { + return 1; + } + return 0; +} + +1; From d909b8ad7094c4504a28142d6599dcf9ccc1060f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 22 Jul 2017 18:56:13 +0200 Subject: [PATCH 36/53] Add DB abstraction layer --- CHANGELOG | 14 ++ Makefile | 3 + cpanfile | 2 + cpanfile.snapshot | 155 ++++++++++++ lib/Lufi.pm | 2 +- lib/Lufi/Command/cron/cleanbdd.pm | 19 +- lib/Lufi/Command/cron/cleanfiles.pm | 49 ++-- lib/Lufi/Command/cron/watch.pm | 25 +- lib/Lufi/Controller/Files.pm | 124 ++++----- lib/Lufi/Controller/Misc.pm | 14 +- lib/Lufi/DB/File.pm | 291 ++++++++++++++++++++++ lib/Lufi/DB/File/SQLite.pm | 192 ++++++++++++++ lib/{LufiDB.pm => Lufi/DB/SQLite.pm} | 13 +- lib/Lufi/DB/Slice.pm | 104 ++++++++ lib/Lufi/{Slice.pm => DB/Slice/SQLite.pm} | 21 +- lib/Lufi/File.pm | 103 -------- lib/Lufi/Plugin/Helpers.pm | 71 ++++-- lufi.conf.template | 18 +- themes/default/lib/Lufi/I18N/ca.po | 30 +-- themes/default/lib/Lufi/I18N/en.po | 30 +-- themes/default/lib/Lufi/I18N/fr.po | 30 +-- themes/default/lib/Lufi/I18N/it.po | 30 +-- themes/default/lib/Lufi/I18N/nl.po | 30 +-- themes/default/lib/Lufi/I18N/oc.po | 30 +-- themes/default/lib/Lufi/I18N/pt.po | 30 +-- themes/default/public/js/lufi-down.js | 4 + utilities/migrations_pg.sql | 27 ++ 27 files changed, 1110 insertions(+), 351 deletions(-) create mode 100644 CHANGELOG mode change 100755 => 100644 lib/Lufi.pm create mode 100644 lib/Lufi/DB/File.pm create mode 100644 lib/Lufi/DB/File/SQLite.pm rename lib/{LufiDB.pm => Lufi/DB/SQLite.pm} (81%) create mode 100644 lib/Lufi/DB/Slice.pm rename lib/Lufi/{Slice.pm => DB/Slice/SQLite.pm} (64%) delete mode 100644 lib/Lufi/File.pm create mode 100644 utilities/migrations_pg.sql diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..381bb22 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,14 @@ +Revision history for Lufi + +0.02 2017-? + - Database abstraction layer + - IE 11 and Edge support + - Fix encoding error (#83) + - Htpassword authentication support + - Ability to add a password to a file + +0.01 2017-01-09 + - Upload files + - Download files + - Preview files in browser depending on mimetype (images and videos) + - LDAP authentication support diff --git a/Makefile b/Makefile index aedffd9..d56ddf4 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,9 @@ locales: $(XGETTEXT) $(EXTRACTDIR) -o $(PT) 2>/dev/null $(XGETTEXT) $(EXTRACTDIR) -o $(NL) 2>/dev/null +podcheck: + podchecker lib/Lufi/DB/File.pm lib/Lufi/DB/Slice.pm + test: $(CARTON) $(REAL_LUFI) test diff --git a/cpanfile b/cpanfile index 421f77b..ed14502 100644 --- a/cpanfile +++ b/cpanfile @@ -1,9 +1,11 @@ requires 'Mojolicious', '>= 7.31'; requires 'ORLite'; requires 'Mojolicious::Plugin::DebugDumperHelper'; +requires 'Mojolicious::Plugin::PgURLHelper'; requires 'Mojolicious::Plugin::I18N'; requires 'Mojolicious::Plugin::Mail'; requires 'Mojolicious::Plugin::Authentication'; +requires 'Mojo::Pg'; requires 'EV'; requires 'Filesys::DiskUsage'; requires 'Switch'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 030f516..19226ce 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -51,6 +51,26 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + Class-Method-Modifiers-2.12 + pathname: E/ET/ETHER/Class-Method-Modifiers-2.12.tar.gz + provides: + Class::Method::Modifiers 2.12 + requirements: + B 0 + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 0 + base 0 + perl 5.006 + strict 0 + warnings 0 + Clone-0.39 + pathname: G/GA/GARU/Clone-0.39.tar.gz + provides: + Clone 0.39 + requirements: + ExtUtils::MakeMaker 0 + Test::More 0 Convert-ASN1-0.27 pathname: G/GB/GBARR/Convert-ASN1-0.27.tar.gz provides: @@ -85,6 +105,17 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.30 Test::Fatal 0 Test::More 0 + DBD-Pg-3.6.2 + pathname: T/TU/TURNSTEP/DBD-Pg-3.6.2.tar.gz + provides: + Bundle::DBD::Pg v3.6.2 + DBD::Pg v3.6.2 + requirements: + DBI 1.614 + ExtUtils::MakeMaker 6.11 + Test::More 0.88 + Time::HiRes 0 + version 0 DBD-SQLite-1.54 pathname: I/IS/ISHIGAKI/DBD-SQLite-1.54.tar.gz provides: @@ -241,6 +272,14 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + Devel-GlobalDestruction-0.14 + pathname: H/HA/HAARG/Devel-GlobalDestruction-0.14.tar.gz + provides: + Devel::GlobalDestruction 0.14 + requirements: + ExtUtils::MakeMaker 0 + Sub::Exporter::Progressive 0.001011 + perl 5.006 Digest-HMAC-1.03 pathname: G/GA/GAAS/Digest-HMAC-1.03.tar.gz provides: @@ -454,6 +493,14 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 HTTP::Headers 6 perl 5.008001 + Hash-Merge-0.200 + pathname: R/RE/REHSACK/Hash-Merge-0.200.tar.gz + provides: + Hash::Merge 0.200 + requirements: + Clone 0 + ExtUtils::MakeMaker 0 + perl 5.008001 IO-HTML-1.001 pathname: C/CJ/CJM/IO-HTML-1.001.tar.gz provides: @@ -571,6 +618,13 @@ DISTRIBUTIONS File::Spec 0 List::Util 0 Test::More 0.47 + MRO-Compat-0.13 + pathname: H/HA/HAARG/MRO-Compat-0.13.tar.gz + provides: + MRO::Compat 0.13 + requirements: + ExtUtils::MakeMaker 0 + perl 5.006 MailTools-2.18 pathname: M/MA/MARKOV/MailTools-2.18.tar.gz provides: @@ -654,6 +708,31 @@ DISTRIBUTIONS Text::ParseWords 0 perl 5.006001 version 0.87 + Module-Runtime-0.015 + pathname: Z/ZE/ZEFRAM/Module-Runtime-0.015.tar.gz + provides: + Module::Runtime 0.015 + requirements: + Module::Build 0 + Test::More 0.41 + perl 5.006 + strict 0 + warnings 0 + Mojo-Pg-4.0 + pathname: S/SR/SRI/Mojo-Pg-4.0.tar.gz + provides: + Mojo::Pg 4.0 + Mojo::Pg::Database undef + Mojo::Pg::Migrations undef + Mojo::Pg::PubSub undef + Mojo::Pg::Results undef + Mojo::Pg::Transaction undef + requirements: + DBD::Pg 3.005001 + ExtUtils::MakeMaker 0 + Mojolicious 7.32 + SQL::Abstract 1.81 + perl 5.010001 Mojolicious-7.36 pathname: S/SR/SRI/Mojolicious-7.36.tar.gz provides: @@ -813,6 +892,43 @@ DISTRIBUTIONS Mojolicious 5 Test::More 0 perl 5.001001 + Mojolicious-Plugin-PgURLHelper-0.03 + pathname: L/LD/LDIDRY/Mojolicious-Plugin-PgURLHelper-0.03.tar.gz + provides: + Mojolicious::Plugin::PgURLHelper 0.03 + requirements: + ExtUtils::MakeMaker 0 + Mojolicious 7.23 + Moo-2.003002 + pathname: H/HA/HAARG/Moo-2.003002.tar.gz + provides: + Method::Generate::Accessor undef + Method::Generate::BuildAll undef + Method::Generate::Constructor undef + Method::Generate::DemolishAll undef + Moo 2.003002 + Moo::HandleMoose undef + Moo::HandleMoose::FakeConstructor undef + Moo::HandleMoose::FakeMetaClass undef + Moo::HandleMoose::_TypeMap undef + Moo::Object undef + Moo::Role 2.003002 + Moo::_Utils undef + Moo::_mro undef + Moo::_strictures undef + Moo::sification undef + oo undef + requirements: + Class::Method::Modifiers 1.1 + Devel::GlobalDestruction 0.11 + Exporter 5.57 + ExtUtils::MakeMaker 0 + Module::Runtime 0.014 + Role::Tiny 2.000004 + Scalar::Util 0 + Sub::Defer 2.003001 + Sub::Quote 2.003001 + perl 5.006 Mozilla-CA-20160104 pathname: A/AB/ABH/Mozilla-CA-20160104.tar.gz provides: @@ -909,6 +1025,45 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.30 File::Spec 0 strict 0 + Role-Tiny-2.000005 + pathname: H/HA/HAARG/Role-Tiny-2.000005.tar.gz + provides: + Role::Tiny 2.000005 + Role::Tiny::With 2.000005 + requirements: + Exporter 5.57 + perl 5.006 + SQL-Abstract-1.84 + pathname: I/IL/ILMARI/SQL-Abstract-1.84.tar.gz + provides: + SQL::Abstract 1.84 + SQL::Abstract::Test undef + SQL::Abstract::Tree undef + requirements: + Exporter 5.57 + ExtUtils::MakeMaker 0 + Hash::Merge 0.12 + List::Util 0 + MRO::Compat 0.12 + Moo 2.000001 + Scalar::Util 0 + Sub::Quote 2.000001 + Text::Balanced 2.00 + Sub-Exporter-Progressive-0.001013 + pathname: F/FR/FREW/Sub-Exporter-Progressive-0.001013.tar.gz + provides: + Sub::Exporter::Progressive 0.001013 + requirements: + ExtUtils::MakeMaker 0 + Sub-Quote-2.004000 + pathname: H/HA/HAARG/Sub-Quote-2.004000.tar.gz + provides: + Sub::Defer 2.004000 + Sub::Quote 2.004000 + requirements: + ExtUtils::MakeMaker 0 + Scalar::Util 0 + perl 5.006 Sub-Uplevel-0.2800 pathname: D/DA/DAGOLDEN/Sub-Uplevel-0.2800.tar.gz provides: diff --git a/lib/Lufi.pm b/lib/Lufi.pm old mode 100755 new mode 100644 index e48d4ce..e703ec4 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -1,7 +1,6 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lufi; use Mojo::Base 'Mojolicious'; -use LufiDB; use Net::LDAP; use Apache::Htpasswd; @@ -29,6 +28,7 @@ sub startup { upload_dir => 'files', session_duration => 3600, allow_pwd_on_files => 0, + dbtype => 'sqlite', } }); diff --git a/lib/Lufi/Command/cron/cleanbdd.pm b/lib/Lufi/Command/cron/cleanbdd.pm index a6c32ca..4a3e326 100644 --- a/lib/Lufi/Command/cron/cleanbdd.pm +++ b/lib/Lufi/Command/cron/cleanbdd.pm @@ -1,9 +1,8 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lufi::Command::cron::cleanbdd; use Mojo::Base 'Mojolicious::Command'; -use LufiDB; +use Lufi::DB::File; use FindBin qw($Bin); -use File::Spec qw(catfile); has description => 'Delete IP addresses from database after configured delay.'; has usage => sub { shift->extract_usage }; @@ -11,20 +10,24 @@ has usage => sub { shift->extract_usage }; sub run { my $c = shift; + my $cfile = Mojo::File->new($Bin, '..' , 'lufi.conf'); + if (defined $ENV{MOJO_CONFIG}) { + $cfile = Mojo::File->new($ENV{MOJO_CONFIG}); + unless (-e $cfile->to_abs) { + $cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG}); + } + } my $config = $c->app->plugin('Config', { - file => File::Spec->catfile($Bin, '..' ,'lufi.conf'), + file => $cfile, default => { + dbtype => 'sqlite', keep_ip_during => 365, } }); my $separation = time() - $config->{keep_ip_during} * 86400; - LufiDB->do( - 'UPDATE files SET created_by = NULL WHERE created_by IS NOT NULL AND created_at < ?', - {}, - $separation - ); + Lufi::DB::File->new(app => $c->app)->delete_creator_before($separation); } =encoding utf8 diff --git a/lib/Lufi/Command/cron/cleanfiles.pm b/lib/Lufi/Command/cron/cleanfiles.pm index 912d715..c9d0ba0 100644 --- a/lib/Lufi/Command/cron/cleanfiles.pm +++ b/lib/Lufi/Command/cron/cleanfiles.pm @@ -1,10 +1,8 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lufi::Command::cron::cleanfiles; use Mojo::Base 'Mojolicious::Command'; -use LufiDB; -use Lufi::File; +use Lufi::DB::File; use FindBin qw($Bin); -use File::Spec qw(catfile); has description => 'Delete expired files.'; has usage => sub { shift->extract_usage }; @@ -12,28 +10,39 @@ has usage => sub { shift->extract_usage }; sub run { my $c = shift; + my $cfile = Mojo::File->new($Bin, '..' , 'lufi.conf'); + if (defined $ENV{MOJO_CONFIG}) { + $cfile = Mojo::File->new($ENV{MOJO_CONFIG}); + unless (-e $cfile->to_abs) { + $cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG}); + } + } + my $config = $c->app->plugin('Config', { + file => $cfile, + default => { + dbtype => 'sqlite', + } + }); + my $time = time(); - ## Select only files expired since two days, to be sure that nobody is still downloading it - my @files = LufiDB::Files->select('WHERE deleted = 0 AND ((delete_at_day + 2) * 86400) < (? - created_at) AND delete_at_day != 0', $time); - - for my $file (@files) { - my $f = Lufi::File->new(record => $file); - $file->delete; - } - - my $config = $c->app->plugin('Config', { - file => File::Spec->catfile($Bin, '..' ,'lufi.conf'), - }); + my $ldfile = Lufi::DB::File->new(app => $c->app); + $ldfile->get_expired($time)->each( + sub { + my ($f, $num) = @_; + $f->delete; + } + ); if (defined($config->{delete_no_longer_viewed_files}) && $config->{delete_no_longer_viewed_files} > 0) { $time = time() - $config->{delete_no_longer_viewed_files} * 86400; - @files = LufiDB::Files->select('WHERE deleted = 0 AND last_access_at < ?', $time); - - for my $file (@files) { - my $f = Lufi::File->new(record => $file); - $file->delete; - } + my $ldfile = Lufi::DB::File->new(app => $c->app); + $ldfile->get_no_longer_viewed($time)->each( + sub { + my ($f, $num) = @_; + $f->delete; + } + ); } } diff --git a/lib/Lufi/Command/cron/watch.pm b/lib/Lufi/Command/cron/watch.pm index ebb2fec..af4134e 100644 --- a/lib/Lufi/Command/cron/watch.pm +++ b/lib/Lufi/Command/cron/watch.pm @@ -1,11 +1,9 @@ package Lufi::Command::cron::watch; use Mojo::Base 'Mojolicious::Command'; use Filesys::DiskUsage qw/du/; -use LufiDB; -use Lufi::File; +use Lufi::DB::File; use Switch; use FindBin qw($Bin); -use File::Spec qw(catfile); has description => 'Watch the files directory and take action when over quota'; has usage => sub { shift->extract_usage }; @@ -13,9 +11,17 @@ has usage => sub { shift->extract_usage }; sub run { my $c = shift; + my $cfile = Mojo::File->new($Bin, '..' , 'lufi.conf'); + if (defined $ENV{MOJO_CONFIG}) { + $cfile = Mojo::File->new($ENV{MOJO_CONFIG}); + unless (-e $cfile->to_abs) { + $cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG}); + } + } my $config = $c->app->plugin('Config', { - file => File::Spec->catfile($Bin, '..' ,'lufi.conf'), + file => $cfile, default => { + dbtype => 'sqlite', policy_when_full => 'warn' } }); @@ -36,11 +42,14 @@ sub run { } case 'delete' { say '[Lufi cron job watch] Older files are being deleted'; + my $ldfile = Lufi::DB::File->new(app => $c->app); do { - for my $file (LufiDB::Files->select('WHERE deleted = 0 ORDER BY created_at ASC LIMIT 50')) { - my $f = Lufi::File->new(record => $file); - $file->delete; - } + $ldfile->get_oldest_undeleted_files(50)->each( + sub { + my ($f, $num) = @_; + $f->delete; + } + ); } while (du(qw/files/) > $config->{max_total_size}); } else { diff --git a/lib/Lufi/Controller/Files.pm b/lib/Lufi/Controller/Files.pm index 7a783a8..7841268 100644 --- a/lib/Lufi/Controller/Files.pm +++ b/lib/Lufi/Controller/Files.pm @@ -4,9 +4,8 @@ use Mojo::Base 'Mojolicious::Controller'; use Mojo::JSON qw(encode_json decode_json to_json true false); use Mojo::Util qw(encode decode); use Mojo::File; -use LufiDB; -use Lufi::File; -use Lufi::Slice; +use Lufi::DB::File; +use Lufi::DB::Slice; use File::Spec::Functions; use Number::Bytes::Human qw(format_bytes); use Filesys::DfPortable; @@ -38,47 +37,46 @@ sub upload { # Check if stop_upload file is present if ($c->stop_upload) { $stop = 1; - $c->send(encode_json( + $c->send(decode('UTF-8', encode_json( { success => false, msg => $c->l('Sorry, uploading is disabled.'), sent_delay => $json->{delay}, i => $json->{i} } - )); + ))); } # Check against max_size elsif (defined $c->config('max_file_size')) { if ($json->{size} > $c->config('max_file_size')) { $stop = 1; - $c->send(encode_json( + $c->send(decode('UTF-8', encode_json( { success => false, msg => $c->l('Your file is too big: %1 (maximum size allowed: %2)', format_bytes($json->{size}), format_bytes($c->config('max_file_size'))), sent_delay => $json->{delay}, i => $json->{i} } - )); + ))); } } # Check that we have enough space (multiplying by 2 since it's encrypted, it takes more place that the original file) elsif ($json->{part} == 0 && ($json->{size} * 2) >= dfportable($c->config('upload_dir'))->{bavail}) { $stop = 1; - $c->send(encode_json( + $c->send(decode('UTF-8', encode_json( { success => false, msg => $c->l('No enough space available on the server for this file (size: %1).', format_bytes($json->{size})), sent_delay => $json->{delay}, i => $json->{i} } - )); + ))); } unless ($stop) { my $f; if (defined($json->{id})) { - my @records = LufiDB::Files->select('WHERE short = ?', $json->{id}); - $f = Lufi::File->new(record => $records[0]) if scalar @records; + $f = Lufi::DB::File->new(app => $c->app)->from_short($json->{id}); } else { my $delay; unless (defined $json->{delay}) { @@ -113,19 +111,17 @@ sub upload { if (defined($c->config('ldap')) || defined($c->config('htpasswd'))) { $creator = 'User: '.$c->current_user.', IP: '.$creator; } - $f = Lufi::File->new( - record => $c->get_empty, - created_by => $creator, - delete_at_first_view => ($json->{del_at_first_view}) ? 1 : 0, - delete_at_day => $delay, - mediatype => $json->{type}, - filename => $json->{name}, - filesize => $json->{size}, - nbslices => $json->{total}, - mod_token => $c->shortener($c->config('token_length')), - passwd => $salted_pwd - ); - $f->write; + $f = Lufi::DB::File->new(app => $c->app)->get_empty() + ->created_by($creator) + ->delete_at_first_view(($json->{del_at_first_view}) ? 1 : 0) + ->delete_at_day($delay) + ->mediatype($json->{type}) + ->filename($json->{name}) + ->filesize($json->{size}) + ->nbslices($json->{total}) + ->mod_token($c->shortener($c->config('token_length'))) + ->passwd($salted_pwd) + ->write; } # This check is just in case we didn't succeed to find a corresponding record @@ -140,7 +136,8 @@ sub upload { # Create slice file my $file = catfile($dir, $json->{part}.'.part'); - my $s = Lufi::Slice->new( + my $s = Lufi::DB::Slice->new( + app => $c->app, short => $f->short, j => $json->{part}, path => $file @@ -176,14 +173,14 @@ sub upload { } )); } else { - $ws->send(encode_json( + $ws->send(decode('UTF-8', encode_json( { success => false, msg => $c->l('The server was unable to find the file record to add your file part to. Please, contact the administrator.'), sent_delay => $json->{delay}, i => $json->{i} } - )); + ))); } } } @@ -203,37 +200,35 @@ sub download { $c->inactivity_timeout(300000); $c->app->log->debug('Client connected'); - my @records = LufiDB::Files->select('WHERE short = ?', $short); + my $ldfile = Lufi::DB::File->new(app => $c->app)->from_short($short); # Do we have a file? - if (scalar @records) { - my $record = $records[0]; + if (defined $ldfile) { # Is the file fully uploaded? - if ($record->deleted + if ($ldfile->deleted || ( - $record->delete_at_day != 0 + $ldfile->delete_at_day != 0 && ( - ($record->created_at + $record->delete_at_day * 86400) < time() + ($ldfile->created_at + $ldfile->delete_at_day * 86400) < time() ) ) ) { - unless ($record->deleted) { - my $f = Lufi::File->new(record => $record); - $f->delete; + unless ($ldfile->deleted) { + $ldfile->delete; } $c->on( message => sub { my ($ws, $json) = @_; - $c->send(encode_json( + $c->send(decode('UTF-8', encode_json( { success => false, msg => $c->l('Error: the file existed but was deleted.') } - )); + ))); } ); - } elsif ($record->complete) { - my $f = Lufi::File->new(record => $record); + } elsif ($ldfile->complete) { + my $f = $ldfile; $c->on( message => sub { @@ -273,7 +268,11 @@ sub download { } } } else { - $c->send(encode_json({msg => $c->l('Your password is not valid. Please refresh the page to retry.')})); + $c->send(decode('UTF-8', encode_json( + { + msg => $c->l('Your password is not valid. Please refresh the page to retry.') + } + ))); } } ); @@ -286,22 +285,22 @@ sub download { $c->on( message => sub { my ($ws, $json) = @_; - $c->send(encode_json( + $c->send(decode('UTF-8', encode_json( { success => false, msg => $c->l('Error: the file has not been sent entirely.') } - )); + ))); } ); } } else { - $c->send(encode_json( + $c->send(decode('UTF-8', encode_json( { success => false, msg => $c->l('Error: unable to find the file. Are you sure of your URL?') } - )); + ))); } } @@ -309,13 +308,13 @@ sub r { my $c = shift; my $short = $c->param('short'); - my @records = LufiDB::Files->select('WHERE short = ?', $short); - if (scalar @records) { - my $f = Lufi::File->new(record => $records[0]); + my $ldfile = Lufi::DB::File->new(app => $c->app)->from_short($short); + + if (defined $ldfile) { return $c->render( template => 'render', - f => $f, - file_pwd => ($c->config('allow_pwd_on_files') && defined($records[0]->{passwd})) + f => $ldfile, + file_pwd => ($c->config('allow_pwd_on_files') && defined($ldfile->passwd)) ); } else { return $c->render( @@ -331,15 +330,16 @@ sub get_counter { my $token = $c->param('token'); 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) { + my $ldfile = Lufi::DB::File->new(app => $c->app)->from_short($short); + + if (defined $ldfile) { + if ($ldfile->mod_token eq $token) { return $c->render( json => { success => true, short => $short, - counter => $records[0]->counter, - deleted => ($records[0]->deleted) ? true : false + counter => $ldfile->counter, + deleted => ($ldfile->deleted) ? true : false } ); } else { @@ -380,14 +380,16 @@ sub delete { my $token = $c->param('token'); 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]); + my $ldfile = Lufi::DB::File->new(app => $c->app)->from_short($short); + + $ldfile = undef unless (defined($ldfile) && $ldfile->mod_token eq $token); + + if (defined $ldfile) { my $msg; - if ($f->deleted) { + if ($ldfile->deleted) { $msg = $c->l('The file has already been deleted'); } else { - $f->delete; + $ldfile->delete; $msg = $c->l('File deleted'); } return $c->respond_to( @@ -400,7 +402,7 @@ sub delete { any => sub { $c->render( template => 'msg', - f => $f, + f => $ldfile, msg => $msg ); } diff --git a/lib/Lufi/Controller/Misc.pm b/lib/Lufi/Controller/Misc.pm index a688559..1783d61 100644 --- a/lib/Lufi/Controller/Misc.pm +++ b/lib/Lufi/Controller/Misc.pm @@ -2,22 +2,18 @@ package Lufi::Controller::Misc; use Mojo::Base 'Mojolicious::Controller'; use Mojo::File; -use LufiDB; -use Lufi::File; -use Lufi::Slice; +use Lufi::DB::File; sub fullstats { my $c = shift; - my $files = LufiDB::Files->count('WHERE created_at IS NOT null AND deleted = 0'); - my $deleted = LufiDB::Files->count('WHERE created_at IS NOT null AND deleted = 1'); - my $empty = LufiDB::Files->count('WHERE created_at IS null'); + my $stats = Lufi::DB::File->new(app => $c->app)->get_stats; return $c->render( json => { - files => $files, - deleted => $deleted, - empty => $empty, + files => $stats->{files}, + deleted => $stats->{deleted}, + empty => $stats->{empty}, timestamp => time, } ); diff --git a/lib/Lufi/DB/File.pm b/lib/Lufi/DB/File.pm new file mode 100644 index 0000000..09d6589 --- /dev/null +++ b/lib/Lufi/DB/File.pm @@ -0,0 +1,291 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lufi::DB::File; +use Mojo::Base -base; +use Mojo::Collection; + +has 'short'; +has 'deleted' => 0; +has 'mediatype'; +has 'filename'; +has 'filesize'; +has 'counter' => 0; +has 'delete_at_first_view' => 0; +has 'delete_at_day'; +has 'created_at' => sub { + return time; +}; +has 'created_by'; +has 'last_access_at'; +has 'mod_token'; +has 'nbslices'; +has 'complete' => 0; +has 'slices' => sub { + return Mojo::Collection->new(); +}; +has 'passwd'; +has 'app'; + +=head1 NAME + +Lufi::DB::File - DB abstraction layer for Lufi file + +=head1 Contributing + +When creating a new database accessor, make sure that it provides the following subroutines. +After that, modify this file and modify the C subroutine to allow to use your accessor. + +Have a look at Lufi::DB::File::SQLite's code: it's simple and may be more understandable that this doc. + +=head1 Attributes + +=over 1 + +=item B : string + +=item B : boolean + +=item B : string + +=item B : string + +=item B : integer + +=item B : integer + +=item B : boolean + +=item B : integer + +=item B : unix timestamp + +=item B : string + +=item B : unix timestamp + +=item B : string + +=item B : integer + +=item B : boolean + +=item B : Mojo::Collection of Lufi::DB::Slice + +=item B : string + +=item B : a Mojolicious object + +=back + +=head1 Sub routines + +=head2 new + +=over 1 + +=item B : C<$c = Lufi::DB::File-Enew(app =E $self);> + +=item B : any of the attribute above + +=item B : construct a new db accessor object. If the C attribute is provided, it have to load the informations from the database. + +=item B : the db accessor object + +=item B : the app argument is used by Lufi::DB::File to choose which db accessor will be used, you don't need to use it in new(), but you can use it to access helpers or configuration settings in the other subroutines + +=back + +=cut + +sub new { + my $c = shift; + + $c = $c->SUPER::new(@_); + + if (ref($c) eq 'Lufi::DB::File') { + my $dbtype = $c->app->config('dbtype'); + if ($dbtype eq 'sqlite') { + use Lufi::DB::File::SQLite; + $c = Lufi::DB::File::SQLite->new(@_); + #} elsif ($dbtype eq 'postgresql') { + #use Lufi::DB::File::Pg; + #$c = Lufi::DB::File::Pg->new(@_); + } + } + + return $c; +} + +=head2 delete + +=over 1 + +=item B : C<$c-Edelet> + +=item B : none + +=item B : delete the files of the slices and the directory containing those files, then update the object by setting the deleted attribute to 1 (true) + +=item B : the db accessor object + +=back + +=cut + +sub delete { + my $c = shift; + + $c->slices->each(sub { + my ($e, $num) = @_; + unlink $e->path; + }); + rmdir Mojo::File->new($c->app->config('upload_dir'), $c->short); + $c->deleted(1); + + $c->write; + + return $c; +} + +=head2 write + +=over 1 + +=item B : C<$c-Ewrite> + +=item B : none + +=item B : create or update a record in the database, with the values of the object's attributes + +=item B : the db accessor object + +=back + +=head2 count_empty + +=over 1 + +=item B : C<$c-Ecount_empty> + +=item B : none + +=item B : count how many records have a null created_at column + +=item B : integer + +=back + +=head2 already_exists + +=over 1 + +=item B : C<$c-Ealready_exists($short)> + +=item B : a string + +=item B : check if the given string is already used as short attribute for a file + +=item B : 1 or 0 + +=back + +=head2 get_empty + +=over 1 + +=item B : C<$c-Eget_empty> + +=item B : none + +=item B : select an empty ready-to-use record from the database + +=item B : a db accessor object + +=back + +=head2 get_stats + +=over 1 + +=item B : C<$c-Eget_stats> + +=item B : none + +=item B : get stats about how many empty files, deleted files and non-deleted files there is in the database + +=item B : a hash table reference containing three keys: files, deleted and empty + +=back + +=head2 from_short + +=over 1 + +=item B : C<$c-Efrom_short($short)> + +=item B : string + +=item B : find a file in the database from its short attribute + +=item B : a db accessor object + +=back + +=head2 get_oldest_undeleted_files + +=over 1 + +=item B : C<$c-Eget_oldest_undeleted_files($num)> + +=item B : integer + +=item B : get the X oldest non-deleted files + +=item B : a Mojo::Collection of Lufi::DB::File objects + +=back + +=head2 get_expired + +=over 1 + +=item B : C<$c-Eget_expired($time)> + +=item B : unix timestamp + +=item B : get the non-deleted files that are expired at the given timestamp minus 2 days + +=item B : a Mojo::Collection of Lufi::DB::File objects + +=back + +=head2 get_no_longer_viewed + +=over 1 + +=item B : C<$c-Eget_no_longer_viewed($time)> + +=item B : unix timestamp + +=item B : get the files that have not been viewed after the given timestamp + +=item B : a Mojo::Collection of Lufi::DB::File objects + +=back + +=head2 delete_creator_before + +=over 1 + +=item B : C<$c-Edelete_creator_before($time)> + +=item B : unix timestamp + +=item B : empty the created_by column for files created before the given timestamp + +=item B : nothing + +=back + +=cut + +1; diff --git a/lib/Lufi/DB/File/SQLite.pm b/lib/Lufi/DB/File/SQLite.pm new file mode 100644 index 0000000..e0e37a9 --- /dev/null +++ b/lib/Lufi/DB/File/SQLite.pm @@ -0,0 +1,192 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lufi::DB::File::SQLite; +use Mojo::Base 'Lufi::DB::File'; +use Mojo::File; +use Mojo::Collection 'c'; +use Lufi::DB::SQLite; +use Lufi::DB::Slice; + +has 'record'; + +sub new { + my $c = shift; + + $c = $c->SUPER::new(@_); + $c = $c->_slurp if defined $c->record; + + return $c; +} + +sub write { + my $c = shift; + + if (defined $c->record) { + $c->record->update( + short => $c->short, + deleted => $c->deleted, + mediatype => $c->mediatype, + filename => $c->filename, + filesize => $c->filesize, + counter => $c->counter, + delete_at_first_view => $c->delete_at_first_view, + delete_at_day => $c->delete_at_day, + created_at => $c->created_at, + created_by => $c->created_by, + last_access_at => $c->last_access_at, + mod_token => $c->mod_token, + nbslices => $c->nbslices, + complete => $c->complete, + passwd => $c->passwd, + ); + } else { + my $record = Lufi::DB::SQLite::Files->create( + short => $c->short, + deleted => $c->deleted, + mediatype => $c->mediatype, + filename => $c->filename, + filesize => $c->filesize, + counter => $c->counter, + delete_at_first_view => $c->delete_at_first_view, + delete_at_day => $c->delete_at_day, + created_at => $c->created_at, + created_by => $c->created_by, + last_access_at => $c->last_access_at, + mod_token => $c->mod_token, + nbslices => $c->nbslices, + complete => $c->complete, + passwd => $c->passwd, + ); + $c->record($record); + } + + return $c; +} + +sub count_empty { + my $c = shift; + + return Lufi::DB::SQLite::Files->count('WHERE created_at IS NULL'); +} + +sub already_exists { + my $c = shift; + my $short = shift; + + return Lufi::DB::SQLite::Files->count('WHERE short = ?', $short); +} + +sub get_empty { + my $c = shift; + + my @records = Lufi::DB::SQLite::Files->select('WHERE created_at IS NULL LIMIT 1'); + $c->record($records[0]); + $c->record->update(created_at => time); + $c->write; + $c->_slurp; + + return $c; +} + +sub get_stats { + my $c = shift; + + my $files = Lufi::DB::SQLite::Files->count('WHERE created_at IS NOT null AND deleted = 0'); + my $deleted = Lufi::DB::SQLite::Files->count('WHERE created_at IS NOT null AND deleted = 1'); + my $empty = Lufi::DB::SQLite::Files->count('WHERE created_at IS null'); + + return {files => $files, deleted => $deleted, empty => $empty}; +} + +sub from_short { + my $c = shift; + my $short = shift; + + my @records = Lufi::DB::SQLite::Files->select('WHERE short = ?', $short); + + if (scalar @records) { + $c->record($records[0]); + $c->_slurp; + + return $c; + } else { + return undef; + } +} + +sub get_oldest_undeleted_files { + my $c = shift; + my $num = shift; + + my @files = Lufi::DB::SQLite::Files->select('WHERE deleted = 0 ORDER BY created_at ASC LIMIT ?', $num); + + return c(map { Lufi::DB::File->new(app => $c->app, record => $_) } @files); +} + +sub get_expired { + my $c = shift; + my $time = shift; + + ## Select only files expired since two days, to be sure that nobody is still downloading it + my @files = LufiDB::Files->select('WHERE deleted = 0 AND ((delete_at_day + 2) * 86400) < (? - created_at) AND delete_at_day != 0', $time); + + return c(map { Lufi::DB::File->new(app => $c->app, record => $_) } @files); +} + +sub get_no_longer_viewed { + my $c = shift; + my $time = shift; + + my @files = LufiDB::Files->select('WHERE deleted = 0 AND last_access_at < ?', $time); + + return c(map { Lufi::DB::File->new(app => $c->app, record => $_) } @files); +} + +sub delete_creator_before { + my $c = shift; + my $separation = shift; + + Lufi::DB::SQLite->do( + 'UPDATE files SET created_by = NULL WHERE created_by IS NOT NULL AND created_at < ?', + {}, + $separation + ); +} + +sub _slurp { + my $c = shift; + + my @files; + if ($c->record) { + @files = ($c->record); + } elsif ($c->short) { + @files = Lufi::DB::SQLite::Files->select('WHERE short = ?', $c->short); + } + + if (scalar @files) { + my $file = $files[0]; + + $c->short($file->short); + $c->deleted($file->deleted) if defined $file->deleted; + $c->mediatype($file->mediatype) if defined $file->mediatype; + $c->filename($file->filename) if defined $file->filename; + $c->filesize($file->filesize) if defined $file->filesize; + $c->counter($file->counter) if defined $file->counter; + $c->delete_at_first_view($file->delete_at_first_view) if defined $file->delete_at_first_view; + $c->delete_at_day($file->delete_at_day) if defined $file->delete_at_day; + $c->created_at($file->created_at) if defined $file->created_at; + $c->created_by($file->created_by) if defined $file->created_by; + $c->last_access_at($file->last_access_at) if defined $file->last_access_at; + $c->mod_token($file->mod_token) if defined $file->mod_token; + $c->nbslices($file->nbslices) if defined $file->nbslices; + $c->complete($file->complete) if defined $file->complete; + $c->passwd($file->passwd) if defined $file->passwd; + + $c->record($file) unless $c->record; + } + + $c->slices(Lufi::DB::Slice->new(app => $c->app)->get_slices_of_file($c->short)); + + return $c; +} + +1; diff --git a/lib/LufiDB.pm b/lib/Lufi/DB/SQLite.pm similarity index 81% rename from lib/LufiDB.pm rename to lib/Lufi/DB/SQLite.pm index 1bb66f4..4553f56 100644 --- a/lib/LufiDB.pm +++ b/lib/Lufi/DB/SQLite.pm @@ -1,14 +1,21 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: -package LufiDB; +package Lufi::DB::SQLite; use Mojolicious; +use Mojo::File; use FindBin qw($Bin); -use File::Spec::Functions; BEGIN { my $m = Mojolicious->new; + my $cfile = Mojo::File->new($Bin, '..' , 'lufi.conf'); + if (defined $ENV{MOJO_CONFIG}) { + $cfile = Mojo::File->new($ENV{MOJO_CONFIG}); + unless (-e $cfile->to_abs) { + $cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG}); + } + } our $config = $m->plugin('Config' => { - file => catfile($Bin, '..' ,'lufi.conf'), + file => $cfile->to_abs->to_string, default => { db_path => 'lufi.db' } diff --git a/lib/Lufi/DB/Slice.pm b/lib/Lufi/DB/Slice.pm new file mode 100644 index 0000000..5d77b4b --- /dev/null +++ b/lib/Lufi/DB/Slice.pm @@ -0,0 +1,104 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lufi::DB::Slice; +use Mojo::Base -base; + +has 'short'; +has 'j'; +has 'path'; +has 'app'; + +=head1 NAME + +Lufi::DB::Slice - DB abstraction layer for Lufi file + +=head1 Contributing + +When creating a new database accessor, make sure that it provides the following subroutines. +After that, modify this file and modify the C subroutine to allow to use your accessor. + +Have a look at Lufi::DB::Slice::SQLite's code: it's simple and may be more understandable that this doc. + +=head1 Attributes + +=over 1 + +=item B : string + +=item B : integer + +=item B : string + +=item B : A mojolicious object + +=back + +=head1 Sub routines + +=head2 new + +=over 1 + +=item B : C<$c = Lufi::DB::Slice-Enew(app =E $self);> + +=item B : any of the attribute above + +=item B : construct a new db accessor object. If the C attribute is provided, it have to load the informations from the database. + +=item B : the db accessor object + +=item B : the app argument is used by Lufi::DB::Slice to choose which db accessor will be used, you don't need to use it in new(), but you can use it to access helpers or configuration settings in the other subroutines + +=back + +=cut + +sub new { + my $c = shift; + + $c = $c->SUPER::new(@_); + + if (ref($c) eq 'Lufi::DB::Slice') { + my $dbtype = $c->app->config('dbtype'); + if ($dbtype eq 'sqlite') { + use Lufi::DB::Slice::SQLite; + $c = Lufi::DB::Slice::SQLite->new(@_); + #} elsif ($dbtype eq 'postgresql') { + # use Lufi::DB::Slice::Pg; + # $c = Lufi::DB::Slice::Pg->new(@_); + } + } + + return $c; +} + +=head2 write + +=over 1 + +=item B : C<$c-Ewrite> + +=item B : none + +=item B : create or update a record in the database, with the values of the object's attributes + +=item B : the db accessor object + +=back + +=head2 get_slices_of_file + +=over 1 + +=item B : C<$c-Eget_slices_of_file($short)> + +=item B : string + +=item B : get all Lufi::DB::Slice objects related to a file + +=item B : a Mojo::Collection of Lufi::DB::Slice objects + +=back + +=cut + +1; diff --git a/lib/Lufi/Slice.pm b/lib/Lufi/DB/Slice/SQLite.pm similarity index 64% rename from lib/Lufi/Slice.pm rename to lib/Lufi/DB/Slice/SQLite.pm index 2821032..5927f9b 100644 --- a/lib/Lufi/Slice.pm +++ b/lib/Lufi/DB/Slice/SQLite.pm @@ -1,12 +1,10 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: -package Lufi::Slice; -use Mojo::Base -base; -use LufiDB; +package Lufi::DB::Slice::SQLite; +use Mojo::Base 'Lufi::DB::Slice'; +use Lufi::DB::SQLite; +use Mojo::Collection 'c'; has 'record'; -has 'short'; -has 'j'; -has 'path'; sub new { my $c = shift; @@ -28,7 +26,7 @@ sub write { path => $c->path ); } else { - my $record = LufiDB::Slices->create( + my $record = Lufi::DB::SQLite::Slices->create( short => $c->short, j => $c->j, path => $c->path @@ -39,6 +37,15 @@ sub write { return $c; } +sub get_slices_of_file { + my $c = shift; + my $short = shift; + + my @slices = Lufi::DB::SQLite::Slices->select('WHERE short = ? ORDER BY j ASC', $short); + + return c(map { Lufi::DB::Slice->new(app => $c->app, record => $_) } @slices); +} + sub _slurp { my $c = shift; diff --git a/lib/Lufi/File.pm b/lib/Lufi/File.pm deleted file mode 100644 index ddc3613..0000000 --- a/lib/Lufi/File.pm +++ /dev/null @@ -1,103 +0,0 @@ -# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: -package Lufi::File; -use Mojo::Base -base; -use Mojo::Collection; -use LufiDB; -use Lufi::Slice; - -has 'record'; -has 'short'; -has 'deleted' => 0; -has 'mediatype'; -has 'filename'; -has 'filesize'; -has 'counter' => 0; -has 'delete_at_first_view' => 0; -has 'delete_at_day'; -has 'created_at' => sub { - return time; -}; -has 'created_by'; -has 'last_access_at'; -has 'mod_token'; -has 'nbslices'; -has 'complete' => 0; -has 'slices' => sub { - return Mojo::Collection->new(); -}; -has 'passwd'; - -sub new { - my $c = shift; - - $c = $c->SUPER::new(@_); - - $c = $c->_slurp if defined $c->record; - - return $c; -} - -sub write { - my $c = shift; - - $c->record->update( - deleted => $c->deleted, - mediatype => $c->mediatype, - filename => $c->filename, - filesize => $c->filesize, - counter => $c->counter, - delete_at_first_view => $c->delete_at_first_view, - delete_at_day => $c->delete_at_day, - created_at => $c->created_at, - created_by => $c->created_by, - last_access_at => $c->last_access_at, - mod_token => $c->mod_token, - nbslices => $c->nbslices, - complete => $c->complete, - passwd => $c->passwd, - ); - - return $c; -} - -sub delete { - my $c = shift; - - $c->slices->each(sub { - my ($e, $num) = @_; - unlink $e->path; - }); - $c->deleted(1); - - $c->write; - - return $c; -} - -sub _slurp { - my $c = shift; - - $c->short($c->record->short); - $c->deleted($c->record->deleted) if defined $c->record->deleted; - $c->mediatype($c->record->mediatype) if defined $c->record->mediatype; - $c->filename($c->record->filename) if defined $c->record->filename; - $c->filesize($c->record->filesize) if defined $c->record->filesize; - $c->counter($c->record->counter) if defined $c->record->counter; - $c->delete_at_first_view($c->record->delete_at_first_view) if defined $c->record->delete_at_first_view; - $c->delete_at_day($c->record->delete_at_day) if defined $c->record->delete_at_day; - $c->created_at($c->record->created_at) if defined $c->record->created_at; - $c->created_by($c->record->created_by) if defined $c->record->created_by; - $c->last_access_at($c->record->last_access_at) if defined $c->record->last_access_at; - $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); - - $c->slices(Mojo::Collection->new(map { Lufi::Slice->new(record => $_) } @slices)); - - return $c; -} - -1; diff --git a/lib/Lufi/Plugin/Helpers.pm b/lib/Lufi/Plugin/Helpers.pm index cda1381..1d5539f 100644 --- a/lib/Lufi/Plugin/Helpers.pm +++ b/lib/Lufi/Plugin/Helpers.pm @@ -1,20 +1,37 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lufi::Plugin::Helpers; use Mojo::Base 'Mojolicious::Plugin'; +use Lufi::DB::File; use Data::Entropy qw(entropy_source); -use LufiDB; sub register { my ($self, $app) = @_; - # 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;'); + $app->plugin('PgURLHelper'); + # + # if ($app->config('dbtype') eq 'postgresql') { + # use Mojo::Pg; + # $app->helper(pg => \&_pg); + # + # # Database migration + # my $migrations = Mojo::Pg::Migrations->new(pg => $app->pg); + # if ($app->mode eq 'development' && $ENV{LUFI_DEV} == 1) { + # $migrations->from_file('utilities/migrations.sql')->migrate(0)->migrate(1); + # } else { + # $migrations->from_file('utilities/migrations.sql')->migrate(1); + # } + # } elsif ($app->config('dbtype') eq 'sqlite') { + if ($app->config('dbtype') eq 'sqlite') { + # SQLite database migration if needed + use Lufi::DB::SQLite; + my $columns = Lufi::DB::SQLite::Files->table_info; + my $pwd_col = 0; + foreach my $col (@{$columns}) { + $pwd_col = 1 if $col->{name} eq 'passwd'; + } + unless ($pwd_col) { + Lufi::DB::SQLite->do('ALTER TABLE files ADD COLUMN passwd TEXT;'); + } } $app->helper(provisioning => \&_provisioning); @@ -27,23 +44,26 @@ sub register { $app->helper(stop_upload => \&_stop_upload); } +sub _pg { + my $c = shift; + + state $pg = Mojo::Pg->new($c->app->pg_url($c->app->config('pgdb'))); + return $pg; +} + sub _provisioning { my $c = shift; # Create some short patterns for provisioning - if (LufiDB::Files->count('WHERE created_at IS NULL') < $c->config('provisioning')) { - for (my $i = 0; $i < $c->config('provis_step'); $i++) { - if (LufiDB->begin) { - my $short; - do { - $short= $c->shortener($c->config('length')); - } while (LufiDB::Files->count('WHERE short = ?', $short)); + my $ldfile = Lufi::DB::File->new(app => $c->app); + if ($ldfile->count_empty < $c->app->config('provisioning')) { + for (my $i = 0; $i < $c->app->config('provis_step'); $i++) { + my $short; + do { + $short = $c->shortener($c->app->config('length')); + } while ($ldfile->already_exists($short)); - LufiDB::Files->create( - short => $short - ); - LufiDB->commit; - } + $ldfile->created_at(undef)->short($short)->write; } } } @@ -51,8 +71,9 @@ sub _provisioning { sub _get_empty { my $c = shift; - my @records = LufiDB::Files->select('WHERE created_at IS NULL LIMIT 1'); - return $records[0]; + my $ldfile = Lufi::DB::File->new(app => $c->app)->get_empty; + + return $ldfile; } sub _shortener { @@ -79,7 +100,7 @@ sub _ip { sub _default_delay { my $c = shift; - return $c->config('default_delay') if ($c->config('default_delay') >= 0); + return $c->app->config('default_delay') if ($c->app->config('default_delay') >= 0); warn "default_delay set to a negative value. Default to 0."; return 0; @@ -88,7 +109,7 @@ sub _default_delay { sub _max_delay { my $c = shift; - return $c->config('max_delay') if ($c->config('max_delay') >= 0); + return $c->app->config('max_delay') if ($c->app->config('max_delay') >= 0); warn "max_delay set to a negative value. Default to 0."; return 0; diff --git a/lufi.conf.template b/lufi.conf.template index 56bda8f..218f23b 100755 --- a/lufi.conf.template +++ b/lufi.conf.template @@ -107,12 +107,28 @@ # Optional, default to no-reply@lufi.io #mail_sender => 'no-reply@lufi.io', + # choose what database you want to use + # valid choices are sqlite and postgresql (all lowercase) + # optional, default is sqlite + #dbtype => 'sqlite', + + # SQLite ONLY - only used if dbtype is set to sqlite # define a path to the SQLite database # you can define it relative to lufi directory or set an absolute path - # remember that it has to be in a directory writable by Lufi user + # remember that it has to be in a directory writable by Lutim user # optional, default is lufi.db #db_path => 'lufi.db', + # PostgreSQL ONLY - only used if dbtype is set to postgresql + # these are the credentials to access the PostgreSQL database + # mandatory if you choosed postgresql as dbtype + #pgdb => { + # database => 'lufi', + # host => 'localhost', + # #user => 'DBUSER', + # #pwd => 'DBPASSWORD' + #}, + # define a path to the upload directory, where the uploaded files will be stored # you can define it relative to lufi directory or set an absolute path # remember that it has to be in a directory writable by Lufi user diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po index 86bd4a9..80a9ba1 100644 --- a/themes/default/lib/Lufi/I18N/ca.po +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -93,15 +93,15 @@ msgstr "Copia tots els enllaços al porta-retalls" msgid "Copy to clipboard" msgstr "Copia al porta-retalls" -#: lib/Lufi/Controller/Files.pm:423 +#: lib/Lufi/Controller/Files.pm:429 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:407 +#: lib/Lufi/Controller/Files.pm:411 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:323 +#: lib/Lufi/Controller/Files.pm:322 msgid "Could not find the file. Are you sure of the URL?" msgstr "No trobo el fitxer. Esteu segurs de la URL?" @@ -157,15 +157,15 @@ msgstr "correus electrònics" msgid "Encrypting part XX1 of XX2" msgstr "S'està xifrant la part XX1 de XX2" -#: lib/Lufi/Controller/Files.pm:230 +#: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." msgstr "Error: el fitxer existia però va ser eliminat." -#: lib/Lufi/Controller/Files.pm:292 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "Error: el fitxer no s'ha enviat del tot." -#: lib/Lufi/Controller/Files.pm:302 +#: lib/Lufi/Controller/Files.pm:301 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "Error: no trobo el fitxer. Esteu segur de la URL ?" @@ -181,7 +181,7 @@ msgstr "Expira el" msgid "Export localStorage data" msgstr "Exporta dades a l'emmagatzematge local" -#: lib/Lufi/Controller/Files.pm:391 +#: lib/Lufi/Controller/Files.pm:393 msgid "File deleted" msgstr "Fitxer eliminat" @@ -275,7 +275,7 @@ msgid "My files" msgstr "Els meus fitxers" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:70 +#: lib/Lufi/Controller/Files.pm:69 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)" @@ -300,7 +300,7 @@ msgstr "Si us plau contacteu amb l'administrador: %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 "Si us plau, espereu mentre obtenim el fitxer. Abans que el tingueu disponible primer cal descarregar i desxifrar tots els trossos." -#: lib/Lufi.pm:300 +#: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -341,7 +341,7 @@ msgstr "Compartiu fitxers amb total privacitat a %1" msgid "Signin" msgstr "Autenticació" -#: lib/Lufi.pm:303 +#: lib/Lufi.pm:194 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 "" @@ -349,7 +349,7 @@ msgstr "" 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:44 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "Disculpeu, les pujades estan deshabilitades" @@ -371,7 +371,7 @@ msgstr "El cos del correu no pot estar buit." msgid "The email subject can't be empty." msgstr "L'assumpte dle correu no pot estar buit." -#: lib/Lufi/Controller/Files.pm:388 +#: lib/Lufi/Controller/Files.pm:390 msgid "The file has already been deleted" msgstr "El fitxer ja ha estat esborrat" @@ -396,7 +396,7 @@ msgstr "El correu ja està enviat." 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:182 +#: lib/Lufi/Controller/Files.pm:179 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." @@ -476,11 +476,11 @@ 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:57 +#: lib/Lufi/Controller/Files.pm:56 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "El fitxer és massa gran: %1 (mida màxima admesa: %2)" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:273 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index 876e2f9..b37f64c 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -90,15 +90,15 @@ msgstr "" msgid "Copy to clipboard" msgstr "" -#: lib/Lufi/Controller/Files.pm:423 +#: lib/Lufi/Controller/Files.pm:429 msgid "Could not delete the file. You are not authenticated." msgstr "" -#: lib/Lufi/Controller/Files.pm:407 +#: lib/Lufi/Controller/Files.pm:411 msgid "Could not find the file. Are you sure of the URL and the token?" msgstr "" -#: lib/Lufi/Controller/Files.pm:323 +#: lib/Lufi/Controller/Files.pm:322 msgid "Could not find the file. Are you sure of the URL?" msgstr "" @@ -154,15 +154,15 @@ msgstr "" msgid "Encrypting part XX1 of XX2" msgstr "" -#: lib/Lufi/Controller/Files.pm:230 +#: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." msgstr "" -#: lib/Lufi/Controller/Files.pm:292 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "" -#: lib/Lufi/Controller/Files.pm:302 +#: lib/Lufi/Controller/Files.pm:301 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "" @@ -178,7 +178,7 @@ msgstr "" msgid "Export localStorage data" msgstr "" -#: lib/Lufi/Controller/Files.pm:391 +#: lib/Lufi/Controller/Files.pm:393 msgid "File deleted" msgstr "" @@ -271,7 +271,7 @@ msgid "My files" msgstr "" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:70 +#: lib/Lufi/Controller/Files.pm:69 msgid "No enough space available on the server for this file (size: %1)." msgstr "" @@ -296,7 +296,7 @@ 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 +#: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -337,7 +337,7 @@ msgstr "" msgid "Signin" msgstr "" -#: lib/Lufi.pm:303 +#: lib/Lufi.pm:194 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 "" @@ -345,7 +345,7 @@ msgstr "" msgid "Sorry, the uploading is currently disabled. Please try again later." msgstr "" -#: lib/Lufi/Controller/Files.pm:44 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "" @@ -365,7 +365,7 @@ msgstr "" msgid "The email subject can't be empty." msgstr "" -#: lib/Lufi/Controller/Files.pm:388 +#: lib/Lufi/Controller/Files.pm:390 msgid "The file has already been deleted" msgstr "" @@ -390,7 +390,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:182 +#: lib/Lufi/Controller/Files.pm:179 msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator." msgstr "" @@ -470,11 +470,11 @@ msgid "You must give email addresses." msgstr "" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:57 +#: lib/Lufi/Controller/Files.pm:56 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:273 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index 08c7e3a..74f0993 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -92,15 +92,15 @@ msgstr "Copier tous les liens dans le presse-papier" msgid "Copy to clipboard" msgstr "Copier dans le presse-papier" -#: lib/Lufi/Controller/Files.pm:423 +#: lib/Lufi/Controller/Files.pm:429 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:407 +#: lib/Lufi/Controller/Files.pm:411 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:323 +#: 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 ?" @@ -156,15 +156,15 @@ msgstr "Mails" msgid "Encrypting part XX1 of XX2" msgstr "Chiffrement du fragment XX1 sur XX2" -#: lib/Lufi/Controller/Files.pm:230 +#: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." msgstr "Erreur : le fichier existait mais a été supprimé" -#: lib/Lufi/Controller/Files.pm:292 +#: 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:302 +#: 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 ?" @@ -180,7 +180,7 @@ msgstr "Expire le" msgid "Export localStorage data" msgstr "Exporter les données localStorage" -#: lib/Lufi/Controller/Files.pm:391 +#: lib/Lufi/Controller/Files.pm:393 msgid "File deleted" msgstr "Fichier supprimé" @@ -273,7 +273,7 @@ msgid "My files" msgstr "Mes fichiers" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:70 +#: 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)." @@ -298,7 +298,7 @@ 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 +#: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." msgstr "Veuillez vérifier vos identifiants : impossible de vous authentifier." @@ -339,7 +339,7 @@ msgstr "Partagez vos fichiers en toute confidentialité sur %1" msgid "Signin" msgstr "Connexion" -#: lib/Lufi.pm:303 +#: lib/Lufi.pm:194 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." @@ -347,7 +347,7 @@ msgstr "Désolé, vous n’êtes pas autorisé à utiliser ce service. Contactez 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:44 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "Désolé, l’envoi de fichier est désactivé." @@ -367,7 +367,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:388 +#: lib/Lufi/Controller/Files.pm:390 msgid "The file has already been deleted" msgstr "Le fichier a déjà été supprimé" @@ -392,7 +392,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:182 +#: lib/Lufi/Controller/Files.pm:179 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." @@ -472,11 +472,11 @@ msgid "You must give email addresses." msgstr "Vous devez envoyer des adresses mail." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:57 +#: 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:276 +#: lib/Lufi/Controller/Files.pm:273 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." diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index cfa410a..d9938b9 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -92,15 +92,15 @@ msgstr "Copiare tutti i link negli appunti" msgid "Copy to clipboard" msgstr "Copiare negli appunti" -#: lib/Lufi/Controller/Files.pm:423 +#: lib/Lufi/Controller/Files.pm:429 msgid "Could not delete the file. You are not authenticated." msgstr "Impossibile cancellare il file. Non siete autenticati." -#: lib/Lufi/Controller/Files.pm:407 +#: lib/Lufi/Controller/Files.pm:411 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:323 +#: 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?" @@ -156,15 +156,15 @@ msgstr "Email" msgid "Encrypting part XX1 of XX2" msgstr "Cifratura della parte XX1 di XX2" -#: lib/Lufi/Controller/Files.pm:230 +#: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." msgstr "Errore: il file esisteva ma è stato eliminato" -#: lib/Lufi/Controller/Files.pm:292 +#: 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:302 +#: 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 ?" @@ -180,7 +180,7 @@ msgstr "Scade il" msgid "Export localStorage data" msgstr "Esportare i dati del localStorage" -#: lib/Lufi/Controller/Files.pm:391 +#: lib/Lufi/Controller/Files.pm:393 msgid "File deleted" msgstr "File cancellato" @@ -273,7 +273,7 @@ msgid "My files" msgstr "I miei file" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:70 +#: 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)." @@ -298,7 +298,7 @@ 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 +#: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -339,7 +339,7 @@ msgstr "Condividi tutti i file in totale riservatezza su %1" msgid "Signin" msgstr "Autenticazione" -#: lib/Lufi.pm:303 +#: lib/Lufi.pm:194 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 "" @@ -347,7 +347,7 @@ msgstr "" 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:44 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "L'invio del file è attualemente disattivato." @@ -367,7 +367,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:388 +#: lib/Lufi/Controller/Files.pm:390 msgid "The file has already been deleted" msgstr "Il file è già stato cancellato" @@ -392,7 +392,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:182 +#: lib/Lufi/Controller/Files.pm:179 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." @@ -472,11 +472,11 @@ msgid "You must give email addresses." msgstr "Devi fornire gli indirizzi email." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:57 +#: 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:276 +#: lib/Lufi/Controller/Files.pm:273 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po index 93189a3..aafa7c1 100644 --- a/themes/default/lib/Lufi/I18N/nl.po +++ b/themes/default/lib/Lufi/I18N/nl.po @@ -79,15 +79,15 @@ msgstr "Kopieer alle links naar klembord" msgid "Copy to clipboard" msgstr "Kopieer naar klembord" -#: lib/Lufi/Controller/Files.pm:423 +#: lib/Lufi/Controller/Files.pm:429 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:407 +#: lib/Lufi/Controller/Files.pm:411 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:323 +#: lib/Lufi/Controller/Files.pm:322 msgid "Could not find the file. Are you sure of the URL?" msgstr "Kan het bestand niet vinden. Klopt de URL?" @@ -143,15 +143,15 @@ msgstr "Emails" msgid "Encrypting part XX1 of XX2" msgstr "Encrypten deel XX1 van XX2 " -#: lib/Lufi/Controller/Files.pm:230 +#: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." msgstr "Fout: het bestand bestond wel maar is verwijderd." -#: lib/Lufi/Controller/Files.pm:292 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "Fout: het bestand is niet volledig opgestuurd." -#: lib/Lufi/Controller/Files.pm:302 +#: lib/Lufi/Controller/Files.pm:301 msgid "Error: unable to find the file. Are you sure of your URL?" msgstr "Fout: kan het bestand niet vinden. Is de URL juist?" @@ -167,7 +167,7 @@ msgstr "Vervalt op" msgid "Export localStorage data" msgstr "Exporteer opgeslagen data" -#: lib/Lufi/Controller/Files.pm:391 +#: lib/Lufi/Controller/Files.pm:393 msgid "File deleted" msgstr "Bestand verwijderd" @@ -260,7 +260,7 @@ msgid "My files" msgstr "Mijn bestanden" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:70 +#: lib/Lufi/Controller/Files.pm:69 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)." @@ -285,7 +285,7 @@ msgstr "Neem contact op met 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 "Een ogenblik geduld, we pakken je bestand er bij. We moeten alle delen downloaden en decrypten voordat je het kan downloaden." -#: lib/Lufi.pm:300 +#: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -330,7 +330,7 @@ msgstr "Deel je bestanden met volledige privacy op %1" msgid "Signin" msgstr "Inloggen" -#: lib/Lufi.pm:303 +#: lib/Lufi.pm:194 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 "" @@ -338,7 +338,7 @@ msgstr "" 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:44 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "SOrry, uploaden is uitgeschakeld." @@ -358,7 +358,7 @@ msgstr "Mail inhoud kan niet leeg zijn." msgid "The email subject can't be empty." msgstr "Onderwerp kan niet leeg zijn." -#: lib/Lufi/Controller/Files.pm:388 +#: lib/Lufi/Controller/Files.pm:390 msgid "The file has already been deleted" msgstr "Bestand is reeds verwijderd" @@ -383,7 +383,7 @@ msgstr "Email is verzonden." 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:182 +#: lib/Lufi/Controller/Files.pm:179 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." @@ -463,11 +463,11 @@ msgid "You must give email addresses." msgstr "Je moet een mail adres opgeven." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:57 +#: lib/Lufi/Controller/Files.pm:56 msgid "Your file is too big: %1 (maximum size allowed: %2)" msgstr "Je bestand is te groot: %1 (max: %2)" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:273 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index f787473..259db3e 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -92,15 +92,15 @@ msgstr "Copiar totes los ligams dins lo quichapapièrs" msgid "Copy to clipboard" msgstr "Copiar dins lo quichapapièrs" -#: lib/Lufi/Controller/Files.pm:423 +#: lib/Lufi/Controller/Files.pm:429 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:407 +#: lib/Lufi/Controller/Files.pm:411 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:323 +#: 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 ?" @@ -156,15 +156,15 @@ msgstr "Corrièl" msgid "Encrypting part XX1 of XX2" msgstr "Chiframent del tròç XX1 sus XX2" -#: lib/Lufi/Controller/Files.pm:230 +#: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." msgstr "Error : lo fichièr existissiá mas es estat suprimit" -#: lib/Lufi/Controller/Files.pm:292 +#: 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:302 +#: 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 ?" @@ -180,7 +180,7 @@ msgstr "Expira lo" msgid "Export localStorage data" msgstr "Exportar las donadas localStorage" -#: lib/Lufi/Controller/Files.pm:391 +#: lib/Lufi/Controller/Files.pm:393 msgid "File deleted" msgstr "Fichièr suprimit" @@ -273,7 +273,7 @@ msgid "My files" msgstr "Mos fichièrs" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:70 +#: 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)." @@ -298,7 +298,7 @@ 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 +#: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -339,7 +339,7 @@ msgstr "Partejatz vòstres fichièrs en tota confidencialitat sus %1" msgid "Signin" msgstr "Connexion" -#: lib/Lufi.pm:303 +#: lib/Lufi.pm:194 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 "" @@ -347,7 +347,7 @@ msgstr "" 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:44 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "O planhèm, la foncion per mandar de fichièr es desactivada." @@ -367,7 +367,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:388 +#: lib/Lufi/Controller/Files.pm:390 msgid "The file has already been deleted" msgstr "Lo fichièr es ja estat suprimit" @@ -392,7 +392,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:182 +#: lib/Lufi/Controller/Files.pm:179 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." @@ -472,11 +472,11 @@ msgid "You must give email addresses." msgstr "Vos cal donar d’adreças." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:57 +#: 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:276 +#: lib/Lufi/Controller/Files.pm:273 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/pt.po b/themes/default/lib/Lufi/I18N/pt.po index 35d0d0d..f38cc4d 100644 --- a/themes/default/lib/Lufi/I18N/pt.po +++ b/themes/default/lib/Lufi/I18N/pt.po @@ -93,15 +93,15 @@ msgstr "Copiar todos os links para a área de transferência" msgid "Copy to clipboard" msgstr "Copiar para a área de transferência" -#: lib/Lufi/Controller/Files.pm:423 +#: lib/Lufi/Controller/Files.pm:429 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:407 +#: lib/Lufi/Controller/Files.pm:411 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:323 +#: lib/Lufi/Controller/Files.pm:322 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?" @@ -161,15 +161,15 @@ msgstr "E-mails" msgid "Encrypting part XX1 of XX2" msgstr "Codificação do fragmento XX1 de XX2" -#: lib/Lufi/Controller/Files.pm:230 +#: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." msgstr "Erro: o ficheiro existia mas foi apagado." -#: lib/Lufi/Controller/Files.pm:292 +#: lib/Lufi/Controller/Files.pm:291 msgid "Error: the file has not been sent entirely." msgstr "Erro: o ficheiro não foi enviado na totalidade." -#: lib/Lufi/Controller/Files.pm:302 +#: lib/Lufi/Controller/Files.pm:301 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?" @@ -185,7 +185,7 @@ msgstr "Expira no" msgid "Export localStorage data" msgstr "Exportar os dados localStorage" -#: lib/Lufi/Controller/Files.pm:391 +#: lib/Lufi/Controller/Files.pm:393 msgid "File deleted" msgstr "Ficheiro apagado" @@ -282,7 +282,7 @@ msgid "My files" msgstr "Meus ficheiros" #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:70 +#: lib/Lufi/Controller/Files.pm:69 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)." @@ -307,7 +307,7 @@ msgstr "Contacte o administrador: %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 "Por favor aguarde durante a recuperação do seu ficheiro. Primeiro devemos recuperar e descodificar todos os fragmentos e depois poderá descarregar o ficheiro." -#: lib/Lufi.pm:300 +#: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -348,7 +348,7 @@ msgstr "Partilhe os seus ficheiros com toda a privacidade em %1" msgid "Signin" msgstr "Conexão" -#: lib/Lufi.pm:303 +#: lib/Lufi.pm:194 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 "" @@ -356,7 +356,7 @@ msgstr "" 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:44 +#: lib/Lufi/Controller/Files.pm:43 msgid "Sorry, uploading is disabled." msgstr "Desculpe, o envio do ficheiro está desativado." @@ -376,7 +376,7 @@ msgstr "A mensagem do e-mail não pode estar vazia." msgid "The email subject can't be empty." msgstr "O assunto do e-mail não pode estar vazio." -#: lib/Lufi/Controller/Files.pm:388 +#: lib/Lufi/Controller/Files.pm:390 msgid "The file has already been deleted" msgstr "O ficheiro já foi apagado" @@ -401,7 +401,7 @@ msgstr "O e-mail foi enviado." 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:182 +#: lib/Lufi/Controller/Files.pm:179 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." @@ -485,11 +485,11 @@ msgid "You must give email addresses." msgstr "Deve escrever os e-mails." #. (format_bytes($json->{size}) -#: lib/Lufi/Controller/Files.pm:57 +#: lib/Lufi/Controller/Files.pm:56 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)" -#: lib/Lufi/Controller/Files.pm:276 +#: lib/Lufi/Controller/Files.pm:273 msgid "Your password is not valid. Please refresh the page to retry." msgstr "" diff --git a/themes/default/public/js/lufi-down.js b/themes/default/public/js/lufi-down.js index 1af603d..3285fdf 100644 --- a/themes/default/public/js/lufi-down.js +++ b/themes/default/public/js/lufi-down.js @@ -106,6 +106,10 @@ function spawnWebsocket(pa) { innerHTML.push(''); + } else if (data.type.match(/^audio\//) !== null) { + innerHTML.push(''); } pbd.html(innerHTML.join('')); diff --git a/utilities/migrations_pg.sql b/utilities/migrations_pg.sql new file mode 100644 index 0000000..e2917b2 --- /dev/null +++ b/utilities/migrations_pg.sql @@ -0,0 +1,27 @@ +-- 1 up +CREATE TABLE IF NOT EXISTS files ( + short text PRIMARY KEY, + deleted boolean default false, + mediatype text, + filename text, + filesize integer, + counter integer default 0, + delete_at_first_view boolean, + delete_at_day integer, + created_at integer, + created_by text, + last_access_at integer, + mod_token text, + nbslices integer, + complete boolean default false, + passwd text +); + +CREATE TABLE IF NOT EXISTS slices ( + short text REFERENCES files(short) ON DELETE CASCADE, + j integer NOT NULL, + path text unique NOT NULL, +); +-- 1 down +DROP TABLE slices; +DROP TABLE files; From d5395f42968efdcc0dfda7bffa27924ba8566a44 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 22 Jul 2017 19:17:31 +0200 Subject: [PATCH 37/53] Bug in SQLite file layer --- lib/Lufi/DB/File/SQLite.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Lufi/DB/File/SQLite.pm b/lib/Lufi/DB/File/SQLite.pm index e0e37a9..bd6bd2c 100644 --- a/lib/Lufi/DB/File/SQLite.pm +++ b/lib/Lufi/DB/File/SQLite.pm @@ -79,12 +79,8 @@ sub get_empty { my $c = shift; my @records = Lufi::DB::SQLite::Files->select('WHERE created_at IS NULL LIMIT 1'); - $c->record($records[0]); - $c->record->update(created_at => time); - $c->write; - $c->_slurp; - return $c; + return $c->record($records[0])->_slurp->created_at(time)->write; } sub get_stats { From 18499a1106a609baf6c47df84fe2636d8edad8a4 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 22 Jul 2017 19:20:38 +0200 Subject: [PATCH 38/53] Add PostgreSQL support --- CHANGELOG | 1 + lib/Lufi/DB/File.pm | 6 +- lib/Lufi/DB/File/Pg.pm | 177 ++++++++++++++++++++++++++++++++++++ lib/Lufi/DB/File/SQLite.pm | 2 +- lib/Lufi/DB/Slice.pm | 6 +- lib/Lufi/DB/Slice/Pg.pm | 73 +++++++++++++++ lib/Lufi/Plugin/Helpers.pm | 27 +++--- lufi.conf.template | 2 +- utilities/migrations_pg.sql | 3 +- 9 files changed, 274 insertions(+), 23 deletions(-) create mode 100644 lib/Lufi/DB/File/Pg.pm create mode 100644 lib/Lufi/DB/Slice/Pg.pm mode change 100755 => 100644 lufi.conf.template diff --git a/CHANGELOG b/CHANGELOG index 381bb22..8558dcc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Revision history for Lufi 0.02 2017-? - Database abstraction layer + - PostgreSQL support - IE 11 and Edge support - Fix encoding error (#83) - Htpassword authentication support diff --git a/lib/Lufi/DB/File.pm b/lib/Lufi/DB/File.pm index 09d6589..d323b9e 100644 --- a/lib/Lufi/DB/File.pm +++ b/lib/Lufi/DB/File.pm @@ -106,9 +106,9 @@ sub new { if ($dbtype eq 'sqlite') { use Lufi::DB::File::SQLite; $c = Lufi::DB::File::SQLite->new(@_); - #} elsif ($dbtype eq 'postgresql') { - #use Lufi::DB::File::Pg; - #$c = Lufi::DB::File::Pg->new(@_); + } elsif ($dbtype eq 'postgresql') { + use Lufi::DB::File::Pg; + $c = Lufi::DB::File::Pg->new(@_); } } diff --git a/lib/Lufi/DB/File/Pg.pm b/lib/Lufi/DB/File/Pg.pm new file mode 100644 index 0000000..f28a099 --- /dev/null +++ b/lib/Lufi/DB/File/Pg.pm @@ -0,0 +1,177 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lufi::DB::File::Pg; +use Mojo::Base 'Lufi::DB::File'; +use Mojo::File; +use Mojo::Collection 'c'; +use Lufi::DB::Slice; + +has 'record' => 0; + +sub new { + my $c = shift; + + $c = $c->SUPER::new(@_); + + return $c; +} + +sub write { + my $c = shift; + + if ($c->record) { + $c->app->pg->db->query('UPDATE files SET short = ?, deleted = ?, mediatype = ?, filename = ?, filesize = ?, counter = ?, delete_at_first_view = ?, delete_at_day = ?, created_at = ?, created_by = ?, last_access_at = ?, mod_token = ?, nbslices = ?, complete = ?, passwd = ? WHERE short = ?', $c->short, $c->deleted, $c->mediatype, $c->filename, $c->filesize, $c->counter, $c->delete_at_first_view, $c->delete_at_day, $c->created_at, $c->created_by, $c->last_access_at, $c->mod_token, $c->nbslices, $c->complete, $c->passwd, $c->short); + } else { + $c->app->pg->db->query('INSERT INTO files (short, deleted, mediatype, filename, filesize, counter, delete_at_first_view, delete_at_day, created_at, created_by, last_access_at, mod_token, nbslices, complete, passwd) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', $c->short, $c->deleted, $c->mediatype, $c->filename, $c->filesize, $c->counter, $c->delete_at_first_view, $c->delete_at_day, $c->created_at, $c->created_by, $c->last_access_at, $c->mod_token, $c->nbslices, $c->complete, $c->passwd); + $c->record(1); + } + + return $c; +} + +sub count_empty { + my $c = shift; + + return $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS NULL')->hashes->first->{count}; +} + +sub already_exists { + my $c = shift; + my $short = shift; + + return $c->app->pg->db->query('SELECT count(short) FROM files WHERE short = ?', $short)->hashes->first->{count}; +} + +sub get_empty { + my $c = shift; + + my $r = $c->app->pg->db->query('SELECT * FROM files WHERE created_at IS NULL')->hashes->shuffle->first; + + return $c->_slurp($r)->created_at(time)->write; +} + +sub get_stats { + my $c = shift; + + my $files = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS NOT null AND deleted = 0')->hashes->first->{count}; + my $deleted = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS NOT null AND deleted = 1')->hashes->first->{count}; + my $empty = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS null')->hashes->first->{count}; + + return { files => $files, deleted => $deleted, empty => $empty }; +} + +sub from_short { + my $c = shift; + my $short = shift; + + my $r = $c->app->pg->db->query('SELECT * FROM files WHERE short = ?', $short)->hashes; + + if ($r->size) { + return $c->_slurp($r->first)->record(1); + } else { + return undef; + } +} + +sub get_oldest_undeleted_files { + my $c = shift; + my $num = shift; + + my @files; + my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = 0 ORDER BY created_at ASC LIMIT ?', $num)->hashes; + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lufi::DB::File->new(app => $c->app); + + push @files, $i->_slurp($e); + } + ); + + return c(@files); +} + +sub get_expired { + my $c = shift; + my $time = shift; + + my @files; + ## Select only files expired since two days, to be sure that nobody is still downloading it + my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = 0 AND ((delete_at_day + 2) * 86400) < (? - created_at) AND delete_at_day != 0', $time)->hashes; + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lufi::DB::File->new(app => $c->app); + + push @files, $i->_slurp($e); + } + ); + + return c(@files); +} + +sub get_no_longer_viewed { + my $c = shift; + my $time = shift; + + my @files; + my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = 0 AND last_access_at < ?', $time)->hashes; + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lufi::DB::File->new(app => $c->app); + + push @files, $i->_slurp($e); + } + ); + + return c(@files); +} + +sub delete_creator_before { + my $c = shift; + my $separation = shift; + + $c->app->pg->db->query('UPDATE files SET created_by = NULL WHERE created_by IS NOT NULL AND created_at < ?', $separation); +} + +sub _slurp { + my $c = shift; + my $r = shift; + + my $file; + if (defined $r) { + $file = $r; + } else { + my $files = $c->app->pg->db->query('SELECT * FROM files WHERE short = ?', $c->short)->hashes; + + if ($files->size) { + $file = $files->first; + } + } + + if ($file) { + $c->short($file->{short}); + $c->deleted($file->{deleted}); + $c->mediatype($file->{mediatype}); + $c->filename($file->{filename}); + $c->filesize($file->{filesize}); + $c->counter($file->{counter}); + $c->delete_at_first_view($file->{delete_at_first_view}); + $c->delete_at_day($file->{delete_at_day}); + $c->created_at($file->{created_at}); + $c->created_by($file->{created_by}); + $c->last_access_at($file->{last_access_at}); + $c->mod_token($file->{mod_token}); + $c->nbslices($file->{nbslices}); + $c->complete($file->{complete}); + $c->passwd($file->{passwd}); + + $c->record(1) unless $c->record; + } + + $c->slices(Lufi::DB::Slice->new(app => $c->app)->get_slices_of_file($c->short)); + + return $c; +} + +1; diff --git a/lib/Lufi/DB/File/SQLite.pm b/lib/Lufi/DB/File/SQLite.pm index bd6bd2c..a62e710 100644 --- a/lib/Lufi/DB/File/SQLite.pm +++ b/lib/Lufi/DB/File/SQLite.pm @@ -90,7 +90,7 @@ sub get_stats { my $deleted = Lufi::DB::SQLite::Files->count('WHERE created_at IS NOT null AND deleted = 1'); my $empty = Lufi::DB::SQLite::Files->count('WHERE created_at IS null'); - return {files => $files, deleted => $deleted, empty => $empty}; + return { files => $files, deleted => $deleted, empty => $empty }; } sub from_short { diff --git a/lib/Lufi/DB/Slice.pm b/lib/Lufi/DB/Slice.pm index 5d77b4b..b350071 100644 --- a/lib/Lufi/DB/Slice.pm +++ b/lib/Lufi/DB/Slice.pm @@ -62,9 +62,9 @@ sub new { if ($dbtype eq 'sqlite') { use Lufi::DB::Slice::SQLite; $c = Lufi::DB::Slice::SQLite->new(@_); - #} elsif ($dbtype eq 'postgresql') { - # use Lufi::DB::Slice::Pg; - # $c = Lufi::DB::Slice::Pg->new(@_); + } elsif ($dbtype eq 'postgresql') { + use Lufi::DB::Slice::Pg; + $c = Lufi::DB::Slice::Pg->new(@_); } } diff --git a/lib/Lufi/DB/Slice/Pg.pm b/lib/Lufi/DB/Slice/Pg.pm new file mode 100644 index 0000000..5744b49 --- /dev/null +++ b/lib/Lufi/DB/Slice/Pg.pm @@ -0,0 +1,73 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lufi::DB::Slice::Pg; +use Mojo::Base 'Lufi::DB::Slice'; +use Mojo::Collection 'c'; + +has 'record' => 0; + +sub new { + my $c = shift; + + $c = $c->SUPER::new(@_); + + return $c; +} + +sub write { + my $c = shift; + + if ($c->record) { + $c->app->pg->db->query('UPDATE slices SET short = ?, j = ?, path = ? WHERE short = ? AND j = ?', $c->short, $c->j, $c->path, $c->short, $c->j); + } else { + $c->app->pg->db->query('INSERT INTO slices (short, j, path) VALUES (?, ?, ?)', $c->short, $c->j, $c->path); + $c->record(1); + } + + return $c; +} + +sub get_slices_of_file { + my $c = shift; + my $short = shift; + + my @slices; + my $records = $c->app->pg->db->query('SELECT * FROM slices WHERE short = ? ORDER BY j ASC', $short)->hashes; + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lufi::DB::Slice->new(app => $c->app); + + push @slices, $i->_slurp($e); + } + ); + + return c(@slices); +} + +sub _slurp { + my $c = shift; + my $r = shift; + + my $slice; + if (defined $r) { + $slice = $r; + } else { + my $slices = $c->app->pg->db->query('SELECT * FROM slices WHERE short = ? AND j = ?', $c->short, $c->j)->hashes; + + if ($slices->size) { + $slice = $slices->first; + } + } + + if ($slice) { + $c->short($slice->{short}); + $c->j($slice->{j}); + $c->path($slice->{path}); + + $c->record(1); + } + + return $c; +} + +1; diff --git a/lib/Lufi/Plugin/Helpers.pm b/lib/Lufi/Plugin/Helpers.pm index 1d5539f..518f3fe 100644 --- a/lib/Lufi/Plugin/Helpers.pm +++ b/lib/Lufi/Plugin/Helpers.pm @@ -8,20 +8,19 @@ sub register { my ($self, $app) = @_; $app->plugin('PgURLHelper'); - # - # if ($app->config('dbtype') eq 'postgresql') { - # use Mojo::Pg; - # $app->helper(pg => \&_pg); - # - # # Database migration - # my $migrations = Mojo::Pg::Migrations->new(pg => $app->pg); - # if ($app->mode eq 'development' && $ENV{LUFI_DEV} == 1) { - # $migrations->from_file('utilities/migrations.sql')->migrate(0)->migrate(1); - # } else { - # $migrations->from_file('utilities/migrations.sql')->migrate(1); - # } - # } elsif ($app->config('dbtype') eq 'sqlite') { - if ($app->config('dbtype') eq 'sqlite') { + + if ($app->config('dbtype') eq 'postgresql') { + use Mojo::Pg; + $app->helper(pg => \&_pg); + + # Database migration + my $migrations = Mojo::Pg::Migrations->new(pg => $app->pg); + if ($app->mode eq 'development' && $ENV{LUFI_DEV}) { + $migrations->from_file('utilities/migrations_pg.sql')->migrate(0)->migrate(1); + } else { + $migrations->from_file('utilities/migrations_pg.sql')->migrate(1); + } + } elsif ($app->config('dbtype') eq 'sqlite') { # SQLite database migration if needed use Lufi::DB::SQLite; my $columns = Lufi::DB::SQLite::Files->table_info; diff --git a/lufi.conf.template b/lufi.conf.template old mode 100755 new mode 100644 index 218f23b..ac0b7f2 --- a/lufi.conf.template +++ b/lufi.conf.template @@ -115,7 +115,7 @@ # SQLite ONLY - only used if dbtype is set to sqlite # define a path to the SQLite database # you can define it relative to lufi directory or set an absolute path - # remember that it has to be in a directory writable by Lutim user + # remember that it has to be in a directory writable by Lufi user # optional, default is lufi.db #db_path => 'lufi.db', diff --git a/utilities/migrations_pg.sql b/utilities/migrations_pg.sql index e2917b2..3ceeef9 100644 --- a/utilities/migrations_pg.sql +++ b/utilities/migrations_pg.sql @@ -18,9 +18,10 @@ CREATE TABLE IF NOT EXISTS files ( ); CREATE TABLE IF NOT EXISTS slices ( - short text REFERENCES files(short) ON DELETE CASCADE, + short text NOT NULL REFERENCES files(short) ON DELETE CASCADE, j integer NOT NULL, path text unique NOT NULL, + constraint slice_short_j UNIQUE (short, j) ); -- 1 down DROP TABLE slices; From 6ae96ccd6c74fd9810c441545a2369751872e50a Mon Sep 17 00:00:00 2001 From: Nikos Filopoulos Date: Mon, 11 Sep 2017 20:07:44 +0200 Subject: [PATCH 39/53] Correction of Italian words --- themes/default/lib/Lufi/I18N/it.po | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index d9938b9..bd578c1 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -33,11 +33,11 @@ msgstr "24 ore" #: themes/default/templates/mail.html.ep:83 msgid ":" -msgstr " :" +msgstr "A :" #: 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 grazie con una foto di un gattino sur Diaspora* o Twitter è forte;-)" +msgstr "Un grazie con una foto di un gattino sur Diaspora* o Twitter è forte;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" @@ -53,7 +53,7 @@ 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." +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:52 @@ -66,7 +66,7 @@ msgstr "Ritorna all'homepage" #: lib/Lufi/Controller/Mail.pm:20 msgid "Bad CSRF token!" -msgstr "Torken CSRF errato!" +msgstr "Token CSRF errato!" #: themes/default/templates/render.html.ep:48 msgid "Click here to refresh the page and restart the download." @@ -174,7 +174,7 @@ msgstr "Scadenza:" #: themes/default/templates/files.html.ep:29 msgid "Expires at" -msgstr "Scade il" +msgstr "Scadrà il" #: themes/default/templates/files.html.ep:12 msgid "Export localStorage data" @@ -310,9 +310,13 @@ msgstr "Riservatezza" msgid "Purge expired files from localStorage" msgstr "Eliminare dal localStorage i file scaduti" +#: +msgid "Rows in purple mean that the files have expired and are no longer available." +msgstr "Le righe in viola indicano che il file è scaduto e non è più disponibile." + #: themes/default/templates/files.html.ep:9 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." +msgstr "" #: themes/default/templates/index.html.ep:111 msgid "Send all links by email" @@ -328,7 +332,7 @@ msgstr "Inviare tramite il vostro programma di posta" #: 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." +msgstr "Invio della parte XX1 su XX2. Prego attendere, la barra di avanzamento può impiegare del tempo prima di colorarsi." #. (url_for('/') #: themes/default/templates/mail.html.ep:91 @@ -351,9 +355,13 @@ msgstr "L'invio del file è attualemente disattivato. Riprovare più tardi." msgid "Sorry, uploading is disabled." msgstr "L'invio del file è attualemente disattivato." +#: +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'amministratore pu vedere solo il nome del file, la sua dimensione e il suo mimetype (video, testo, etc)." + #: 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'amministratore pu vedere solo il nome del file, la sua dimensione e il suo mimetype (video, testo, etc.)." +msgstr "" #: themes/default/templates/files.html.ep:44 msgid "The data has been successfully imported." From a6a58e4a07f249f22745c74e9f04e90f8142ebff Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Thu, 20 Jul 2017 13:09:15 +0200 Subject: [PATCH 40/53] Added compatibility list --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d66722a..82c6348 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,17 @@ Lufi means Let's Upload that FIle. +## Which browsers are compatible? + +Lufi is tested and working on the following browsers / devices : + - Firefox + - Chrome + - Internet Explorer 11 + - Microsoft Edge + - Safari + - iOS devices (ipad, iphone) + - Android devices (Galaxy tab, Galaxy S8) + ## What does it do? It stores files and allows you to download them. From f333a9af74df1ea9be058860bfd7796b1e0a6ff6 Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Wed, 23 Aug 2017 09:30:36 +0200 Subject: [PATCH 41/53] IE & Edge fix for downloading blob files, gives option to save or open the file when the link is opened. --- themes/default/public/js/lufi-down.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/themes/default/public/js/lufi-down.js b/themes/default/public/js/lufi-down.js index 3285fdf..671c302 100644 --- a/themes/default/public/js/lufi-down.js +++ b/themes/default/public/js/lufi-down.js @@ -97,7 +97,13 @@ function spawnWebsocket(pa) { var pbd = $('#pbd'); pbd.attr('class', 'center-align'); - var blobURL = URL.createObjectURL(blob); + // IE & Edge fix for downloading blob files, gives option to save or open the file when the link is opened. + if (window.navigator && window.navigator.msSaveOrOpenBlob) { + var fileName = escapeHtml(data.name); + window.navigator.msSaveOrOpenBlob(blob, fileName); + } else { + var blobURL = URL.createObjectURL(blob); + } var innerHTML = ['

', i18n.download, '

']; if (data.type.match(/^image\//) !== null) { From 5754ac2113e27cd86c35fe0a14658a74e87d4f28 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 11 Sep 2017 20:58:47 +0200 Subject: [PATCH 42/53] Remove trailing spaces and replace tabs with spaces --- lib/Lufi/Command/theme.pm | 2 +- themes/default/lib/Lufi/I18N/ca.po | 10 ++-- themes/default/lib/Lufi/I18N/en.po | 10 ++-- themes/default/lib/Lufi/I18N/fr.po | 10 ++-- themes/default/lib/Lufi/I18N/it.po | 10 ++-- themes/default/lib/Lufi/I18N/nl.po | 10 ++-- themes/default/lib/Lufi/I18N/oc.po | 10 ++-- themes/default/lib/Lufi/I18N/pt.po | 10 ++-- themes/default/public/js/lufi-up.js | 10 ++-- .../default/templates/layouts/default.html.ep | 47 +++++++++---------- 10 files changed, 64 insertions(+), 65 deletions(-) diff --git a/lib/Lufi/Command/theme.pm b/lib/Lufi/Command/theme.pm index 96a3ca3..185e5d5 100644 --- a/lib/Lufi/Command/theme.pm +++ b/lib/Lufi/Command/theme.pm @@ -62,7 +62,7 @@ SEDOPTS=-e "s\@SOME DESCRIPTIVE TITLE\@Lufi language file\@" \\ -e "s\@CHARSET\@utf8\@" \\ -e "s\@the PACKAGE package\@the Lufi package\@" \\ -e '/^\\#\\. (/{N;/\\n\\#\\. (/{N;/\\n.*\\.\\.\\/default\\//{s/\\#\\..*\\n.*\\#\\./\\#. (/g}}}' \\ - -e '/^\\#\\. (/{N;/\\n.*\\.\\.\\/default\\//{s/\\n/ /}}' + -e '/^\\#\\. (/{N;/\\n.*\\.\\.\\/default\\//{s/\\n/ /}}' SEDOPTS2=-e '/^\\#.*\\.\\.\\/default\\//,+3d' XGETTEXT=carton exec ../../local/bin/xgettext.pl CARTON=carton exec diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po index 80a9ba1..3f70ffb 100644 --- a/themes/default/lib/Lufi/I18N/ca.po +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -44,7 +44,7 @@ msgstr "Un agraïment amb la foto d'un gatet a From 7aae44f6cc7c5ea16d4cceecc2cb3b1970c224ac Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 11 Sep 2017 21:30:45 +0200 Subject: [PATCH 43/53] Fix #64 --- lib/Lufi/Controller/Mail.pm | 3 ++- themes/default/lib/Lufi/I18N/ca.po | 12 ++++++------ themes/default/lib/Lufi/I18N/en.po | 12 ++++++------ themes/default/lib/Lufi/I18N/fr.po | 12 ++++++------ themes/default/lib/Lufi/I18N/it.po | 12 ++++++------ themes/default/lib/Lufi/I18N/nl.po | 12 ++++++------ themes/default/lib/Lufi/I18N/oc.po | 12 ++++++------ themes/default/lib/Lufi/I18N/pt.po | 12 ++++++------ 8 files changed, 44 insertions(+), 43 deletions(-) diff --git a/lib/Lufi/Controller/Mail.pm b/lib/Lufi/Controller/Mail.pm index b004919..bbfbfbe 100644 --- a/lib/Lufi/Controller/Mail.pm +++ b/lib/Lufi/Controller/Mail.pm @@ -6,10 +6,11 @@ use Mojo::JSON qw(decode_json); sub render_mail { my $c = shift; + my $links = (defined($c->param('links'))) ? decode_json($c->param('links')) : []; $c->render( template => 'mail', - links => decode_json($c->param('links')) + links => $links ); } diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po index 3f70ffb..9982b56 100644 --- a/themes/default/lib/Lufi/I18N/ca.po +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -65,7 +65,7 @@ msgstr "Demanem la part XX1 de %1 del fitxer" msgid "Back to homepage" msgstr "Retorna a la pàgina d'inici" -#: lib/Lufi/Controller/Mail.pm:20 +#: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" msgstr "Mal testimoni CSRF!" @@ -363,11 +363,11 @@ msgstr "" msgid "The data has been successfully imported." msgstr "La importació de les dades ha reeixit." -#: lib/Lufi/Controller/Mail.pm:42 +#: lib/Lufi/Controller/Mail.pm:43 msgid "The email body can't be empty." msgstr "El cos del correu no pot estar buit." -#: lib/Lufi/Controller/Mail.pm:41 +#: lib/Lufi/Controller/Mail.pm:42 msgid "The email subject can't be empty." msgstr "L'assumpte dle correu no pot estar buit." @@ -380,7 +380,7 @@ msgid "The files uploaded on a Lufi instance are encrypted before the upload to 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 +#: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" msgstr "Les següents adreces de correu electrònic no són vàlides: %1" @@ -388,7 +388,7 @@ msgstr "Les següents adreces de correu electrònic no són vàlides: %1" 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 +#: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." msgstr "El correu ja està enviat." @@ -471,7 +471,7 @@ msgstr "Heu intentat deixar aquesta pàgina. Es canceŀlarà la pujada. N'esteu msgid "You have been successfully logged out." msgstr "Heu sortit correctament." -#: lib/Lufi/Controller/Mail.pm:40 +#: lib/Lufi/Controller/Mail.pm:41 msgid "You must give email addresses." msgstr "Heu de donar l'adreça de correu electrònic." diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index e65ba46..72cfd26 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -62,7 +62,7 @@ msgstr "" msgid "Back to homepage" msgstr "" -#: lib/Lufi/Controller/Mail.pm:20 +#: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" msgstr "" @@ -357,11 +357,11 @@ msgstr "" msgid "The data has been successfully imported." msgstr "" -#: lib/Lufi/Controller/Mail.pm:42 +#: lib/Lufi/Controller/Mail.pm:43 msgid "The email body can't be empty." msgstr "" -#: lib/Lufi/Controller/Mail.pm:41 +#: lib/Lufi/Controller/Mail.pm:42 msgid "The email subject can't be empty." msgstr "" @@ -374,7 +374,7 @@ msgid "The files uploaded on a Lufi instance are encrypted before the upload to msgstr "" #. (join(', ', @bad) -#: lib/Lufi/Controller/Mail.pm:37 +#: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" msgstr "" @@ -382,7 +382,7 @@ msgstr "" msgid "The link(s) has been copied to your clipboard" msgstr "" -#: lib/Lufi/Controller/Mail.pm:65 +#: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." msgstr "" @@ -465,7 +465,7 @@ msgstr "" msgid "You have been successfully logged out." msgstr "" -#: lib/Lufi/Controller/Mail.pm:40 +#: lib/Lufi/Controller/Mail.pm:41 msgid "You must give email addresses." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index 9d08f51..7009b61 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -64,7 +64,7 @@ msgstr "Demande de récupération du fragment de fichier XX1 sur %1" msgid "Back to homepage" msgstr "Retour à la page d’accueil" -#: lib/Lufi/Controller/Mail.pm:20 +#: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" msgstr "Mauvais jeton CSRF !" @@ -359,11 +359,11 @@ msgstr "L’administrateur ne peut voir que le nom du fichier, sa taille et son msgid "The data has been successfully imported." msgstr "Les données ont été importées avec succès." -#: lib/Lufi/Controller/Mail.pm:42 +#: lib/Lufi/Controller/Mail.pm:43 msgid "The email body can't be empty." msgstr "Le corps du mail ne peut être vide." -#: lib/Lufi/Controller/Mail.pm:41 +#: lib/Lufi/Controller/Mail.pm:42 msgid "The email subject can't be empty." msgstr "Le sujet du mail ne peut être vide." @@ -376,7 +376,7 @@ msgid "The files uploaded on a Lufi instance are encrypted before the upload to msgstr "Les fichiers envoyés sur une instance de Lufi sont chiffrés avant l’envoi au serveur : l’administrateur du serveur ne peut pas voir le contenu de vos fichiers." #. (join(', ', @bad) -#: lib/Lufi/Controller/Mail.pm:37 +#: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" msgstr "Les adresses mail suivantes ne sont pas valides : %1" @@ -384,7 +384,7 @@ msgstr "Les adresses mail suivantes ne sont pas valides : %1" msgid "The link(s) has been copied to your clipboard" msgstr "Le(s) lien(s) a/ont été copié dans votre presse-papier" -#: lib/Lufi/Controller/Mail.pm:65 +#: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." msgstr "Le mail a été envoyé." @@ -467,7 +467,7 @@ msgstr "Vous essayez de quitter la page. L’envoi sera annulé. Êtes-vous sûr msgid "You have been successfully logged out." msgstr "Vous avez été déconnecté·e avec succès." -#: lib/Lufi/Controller/Mail.pm:40 +#: lib/Lufi/Controller/Mail.pm:41 msgid "You must give email addresses." msgstr "Vous devez envoyer des adresses mail." diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index c1633f8..c85af03 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -64,7 +64,7 @@ msgstr "Recupero della porzione del file XX1 su %1" msgid "Back to homepage" msgstr "Ritorna all'homepage" -#: lib/Lufi/Controller/Mail.pm:20 +#: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" msgstr "Token CSRF errato!" @@ -367,11 +367,11 @@ msgstr "" msgid "The data has been successfully imported." msgstr "I dati sono stati importati correttamente." -#: lib/Lufi/Controller/Mail.pm:42 +#: lib/Lufi/Controller/Mail.pm:43 msgid "The email body can't be empty." msgstr "Il corpo dell'email non può essere vuoto." -#: lib/Lufi/Controller/Mail.pm:41 +#: lib/Lufi/Controller/Mail.pm:42 msgid "The email subject can't be empty." msgstr "Il soggetto dell'email non può essere vuoto." @@ -384,7 +384,7 @@ msgid "The files uploaded on a Lufi instance are encrypted before the upload to msgstr "I file inviati su un istanza di Lufi sono cifrati prima dell'invio al server: l'amministratore del server non può vedere il contenuto dei vostri file." #. (join(', ', @bad) -#: lib/Lufi/Controller/Mail.pm:37 +#: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" msgstr "I seguenti indirizzi email non sono validi: %1" @@ -392,7 +392,7 @@ msgstr "I seguenti indirizzi email non sono validi: %1" msgid "The link(s) has been copied to your clipboard" msgstr "I link sono stati copiati negli appunti" -#: lib/Lufi/Controller/Mail.pm:65 +#: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." msgstr "Email inviata." @@ -475,7 +475,7 @@ msgstr "Hai cercato di uscire da questa pagina. L'invio sarà cancellato. Sei si msgid "You have been successfully logged out." msgstr "Logout avvenuto con successo." -#: lib/Lufi/Controller/Mail.pm:40 +#: lib/Lufi/Controller/Mail.pm:41 msgid "You must give email addresses." msgstr "Devi fornire gli indirizzi email." diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po index adcd591..fdd11e9 100644 --- a/themes/default/lib/Lufi/I18N/nl.po +++ b/themes/default/lib/Lufi/I18N/nl.po @@ -51,7 +51,7 @@ msgstr "Deel XX1 van %1 wordt opgehaald" msgid "Back to homepage" msgstr "Terug naar home" -#: lib/Lufi/Controller/Mail.pm:20 +#: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" msgstr "Verkeerde CSRF token!" @@ -350,11 +350,11 @@ msgstr "Beheerders zien alleen bestandsnamen, grootte en mimetype (wat voor soor msgid "The data has been successfully imported." msgstr "Data is succesvol geimporteerd." -#: lib/Lufi/Controller/Mail.pm:42 +#: lib/Lufi/Controller/Mail.pm:43 msgid "The email body can't be empty." msgstr "Mail inhoud kan niet leeg zijn." -#: lib/Lufi/Controller/Mail.pm:41 +#: lib/Lufi/Controller/Mail.pm:42 msgid "The email subject can't be empty." msgstr "Onderwerp kan niet leeg zijn." @@ -367,7 +367,7 @@ msgid "The files uploaded on a Lufi instance are encrypted before the upload to 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 +#: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" msgstr "Volgende email adressen zijn niet geldig: %1" @@ -375,7 +375,7 @@ msgstr "Volgende email adressen zijn niet geldig: %1" msgid "The link(s) has been copied to your clipboard" msgstr "De link is gekopieerd naar je klembord" -#: lib/Lufi/Controller/Mail.pm:65 +#: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." msgstr "Email is verzonden." @@ -458,7 +458,7 @@ msgstr "Je verlaat deze pagina. Upload zal geannuleerd worden. Weet je het zeker msgid "You have been successfully logged out." msgstr "Je bent succesvol uitgelogd." -#: lib/Lufi/Controller/Mail.pm:40 +#: lib/Lufi/Controller/Mail.pm:41 msgid "You must give email addresses." msgstr "Je moet een mail adres opgeven." diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index dbed4b6..95ccf09 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -64,7 +64,7 @@ msgstr "Demanda del tròç XX1 sus %1 del fichièr" msgid "Back to homepage" msgstr "Retorn a la pagina d’acuèlh" -#: lib/Lufi/Controller/Mail.pm:20 +#: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" msgstr "Marrit geton CSRF !" @@ -359,11 +359,11 @@ msgstr "L’administrator pòt pas que veire lo nom del fichièr, sa talha e son msgid "The data has been successfully imported." msgstr "Las donadas son ben estadas importadas." -#: lib/Lufi/Controller/Mail.pm:42 +#: lib/Lufi/Controller/Mail.pm:43 msgid "The email body can't be empty." msgstr "Lo contengut del corrièl pòt pas èsser void." -#: lib/Lufi/Controller/Mail.pm:41 +#: lib/Lufi/Controller/Mail.pm:42 msgid "The email subject can't be empty." msgstr "Lo sujècte del corrièl pòt pas èsser void." @@ -376,7 +376,7 @@ msgid "The files uploaded on a Lufi instance are encrypted before the upload to msgstr "Los fichièrs mandats amb una instància Lufi son chifrats abans la mandadís al servidor : l’administrator del servidor pòt pas veire lo contengut dels fichièrs." #. (join(', ', @bad) -#: lib/Lufi/Controller/Mail.pm:37 +#: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" msgstr "Las adreças de corrièl seguentas son pas validas : %1" @@ -384,7 +384,7 @@ msgstr "Las adreças de corrièl seguentas son pas validas : %1" 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" -#: lib/Lufi/Controller/Mail.pm:65 +#: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." msgstr "Lo corrièl es estat mandat." @@ -467,7 +467,7 @@ msgstr "Ensajatz de partir de la pagina. Lo mandadís serà anullat. Sètz segur msgid "You have been successfully logged out." msgstr "Sètz ben estat desconnectat." -#: lib/Lufi/Controller/Mail.pm:40 +#: lib/Lufi/Controller/Mail.pm:41 msgid "You must give email addresses." msgstr "Vos cal donar d’adreças." diff --git a/themes/default/lib/Lufi/I18N/pt.po b/themes/default/lib/Lufi/I18N/pt.po index 3c6fdce..0cc7321 100644 --- a/themes/default/lib/Lufi/I18N/pt.po +++ b/themes/default/lib/Lufi/I18N/pt.po @@ -65,7 +65,7 @@ msgstr "Pedido de recuperação de um fragmento do ficheiro XX1 de %1" msgid "Back to homepage" msgstr "Voltar à página inicial" -#: lib/Lufi/Controller/Mail.pm:20 +#: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" msgstr "Símbolo errado CSRF !" @@ -368,11 +368,11 @@ msgstr "O administrador pode apenas ver o nome do ficheiro, o seu tamanho e o ti msgid "The data has been successfully imported." msgstr "Os dados foram importados com sucesso." -#: lib/Lufi/Controller/Mail.pm:42 +#: lib/Lufi/Controller/Mail.pm:43 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 +#: lib/Lufi/Controller/Mail.pm:42 msgid "The email subject can't be empty." msgstr "O assunto do e-mail não pode estar vazio." @@ -385,7 +385,7 @@ msgid "The files uploaded on a Lufi instance are encrypted before the upload to 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 +#: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" msgstr "Os e-mails seguintes não são válidos: %1" @@ -393,7 +393,7 @@ msgstr "Os e-mails seguintes não são válidos: %1" 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 +#: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." msgstr "O e-mail foi enviado." @@ -480,7 +480,7 @@ msgstr "Está a tentar sair da página. O envio será anulado. Tem a certeza?" msgid "You have been successfully logged out." msgstr "Foi desconectado com sucesso." -#: lib/Lufi/Controller/Mail.pm:40 +#: lib/Lufi/Controller/Mail.pm:41 msgid "You must give email addresses." msgstr "Deve escrever os e-mails." From 0b79642f6aa2934e1cebcaa5cc0b8e6e62070b23 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 11 Sep 2017 21:42:44 +0200 Subject: [PATCH 44/53] Fix #65 --- 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 bdd677f..94bab1d 100644 --- a/themes/default/templates/mail.html.ep +++ b/themes/default/templates/mail.html.ep @@ -75,7 +75,7 @@ '<%= $link %>', % } ]; - var text = "<%= l('Hello,\n\nHere\'s some files I want to share with you:\n') %>"; + var text = "<%== l('Hello,\n\nHere\'s some files I want to share with you:\n') %>"; links.forEach(function(name, index, array) { var item = findItem(name); if (item !== null && item !== undefined) { From 04961a28800f3df17efc9198e9430ac8b893384a Mon Sep 17 00:00:00 2001 From: Quentin Date: Tue, 12 Sep 2017 09:14:17 +0200 Subject: [PATCH 45/53] Update oc.po --- themes/default/lib/Lufi/I18N/oc.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index 95ccf09..095f7c8 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -1,4 +1,4 @@ -# Lufi FR translation +# Lufi OC translation # Copyright (C) 2015 Luc Didry # This file is distributed under the same license as the Lufi package. # Luc Didry , 2015. @@ -300,7 +300,7 @@ msgstr "Mercés d’esperar pendent la recuperacion de vòstre fichièr. Nos cal #: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." -msgstr "" +msgstr "Mercés de verificar vòstres identificants : impossible de vos autorificar." #: themes/default/templates/about.html.ep:5 msgid "Privacy" @@ -341,7 +341,7 @@ msgstr "Connexion" #: lib/Lufi.pm:194 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 "" +msgstr "O planhèm collèga, sètz pas autorizat a utilizar aqueste servici. Contactatz ton administratr sistèma se pensatz qu'i a un problèma." #: themes/default/templates/index.html.ep:30 msgid "Sorry, the uploading is currently disabled. Please try again later." From 79914b21cfa3701391c6ba84d89525094e93ddc8 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 12 Sep 2017 20:28:54 +0200 Subject: [PATCH 46/53] Fix #98 --- themes/default/lib/Lufi/I18N/ca.po | 4 ++-- themes/default/lib/Lufi/I18N/en.po | 2 +- themes/default/lib/Lufi/I18N/fr.po | 4 ++-- themes/default/lib/Lufi/I18N/it.po | 4 ++-- themes/default/lib/Lufi/I18N/nl.po | 4 ++-- themes/default/lib/Lufi/I18N/oc.po | 4 ++-- themes/default/lib/Lufi/I18N/pt.po | 4 ++-- themes/default/templates/about.html.ep | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po index 9982b56..321ddd3 100644 --- a/themes/default/lib/Lufi/I18N/ca.po +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -37,8 +37,8 @@ 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 ;-)" +msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" +msgstr "Un agraïment amb la foto d'un gatet a Diaspora* o a Mastodon també fa goig ;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index 72cfd26..2409076 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -34,7 +34,7 @@ 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 ;-)" +msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" msgstr "" #: themes/default/templates/render.html.ep:42 diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index 7009b61..e2f6821 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -36,8 +36,8 @@ 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 merci avec une photo de chaton sur Diaspora* ou Twitter fait aussi l’affaire ;-)" +msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" +msgstr "Un merci avec une photo de chaton sur Diaspora* ou Mastodon fait aussi l’affaire ;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index c85af03..98d7258 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -36,8 +36,8 @@ msgid ":" msgstr "A :" #: 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 grazie con una foto di un gattino sur Diaspora* o Twitter è forte;-)" +msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" +msgstr "Un grazie con una foto di un gattino sur Diaspora* o Mastodon è forte;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po index fdd11e9..d765622 100644 --- a/themes/default/lib/Lufi/I18N/nl.po +++ b/themes/default/lib/Lufi/I18N/nl.po @@ -23,8 +23,8 @@ 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 ;-)" +msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" +msgstr "Een bedankt foto met een katje op Diaspora* of Mastodon is ook goed ;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index 095f7c8..dc49575 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -36,8 +36,8 @@ 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 mercé amb una foto de caton sus Diaspora* o Twitter conven tanben ;-)" +msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" +msgstr "Un mercé amb una foto de caton sus Diaspora* o Mastodon conven tanben ;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" diff --git a/themes/default/lib/Lufi/I18N/pt.po b/themes/default/lib/Lufi/I18N/pt.po index 0cc7321..d154f07 100644 --- a/themes/default/lib/Lufi/I18N/pt.po +++ b/themes/default/lib/Lufi/I18N/pt.po @@ -37,8 +37,8 @@ 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 ;-)" +msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" +msgstr "Um obrigado com a foto de um gatinho no Diaspora* ou Mastodon é também porreiro ;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" diff --git a/themes/default/templates/about.html.ep b/themes/default/templates/about.html.ep index 7c76ee7..17ddf44 100644 --- a/themes/default/templates/about.html.ep +++ b/themes/default/templates/about.html.ep @@ -13,7 +13,7 @@

<%= l('Please contact the administrator: %1', config('contact')) %>

<%= l('Who wrote this software?') %>

<%== l('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.') %>
- <%== l('A thank you with a photo of kitten on Diaspora* or Twitter is cool too ;-)') %>

+ <%== l('A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)') %>

<%= l('How to install the software on my server?') %>

<%== l('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.') %>
<%== l('Get the source code on the official repository or on its Github mirror') %> From 834f2520856f957f4a4ff140ca430807cde4dc67 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 12 Sep 2017 20:59:31 +0200 Subject: [PATCH 47/53] update CHANGELOG --- CHANGELOG | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8558dcc..2e49c35 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,12 +1,16 @@ Revision history for Lufi -0.02 2017-? +0.02 2017-09-12 - Database abstraction layer - PostgreSQL support - IE 11 and Edge support - Fix encoding error (#83) - Htpassword authentication support - Ability to add a password to a file + - Portuguese translation + - Catalan translation + - IE 11 support + - Bugfixes 0.01 2017-01-09 - Upload files From 55b0a366cffb8761de4a28248dfdbd803a07142f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 12 Sep 2017 21:46:31 +0200 Subject: [PATCH 48/53] Fixes #23 This commit is dedicated to Schoumi, who is supporting me on Tipeee. Many thanks :-) --- CHANGELOG | 1 + themes/default/public/js/lufi-files.js | 29 ++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2e49c35..f8a3763 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ Revision history for Lufi - Portuguese translation - Catalan translation - IE 11 support + - Deleting files from "My files" is now done with Ajax (#23) - Bugfixes 0.01 2017-01-09 diff --git a/themes/default/public/js/lufi-files.js b/themes/default/public/js/lufi-files.js index 74e7719..7315dc2 100644 --- a/themes/default/public/js/lufi-files.js +++ b/themes/default/public/js/lufi-files.js @@ -106,6 +106,30 @@ function importStorage(f) { reader.readAsArrayBuffer(f[0]); } +function delFile() { + var dlink = $(this).attr('data-dlink'); + var short = $(this).attr('data-short'); + $.ajax({ + url: dlink, + method: 'GET', + data: { + format: 'json' + }, + success: function(data) { + if (data.success) { + $('#row-'+short).remove(); + delItem(short); + } else { + alert(data.msg); + } + }, + error: function() { + }, + complete: function() { + } + }); +} + function populateFilesTable() { $('#myfiles').empty(); @@ -125,7 +149,7 @@ function populateFilesTable() { var limit = (element.delay === 0) ? i18n.noExpiration : moment.unix(element.delay * 86400 + element.created_at).locale(window.navigator.language).format('LLLL'); var created_at = moment.unix(element.created_at).locale(window.navigator.language).format('LLLL'); - var tr = $(''); + var tr = $(''); tr.html([ '', escapeHtml(element.name), '', @@ -144,12 +168,13 @@ function populateFilesTable() { limit, '', '', - '', + '', '', '', '', ''].join('')); $('#myfiles').append(tr); + $('#del-'+element.short).on('click', delFile); $.ajax({ url: counterURL, From 81d73cfb3c5b10d9ee43f1538d3d751cc0a2484e Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 12 Sep 2017 22:46:10 +0200 Subject: [PATCH 49/53] Fixes #24 This commit is dedicated to jehster, who is supporting me on Tipeee. Many thanks :-) --- CHANGELOG | 1 + themes/default/lib/Lufi/I18N/ca.po | 24 +++++++++++++--------- themes/default/lib/Lufi/I18N/en.po | 24 +++++++++++++--------- themes/default/lib/Lufi/I18N/fr.po | 24 +++++++++++++--------- themes/default/lib/Lufi/I18N/it.po | 24 +++++++++++++--------- themes/default/lib/Lufi/I18N/nl.po | 24 +++++++++++++--------- themes/default/lib/Lufi/I18N/oc.po | 24 +++++++++++++--------- themes/default/lib/Lufi/I18N/pt.po | 24 +++++++++++++--------- themes/default/public/css/lufi.css | 3 +++ themes/default/public/js/lufi-files.js | 28 +++++++++++++++++++++++++- themes/default/templates/files.html.ep | 4 +++- 11 files changed, 132 insertions(+), 72 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f8a3763..c0e8439 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ Revision history for Lufi - Catalan translation - IE 11 support - Deleting files from "My files" is now done with Ajax (#23) + - Allow bulk files deletion from "My files" (#24) - Bugfixes 0.01 2017-01-09 diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po index 321ddd3..85ff22c 100644 --- a/themes/default/lib/Lufi/I18N/ca.po +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -105,15 +105,19 @@ msgstr "No es troba el fitxer. Esteu segur de la URL i el testimoni?" 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 +#: themes/default/templates/files.html.ep:28 msgid "Counter" msgstr "Comptador" -#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +#: themes/default/templates/files.html.ep:29 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:104 +#: themes/default/templates/files.html.ep:18 +msgid "Delete selected files" +msgstr "" + +#: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Enllaç per a eliminació" @@ -129,7 +133,7 @@ msgstr "Descàrrega" msgid "Download aborted." msgstr "Descàrrega avortada." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Enllaç per a descàrrega" @@ -173,7 +177,7 @@ msgstr "Error: no trobo el fitxer. Esteu segur de la URL ?" msgid "Expiration:" msgstr "Expiració:" -#: themes/default/templates/files.html.ep:29 +#: themes/default/templates/files.html.ep:31 msgid "Expires at" msgstr "Expira el" @@ -185,7 +189,7 @@ msgstr "Exporta dades a l'emmagatzematge local" msgid "File deleted" msgstr "Fitxer eliminat" -#: themes/default/templates/files.html.ep:24 +#: themes/default/templates/files.html.ep:26 msgid "File name" msgstr "Nom de fitxer" @@ -266,7 +270,7 @@ msgstr "Sortida" 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:31 +#: themes/default/templates/files.html.ep:33 msgid "Mail" msgstr "" @@ -279,7 +283,7 @@ msgstr "Els meus fitxers" 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:43 themes/default/templates/index.html.ep:112 +#: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Sense moratòria d'expiració" @@ -359,7 +363,7 @@ 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:44 +#: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." msgstr "La importació de les dades ha reeixit." @@ -427,7 +431,7 @@ msgstr "No he pogut obtenir el comptador de %1. No esteu autenticat." msgid "Upload files" msgstr "Pujar fitxers" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:30 msgid "Uploaded at" msgstr "Pujat a les" diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index 2409076..f1f284c 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -102,15 +102,19 @@ msgstr "" msgid "Could not find the file. Are you sure of the URL?" msgstr "" -#: themes/default/templates/files.html.ep:26 +#: themes/default/templates/files.html.ep:28 msgid "Counter" msgstr "" -#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +#: themes/default/templates/files.html.ep:29 themes/default/templates/index.html.ep:64 msgid "Delete at first download?" msgstr "" -#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 +#: themes/default/templates/files.html.ep:18 +msgid "Delete selected files" +msgstr "" + +#: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "" @@ -126,7 +130,7 @@ msgstr "" msgid "Download aborted." msgstr "" -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "" @@ -170,7 +174,7 @@ msgstr "" msgid "Expiration:" msgstr "" -#: themes/default/templates/files.html.ep:29 +#: themes/default/templates/files.html.ep:31 msgid "Expires at" msgstr "" @@ -182,7 +186,7 @@ msgstr "" msgid "File deleted" msgstr "" -#: themes/default/templates/files.html.ep:24 +#: themes/default/templates/files.html.ep:26 msgid "File name" msgstr "" @@ -262,7 +266,7 @@ msgstr "" msgid "Lufi is a free (as in free speech) file hosting software." msgstr "" -#: themes/default/templates/files.html.ep:31 +#: themes/default/templates/files.html.ep:33 msgid "Mail" msgstr "" @@ -275,7 +279,7 @@ msgstr "" msgid "No enough space available on the server for this file (size: %1)." msgstr "" -#: themes/default/templates/files.html.ep:43 themes/default/templates/index.html.ep:112 +#: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "" @@ -353,7 +357,7 @@ msgstr "" 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 "" -#: themes/default/templates/files.html.ep:44 +#: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." msgstr "" @@ -421,7 +425,7 @@ msgstr "" msgid "Upload files" msgstr "" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:30 msgid "Uploaded at" msgstr "" diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index e2f6821..4efb92c 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -104,15 +104,19 @@ msgstr "Impossible de retrouver le fichier. Êtes-vous sûr(e) que l’URL et le 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 ?" -#: themes/default/templates/files.html.ep:26 +#: themes/default/templates/files.html.ep:28 msgid "Counter" msgstr "Compteur" -#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +#: themes/default/templates/files.html.ep:29 themes/default/templates/index.html.ep:64 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:104 +#: themes/default/templates/files.html.ep:18 +msgid "Delete selected files" +msgstr "Supprimer les fichiers sélectionnés" + +#: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Lien de suppression" @@ -128,7 +132,7 @@ msgstr "Télécharger" msgid "Download aborted." msgstr "Téléchargement abandonné." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Lien de téléchargement" @@ -172,7 +176,7 @@ msgstr "Erreur : impossible de retrouver le fichier. Êtes-vous sûr(e) de l’ msgid "Expiration:" msgstr "Expiration :" -#: themes/default/templates/files.html.ep:29 +#: themes/default/templates/files.html.ep:31 msgid "Expires at" msgstr "Expire le" @@ -184,7 +188,7 @@ msgstr "Exporter les données localStorage" msgid "File deleted" msgstr "Fichier supprimé" -#: themes/default/templates/files.html.ep:24 +#: themes/default/templates/files.html.ep:26 msgid "File name" msgstr "Nom du fichier" @@ -264,7 +268,7 @@ msgstr "Déconnexion" msgid "Lufi is a free (as in free speech) file hosting software." msgstr "Lufi est un logiciel libre d’hébergement de fichiers." -#: themes/default/templates/files.html.ep:31 +#: themes/default/templates/files.html.ep:33 msgid "Mail" msgstr "" @@ -277,7 +281,7 @@ msgstr "Mes fichiers" 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:43 themes/default/templates/index.html.ep:112 +#: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Pas de délai d’expiration" @@ -355,7 +359,7 @@ msgstr "Désolé, l’envoi de fichier est désactivé." 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’administrateur ne peut voir que le nom du fichier, sa taille et son type mime (son type de fichier : vidéo, texte, etc.)." -#: themes/default/templates/files.html.ep:44 +#: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." msgstr "Les données ont été importées avec succès." @@ -423,7 +427,7 @@ msgstr "Impossible de récupérer le compteur pour %1. Vous n’êtes pas connec msgid "Upload files" msgstr "Envoyer des fichiers" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:30 msgid "Uploaded at" msgstr "Envoyé le" diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index 98d7258..9bc5eec 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -104,15 +104,19 @@ msgstr "Impossibile trovare il file. Sei sicuro che URL e token siano corretti ? msgid "Could not find the file. Are you sure of the URL?" msgstr "Impossibile trovare il file. Sei sicuro che l'URL sia corretto?" -#: themes/default/templates/files.html.ep:26 +#: themes/default/templates/files.html.ep:28 msgid "Counter" msgstr "Contatore" -#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +#: themes/default/templates/files.html.ep:29 themes/default/templates/index.html.ep:64 msgid "Delete at first download?" msgstr "Cancellare al primo download?" -#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:104 +#: themes/default/templates/files.html.ep:18 +msgid "Delete selected files" +msgstr "" + +#: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Link per l'eliminazione" @@ -128,7 +132,7 @@ msgstr "Download" msgid "Download aborted." msgstr "Download annullato." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Link per il download" @@ -172,7 +176,7 @@ msgstr "Errore: impossibile trovare il file. Sei certo dell'URL ?" msgid "Expiration:" msgstr "Scadenza:" -#: themes/default/templates/files.html.ep:29 +#: themes/default/templates/files.html.ep:31 msgid "Expires at" msgstr "Scadrà il" @@ -184,7 +188,7 @@ msgstr "Esportare i dati del localStorage" msgid "File deleted" msgstr "File cancellato" -#: themes/default/templates/files.html.ep:24 +#: themes/default/templates/files.html.ep:26 msgid "File name" msgstr "Nome del file" @@ -264,7 +268,7 @@ msgstr "Logout" msgid "Lufi is a free (as in free speech) file hosting software." msgstr "Lufi è un software libero di file hosting." -#: themes/default/templates/files.html.ep:31 +#: themes/default/templates/files.html.ep:33 msgid "Mail" msgstr "" @@ -277,7 +281,7 @@ msgstr "I miei file" 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:43 themes/default/templates/index.html.ep:112 +#: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Nessun ritardo per la scadenza" @@ -363,7 +367,7 @@ msgstr "L'amministratore pu vedere solo il nome del file, la sua dimensione e il 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 "" -#: themes/default/templates/files.html.ep:44 +#: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." msgstr "I dati sono stati importati correttamente." @@ -431,7 +435,7 @@ msgstr "Impossibile recuperare il contatore per %1. Non sei autenticato." msgid "Upload files" msgstr "Invio dei file" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:30 msgid "Uploaded at" msgstr "Invio il" diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po index d765622..21e0078 100644 --- a/themes/default/lib/Lufi/I18N/nl.po +++ b/themes/default/lib/Lufi/I18N/nl.po @@ -91,15 +91,19 @@ msgstr "Kan het bestand niet vinden. Klopt de URL en token wel?" 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 +#: themes/default/templates/files.html.ep:28 msgid "Counter" msgstr "Teller" -#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +#: themes/default/templates/files.html.ep:29 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:104 +#: themes/default/templates/files.html.ep:18 +msgid "Delete selected files" +msgstr "" + +#: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Verwijderingslink" @@ -115,7 +119,7 @@ msgstr "Download" msgid "Download aborted." msgstr "Download geannuleerd." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Download link" @@ -159,7 +163,7 @@ msgstr "Fout: kan het bestand niet vinden. Is de URL juist?" msgid "Expiration:" msgstr "Vervaldatum:" -#: themes/default/templates/files.html.ep:29 +#: themes/default/templates/files.html.ep:31 msgid "Expires at" msgstr "Vervalt op" @@ -171,7 +175,7 @@ msgstr "Exporteer opgeslagen data" msgid "File deleted" msgstr "Bestand verwijderd" -#: themes/default/templates/files.html.ep:24 +#: themes/default/templates/files.html.ep:26 msgid "File name" msgstr "Bestandsnaam" @@ -251,7 +255,7 @@ msgstr "Logout" 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:31 +#: themes/default/templates/files.html.ep:33 msgid "Mail" msgstr "" @@ -264,7 +268,7 @@ msgstr "Mijn bestanden" 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:43 themes/default/templates/index.html.ep:112 +#: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Geen verloop uitstel" @@ -346,7 +350,7 @@ msgstr "SOrry, uploaden is uitgeschakeld." 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:44 +#: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." msgstr "Data is succesvol geimporteerd." @@ -414,7 +418,7 @@ msgstr "Kan geen teller verkrijgen voor %1. Je bent niet geauthenticeerd." msgid "Upload files" msgstr "Upload bestanden" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:30 msgid "Uploaded at" msgstr "Geupload op" diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index dc49575..98ca525 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -104,15 +104,19 @@ msgstr "Impossible de trobar lo fichièr. Sètz segur-a que l’URL e lo geton s 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 ?" -#: themes/default/templates/files.html.ep:26 +#: themes/default/templates/files.html.ep:28 msgid "Counter" msgstr "Comptador" -#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +#: themes/default/templates/files.html.ep:29 themes/default/templates/index.html.ep:64 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:104 +#: themes/default/templates/files.html.ep:18 +msgid "Delete selected files" +msgstr "" + +#: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Ligam de supression" @@ -128,7 +132,7 @@ msgstr "Telecargar" msgid "Download aborted." msgstr "Telecargament abandonat." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Ligam de telecargament" @@ -172,7 +176,7 @@ msgstr "Error : impossible de trobar lo fichièr. Sètz segur-a de l’URL ?" msgid "Expiration:" msgstr "Expiracion :" -#: themes/default/templates/files.html.ep:29 +#: themes/default/templates/files.html.ep:31 msgid "Expires at" msgstr "Expira lo" @@ -184,7 +188,7 @@ msgstr "Exportar las donadas localStorage" msgid "File deleted" msgstr "Fichièr suprimit" -#: themes/default/templates/files.html.ep:24 +#: themes/default/templates/files.html.ep:26 msgid "File name" msgstr "Nom del fichièr" @@ -264,7 +268,7 @@ msgstr "Desconnexion" msgid "Lufi is a free (as in free speech) file hosting software." msgstr "Lufi es un logicial liure d’albèrgament de fichièrs." -#: themes/default/templates/files.html.ep:31 +#: themes/default/templates/files.html.ep:33 msgid "Mail" msgstr "" @@ -277,7 +281,7 @@ msgstr "Mos fichièrs" 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:43 themes/default/templates/index.html.ep:112 +#: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Pas cap de relambi d’expiracion" @@ -355,7 +359,7 @@ msgstr "O planhèm, la foncion per mandar de fichièr es desactivada." 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’administrator pòt pas que veire lo nom del fichièr, sa talha e son mimetype (Quina mena de fichièr es : vidèo, tèxte, etc.)." -#: themes/default/templates/files.html.ep:44 +#: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." msgstr "Las donadas son ben estadas importadas." @@ -423,7 +427,7 @@ msgstr "Impossible de recuperar lo comptador per %1. Sètz pas connectat·ada." msgid "Upload files" msgstr "Mandar de fichièrs" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:30 msgid "Uploaded at" msgstr "Mandat lo" diff --git a/themes/default/lib/Lufi/I18N/pt.po b/themes/default/lib/Lufi/I18N/pt.po index d154f07..851ebcb 100644 --- a/themes/default/lib/Lufi/I18N/pt.po +++ b/themes/default/lib/Lufi/I18N/pt.po @@ -105,15 +105,19 @@ msgstr "Impossível encontrar o ficheiro.Tem a certeza que o URL e os símbolos 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 +#: themes/default/templates/files.html.ep:28 msgid "Counter" msgstr "Contador" -#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:64 +#: themes/default/templates/files.html.ep:29 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:104 +#: themes/default/templates/files.html.ep:18 +msgid "Delete selected files" +msgstr "" + +#: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" msgstr "Eliminar o link" @@ -129,7 +133,7 @@ msgstr "Download" msgid "Download aborted." msgstr "Download interrompido." -#: themes/default/templates/files.html.ep:25 themes/default/templates/index.html.ep:105 +#: themes/default/templates/files.html.ep:27 themes/default/templates/index.html.ep:105 msgid "Download link" msgstr "Link para o download" @@ -177,7 +181,7 @@ msgstr "Erro: impossível encontrar o ficheiro. Tem a certeza do URL?" msgid "Expiration:" msgstr "Expiração:" -#: themes/default/templates/files.html.ep:29 +#: themes/default/templates/files.html.ep:31 msgid "Expires at" msgstr "Expira no" @@ -189,7 +193,7 @@ msgstr "Exportar os dados localStorage" msgid "File deleted" msgstr "Ficheiro apagado" -#: themes/default/templates/files.html.ep:24 +#: themes/default/templates/files.html.ep:26 msgid "File name" msgstr "Nome do ficheiro" @@ -273,7 +277,7 @@ msgstr "Encerrar sessão" 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:31 +#: themes/default/templates/files.html.ep:33 msgid "Mail" msgstr "" @@ -286,7 +290,7 @@ msgstr "Meus ficheiros" 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:43 themes/default/templates/index.html.ep:112 +#: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" msgstr "Não tem prazo de expiração" @@ -364,7 +368,7 @@ msgstr "Desculpe, o envio do ficheiro está desativado." 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:44 +#: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." msgstr "Os dados foram importados com sucesso." @@ -432,7 +436,7 @@ msgstr "Impossível recuperar o contador para %1. Não está conectado." msgid "Upload files" msgstr "Enviar os ficheiros" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:30 msgid "Uploaded at" msgstr "Enviar a" diff --git a/themes/default/public/css/lufi.css b/themes/default/public/css/lufi.css index 9d1f347..496901a 100644 --- a/themes/default/public/css/lufi.css +++ b/themes/default/public/css/lufi.css @@ -99,3 +99,6 @@ a.classic:focus { overflow: hidden; text-overflow: ellipsis; } +.files-buttons a { + margin-bottom: 10px; +} diff --git a/themes/default/public/js/lufi-files.js b/themes/default/public/js/lufi-files.js index 7315dc2..58e64e5 100644 --- a/themes/default/public/js/lufi-files.js +++ b/themes/default/public/js/lufi-files.js @@ -130,6 +130,20 @@ function delFile() { }); } +function evaluateMassDelete() { + if ($('input[data-checked="data-checked"]').length > 0) { + $('#mass-delete').removeAttr('disabled'); + $('#mass-delete').removeClass('disabled'); + } else { + $('#mass-delete').attr('disabled'); + $('#mass-delete').addClass('disabled'); + } +} + +function massDelete() { + $('input[data-checked="data-checked"]').each(delFile); +} + function populateFilesTable() { $('#myfiles').empty(); @@ -150,7 +164,11 @@ function populateFilesTable() { var created_at = moment.unix(element.created_at).locale(window.navigator.language).format('LLLL'); var tr = $(''); - tr.html([ '', + tr.html([ '', + '', + '', + '', + '', escapeHtml(element.name), '', '', @@ -175,6 +193,14 @@ function populateFilesTable() { ''].join('')); $('#myfiles').append(tr); $('#del-'+element.short).on('click', delFile); + $('label[for="check-'+element.short+'"').on('click', function(){ + if ($('#check-'+element.short).attr('data-checked') && $('#check-'+element.short).attr('data-checked') === 'data-checked') { + $('#check-'+element.short).attr('data-checked', null); + } else { + $('#check-'+element.short).attr('data-checked', 'data-checked'); + } + evaluateMassDelete(); + }); $.ajax({ url: counterURL, diff --git a/themes/default/templates/files.html.ep b/themes/default/templates/files.html.ep index cb96a84..a7441e3 100644 --- a/themes/default/templates/files.html.ep +++ b/themes/default/templates/files.html.ep @@ -8,19 +8,21 @@ <%= l('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.') %>
<%= l('Rows in red mean that the files have expired and are no longer available.') %>

-
+
+ From 29dfd2835d52c443939a0250fdadef0af541a3d3 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 12 Sep 2017 22:57:48 +0200 Subject: [PATCH 50/53] Waiting for complete oc translation before releasing a new version --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index c0e8439..5aa3947 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ Revision history for Lufi -0.02 2017-09-12 +0.02 2017-09-? - Database abstraction layer - PostgreSQL support - IE 11 and Edge support From 9c62d4c3945297bbfaca1c1f0e3b57f2705c3b80 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 12 Sep 2017 23:08:25 +0200 Subject: [PATCH 51/53] Fix cron command for Pg --- lib/Lufi/DB/File/Pg.pm | 10 +++++----- lib/Mounter.pm | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/Lufi/DB/File/Pg.pm b/lib/Lufi/DB/File/Pg.pm index f28a099..62967f7 100644 --- a/lib/Lufi/DB/File/Pg.pm +++ b/lib/Lufi/DB/File/Pg.pm @@ -52,8 +52,8 @@ sub get_empty { sub get_stats { my $c = shift; - my $files = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS NOT null AND deleted = 0')->hashes->first->{count}; - my $deleted = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS NOT null AND deleted = 1')->hashes->first->{count}; + my $files = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS NOT null AND deleted = false')->hashes->first->{count}; + my $deleted = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS NOT null AND deleted = true')->hashes->first->{count}; my $empty = $c->app->pg->db->query('SELECT count(short) FROM files WHERE created_at IS null')->hashes->first->{count}; return { files => $files, deleted => $deleted, empty => $empty }; @@ -77,7 +77,7 @@ sub get_oldest_undeleted_files { my $num = shift; my @files; - my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = 0 ORDER BY created_at ASC LIMIT ?', $num)->hashes; + my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = false ORDER BY created_at ASC LIMIT ?', $num)->hashes; $records->each( sub { my ($e, $num) = @_; @@ -96,7 +96,7 @@ sub get_expired { my @files; ## Select only files expired since two days, to be sure that nobody is still downloading it - my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = 0 AND ((delete_at_day + 2) * 86400) < (? - created_at) AND delete_at_day != 0', $time)->hashes; + my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = false AND ((delete_at_day + 2) * 86400) < (? - created_at) AND delete_at_day != 0', $time)->hashes; $records->each( sub { my ($e, $num) = @_; @@ -114,7 +114,7 @@ sub get_no_longer_viewed { my $time = shift; my @files; - my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = 0 AND last_access_at < ?', $time)->hashes; + my $records = $c->app->pg->db->query('SELECT * FROM files WHERE deleted = false AND last_access_at < ?', $time)->hashes; $records->each( sub { my ($e, $num) = @_; diff --git a/lib/Mounter.pm b/lib/Mounter.pm index 9860253..ab2d6fc 100644 --- a/lib/Mounter.pm +++ b/lib/Mounter.pm @@ -19,6 +19,9 @@ sub startup { } ); + # Helpers + $self->plugin('Lufi::Plugin::Helpers'); + # Themes handling shift @{$self->static->paths}; if ($config->{theme} ne 'default') { From 800a20d5be01ffbc1eda8ab6d317d9efca4b5fd9 Mon Sep 17 00:00:00 2001 From: Quentin Date: Wed, 13 Sep 2017 09:08:17 +0200 Subject: [PATCH 52/53] =?UTF-8?q?Update=20oc.po=20quelques=20fautes=20de?= =?UTF-8?q?=20frappes=20par-ci=20par-l=C3=A0=20^^=20J=E2=80=99en=20ai=20pr?= =?UTF-8?q?ofit=C3=A9=20pour=20mettre=20des=20espaces=20fines=20ins=C3=A9c?= =?UTF-8?q?ables=20;)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/default/lib/Lufi/I18N/oc.po | 90 +++++++++++++++--------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index 98ca525..861a413 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -33,11 +33,11 @@ msgstr "24 oras" #: themes/default/templates/mail.html.ep:83 msgid ":" -msgstr " :" +msgstr " :" #: themes/default/templates/about.html.ep:16 msgid "A thank you with a photo of kitten on Diaspora* or Mastodon is cool too ;-)" -msgstr "Un mercé amb una foto de caton sus Diaspora* o Mastodon conven tanben ;-)" +msgstr "Un mercé amb una fotografia de caton sus Diaspora* o Mastodon conven tanben ;-)" #: themes/default/templates/render.html.ep:42 msgid "Abort" @@ -49,11 +49,11 @@ msgstr "A prepaus" #: themes/default/templates/index.html.ep:71 msgid "Add a password to file(s)" -msgstr "" +msgstr "Apondre un senhal al(s) fichièr(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 "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." +msgstr "Ja que Lufi es un logicial liure somés als tèrmes de la licéncia AGPLv3, podètz l’installar sus vòstre pròpri servidor. Mercés de consultar lo Wiki per veire la procedura." #. (stash('f') #: themes/default/templates/render.html.ep:52 @@ -66,7 +66,7 @@ msgstr "Retorn a la pagina d’acuèlh" #: lib/Lufi/Controller/Mail.pm:21 msgid "Bad CSRF token!" -msgstr "Marrit geton CSRF !" +msgstr "Marrit geton CSRF !" #: themes/default/templates/render.html.ep:48 msgid "Click here to refresh the page and restart the download." @@ -74,7 +74,7 @@ msgstr "Clicatz aquí per actualizar la pagina e tornar començar lo telecargame #: themes/default/templates/index.html.ep:80 msgid "Click to open the file browser" -msgstr "Clicatz per dobrir lo navigador de fichièr" +msgstr "Clicatz per dobrir lo navigator de fichièr" #: themes/default/templates/delays.html.ep:38 msgid "Close" @@ -86,11 +86,11 @@ msgstr "Adreças de corrièl separadas per de virgulas" #: themes/default/templates/index.html.ep:100 msgid "Copy all links to clipboard" -msgstr "Copiar totes los ligams dins lo quichapapièrs" +msgstr "Copiar totes los ligams al quicha-papièrs" #: themes/default/templates/index.html.ep:103 msgid "Copy to clipboard" -msgstr "Copiar dins lo quichapapièrs" +msgstr "Copiar al quicha-papièrs" #: lib/Lufi/Controller/Files.pm:429 msgid "Could not delete the file. You are not authenticated." @@ -98,11 +98,11 @@ msgstr "Impossible de suprimir lo fichièr. Sètz pas connectat-ada." #: lib/Lufi/Controller/Files.pm:411 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 ?" +msgstr "Impossible de trobar lo fichièr. Sètz segur-a que l’URL e lo geton son bons ?" #: 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 ?" +msgstr "Impossible de trobar lo fichièr. Sètz segur-a que l’URL es bona ?" #: themes/default/templates/files.html.ep:28 msgid "Counter" @@ -110,11 +110,11 @@ msgstr "Comptador" #: themes/default/templates/files.html.ep:29 themes/default/templates/index.html.ep:64 msgid "Delete at first download?" -msgstr "Suprimir aprèp lo primièr telecargament ?" +msgstr "Suprimir aprèp lo primièr telecargament ?" #: themes/default/templates/files.html.ep:18 msgid "Delete selected files" -msgstr "" +msgstr "Suprimir los fichièrs seleccionats" #: themes/default/templates/files.html.ep:32 themes/default/templates/index.html.ep:104 msgid "Deletion link" @@ -122,7 +122,7 @@ msgstr "Ligam de supression" #: 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 "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." +msgstr "Vos copetz pas lo cap : se un utilizaire comença a telecargar 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:106 themes/default/templates/render.html.ep:28 msgid "Download" @@ -138,7 +138,7 @@ msgstr "Ligam de telecargament" #: 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 "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." +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 descopats 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:77 msgid "Drop files here" @@ -146,11 +146,11 @@ msgstr "Lisatz vòstres fichièrs aquí" #: themes/default/templates/mail.html.ep:38 msgid "Email body" -msgstr "Còs del mail" +msgstr "Còs del corrièl" #: themes/default/templates/mail.html.ep:30 msgid "Email subject" -msgstr "Subjècte del mail" +msgstr "Subjècte del corrièl" #: themes/default/templates/mail.html.ep:24 themes/default/templates/mail.html.ep:26 msgid "Emails" @@ -162,19 +162,19 @@ msgstr "Chiframent del tròç XX1 sus XX2" #: lib/Lufi/Controller/Files.pm:225 msgid "Error: the file existed but was deleted." -msgstr "Error : lo fichièr existissiá mas es estat suprimit" +msgstr "Error : lo fichièr existissiá mas es estat suprimit" #: 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" +msgstr "Error : lo fichièr es pas estat mandat completament" #: 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 ?" +msgstr "Error : impossible de trobar lo fichièr. Sètz segur-a de l’URL ?" #: themes/default/templates/index.html.ep:108 msgid "Expiration:" -msgstr "Expiracion :" +msgstr "Expiracion :" #: themes/default/templates/files.html.ep:31 msgid "Expires at" @@ -202,7 +202,7 @@ msgstr "Recuperatz lo còdi font sul {size}) #: 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)." +msgstr "Espaci disc insufisent sul servidor per aqueste fichièr (talha del fichièr : \"%1)." #: themes/default/templates/files.html.ep:45 themes/default/templates/index.html.ep:112 msgid "No expiration delay" @@ -287,7 +287,7 @@ msgstr "Pas cap de relambi d’expiracion" #: 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 "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." +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/index.html.ep:70 themes/default/templates/login.html.ep:21 themes/default/templates/render.html.ep:26 msgid "Password" @@ -296,7 +296,7 @@ msgstr "Senhal" #. (config('contact') #: themes/default/templates/about.html.ep:13 msgid "Please contact the administrator: %1" -msgstr "Mercés de contactar l’administrator : %1" +msgstr "Mercés de contactar l’administrator : %1" #: 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." @@ -304,7 +304,7 @@ msgstr "Mercés d’esperar pendent la recuperacion de vòstre fichièr. Nos cal #: lib/Lufi.pm:191 msgid "Please, check your credentials: unable to authenticate." -msgstr "Mercés de verificar vòstres identificants : impossible de vos autorificar." +msgstr "Mercés de verificar vòstres identificants : impossible de vos autentificar." #: themes/default/templates/about.html.ep:5 msgid "Privacy" @@ -345,7 +345,7 @@ msgstr "Connexion" #: lib/Lufi.pm:194 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 "O planhèm collèga, sètz pas autorizat a utilizar aqueste servici. Contactatz ton administratr sistèma se pensatz qu'i a un problèma." +msgstr "O planhèm collèga, sètz pas autorizat a utilizar aqueste servici. Contactatz vòstre administrator sistèma se pensatz que i a un problèma." #: themes/default/templates/index.html.ep:30 msgid "Sorry, the uploading is currently disabled. Please try again later." @@ -357,7 +357,7 @@ msgstr "O planhèm, la foncion per mandar de fichièr es desactivada." #: 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’administrator pòt pas que veire lo nom del fichièr, sa talha e son mimetype (Quina mena de fichièr es : vidèo, tèxte, etc.)." +msgstr "L’administrator pòt pas que veire lo nom del fichièr, sa talha e son mimetype (Quina mena de fichièr es : vidèo, tèxte, etc.)." #: themes/default/templates/files.html.ep:46 msgid "The data has been successfully imported." @@ -377,16 +377,16 @@ msgstr "Lo fichièr es ja estat suprimit" #: 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 "Los fichièrs mandats amb una instància Lufi son chifrats abans la mandadís al servidor : l’administrator del servidor pòt pas veire lo contengut dels fichièrs." +msgstr "Los fichièrs mandats amb una instància Lufi son chifrats abans la mandadís al servidor : l’administrator del servidor pòt pas veire lo contengut dels fichièrs." #. (join(', ', @bad) #: lib/Lufi/Controller/Mail.pm:38 msgid "The following email addresses are not valid: %1" -msgstr "Las adreças de corrièl seguentas son pas validas : %1" +msgstr "Las adreças de corrièl seguentas son pas validas : %1" #: 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" +msgstr "Lo(s) ligam(s) es/son estat(s) copiat(s) dins vòstre quicha-papièrs" #: lib/Lufi/Controller/Mail.pm:66 msgid "The mail has been sent." @@ -402,11 +402,11 @@ msgstr "Lo servidor es pas estat capable de retrobar l’enregistrament del fich #: 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 "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 :" +msgstr "Aqueste servidor impausa de limitacions segon la talha 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:102 msgid "Unable to copy the link(s) to your clipboard" -msgstr "Impossible de copiar lo(s) ligams(s) dins vòstre quichapapièrs" +msgstr "Impossible de copiar lo(s) ligams(s) dins vòstre quicha-papièrs" #. ($short) #: lib/Lufi/Controller/Files.pm:361 @@ -441,11 +441,11 @@ msgstr "Error de comunicacion WebSocket" #: themes/default/templates/about.html.ep:3 msgid "What is Lufi?" -msgstr "Qu’es aquò Lufi ?" +msgstr "Qu’es aquò Lufi ?" #: themes/default/templates/about.html.ep:14 msgid "Who wrote this software?" -msgstr "Qual escriguèt aqueste logicial ?" +msgstr "Qual escriguèt aqueste logicial ?" #: 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." @@ -461,11 +461,11 @@ msgstr "Sembla qu’avètz pas la bona clau dins l’URL. Poiretz pas deschifrar #: 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 ?" +msgstr "Ensajatz de partir de la pagina. Lo telecargament serà anullat. Sètz segur-a ?" #: 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 ?" +msgstr "Ensajatz de partir de la pagina. Lo mandadís serà anullat. Sètz segur-a ?" #: themes/default/templates/logout.html.ep:5 msgid "You have been successfully logged out." @@ -478,11 +478,11 @@ msgstr "Vos cal donar d’adreças." #. (format_bytes($json->{size}) #: 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)" +msgstr "Vòstre fichièr es tròp voluminós : %1 (la talha maximum autorizada es %2)" #: lib/Lufi/Controller/Files.pm:273 msgid "Your password is not valid. Please refresh the page to retry." -msgstr "" +msgstr "Lo senhal es pas valid. Mercés d’actualizar la pagina e ensajar tornamai." #. (format_bytes($keys[$i]) #: themes/default/templates/delays.html.ep:20 @@ -496,7 +496,7 @@ msgstr "entre %1 e %2, lo fichièr serà gardat per totjorn. ;" #: themes/default/templates/mail.html.ep:85 msgid "deadline: " -msgstr "darrièr relambi per telecargar :" +msgstr "darrièr relambi per telecargar :" #. (format_bytes($keys[$i]) #: themes/default/templates/delays.html.ep:26 From 0edc107455f45b0fbb72745b471547d9fae584ee Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 13 Sep 2017 09:10:17 +0200 Subject: [PATCH 53/53] Release v0.02 --- CHANGELOG | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5aa3947..060c1eb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ Revision history for Lufi -0.02 2017-09-? +0.02 2017-09-13 - Database abstraction layer - PostgreSQL support - IE 11 and Edge support @@ -9,6 +9,7 @@ Revision history for Lufi - Ability to add a password to a file - Portuguese translation - Catalan translation + - Dutch translation - IE 11 support - Deleting files from "My files" is now done with Ajax (#23) - Allow bulk files deletion from "My files" (#24)
<%= l('File name') %> <%= l('Download link') %> <%= l('Counter') %>