diff --git a/.gitignore b/.gitignore index 66ca22062e7060817112f4c172b9243e5d2af3fd..8850a347502c40a0f138be739394148d71288656 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.swp lutim.conf -lutim.db +*.db *.db-shm *.db-wal script/hypnotoad.pid diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..3ce11b4eed54610e1aebbe9f2554a2f2430c78cf --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +image: hatsoftwares/test-ci:latest +stages: + - sqlite +before_script: + - carton install + - rm -f *db +sqlite: + stage: sqlite + cache: + key: "$CI_BUILD_REF_NAME" + untracked: true + paths: + - local + script: + - MOJO_CONFIG=t/sqlite.conf make test + tags: + - Debian + - Jessie diff --git a/CHANGELOG b/CHANGELOG index f2ce7c6a3bf026d15c048afd5930c44dc7474b50..542875962b1a4f9a57a5e1bdd977358204503bb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,12 @@ Revision history for Lutim 0.8 2017-? - Improve statistics page + - Add database abstraction layer (#42) + - Add PostgreSQL support (#42) + - Asks for Mojolicious 7.31 minimum (to install it: `carton update`) + - Add Liberapay and Tipeee buttons + - Remove Flattr button + - Handle MOJO_CONFIG env variable (#44) 0.7.1 2016-06-21 - Fix dependency bug diff --git a/Makefile b/Makefile index 4b5c2aafa5792830bb6b4592a9313eac06241491..05f68441f6dd009218fd29bea06f8eaa39911e1d 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/Lutim/I18N/en.po FR=themes/default/lib/Lutim/I18N/fr.po DE=themes/default/lib/Lutim/I18N/de.po @@ -7,19 +7,47 @@ OC=themes/default/lib/Lutim/I18N/oc.po XGETTEXT=carton exec local/bin/xgettext.pl CARTON=carton exec LUTIM=script/lutim +REAL_LUTIM=script/application locales: - $(XGETTEXT) -W -f $(EXTRACTFILES) -o $(EN) 2>/dev/null - $(XGETTEXT) -W -f $(EXTRACTFILES) -o $(FR) 2>/dev/null - $(XGETTEXT) -W -f $(EXTRACTFILES) -o $(DE) 2>/dev/null - $(XGETTEXT) -W -f $(EXTRACTFILES) -o $(ES) 2>/dev/null - $(XGETTEXT) -W -f $(EXTRACTFILES) -o $(OC) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(EN) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(FR) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(DE) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(ES) 2>/dev/null + $(XGETTEXT) $(EXTRACTDIR) -o $(OC) 2>/dev/null + +podcheck: + podchecker lib/Lutim/DB/Image.pm + +test-sqlite: + MOJO_CONFIG=t/sqlite.conf $(CARTON) $(REAL_LUTIM) test + +test-pg: + MOJO_CONFIG=t/postgresql.conf $(CARTON) $(REAL_LUTIM) test + +test: podcheck test-sqlite test-pg clean: rm -rf lutim.db files/ + dev: rm -rf themes/default/public/packed/* $(CARTON) morbo $(LUTIM) --listen http://0.0.0.0:3000 --watch lib/ --watch script/ --watch themes/ --watch lutim.conf devlog: multitail log/development.log + +create-pg-test-db: + sudo -u postgres psql -f t/create-pg-testdb.sql + +stats: + $(CARTON) $(LUTIM) cron stats -m production + +watch: + $(CARTON) $(LUTIM) cron watch -m production + +cleanfiles: + $(CARTON) $(LUTIM) cron cleanfiles -m production + +cleanbdd: + $(CARTON) $(LUTIM) cron cleanbdd -m production diff --git a/cpanfile b/cpanfile index 7f71d893d7cf2dde87a96fb021e183bdbf446a71..6e95b8a00fc377581c08c09ae71ee36ab5d2fa92 100644 --- a/cpanfile +++ b/cpanfile @@ -3,6 +3,7 @@ requires 'EV'; requires 'IO::Socket::SSL'; requires 'Data::Validate::URI'; requires 'Net::Domain::TLD', '>= 1.73'; # Must have the last version to handle (at least) .xyz and .link +requires 'Mojo::Pg'; requires 'Mojolicious::Plugin::I18N'; requires 'Mojolicious::Plugin::AssetPack'; requires 'CSS::Minifier::XS'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 901f3024294a1bb4fce7d56d33bffbbce8e3d8c4..7ea7c602151c210b60b0a88be70303fb0840418b 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -72,12 +72,32 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 File::Spec 0.80 perl 5.006 + 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 Class-Singleton-1.4 pathname: A/AB/ABW/Class-Singleton-1.4.tar.gz provides: Class::Singleton 1.4 requirements: ExtUtils::MakeMaker 0 + Clone-0.39 + pathname: G/GA/GARU/Clone-0.39.tar.gz + provides: + Clone 0.39 + requirements: + ExtUtils::MakeMaker 0 + Test::More 0 Crypt-Blowfish-2.14 pathname: D/DP/DPARIS/Crypt-Blowfish-2.14.tar.gz provides: @@ -98,6 +118,17 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.006 + 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.40 pathname: I/IS/ISHIGAKI/DBD-SQLite-1.40.tar.gz provides: @@ -278,19 +309,19 @@ DISTRIBUTIONS Data::Validate::Domain 0 Data::Validate::IP 0 ExtUtils::MakeMaker 0 - DateTime-1.42 - pathname: D/DR/DROLSKY/DateTime-1.42.tar.gz - provides: - DateTime 1.42 - DateTime::Duration 1.42 - DateTime::Helpers 1.42 - DateTime::Infinite 1.42 - DateTime::Infinite::Future 1.42 - DateTime::Infinite::Past 1.42 - DateTime::LeapSecond 1.42 - DateTime::PP 1.42 - DateTime::PPExtra 1.42 - DateTime::Types 1.42 + DateTime-1.43 + pathname: D/DR/DROLSKY/DateTime-1.43.tar.gz + provides: + DateTime 1.43 + DateTime::Duration 1.43 + DateTime::Helpers 1.43 + DateTime::Infinite 1.43 + DateTime::Infinite::Future 1.43 + DateTime::Infinite::Past 1.43 + DateTime::LeapSecond 1.43 + DateTime::PP 1.43 + DateTime::PPExtra 1.43 + DateTime::Types 1.43 requirements: Carp 0 DateTime::Locale 1.06 @@ -734,6 +765,14 @@ DISTRIBUTIONS perl 5.008004 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 Devel-StackTrace-2.02 pathname: D/DR/DROLSKY/Devel-StackTrace-2.02.tar.gz provides: @@ -950,6 +989,14 @@ DISTRIBUTIONS perl 5.005 strict 0 warnings 0 + 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-Socket-IP-0.37 pathname: P/PE/PEVANS/IO-Socket-IP-0.37.tar.gz provides: @@ -1341,8 +1388,22 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Mojolicious-7.31 - pathname: S/SR/SRI/Mojolicious-7.31.tar.gz + Mojo-Pg-3.06 + pathname: S/SR/SRI/Mojo-Pg-3.06.tar.gz + provides: + Mojo::Pg 3.06 + 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 + Mojolicious-7.32 + pathname: S/SR/SRI/Mojolicious-7.32.tar.gz provides: Mojo undef Mojo::Asset undef @@ -1410,7 +1471,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 7.31 + Mojolicious 7.32 Mojolicious::Command undef Mojolicious::Command::cgi undef Mojolicious::Command::cpanify undef @@ -1508,6 +1569,36 @@ DISTRIBUTIONS Mojolicious 5 Test::More 0 perl 5.010001 + 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 Net-Domain-TLD-1.75 pathname: A/AL/ALEXP/Net-Domain-TLD-1.75.tar.gz provides: @@ -1667,6 +1758,22 @@ DISTRIBUTIONS 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 SUPER-1.20141117 pathname: C/CH/CHROMATIC/SUPER-1.20141117.tar.gz provides: @@ -1767,6 +1874,15 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Test::More 0 + Sub-Quote-2.003001 + pathname: H/HA/HAARG/Sub-Quote-2.003001.tar.gz + provides: + Sub::Defer 2.003001 + Sub::Quote 2.003001 + requirements: + ExtUtils::MakeMaker 0 + Scalar::Util 0 + perl 5.006 Sub-Uplevel-0.24 pathname: D/DA/DAGOLDEN/Sub-Uplevel-0.24.tar.gz provides: diff --git a/lib/Lutim.pm b/lib/Lutim.pm index 854e2722c5ae2e24543e4d7c44ffb23112af8ea8..6958a3008c34c81a3f899d88a58b8c1c57920301 100644 --- a/lib/Lutim.pm +++ b/lib/Lutim.pm @@ -1,9 +1,7 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim; use Mojo::Base 'Mojolicious'; -use Mojo::Util qw(quote); use Lutim::DB::Image; -use Crypt::CBC; -use Data::Entropy qw(entropy_source); use vars qw($im_loaded); BEGIN { @@ -71,227 +69,9 @@ sub startup { $self->plugin('AssetPack' => { pipes => [qw(Combine)] }); # Helpers - $self->helper( - render_file => sub { - my $c = shift; - my ($filename, $path, $mediatype, $dl, $expires, $nocache, $key, $thumb) = @_; - - $dl = 'attachment' if ($mediatype =~ m/svg/); - $filename = quote($filename); - - my $asset; - unless (-f $path && -r $path) { - $c->app->log->error("Cannot read file [$path]. error [$!]"); - $c->flash( - msg => $c->l('Unable to find the image: it has been deleted.') - ); - return 500; - } - - $mediatype =~ s/x-//; - - my $headers = Mojo::Headers->new(); - if ($nocache) { - $headers->add('Cache-Control' => 'no-cache, no-store, max-age=0, must-revalidate'); - } else { - $headers->add('Expires' => $expires); - } - $headers->add('Content-Type' => $mediatype.';name='.$filename); - $headers->add('Content-Disposition' => $dl.';filename='.$filename); - $c->res->content->headers($headers); - - if ($key) { - $asset = $c->decrypt($key, $path); - } else { - $asset = Mojo::Asset::File->new(path => $path); - } - - if (defined $thumb && $im_loaded && $mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') { # ImageMagick don't work in Debian with svg (for now?) - my $im = Image::Magick->new; - $im->BlobToImage($asset->slurp); - - # Create the thumbnail - $im->Resize(geometry=>'x'.$c->config('thumbnail_size')); - - # Replace the asset with the thumbnail - $asset = Mojo::Asset::Memory->new->add_chunk($im->ImageToBlob()); - } - - $c->res->content->asset($asset); - $headers->add('Content-Length' => $asset->size); - - return $c->rendered(200); - } - ); - - $self->helper( - ip => sub { - my $c = shift; - my $ip_only = shift || 0; - - 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_only) ? $ip : "$ip remote port:$remote_port"; - } - ); - - $self->helper( - provisioning => sub { - my $c = shift; - - # Create some short patterns for provisioning - my $img = Lutim::DB::Image->new(app => $c->app); - if ($img->count_empty < $c->config->{provisioning}) { - for (my $i = 0; $i < $c->config->{provis_step}; $i++) { - my $short; - do { - $short = $c->shortener($c->config->{length}); - } while ($img->count_short($short) || $short eq 'about' || $short eq 'stats' || $short eq 'd' || $short eq 'm' || $short eq 'gallery' || $short eq 'zip' || $short eq 'infos'); - - $img->short($short) - ->counter(0) - ->enabled(1) - ->delete_at_first_view(0) - ->delete_at_day(0) - ->mod_token($c->shortener($c->config->{token_length})) - ->write; - - $img = Lutim::DB::Image->new(app => $c->app); - } - } - } - ); - - $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( - stop_upload => sub { - my $c = shift; - - if (-f 'stop-upload' || -f 'stop-upload.manual') { - $c->stash( - stop_upload => $c->l('Uploading is currently disabled, please try later or contact the administrator (%1).', $config->{contact}) - ); - return 1; - } - 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( - 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( - is_selected => sub { - my $c = shift; - my $num = shift; - - return ($num == $c->default_delay) ? 'selected="selected"' : ''; - } - ); - - $self->helper( - crypt => sub { - my $c = shift; - my $upload = shift; - my $filename = shift; - - my $key = $c->shortener($c->config('crypto_key_length')); - - my $cipher = Crypt::CBC->new( - -key => $key, - -cipher => 'Blowfish', - -header => 'none', - -iv => 'dupajasi' - ); - - $cipher->start('encrypting'); - - my $crypt_asset = Mojo::Asset::File->new; - - $crypt_asset->add_chunk($cipher->crypt($upload->slurp)); - $crypt_asset->add_chunk($cipher->finish); - - my $crypt_upload = Mojo::Upload->new; - $crypt_upload->filename($filename); - $crypt_upload->asset($crypt_asset); - - return ($crypt_upload, $key); - } - ); - - $self->helper( - decrypt => sub { - my $c = shift; - my $key = shift; - my $file = shift; - - my $cipher = Crypt::CBC->new( - -key => $key, - -cipher => 'Blowfish', - -header => 'none', - -iv => 'dupajasi' - ); - - $cipher->start('decrypting'); - - my $decrypt_asset = Mojo::Asset::File->new; - - open(my $f, "<",$file) or die "Unable to read encrypted file: $!"; - binmode $f; - while (read($f, my $buffer,1024)) { - $decrypt_asset->add_chunk($cipher->crypt($buffer)); - } - $decrypt_asset->add_chunk($cipher->finish) ; - - return $decrypt_asset; - } - ); - - $self->helper( - delete_image => sub { - my $c = shift; - my $img = shift; - unlink $img->path or warn "Could not unlink ".$img->path.": $!"; - $img->disable(); - } - ); + $self->plugin('Lutim::Plugin::Helpers'); + # Hooks $self->hook( before_dispatch => sub { my $c = shift; diff --git a/lib/Lutim/Command/cron.pm b/lib/Lutim/Command/cron.pm index 163620ce6056fcc6b12ae179fc6c645dc394def8..a4d10c95e93aa9eea80a843b2c629cdf24c77787 100644 --- a/lib/Lutim/Command/cron.pm +++ b/lib/Lutim/Command/cron.pm @@ -1,3 +1,4 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::Command::cron; use Mojo::Base 'Mojolicious::Commands'; diff --git a/lib/Lutim/Command/cron/cleanbdd.pm b/lib/Lutim/Command/cron/cleanbdd.pm index c1c5f2842dd8a2c4b53f06e494b878c91806f7f0..b65589b5bc6e78017af8c19cc3c93f52d251e4f7 100644 --- a/lib/Lutim/Command/cron/cleanbdd.pm +++ b/lib/Lutim/Command/cron/cleanbdd.pm @@ -1,5 +1,7 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::Command::cron::cleanbdd; use Mojo::Base 'Mojolicious::Command'; +use Mojo::File; use Lutim::DB::Image; use FindBin qw($Bin); use File::Spec qw(catfile); @@ -10,8 +12,15 @@ has usage => sub { shift->extract_usage }; sub run { my $c = shift; + my $cfile = Mojo::File->new($Bin, '..' , 'lutim.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, '..' ,'lutim.conf'), + file => $cfile, default => { keep_ip_during => 365, dbtype => 'sqlite', diff --git a/lib/Lutim/Command/cron/cleanfiles.pm b/lib/Lutim/Command/cron/cleanfiles.pm index a2e7d76e89da3251701914356b944fa60914afea..1293213ccc2f07365650461c977de5c970ac4bbf 100644 --- a/lib/Lutim/Command/cron/cleanfiles.pm +++ b/lib/Lutim/Command/cron/cleanfiles.pm @@ -1,6 +1,7 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::Command::cron::cleanfiles; use Mojo::Base 'Mojolicious::Command'; -use Mojo::Util qw(slurp decode); +use Mojo::File; use Lutim::DB::Image; use Lutim; use FindBin qw($Bin); @@ -12,8 +13,15 @@ has usage => sub { shift->extract_usage }; sub run { my $c = shift; + my $cfile = Mojo::File->new($Bin, '..' , 'lutim.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, '..' ,'lutim.conf'), + file => $cfile, default => { dbtype => 'sqlite', } diff --git a/lib/Lutim/Command/cron/stats.pm b/lib/Lutim/Command/cron/stats.pm index 08c79b501155b9d230bcf92a9046cebecd2e1253..f4848d493b6a671d38f441b630f9dd376047eacb 100644 --- a/lib/Lutim/Command/cron/stats.pm +++ b/lib/Lutim/Command/cron/stats.pm @@ -1,9 +1,10 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::Command::cron::stats; use Mojo::Base 'Mojolicious::Command'; -use Lutim::DB::Image; use Mojo::DOM; use Mojo::Util qw(encode); use Mojo::File; +use Lutim::DB::Image; use DateTime; use FindBin qw($Bin); use File::Spec qw(catfile); @@ -14,8 +15,15 @@ has usage => sub { shift->extract_usage }; sub run { my $c = shift; + my $cfile = Mojo::File->new($Bin, '..' , 'lutim.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, '..' ,'lutim.conf'), + file => $cfile, theme => 'default', default => { stats_day_num => 365, diff --git a/lib/Lutim/Command/cron/watch.pm b/lib/Lutim/Command/cron/watch.pm index 1e0f1a71a4a90fa1c6fe788e28ee84ea97bbf419..31eda392c82641c46d492d8c23047341bc44d43a 100644 --- a/lib/Lutim/Command/cron/watch.pm +++ b/lib/Lutim/Command/cron/watch.pm @@ -1,10 +1,10 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::Command::cron::watch; use Mojo::Base 'Mojolicious::Command'; -use Mojo::Util qw(slurp decode); use Filesys::DiskUsage qw/du/; use Lutim::DB::Image; use Lutim; +use Mojo::File; use Switch; use FindBin qw($Bin); use File::Spec qw(catfile); @@ -15,8 +15,15 @@ has usage => sub { shift->extract_usage }; sub run { my $c = shift; + my $cfile = Mojo::File->new($Bin, '..' , 'lutim.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, '..' ,'lutim.conf'), + file => $cfile, default => { policy_when_full => 'warn', dbtype => 'sqlite', diff --git a/lib/Lutim/Controller.pm b/lib/Lutim/Controller.pm index 1a94305e3a1e63b47c553d644dfb18b3f8f13bf0..bff11eeb453f2458b27162284019a311d1df4d01 100644 --- a/lib/Lutim/Controller.pm +++ b/lib/Lutim/Controller.pm @@ -405,7 +405,7 @@ sub add { } my $key; - if ($c->param('crypt') || $c->config->{always_encrypt}) { + if ($c->param('crypt') || $c->config('always_encrypt')) { ($upload, $key) = $c->crypt($upload, $filename); } $upload->move_to($path); @@ -580,7 +580,7 @@ sub short { $dt->set_time_zone('GMT'); $expires = $dt->strftime("%a, %d %b %Y %H:%M:%S GMT"); - $test = $c->render_file($image->filename, $image->path, $image->mediatype, $dl, $expires, $image->delete_at_first_view, $key, $thumb); + $test = $c->render_file($im_loaded, $image->filename, $image->path, $image->mediatype, $dl, $expires, $image->delete_at_first_view, $key, $thumb); } } diff --git a/lib/Lutim/DB/Image.pm b/lib/Lutim/DB/Image.pm index 0e936e0e21f0bcd8c063d31fe7ebbcd9d97a7903..36677d98a944fb4aac107af6968dab0ec5286158 100644 --- a/lib/Lutim/DB/Image.pm +++ b/lib/Lutim/DB/Image.pm @@ -98,9 +98,9 @@ sub new { if ($dbtype eq 'sqlite') { use Lutim::DB::Image::SQLite; $c = Lutim::DB::Image::SQLite->new(@_); - #} elsif ($dbtype eq 'postgresql') { - # use Lutim::DB::Image::Pg; - # $c = Lutim::DB::Image::Pg->new(@_); + } elsif ($dbtype eq 'postgresql') { + use Lutim::DB::Image::Pg; + $c = Lutim::DB::Image::Pg->new(@_); } } diff --git a/lib/Lutim/DB/Image/Pg.pm b/lib/Lutim/DB/Image/Pg.pm new file mode 100644 index 0000000000000000000000000000000000000000..1e7d406f2fe7be666619efed7d318bceef5c1a53 --- /dev/null +++ b/lib/Lutim/DB/Image/Pg.pm @@ -0,0 +1,218 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lutim::DB::Image::Pg; +use Mojo::Base 'Lutim::DB::Image'; +use Mojo::Collection 'c'; + +has 'record' => 0; + +sub new { + my $c = shift; + + $c = $c->SUPER::new(@_); + $c = $c->_slurp if ($c->short); + + return $c; +} + +sub count_delete_at_day_endis { + my $c = shift; + my $day = shift; + my $enabled = shift; + my $created = shift; + + if (defined $created) { + return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL AND delete_at_day = ? AND enabled = ? AND created_at < ?', $day, $enabled, $created)->hashes->first->{count}; + } else { + return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL AND delete_at_day = ? AND enabled = ?', $day, $enabled)->hashes->first->{count}; + } +} + +sub count_created_before { + my $c = shift; + my $time = shift; + + return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL AND created_at < ?', $time)->hashes->first->{count}; +} + +sub select_created_after { + my $c = shift; + my $time = shift; + + my @images; + + my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NOT NULL AND created_at >= ?', $time)->hashes; + + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lutim::DB::Image->new(app => $c->app); + $i->_slurp($e); + + push @images, $i; + } + ); + + return c(@images); +} + +sub select_empty { + my $c = shift; + + my $record = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NULL LIMIT 1')->hashes->first; + + $c = $c->_slurp($record); + + return $c; +} + +sub write { + my $c = shift; + + if ($c->record) { + $c->app->pg->db->query('UPDATE lutim SET counter = ?, created_at = ?, created_by = ?, delete_at_day = ?, delete_at_first_view = ?, enabled = ?, filename = ?, footprint = ?, height = ?, last_access_at = ?, mediatype = ?, mod_token = ?, path = ?, short = ?, width = ? WHERE short = ?', $c->counter, $c->created_at, $c->created_by, $c->delete_at_day, $c->delete_at_first_view, $c->enabled, $c->filename, $c->footprint, $c->height, $c->last_access_at, $c->mediatype, $c->mod_token, $c->path, $c->short, $c->width, $c->short); + } else { + $c->app->pg->db->query('INSERT INTO lutim (counter, created_at, created_by, delete_at_day, delete_at_first_view, enabled, filename, footprint, height, last_access_at, mediatype, mod_token, path, short, width) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', $c->counter, $c->created_at, $c->created_by, $c->delete_at_day, $c->delete_at_first_view, $c->enabled, $c->filename, $c->footprint, $c->height, $c->last_access_at, $c->mediatype, $c->mod_token, $c->path, $c->short, $c->width); + $c->record(1); + } + + return $c; +} + +sub count_short { + my $c = shift; + my $short = shift; + + return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE short = ?', $short)->hashes->first->{count}; +} + +sub count_empty { + my $c = shift; + + return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NULL')->hashes->first->{count}; +} + +sub count_not_empty { + my $c = shift; + + return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL')->hashes->first->{count}; +} + +sub clean_ips_until { + my $c = shift; + my $time = shift; + + $c->app->pg->db->query('UPDATE lutim SET created_by = NULL WHERE path IS NOT NULL AND created_at < ?', $time); + + return $c; +} + +sub get_no_longer_viewed_files { + my $c = shift; + my $time = shift; + + my @images; + + my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE enabled = 1 AND last_access_at < ?', $time)->{hashes}; + + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lutim::DB::Image->new(app => $c->app); + $i->record(1); + $i->_slurp($e); + + push @images, $i; + } + ); + + return c(@images); +} + +sub get_images_to_clean { + my $c = shift; + + my @images; + + my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE enabled = 1 AND (delete_at_day * 86400) < (? - created_at) AND delete_at_day != 0', time())->hashes; + + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lutim::DB::Image->new(app => $c->app); + $i->_slurp($e); + + push @images, $i; + } + ); + + return c(@images); +} + +sub get_50_oldest { + my $c = shift; + + my @images; + + my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NOT NULL AND enabled = 1 ORDER BY created_at ASC LIMIT 50')->hashes; + + $records->each( + sub { + my ($e, $num) = @_; + my $i = Lutim::DB::Image->new(app => $c->app); + $i->_slurp($e); + + push @images, $i; + } + ); + + return c(@images); +} + +sub disable { + my $c = shift; + + $c->app->pg->db->query('UPDATE lutim SET enabled = 0 WHERE short = ?', $c->short); + $c->enabled(0); + + return $c; +} + +sub _slurp { + my $c = shift; + my $r = shift; + + my $image; + if (defined $r) { + $image = $r; + } else { + my $images = $c->app->pg->db->query('SELECT * FROM lutim WHERE short = ?', $c->short)->hashes; + + if ($images->size) { + $image = $images->first; + } + } + + if ($image) { + $c->short($image->{short}); + $c->path($image->{path}); + $c->footprint($image->{footprint}); + $c->enabled($image->{enabled}); + $c->mediatype($image->{mediatype}); + $c->filename($image->{filename}); + $c->counter($image->{counter}); + $c->delete_at_first_view($image->{delete_at_first_view}); + $c->delete_at_day($image->{delete_at_day}); + $c->created_at($image->{created_at}); + $c->created_by($image->{created_by}); + $c->last_access_at($image->{last_access_at}); + $c->mod_token($image->{mod_token}); + $c->width($image->{width}); + $c->height($image->{height}); + + $c->record(1); + } + + return $c; +} + +1; diff --git a/lib/Lutim/DB/Image/SQLite.pm b/lib/Lutim/DB/Image/SQLite.pm index a165d375b3bb02fc10af55a538fc3e76126b9dc1..65de29cf5a7c031aeb0fbbbd06dda31ed8a0494a 100644 --- a/lib/Lutim/DB/Image/SQLite.pm +++ b/lib/Lutim/DB/Image/SQLite.pm @@ -8,8 +8,10 @@ has 'record'; sub new { my $c = shift; + $c = $c->SUPER::new(@_); $c = $c->_slurp if ($c->short); + return $c; } @@ -146,7 +148,7 @@ sub get_no_longer_viewed_files { my @images; - my @records = c(Lutim::DB::SQLite::Lutim->select('WHERE enabled = 1 AND last_access_at < ?', $time)); + my @records = Lutim::DB::SQLite::Lutim->select('WHERE enabled = 1 AND last_access_at < ?', $time); for my $e (@records) { my $i = Lutim::DB::Image->new(app => $c->app); @@ -215,23 +217,25 @@ sub _slurp { } if (scalar @images) { - $c->short($images[0]->short); - $c->path($images[0]->path); - $c->footprint($images[0]->footprint); - $c->enabled($images[0]->enabled); - $c->mediatype($images[0]->mediatype); - $c->filename($images[0]->filename); - $c->counter($images[0]->counter); - $c->delete_at_first_view($images[0]->delete_at_first_view); - $c->delete_at_day($images[0]->delete_at_day); - $c->created_at($images[0]->created_at); - $c->created_by($images[0]->created_by); - $c->last_access_at($images[0]->last_access_at); - $c->mod_token($images[0]->mod_token); - $c->width($images[0]->width); - $c->height($images[0]->height); - - $c->record($images[0]) unless $c->record; + my $image = $images[0]; + + $c->short($image->short); + $c->path($image->path); + $c->footprint($image->footprint); + $c->enabled($image->enabled); + $c->mediatype($image->mediatype); + $c->filename($image->filename); + $c->counter($image->counter); + $c->delete_at_first_view($image->delete_at_first_view); + $c->delete_at_day($image->delete_at_day); + $c->created_at($image->created_at); + $c->created_by($image->created_by); + $c->last_access_at($image->last_access_at); + $c->mod_token($image->mod_token); + $c->width($image->width); + $c->height($image->height); + + $c->record($image) unless $c->record; } return $c; diff --git a/lib/Lutim/DB/SQLite.pm b/lib/Lutim/DB/SQLite.pm index b6d1530be4d4a3532e15eb60bb438e4f3b0fe0c4..83bc9c2b90dc14c563a842d0dad1faf7650ddac1 100644 --- a/lib/Lutim/DB/SQLite.pm +++ b/lib/Lutim/DB/SQLite.pm @@ -6,9 +6,16 @@ use FindBin qw($Bin); BEGIN { my $m = Mojolicious->new; + my $cfile = Mojo::File->new($Bin, '..' , 'lutim.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 => Mojo::File->new($Bin, '..' ,'lutim.conf')->to_abs->to_string, + file => $cfile->to_abs->to_string, default => { db_path => 'lutim.db' } diff --git a/lib/Lutim/Plugin/Helpers.pm b/lib/Lutim/Plugin/Helpers.pm new file mode 100644 index 0000000000000000000000000000000000000000..a2c248cea8c1514bbd7288a08c99ec530ea245c3 --- /dev/null +++ b/lib/Lutim/Plugin/Helpers.pm @@ -0,0 +1,249 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lutim::Plugin::Helpers; +use Mojo::Base 'Mojolicious::Plugin'; +use Mojo::Util qw(quote); +use Crypt::CBC; +use Data::Entropy qw(entropy_source); + +sub register { + my ($self, $app) = @_; + + 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') { + $migrations->from_file('utilities/migrations.sql')->migrate(0)->migrate(1); + } else { + $migrations->from_file('utilities/migrations.sql')->migrate(1); + } + } + + $app->helper(render_file => \&_render_file); + $app->helper(ip => \&_ip); + $app->helper(provisioning => \&_provisioning); + $app->helper(shortener => \&_shortener); + $app->helper(stop_upload => \&_stop_upload); + $app->helper(max_delay => \&_max_delay); + $app->helper(default_delay => \&_default_delay); + $app->helper(is_selected => \&_is_selected); + $app->helper(crypt => \&_crypt); + $app->helper(decrypt => \&_decrypt); + $app->helper(delete_image => \&_delete_image); +} + +sub _pg { + my $c = shift; + + my $addr = 'postgresql://'; + $addr .= $c->app->config('pgdb')->{host}; + $addr .= ':'.$c->app->config('pgdb')->{port} if defined $c->app->config('pgdb')->{port}; + $addr .= '/'.$c->app->config('pgdb')->{database}; + state $pg = Mojo::Pg->new($addr); + $pg->password($c->app->config('pgdb')->{pwd}); + $pg->username($c->app->config('pgdb')->{user}); + return $pg; +} + +sub _render_file { + my $c = shift; + my ($im_loaded, $filename, $path, $mediatype, $dl, $expires, $nocache, $key, $thumb) = @_; + + $dl = 'attachment' if ($mediatype =~ m/svg/); + $filename = quote($filename); + + my $asset; + unless (-f $path && -r $path) { + $c->app->log->error("Cannot read file [$path]. error [$!]"); + $c->flash( + msg => $c->l('Unable to find the image: it has been deleted.') + ); + return 500; + } + + $mediatype =~ s/x-//; + + my $headers = Mojo::Headers->new(); + if ($nocache) { + $headers->add('Cache-Control' => 'no-cache, no-store, max-age=0, must-revalidate'); + } else { + $headers->add('Expires' => $expires); + } + $headers->add('Content-Type' => $mediatype.';name='.$filename); + $headers->add('Content-Disposition' => $dl.';filename='.$filename); + $c->res->content->headers($headers); + + if ($key) { + $asset = $c->decrypt($key, $path); + } else { + $asset = Mojo::Asset::File->new(path => $path); + } + + if (defined $thumb && $im_loaded && $mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') { # ImageMagick don't work in Debian with svg (for now?) + my $im = Image::Magick->new; + $im->BlobToImage($asset->slurp); + + # Create the thumbnail + $im->Resize(geometry=>'x'.$c->config('thumbnail_size')); + + # Replace the asset with the thumbnail + $asset = Mojo::Asset::Memory->new->add_chunk($im->ImageToBlob()); + } + + $c->res->content->asset($asset); + $headers->add('Content-Length' => $asset->size); + + return $c->rendered(200); +} + +sub _ip { + my $c = shift; + my $ip_only = shift || 0; + + 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_only) ? $ip : "$ip remote port:$remote_port"; +} + +sub _provisioning { + my $c = shift; + + # Create some short patterns for provisioning + my $img = Lutim::DB::Image->new(app => $c->app); + if ($img->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 ($img->count_short($short) || $short eq 'about' || $short eq 'stats' || $short eq 'd' || $short eq 'm' || $short eq 'gallery' || $short eq 'zip' || $short eq 'infos'); + + $img->short($short) + ->counter(0) + ->enabled(1) + ->delete_at_first_view(0) + ->delete_at_day(0) + ->mod_token($c->shortener($c->app->config('token_length'))) + ->write; + + $img = Lutim::DB::Image->new(app => $c->app); + } + } +} + +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 _stop_upload { + my $c = shift; + + if (-f 'stop-upload' || -f 'stop-upload.manual') { + $c->stash( + stop_upload => $c->l('Uploading is currently disabled, please try later or contact the administrator (%1).', $c->app->config('contact')) + ); + return 1; + } + return 0; +} + +sub _max_delay { + my $c = shift; + + 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; +} + +sub _default_delay { + my $c = shift; + + 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; +} + +sub _is_selected { + my $c = shift; + my $num = shift; + + return ($num == $c->default_delay) ? 'selected="selected"' : ''; +} + +sub _crypt { + my $c = shift; + my $upload = shift; + my $filename = shift; + + my $key = $c->shortener($c->config('crypto_key_length')); + + my $cipher = Crypt::CBC->new( + -key => $key, + -cipher => 'Blowfish', + -header => 'none', + -iv => 'dupajasi' + ); + + $cipher->start('encrypting'); + + my $crypt_asset = Mojo::Asset::File->new; + + $crypt_asset->add_chunk($cipher->crypt($upload->slurp)); + $crypt_asset->add_chunk($cipher->finish); + + my $crypt_upload = Mojo::Upload->new; + $crypt_upload->filename($filename); + $crypt_upload->asset($crypt_asset); + + return ($crypt_upload, $key); +} + +sub _decrypt { + my $c = shift; + my $key = shift; + my $file = shift; + + my $cipher = Crypt::CBC->new( + -key => $key, + -cipher => 'Blowfish', + -header => 'none', + -iv => 'dupajasi' + ); + + $cipher->start('decrypting'); + + my $decrypt_asset = Mojo::Asset::File->new; + + open(my $f, "<",$file) or die "Unable to read encrypted file: $!"; + binmode $f; + while (read($f, my $buffer,1024)) { + $decrypt_asset->add_chunk($cipher->crypt($buffer)); + } + $decrypt_asset->add_chunk($cipher->finish) ; + + return $decrypt_asset; +} + +sub _delete_image { + my $c = shift; + my $img = shift; + unlink $img->path or warn "Could not unlink ".$img->path.": $!"; + $img->disable(); +} + +1; diff --git a/lib/Mounter.pm b/lib/Mounter.pm index f40d2c8a728a7ebc3d5eef5507566b2e9f2eb277..58527d6d7749441e20be4ddae1654b1adfe0a0f0 100644 --- a/lib/Mounter.pm +++ b/lib/Mounter.pm @@ -1,5 +1,7 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Mounter; use Mojo::Base 'Mojolicious'; +use Mojo::File; use FindBin qw($Bin); use File::Spec qw(catfile); @@ -9,9 +11,16 @@ sub startup { push @{$self->commands->namespaces}, 'Lutim::Command'; + my $cfile = Mojo::File->new($Bin, '..' , 'lutim.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 = $self->plugin('Config' => { - file => File::Spec->catfile($Bin, '..' ,'lutim.conf'), + file => $cfile, default => { prefix => '/', theme => 'default', @@ -19,6 +28,8 @@ sub startup { } ); + $self->plugin('Lutim::Plugin::Helpers'); + $config->{prefix} = $config->{url_sub_dir} if (defined($config->{url_sub_dir}) && $config->{prefix} eq '/'); $self->app->log->warn('"url_sub_dir" configuration option is deprecated. Use "prefix" instead. "url_sub_dir" will be removed in the future') if (defined($config->{url_sub_dir})); diff --git a/t/basic.t b/t/basic.t deleted file mode 100644 index 5f257e5498ffe326ceeb1523026db981ee2ad77e..0000000000000000000000000000000000000000 --- a/t/basic.t +++ /dev/null @@ -1,9 +0,0 @@ -use Mojo::Base -strict; - -use Test::More; -use Test::Mojo; - -my $t = Test::Mojo->new('Lutim'); -$t->get_ok('/')->status_is(200)->content_like(qr/Mojolicious/i); - -done_testing(); diff --git a/t/create-pg-testdb.sql b/t/create-pg-testdb.sql new file mode 100644 index 0000000000000000000000000000000000000000..d65625c715dc422c54f5827ac1f23424ebcb013d --- /dev/null +++ b/t/create-pg-testdb.sql @@ -0,0 +1,2 @@ +CREATE USER lutim WITH PASSWORD 'lutim'; +CREATE DATABASE lutimtest OWNER lutim; diff --git a/t/postgresql.conf b/t/postgresql.conf new file mode 100644 index 0000000000000000000000000000000000000000..c9205a1df286ce640e3b6aeab6ee4f84b8f21962 --- /dev/null +++ b/t/postgresql.conf @@ -0,0 +1,169 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +{ + #################### + # Hypnotoad settings + #################### + # see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings + hypnotoad => { + # array of IP addresses and ports you want to listen to + listen => ['http://127.0.0.1:8080'], + # if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1 + # if you use Lutim directly, let it commented + #proxy => 1, + }, + + ################ + # Lutim settings + ################ + + # put a way to contact you here and uncomment it + # mandatory + contact => 'John Doe, admin[at]example.com', + + # random string used to encrypt cookies + # mandatory + secrets => ['fdjsofjoihrei'], + + # choose a theme. See the available themes in `themes` directory + # optional, default is 'default' + #theme => 'default', + + # length of the images random URL + # optional, default is 8 + #length => 8, + + # length of the encryption key + # optional, default is 8 + #crypto_key_length => 8, + + # how many URLs will be provisioned in a batch ? + # optional, default is 5 + #provis_step => 5, + + # max number of URLs to be provisioned + # optional, default is 100 + #provisioning => 100, + + # anti-flood protection delay, in seconds + # users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds + # optional, default is 5 + #anti_flood_delay => 5, + + # twitter account which will appear on twitter cards + # see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter + # optional, default is @framasky + #tweet_card_via => '@framasky', + + # max image size, in octets + # you can write it 10*1024*1024 + # optional, default is 10485760 + max_file_size => 1048576, + + # if you want to have piwik statistics, provide a piwik image tracker + # only the image tracker is allowed, no javascript + # optional, no default + #piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&rec=1', + + # if you want to include something in the right of the screen, put it here + # here's an example to put the logo of your hoster + # optional, no default + #hosted_by => 'My super hoster Hoster logo', + + # DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED + # Lutim now checks if the X-Forwarded-Proto header is present and equal to https. + # set to 1 if you use Lutim behind a secure web server + # optional, default is 0 + #https => 0, + + # broadcast_message which will displayed on all pages of Lutim (but no in json response) + # optional, no default + broadcast_message => 'test broadcast message', + + # array of authorized domains for API calls. + # if you want to authorize everyone to use the API: ['*'] + # optional, no domains allowed by default + #allowed_domains => ['http://1.example.com', 'http://2.example.com'], + + # default time limit for files + # valid values are 0, 1, 7, 30 and 365 + # optional, default is 0 (no limit) + default_delay => 30, + + # number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay) + # a warning message will be displayed on homepage + # optional, default is 0 (no limit) + max_delay => 200, + + # if set to 1, all the images will be encrypted and the encryption option will no be displayed + # optional, default is 0 + #always_encrypt => 0, + + # length of the image's delete token + # optional, default is 24 + #token_length => 24, + + # URL sub-directory in which you want Lutim to be accessible + # example: you want to have Lutim under https://example.org/lutim/ + # => set prefix to '/lutim' or to '/lutim/', it doesn't matter + # optional, defaut is / + #prefix => '/', + + # choose what database you want to use + # valid choices are sqlite and postgresql (all lowercase) + # optional, default is sqlite + dbtype => 'postgresql', + + # SQLite ONLY - only used if dbtype is set to sqlite + # define a path to the SQLite database + # you can define it relative to lutim directory or set an absolute path + # remember that it has to be in a directory writable by Lutim user + # optional, default is lutim.db + #db_path => 'lutim.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 => 'lutimtest', + host => 'localhost', + user => 'lutim', + pwd => 'lutim' + }, + + # define the height of the thumbnails generated at users' will + # this is not the height of the thumbnails send after upload, + # we're talking about thumbnails generated when someone asked for + # https://example.org/lutim/tesrinp?thumb + # this works only if you have ImageMagick + # optional, default is 100 (pixels) + #thumbnail_size => 100, + + ########################## + # Lutim cron jobs settings + ########################## + + # number of days shown in /stats page (used with script/lutim cron stats) + # optional, default is 365 + #stats_day_num => 365, + + # number of days senders' IP addresses are kept in database + # after that delay, they will be deleted from database (used with script/lutim cron cleanbdd) + # optional, default is 365 + #keep_ip_during => 365, + + # max size of the files directory, in octets + # used by script/lutim cron watch to trigger an action + # optional, no default + #max_total_size => 10*1024*1024*1024, + + # default action when files directory is over max_total_size (used with script/lutim cron watch) + # valid values are 'warn', 'stop-upload' and 'delete' + # please, see readme + # optional, default is 'warn' + #policy_when_full => 'warn', + + # images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task + # if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted + # optional, no default + #delete_no_longer_viewed_files => 90 +}; diff --git a/t/sqlite.conf b/t/sqlite.conf new file mode 100644 index 0000000000000000000000000000000000000000..6d09e791c9aea526081c7a97a19b0fef0329e981 --- /dev/null +++ b/t/sqlite.conf @@ -0,0 +1,169 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +{ + #################### + # Hypnotoad settings + #################### + # see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings + hypnotoad => { + # array of IP addresses and ports you want to listen to + listen => ['http://127.0.0.1:8080'], + # if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1 + # if you use Lutim directly, let it commented + #proxy => 1, + }, + + ################ + # Lutim settings + ################ + + # put a way to contact you here and uncomment it + # mandatory + contact => 'John Doe, admin[at]example.com', + + # random string used to encrypt cookies + # mandatory + secrets => ['fdjsofjoihrei'], + + # choose a theme. See the available themes in `themes` directory + # optional, default is 'default' + #theme => 'default', + + # length of the images random URL + # optional, default is 8 + #length => 8, + + # length of the encryption key + # optional, default is 8 + #crypto_key_length => 8, + + # how many URLs will be provisioned in a batch ? + # optional, default is 5 + #provis_step => 5, + + # max number of URLs to be provisioned + # optional, default is 100 + #provisioning => 100, + + # anti-flood protection delay, in seconds + # users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds + # optional, default is 5 + #anti_flood_delay => 5, + + # twitter account which will appear on twitter cards + # see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter + # optional, default is @framasky + #tweet_card_via => '@framasky', + + # max image size, in octets + # you can write it 10*1024*1024 + # optional, default is 10485760 + max_file_size => 1048576, + + # if you want to have piwik statistics, provide a piwik image tracker + # only the image tracker is allowed, no javascript + # optional, no default + #piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&rec=1', + + # if you want to include something in the right of the screen, put it here + # here's an example to put the logo of your hoster + # optional, no default + #hosted_by => 'My super hoster Hoster logo', + + # DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED + # Lutim now checks if the X-Forwarded-Proto header is present and equal to https. + # set to 1 if you use Lutim behind a secure web server + # optional, default is 0 + #https => 0, + + # broadcast_message which will displayed on all pages of Lutim (but no in json response) + # optional, no default + broadcast_message => 'test broadcast message', + + # array of authorized domains for API calls. + # if you want to authorize everyone to use the API: ['*'] + # optional, no domains allowed by default + #allowed_domains => ['http://1.example.com', 'http://2.example.com'], + + # default time limit for files + # valid values are 0, 1, 7, 30 and 365 + # optional, default is 0 (no limit) + default_delay => 30, + + # number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay) + # a warning message will be displayed on homepage + # optional, default is 0 (no limit) + max_delay => 200, + + # if set to 1, all the images will be encrypted and the encryption option will no be displayed + # optional, default is 0 + #always_encrypt => 0, + + # length of the image's delete token + # optional, default is 24 + #token_length => 24, + + # URL sub-directory in which you want Lutim to be accessible + # example: you want to have Lutim under https://example.org/lutim/ + # => set prefix to '/lutim' or to '/lutim/', it doesn't matter + # optional, defaut is / + #prefix => '/', + + # 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 lutim directory or set an absolute path + # remember that it has to be in a directory writable by Lutim user + # optional, default is lutim.db + db_path => 'test.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 => 'lutim', + # host => 'localhost', + # #user => 'DBUSER', + # #pwd => 'DBPASSWORD' + #}, + + # define the height of the thumbnails generated at users' will + # this is not the height of the thumbnails send after upload, + # we're talking about thumbnails generated when someone asked for + # https://example.org/lutim/tesrinp?thumb + # this works only if you have ImageMagick + # optional, default is 100 (pixels) + #thumbnail_size => 100, + + ########################## + # Lutim cron jobs settings + ########################## + + # number of days shown in /stats page (used with script/lutim cron stats) + # optional, default is 365 + #stats_day_num => 365, + + # number of days senders' IP addresses are kept in database + # after that delay, they will be deleted from database (used with script/lutim cron cleanbdd) + # optional, default is 365 + #keep_ip_during => 365, + + # max size of the files directory, in octets + # used by script/lutim cron watch to trigger an action + # optional, no default + #max_total_size => 10*1024*1024*1024, + + # default action when files directory is over max_total_size (used with script/lutim cron watch) + # valid values are 'warn', 'stop-upload' and 'delete' + # please, see readme + # optional, default is 'warn' + #policy_when_full => 'warn', + + # images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task + # if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted + # optional, no default + #delete_no_longer_viewed_files => 90 +}; diff --git a/t/test.t b/t/test.t new file mode 100644 index 0000000000000000000000000000000000000000..2c999c2ace16ce2a5b3333ece16004c9ce940c2f --- /dev/null +++ b/t/test.t @@ -0,0 +1,107 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +use Mojo::Base -strict; +use Mojo::File; +use Mojo::JSON qw(true false); +use Mojolicious; + +use Test::More; +use Test::Mojo; + +use FindBin qw($Bin); +use Digest::file qw(digest_file_hex); + +my ($m, $cfile); + +BEGIN { + use lib 'lib'; + $m = Mojolicious->new; + $cfile = Mojo::File->new($Bin, '..' , 'lutim.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 = $m->plugin('Config' => + { + file => $cfile->to_abs->to_string, + default => { + dbtype => 'sqlite' + } + } + ); + $m->plugin('Lutim::Plugin::Helpers'); + $m->plugin('DebugDumperHelper'); +} + +# Home page +my $t = Test::Mojo->new('Lutim'); +$t->get_ok('/') + ->status_is(200) + ->content_like(qr/Let's Upload That IMage/i); + +# Instance settings informations +$t->get_ok('/infos') + ->status_is(200) + ->json_is( + { + always_encrypt => false, + broadcast_message => 'test broadcast message', + contact => 'John Doe, admin[at]example.com', + default_delay => 30, + image_magick => true, + max_delay => 200, + max_file_size => 1048576 + } + ); + +# Post image +my $image = Mojo::File->new($Bin, '..', 'themes', 'default', 'public', 'img', 'Lutim.png')->to_string; +$t->post_ok('/' => form => { file => { file => $image }, format => 'json' }) + ->status_is(200) + ->json_has('msg', 'success') + ->json_is('/success' => true, '/msg/filename' => 'Lutim.png') + ->json_like('/msg/short' => qr#[-_a-zA-Z0-9]{8}#, '/msg/real_short' => qr#[-_a-zA-Z0-9]{8}#, '/msg/token' => qr#[-_a-zA-Z0-9]{24}#); + +# Post delete-at-first-view image +my $raw = $t->ua->post('/' => form => { file => { file => $image }, 'first-view' => 1, format => 'json' })->res; +my $short = $raw->json('/msg/short'); + +$t->get_ok('/'.$short) + ->status_is(200); + +$t->get_ok('/'.$short) + ->status_is(302); + +# Delete image with token +$raw = $t->ua->post('/' => form => { file => { file => $image }, format => 'json' })->res; +my $rshort = $raw->json('/msg/real_short'); +my $token = $raw->json('/msg/token'); + +$t->get_ok('/'.$rshort) + ->status_is(200); + +$t->get_ok('/d/'.$rshort.'/'.$token, form => { format => 'json' }) + ->status_is('200') + ->json_is( + { + success => true, + msg => 'The image Lutim.png has been successfully deleted' + } + ); + +$t->get_ok('/'.$rshort) + ->status_is(302); + +# Get image counter +$t->post_ok('/c', form => { short => $rshort, token => $token }) + ->status_is(200) + ->json_is( + { + success => true, + counter => 1, + enabled => false + } + ); + +done_testing(); diff --git a/themes/default/lib/Lutim/I18N/de.po b/themes/default/lib/Lutim/I18N/de.po index 660d645c20531e63879196990631544f23378fc4..e7df4189d2c0421567b024884563afa922fd2425 100644 --- a/themes/default/lib/Lutim/I18N/de.po +++ b/themes/default/lib/Lutim/I18N/de.po @@ -18,19 +18,11 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. ($delay) -#. (config('max_delay') #. (7) #. (30) -#: lib/Lutim/Command/cron/stats.pm:100 -#: lib/Lutim/Command/cron/stats.pm:110 -#: lib/Lutim/Command/cron/stats.pm:111 -#: lib/Lutim/Command/cron/stats.pm:127 -#: lib/Lutim/Command/cron/stats.pm:128 -#: lib/Lutim/Command/cron/stats.pm:99 -#: themes/default/templates/partial/lutim.js.ep:235 -#: themes/default/templates/partial/lutim.js.ep:244 -#: themes/default/templates/partial/lutim.js.ep:245 +#. ($delay) +#. (config('max_delay') +#: lib/Lutim/Command/cron/stats.pm:115 lib/Lutim/Command/cron/stats.pm:116 lib/Lutim/Command/cron/stats.pm:126 lib/Lutim/Command/cron/stats.pm:127 lib/Lutim/Command/cron/stats.pm:143 lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:235 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/partial/lutim.js.ep:245 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9 msgid "%1 days" msgstr "%1 Tage" @@ -43,18 +35,11 @@ msgstr "%1 Bilder wurden bisher über diese Instanz versendet." msgid "-or-" msgstr "-oder-" -#: lib/Lutim/Command/cron/stats.pm:101 -#: lib/Lutim/Command/cron/stats.pm:112 -#: lib/Lutim/Command/cron/stats.pm:129 -#: themes/default/templates/index.html.ep:5 +#: lib/Lutim/Command/cron/stats.pm:117 lib/Lutim/Command/cron/stats.pm:128 lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38 msgid "1 year" msgstr "1 Jahr" -#: lib/Lutim/Command/cron/stats.pm:109 -#: lib/Lutim/Command/cron/stats.pm:126 -#: lib/Lutim/Command/cron/stats.pm:98 -#: themes/default/templates/index.html.ep:4 -#: themes/default/templates/partial/lutim.js.ep:244 +#: lib/Lutim/Command/cron/stats.pm:114 lib/Lutim/Command/cron/stats.pm:125 lib/Lutim/Command/cron/stats.pm:142 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7 msgid "24 hours" msgstr "24 Stunden" @@ -62,22 +47,19 @@ msgstr "24 Stunden" msgid ": Error while trying to get the counter." msgstr ":Fehler beim Abrufen des Zählers." -#: lib/Lutim/Command/cron/stats.pm:94 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "" -#: lib/Lutim/Controller.pm:286 +#: lib/Lutim/Controller.pm:288 msgid "An error occured while downloading the image." msgstr "Beim Herunterladen des Bildes ist ein Fehler aufgetreten." -#: themes/default/templates/about.html.ep:41 -#: themes/default/templates/myfiles.html.ep:27 -#: themes/default/templates/stats.html.ep:25 +#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:27 themes/default/templates/stats.html.ep:25 msgid "Back to homepage" msgstr "Zurück zur Hauptseite" -#: themes/default/templates/index.html.ep:193 -#: themes/default/templates/index.html.ep:194 +#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194 msgid "Click to open the file browser" msgstr "Klicken um den Dateibrowser zu öffnen" @@ -85,23 +67,11 @@ msgstr "Klicken um den Dateibrowser zu öffnen" msgid "Contributors" msgstr "Mitwirkende" -#: themes/default/templates/partial/lutim.js.ep:310 -#: themes/default/templates/partial/lutim.js.ep:359 -#: themes/default/templates/partial/lutim.js.ep:437 +#: themes/default/templates/partial/lutim.js.ep:310 themes/default/templates/partial/lutim.js.ep:359 themes/default/templates/partial/lutim.js.ep:437 msgid "Copy all view links to clipboard" msgstr "Alle Links zum Anschauen in die Zwischenablage kopieren" -#: themes/default/templates/index.html.ep:18 -#: themes/default/templates/index.html.ep:36 -#: themes/default/templates/index.html.ep:69 -#: themes/default/templates/index.html.ep:77 -#: themes/default/templates/index.html.ep:85 -#: themes/default/templates/index.html.ep:93 -#: themes/default/templates/partial/common.js.ep:45 -#: themes/default/templates/partial/lutim.js.ep:176 -#: themes/default/templates/partial/lutim.js.ep:188 -#: themes/default/templates/partial/lutim.js.ep:202 -#: themes/default/templates/partial/lutim.js.ep:217 +#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/partial/common.js.ep:45 themes/default/templates/partial/lutim.js.ep:176 themes/default/templates/partial/lutim.js.ep:188 themes/default/templates/partial/lutim.js.ep:202 themes/default/templates/partial/lutim.js.ep:217 msgid "Copy to clipboard" msgstr "In die Zwischenablage kopieren" @@ -117,26 +87,19 @@ msgstr "" msgid "Delay repartition chart for enabled images" msgstr "" -#: themes/default/templates/index.html.ep:115 -#: themes/default/templates/index.html.ep:147 -#: themes/default/templates/index.html.ep:178 -#: themes/default/templates/myfiles.html.ep:16 -#: themes/default/templates/partial/lutim.js.ep:256 +#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:16 themes/default/templates/partial/lutim.js.ep:256 msgid "Delete at first view?" msgstr "Nach erstem Aufruf löschen?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:112 themes/default/templates/raw.html.ep:5 msgid "Deleted images in 30 days" msgstr "" -#: themes/default/templates/index.html.ep:98 -#: themes/default/templates/myfiles.html.ep:19 -#: themes/default/templates/partial/common.js.ep:37 -#: themes/default/templates/partial/common.js.ep:40 +#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:19 themes/default/templates/partial/common.js.ep:37 themes/default/templates/partial/common.js.ep:40 msgid "Deletion link" msgstr "Link zum Löschen" @@ -144,15 +107,11 @@ msgstr "Link zum Löschen" msgid "Download all images" msgstr "Laden Sie alle Bilder" -#: themes/default/templates/index.html.ep:81 -#: themes/default/templates/index.html.ep:83 -#: themes/default/templates/partial/lutim.js.ep:194 -#: themes/default/templates/partial/lutim.js.ep:198 +#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:194 themes/default/templates/partial/lutim.js.ep:198 msgid "Download link" msgstr "Link zum Herunterladen" -#: themes/default/templates/index.html.ep:28 -#: themes/default/templates/index.html.ep:31 +#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 msgid "Download zip link" msgstr "Link zum Archivbilder" @@ -164,8 +123,7 @@ msgstr "Bilder hierher ziehen" msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want." msgstr "Ziehe Bilder in den dafür vorgesehenen Bereich und Lutim wird vier URLs generieren. Eine zum Anschauen, eine zum direkten Herunterladen, eine zum Nutzen in sozialen Netzwerken und eine letzte um das Bild zu löschen." -#: themes/default/templates/index.html.ep:150 -#: themes/default/templates/index.html.ep:181 +#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181 msgid "Encrypt the image (Lutim does not keep the key)." msgstr "Verschlüssle das Bild (Lutim behält den Key nicht)" @@ -189,21 +147,19 @@ msgstr "Dateiname" msgid "For more details, see the homepage of the project." msgstr "Besuche für mehr Details die Homepage des Projekts." -#: themes/default/templates/layouts/default.html.ep:50 +#: themes/default/templates/layouts/default.html.ep:49 msgid "Fork me!" msgstr "Fork me!" -#: themes/default/templates/index.html.ep:10 -#: themes/default/templates/index.html.ep:13 +#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 msgid "Gallery link" msgstr "Link zur Galerie" -#: themes/default/templates/partial/lutim.js.ep:125 -#: themes/default/templates/partial/lutim.js.ep:142 +#: themes/default/templates/partial/lutim.js.ep:125 themes/default/templates/partial/lutim.js.ep:142 msgid "Hit Ctrl+C, then Enter to copy the short link" msgstr "Drücke STRG+C und dann Enter um den Kurz-Link zu kopieren." -#: themes/default/templates/layouts/default.html.ep:45 +#: themes/default/templates/layouts/default.html.ep:44 msgid "Homepage" msgstr "Webseite" @@ -223,27 +179,30 @@ msgstr "Wie kann ich ein Bild melden?" msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained." msgstr "Wenn du versuchst, ein Bild während dem Hochladen zu löschen, wird die SHA512-Summe des Bildes behalten." -#: themes/default/templates/index.html.ep:163 -#: themes/default/templates/index.html.ep:203 +#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203 msgid "Image URL" msgstr "Bild-URL" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:109 themes/default/templates/raw.html.ep:2 msgid "Image delay" msgstr "" -#: lib/Lutim/Controller.pm:715 +#: lib/Lutim/Controller.pm:702 msgid "Image not found." msgstr "Bild nicht gefunden" -#: themes/default/templates/layouts/default.html.ep:49 +#: themes/default/templates/layouts/default.html.ep:48 msgid "Informations" msgstr "Informationen" -#: themes/default/templates/layouts/default.html.ep:55 +#: themes/default/templates/layouts/default.html.ep:56 msgid "Install webapp" msgstr "Installiere die Webapp" +#: themes/default/templates/layouts/default.html.ep:55 +msgid "Instance's statistics" +msgstr "" + #: themes/default/templates/about.html.ep:11 msgid "Is it really anonymous?" msgstr "Ist es wirklich anonym?" @@ -256,26 +215,23 @@ msgstr "Is es wirklich kostenlos?" msgid "Juste like you pronounce the French word lutin (/ly.tɛ̃/)." msgstr "Genauso wie das französische Wort lutin (/ly.tɛ̃/)." -#: themes/default/templates/index.html.ep:153 -#: themes/default/templates/index.html.ep:184 +#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184 msgid "Keep EXIF tags" msgstr "Behalte EXIF-Daten" -#: themes/default/templates/index.html.ep:118 -#: themes/default/templates/index.html.ep:166 -#: themes/default/templates/index.html.ep:206 -#: themes/default/templates/partial/lutim.js.ep:260 +#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:260 msgid "Let's go!" msgstr "Los gehts!" -#: themes/default/templates/layouts/default.html.ep:48 +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Liberapay button" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:47 msgid "License:" msgstr "Lizenz:" -#: themes/default/templates/index.html.ep:89 -#: themes/default/templates/index.html.ep:91 -#: themes/default/templates/partial/lutim.js.ep:208 -#: themes/default/templates/partial/lutim.js.ep:212 +#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:208 themes/default/templates/partial/lutim.js.ep:212 msgid "Link for share on social networks" msgstr "Links zum teilen auf sozialen Netzwerken" @@ -289,15 +245,11 @@ msgstr "" msgid "Main developers" msgstr "Haupt-Entwickler" -#: themes/default/templates/index.html.ep:73 -#: themes/default/templates/index.html.ep:75 -#: themes/default/templates/partial/lutim.js.ep:182 -#: themes/default/templates/partial/lutim.js.ep:185 +#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:182 themes/default/templates/partial/lutim.js.ep:185 msgid "Markdown syntax" msgstr "Markdown Syntax" -#: themes/default/templates/layouts/default.html.ep:54 -#: themes/default/templates/myfiles.html.ep:2 +#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2 msgid "My images" msgstr "Meine Bilder" @@ -305,8 +257,7 @@ msgstr "Meine Bilder" msgid "No limit" msgstr "Keine Begrenzung" -#: themes/default/templates/index.html.ep:165 -#: themes/default/templates/index.html.ep:198 +#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198 msgid "Only images are allowed" msgstr "Es sind nur Bilder erlaubt" @@ -335,20 +286,27 @@ msgstr "Sende ein Bild" msgid "Share it!" msgstr "Teile es!" -#: themes/default/templates/layouts/default.html.ep:51 +#: themes/default/templates/layouts/default.html.ep:50 msgid "Share on Twitter" msgstr "Teile es auf Twitter" -#: themes/default/templates/index.html.ep:133 -#: themes/default/templates/partial/lutim.js.ep:271 +#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:271 msgid "Something bad happened" msgstr "Es ist ein Fehler aufgetreten" #. ($c->config('contact') -#: lib/Lutim/Controller.pm:723 +#: lib/Lutim/Controller.pm:709 msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)." msgstr "Es ist ein Fehler aufgetreten. Versuche es erneut oder kontaktiere den Administrator (%1)." +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Support the author on Liberapay" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Support the author on Tipeee" +msgstr "" + #: themes/default/templates/about.html.ep:13 msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)." msgstr "Die IP-Adresse des Nutzers wird für eine bestimmte Zeit gespeichert. Diese kann der Administrator frei wählen (für die offizielle Instanz, die in Frankreich gehostet ist, liegt diese Zeit bei einem Jahr)" @@ -357,26 +315,23 @@ msgstr "Die IP-Adresse des Nutzers wird für eine bestimmte Zeit gespeichert. Di msgid "The Lutim software is a free software, which allows you to download and install it on you own server. Have a look at the AGPL to see what you can do." msgstr "Lutim ist freie Software, was dir erlaubt sie herunterzuladen und sie auf deinem eigenem Server zu installieren. Schau dir die AGPL an um deine Recht zu sehen." -#: lib/Lutim/Controller.pm:305 +#: lib/Lutim/Controller.pm:307 msgid "The URL is not valid." msgstr "Die URL ist nicht gültig." -#: lib/Lutim/Controller.pm:117 -#: lib/Lutim/Controller.pm:186 +#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188 msgid "The delete token is invalid." msgstr "Das Token zum Löschen ist ungültig." #. ($upload->filename) -#: lib/Lutim/Controller.pm:449 +#: lib/Lutim/Controller.pm:445 msgid "The file %1 is not an image." msgstr "Die Datei %1 ist kein Bild." -#. ($max_file_size) #. ($tx->res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:269 -#: lib/Lutim/Controller.pm:338 -#: themes/default/templates/partial/lutim.js.ep:332 +#. ($max_file_size) +#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:332 msgid "The file exceed the size limit (%1)" msgstr "Die Datei überschreitet die Größenbeschränkung (%1)" @@ -385,17 +340,16 @@ msgid "The graph's datas are not updated in real-time." msgstr "Die Daten des Graphs werden nicht in Echtzeit aktualisiert." #. ($image->filename) -#: lib/Lutim/Controller.pm:188 +#: lib/Lutim/Controller.pm:190 msgid "The image %1 has already been deleted." msgstr "Das Bild %1 wurde schon gelöscht." #. ($image->filename) -#: lib/Lutim/Controller.pm:197 -#: lib/Lutim/Controller.pm:202 +#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204 msgid "The image %1 has been successfully deleted" msgstr "Das Bild %1 wurde erfolgreich gelöscht." -#: lib/Lutim/Controller.pm:125 +#: lib/Lutim/Controller.pm:128 msgid "The image's delay has been successfully modified" msgstr "Die Zeit bis zum Löschen des Bildes wurde erfolgreich geändert." @@ -408,37 +362,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at msgstr "Die Bilder, die du auf Lutim hochlädst, können entweder nie, nach dem ersten Aufruf oder nach einer bestimmten Zeit gelöscht werden." #. ($c->config->{contact}) -#: lib/Lutim/Controller.pm:444 +#: lib/Lutim/Controller.pm:442 msgid "There is no more available URL. Retry or contact the administrator. %1" msgstr "Es sind keine URLs mehr verfügbar. Versuche es erneut oder kontaktiere den Administrator. %1" -#: lib/Lutim/Command/cron/stats.pm:102 +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Tipeee button" +msgstr "" + +#: lib/Lutim/Command/cron/stats.pm:118 themes/default/templates/raw.html.ep:11 msgid "Total" msgstr "" -#: themes/default/templates/index.html.ep:60 -#: themes/default/templates/partial/lutim.js.ep:45 +#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:45 msgid "Tweet it!" msgstr "Twittere es!" #. ($short) -#: lib/Lutim/Controller.pm:159 -#: lib/Lutim/Controller.pm:231 +#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233 msgid "Unable to find the image %1." msgstr "Konnte das Bild %1 nicht finden." -#: lib/Lutim.pm:85 -#: lib/Lutim/Controller.pm:534 -#: lib/Lutim/Controller.pm:580 -#: lib/Lutim/Controller.pm:624 -#: lib/Lutim/Controller.pm:664 -#: lib/Lutim/Controller.pm:676 -#: lib/Lutim/Controller.pm:687 -#: lib/Lutim/Controller.pm:712 +#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61 msgid "Unable to find the image: it has been deleted." msgstr "Dieses Bild wurde gelöscht." -#: lib/Lutim/Controller.pm:101 +#: lib/Lutim/Controller.pm:105 msgid "Unable to get counter" msgstr "Konnte den Zähler nicht abrufen" @@ -446,8 +395,7 @@ msgstr "Konnte den Zähler nicht abrufen" msgid "Unlike many image sharing services, you don't give us rights on uploaded images." msgstr "Im Gegensatz zu anderen Bild-Hosting-Diensten, überträgst du uns nicht die Rechte an hochgeladenen Bildern." -#: themes/default/templates/index.html.ep:162 -#: themes/default/templates/index.html.ep:201 +#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201 msgid "Upload an image with its URL" msgstr "Lade ein Bild über seine URL hoch" @@ -459,16 +407,12 @@ msgstr "Hochgeladen am" msgid "Uploaded files by days" msgstr "Hochgeladene Bilder pro Tag" -#. ($config->{contact}) -#: lib/Lutim.pm:189 +#. ($c->app->config('contact') +#: lib/Lutim/Plugin/Helpers.pm:156 msgid "Uploading is currently disabled, please try later or contact the administrator (%1)." msgstr "Hochladen ist momentan deaktiviert. Versuche es später erneut oder kontaktiere den Administrator (%1)." -#: themes/default/templates/index.html.ep:65 -#: themes/default/templates/index.html.ep:67 -#: themes/default/templates/myfiles.html.ep:14 -#: themes/default/templates/partial/lutim.js.ep:168 -#: themes/default/templates/partial/lutim.js.ep:172 +#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:14 themes/default/templates/partial/lutim.js.ep:168 themes/default/templates/partial/lutim.js.ep:172 msgid "View link" msgstr "Link ansehen" @@ -504,10 +448,7 @@ msgstr "und auf" msgid "core developer" msgstr "Haupt-Entwickler" -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:125 -#: lib/Lutim/Command/cron/stats.pm:97 -#: themes/default/templates/index.html.ep:3 +#: lib/Lutim/Command/cron/stats.pm:113 lib/Lutim/Command/cron/stats.pm:124 lib/Lutim/Command/cron/stats.pm:141 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6 msgid "no time limit" msgstr "keine Zeit-Begrenzung" diff --git a/themes/default/lib/Lutim/I18N/en.po b/themes/default/lib/Lutim/I18N/en.po index 979e9c61c10944eaff89e7407e613ece3b39c132..216915c0d88a75be86a918050f160375a6fb07d4 100644 --- a/themes/default/lib/Lutim/I18N/en.po +++ b/themes/default/lib/Lutim/I18N/en.po @@ -16,19 +16,11 @@ msgstr "" "Language: en\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. ($delay) -#. (config('max_delay') #. (7) #. (30) -#: lib/Lutim/Command/cron/stats.pm:100 -#: lib/Lutim/Command/cron/stats.pm:110 -#: lib/Lutim/Command/cron/stats.pm:111 -#: lib/Lutim/Command/cron/stats.pm:127 -#: lib/Lutim/Command/cron/stats.pm:128 -#: lib/Lutim/Command/cron/stats.pm:99 -#: themes/default/templates/partial/lutim.js.ep:235 -#: themes/default/templates/partial/lutim.js.ep:244 -#: themes/default/templates/partial/lutim.js.ep:245 +#. ($delay) +#. (config('max_delay') +#: lib/Lutim/Command/cron/stats.pm:115 lib/Lutim/Command/cron/stats.pm:116 lib/Lutim/Command/cron/stats.pm:126 lib/Lutim/Command/cron/stats.pm:127 lib/Lutim/Command/cron/stats.pm:143 lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:235 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/partial/lutim.js.ep:245 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9 msgid "%1 days" msgstr "" @@ -41,18 +33,11 @@ msgstr "%1 sent images on this instance from beginning." msgid "-or-" msgstr "-or-" -#: lib/Lutim/Command/cron/stats.pm:101 -#: lib/Lutim/Command/cron/stats.pm:112 -#: lib/Lutim/Command/cron/stats.pm:129 -#: themes/default/templates/index.html.ep:5 +#: lib/Lutim/Command/cron/stats.pm:117 lib/Lutim/Command/cron/stats.pm:128 lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38 msgid "1 year" msgstr "1 year" -#: lib/Lutim/Command/cron/stats.pm:109 -#: lib/Lutim/Command/cron/stats.pm:126 -#: lib/Lutim/Command/cron/stats.pm:98 -#: themes/default/templates/index.html.ep:4 -#: themes/default/templates/partial/lutim.js.ep:244 +#: lib/Lutim/Command/cron/stats.pm:114 lib/Lutim/Command/cron/stats.pm:125 lib/Lutim/Command/cron/stats.pm:142 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7 msgid "24 hours" msgstr "24 hours" @@ -60,22 +45,19 @@ msgstr "24 hours" msgid ": Error while trying to get the counter." msgstr "" -#: lib/Lutim/Command/cron/stats.pm:94 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "" -#: lib/Lutim/Controller.pm:286 +#: lib/Lutim/Controller.pm:288 msgid "An error occured while downloading the image." msgstr "An error occured while downloading the image." -#: themes/default/templates/about.html.ep:41 -#: themes/default/templates/myfiles.html.ep:27 -#: themes/default/templates/stats.html.ep:25 +#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:27 themes/default/templates/stats.html.ep:25 msgid "Back to homepage" msgstr "Back to homepage" -#: themes/default/templates/index.html.ep:193 -#: themes/default/templates/index.html.ep:194 +#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194 msgid "Click to open the file browser" msgstr "Click to open the file browser" @@ -83,23 +65,11 @@ msgstr "Click to open the file browser" msgid "Contributors" msgstr "Contributors" -#: themes/default/templates/partial/lutim.js.ep:310 -#: themes/default/templates/partial/lutim.js.ep:359 -#: themes/default/templates/partial/lutim.js.ep:437 +#: themes/default/templates/partial/lutim.js.ep:310 themes/default/templates/partial/lutim.js.ep:359 themes/default/templates/partial/lutim.js.ep:437 msgid "Copy all view links to clipboard" msgstr "" -#: themes/default/templates/index.html.ep:18 -#: themes/default/templates/index.html.ep:36 -#: themes/default/templates/index.html.ep:69 -#: themes/default/templates/index.html.ep:77 -#: themes/default/templates/index.html.ep:85 -#: themes/default/templates/index.html.ep:93 -#: themes/default/templates/partial/common.js.ep:45 -#: themes/default/templates/partial/lutim.js.ep:176 -#: themes/default/templates/partial/lutim.js.ep:188 -#: themes/default/templates/partial/lutim.js.ep:202 -#: themes/default/templates/partial/lutim.js.ep:217 +#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/partial/common.js.ep:45 themes/default/templates/partial/lutim.js.ep:176 themes/default/templates/partial/lutim.js.ep:188 themes/default/templates/partial/lutim.js.ep:202 themes/default/templates/partial/lutim.js.ep:217 msgid "Copy to clipboard" msgstr "Copy to clipboard" @@ -115,26 +85,19 @@ msgstr "" msgid "Delay repartition chart for enabled images" msgstr "" -#: themes/default/templates/index.html.ep:115 -#: themes/default/templates/index.html.ep:147 -#: themes/default/templates/index.html.ep:178 -#: themes/default/templates/myfiles.html.ep:16 -#: themes/default/templates/partial/lutim.js.ep:256 +#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:16 themes/default/templates/partial/lutim.js.ep:256 msgid "Delete at first view?" msgstr "Delete at first view?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:112 themes/default/templates/raw.html.ep:5 msgid "Deleted images in 30 days" msgstr "" -#: themes/default/templates/index.html.ep:98 -#: themes/default/templates/myfiles.html.ep:19 -#: themes/default/templates/partial/common.js.ep:37 -#: themes/default/templates/partial/common.js.ep:40 +#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:19 themes/default/templates/partial/common.js.ep:37 themes/default/templates/partial/common.js.ep:40 msgid "Deletion link" msgstr "Deletion link" @@ -142,15 +105,11 @@ msgstr "Deletion link" msgid "Download all images" msgstr "" -#: themes/default/templates/index.html.ep:81 -#: themes/default/templates/index.html.ep:83 -#: themes/default/templates/partial/lutim.js.ep:194 -#: themes/default/templates/partial/lutim.js.ep:198 +#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:194 themes/default/templates/partial/lutim.js.ep:198 msgid "Download link" msgstr "Download link" -#: themes/default/templates/index.html.ep:28 -#: themes/default/templates/index.html.ep:31 +#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 msgid "Download zip link" msgstr "" @@ -162,8 +121,7 @@ msgstr "Drag & drop images here" msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want." msgstr "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want." -#: themes/default/templates/index.html.ep:150 -#: themes/default/templates/index.html.ep:181 +#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181 msgid "Encrypt the image (Lutim does not keep the key)." msgstr "Encrypt the image (Lutim does not keep the key)." @@ -187,21 +145,19 @@ msgstr "" msgid "For more details, see the homepage of the project." msgstr "For more details, see the homepage of the project." -#: themes/default/templates/layouts/default.html.ep:50 +#: themes/default/templates/layouts/default.html.ep:49 msgid "Fork me!" msgstr "Fork me!" -#: themes/default/templates/index.html.ep:10 -#: themes/default/templates/index.html.ep:13 +#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 msgid "Gallery link" msgstr "" -#: themes/default/templates/partial/lutim.js.ep:125 -#: themes/default/templates/partial/lutim.js.ep:142 +#: themes/default/templates/partial/lutim.js.ep:125 themes/default/templates/partial/lutim.js.ep:142 msgid "Hit Ctrl+C, then Enter to copy the short link" msgstr "" -#: themes/default/templates/layouts/default.html.ep:45 +#: themes/default/templates/layouts/default.html.ep:44 msgid "Homepage" msgstr "Homepage" @@ -221,27 +177,30 @@ msgstr "How to report an image?" msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained." msgstr "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained." -#: themes/default/templates/index.html.ep:163 -#: themes/default/templates/index.html.ep:203 +#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203 msgid "Image URL" msgstr "Image URL" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:109 themes/default/templates/raw.html.ep:2 msgid "Image delay" msgstr "" -#: lib/Lutim/Controller.pm:715 +#: lib/Lutim/Controller.pm:702 msgid "Image not found." msgstr "" -#: themes/default/templates/layouts/default.html.ep:49 +#: themes/default/templates/layouts/default.html.ep:48 msgid "Informations" msgstr "Informations" -#: themes/default/templates/layouts/default.html.ep:55 +#: themes/default/templates/layouts/default.html.ep:56 msgid "Install webapp" msgstr "Install webapp" +#: themes/default/templates/layouts/default.html.ep:55 +msgid "Instance's statistics" +msgstr "" + #: themes/default/templates/about.html.ep:11 msgid "Is it really anonymous?" msgstr "Is it really anonymous?" @@ -254,26 +213,23 @@ msgstr "Is it really free (as in free beer)?" msgid "Juste like you pronounce the French word lutin (/ly.tɛ̃/)." msgstr "Juste like you pronounce the French word lutin (/ly.tɛ̃/)." -#: themes/default/templates/index.html.ep:153 -#: themes/default/templates/index.html.ep:184 +#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184 msgid "Keep EXIF tags" msgstr "Keep EXIF tags" -#: themes/default/templates/index.html.ep:118 -#: themes/default/templates/index.html.ep:166 -#: themes/default/templates/index.html.ep:206 -#: themes/default/templates/partial/lutim.js.ep:260 +#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:260 msgid "Let's go!" msgstr "Let's go!" -#: themes/default/templates/layouts/default.html.ep:48 +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Liberapay button" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:47 msgid "License:" msgstr "License:" -#: themes/default/templates/index.html.ep:89 -#: themes/default/templates/index.html.ep:91 -#: themes/default/templates/partial/lutim.js.ep:208 -#: themes/default/templates/partial/lutim.js.ep:212 +#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:208 themes/default/templates/partial/lutim.js.ep:212 msgid "Link for share on social networks" msgstr "Link for share on social networks" @@ -285,15 +241,11 @@ msgstr "Lutim is a free (as in free beer) and anonymous image hosting service. I msgid "Main developers" msgstr "Main developers" -#: themes/default/templates/index.html.ep:73 -#: themes/default/templates/index.html.ep:75 -#: themes/default/templates/partial/lutim.js.ep:182 -#: themes/default/templates/partial/lutim.js.ep:185 +#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:182 themes/default/templates/partial/lutim.js.ep:185 msgid "Markdown syntax" msgstr "Markdown syntax" -#: themes/default/templates/layouts/default.html.ep:54 -#: themes/default/templates/myfiles.html.ep:2 +#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2 msgid "My images" msgstr "" @@ -301,8 +253,7 @@ msgstr "" msgid "No limit" msgstr "" -#: themes/default/templates/index.html.ep:165 -#: themes/default/templates/index.html.ep:198 +#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198 msgid "Only images are allowed" msgstr "Only images are allowed" @@ -331,20 +282,27 @@ msgstr "Send an image" msgid "Share it!" msgstr "" -#: themes/default/templates/layouts/default.html.ep:51 +#: themes/default/templates/layouts/default.html.ep:50 msgid "Share on Twitter" msgstr "Share on Twitter" -#: themes/default/templates/index.html.ep:133 -#: themes/default/templates/partial/lutim.js.ep:271 +#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:271 msgid "Something bad happened" msgstr "Something bad happened" #. ($c->config('contact') -#: lib/Lutim/Controller.pm:723 +#: lib/Lutim/Controller.pm:709 msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)." msgstr "" +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Support the author on Liberapay" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Support the author on Tipeee" +msgstr "" + #: themes/default/templates/about.html.ep:13 msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)." msgstr "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)." @@ -353,26 +311,23 @@ msgstr "The IP address of the image's sender is retained for a delay which depen msgid "The Lutim software is a free software, which allows you to download and install it on you own server. Have a look at the AGPL to see what you can do." msgstr "The Lutim software is a free software, which allows you to download and install it on you own server. Have a look at the AGPL to see what you can do." -#: lib/Lutim/Controller.pm:305 +#: lib/Lutim/Controller.pm:307 msgid "The URL is not valid." msgstr "The URL is not valid." -#: lib/Lutim/Controller.pm:117 -#: lib/Lutim/Controller.pm:186 +#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188 msgid "The delete token is invalid." msgstr "The delete token is invalid." #. ($upload->filename) -#: lib/Lutim/Controller.pm:449 +#: lib/Lutim/Controller.pm:445 msgid "The file %1 is not an image." msgstr "The file %1 is not an image." -#. ($max_file_size) #. ($tx->res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:269 -#: lib/Lutim/Controller.pm:338 -#: themes/default/templates/partial/lutim.js.ep:332 +#. ($max_file_size) +#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:332 msgid "The file exceed the size limit (%1)" msgstr "The file exceed the size limit (%1)" @@ -381,17 +336,16 @@ msgid "The graph's datas are not updated in real-time." msgstr "The graph's datas are not updated in real-time." #. ($image->filename) -#: lib/Lutim/Controller.pm:188 +#: lib/Lutim/Controller.pm:190 msgid "The image %1 has already been deleted." msgstr "The image %1 has already been deleted." #. ($image->filename) -#: lib/Lutim/Controller.pm:197 -#: lib/Lutim/Controller.pm:202 +#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204 msgid "The image %1 has been successfully deleted" msgstr "The image %1 has been successfully deleted" -#: lib/Lutim/Controller.pm:125 +#: lib/Lutim/Controller.pm:128 msgid "The image's delay has been successfully modified" msgstr "The image's delay has been successfully modified" @@ -404,37 +358,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at msgstr "The images you post on Lutim can be stored indefinitely or be deleted at first view or after a delay selected from those proposed." #. ($c->config->{contact}) -#: lib/Lutim/Controller.pm:444 +#: lib/Lutim/Controller.pm:442 msgid "There is no more available URL. Retry or contact the administrator. %1" msgstr "There is no more available URL. Retry or contact the administrator. %1" -#: lib/Lutim/Command/cron/stats.pm:102 +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Tipeee button" +msgstr "" + +#: lib/Lutim/Command/cron/stats.pm:118 themes/default/templates/raw.html.ep:11 msgid "Total" msgstr "" -#: themes/default/templates/index.html.ep:60 -#: themes/default/templates/partial/lutim.js.ep:45 +#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:45 msgid "Tweet it!" msgstr "Tweet it!" #. ($short) -#: lib/Lutim/Controller.pm:159 -#: lib/Lutim/Controller.pm:231 +#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233 msgid "Unable to find the image %1." msgstr "Unable to find the image %1." -#: lib/Lutim.pm:85 -#: lib/Lutim/Controller.pm:534 -#: lib/Lutim/Controller.pm:580 -#: lib/Lutim/Controller.pm:624 -#: lib/Lutim/Controller.pm:664 -#: lib/Lutim/Controller.pm:676 -#: lib/Lutim/Controller.pm:687 -#: lib/Lutim/Controller.pm:712 +#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61 msgid "Unable to find the image: it has been deleted." msgstr "Unable to find the image: it has been deleted." -#: lib/Lutim/Controller.pm:101 +#: lib/Lutim/Controller.pm:105 msgid "Unable to get counter" msgstr "" @@ -442,8 +391,7 @@ msgstr "" msgid "Unlike many image sharing services, you don't give us rights on uploaded images." msgstr "Unlike many image sharing services, you don't give us rights on uploaded images." -#: themes/default/templates/index.html.ep:162 -#: themes/default/templates/index.html.ep:201 +#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201 msgid "Upload an image with its URL" msgstr "Upload an image with its URL" @@ -455,16 +403,12 @@ msgstr "" msgid "Uploaded files by days" msgstr "Uploaded files by days" -#. ($config->{contact}) -#: lib/Lutim.pm:189 +#. ($c->app->config('contact') +#: lib/Lutim/Plugin/Helpers.pm:156 msgid "Uploading is currently disabled, please try later or contact the administrator (%1)." msgstr "Uploading is currently disabled, please try later or contact the administrator (%1)." -#: themes/default/templates/index.html.ep:65 -#: themes/default/templates/index.html.ep:67 -#: themes/default/templates/myfiles.html.ep:14 -#: themes/default/templates/partial/lutim.js.ep:168 -#: themes/default/templates/partial/lutim.js.ep:172 +#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:14 themes/default/templates/partial/lutim.js.ep:168 themes/default/templates/partial/lutim.js.ep:172 msgid "View link" msgstr "View link" @@ -484,6 +428,7 @@ msgstr "Who owns rights on images uploaded on Lutim?" msgid "Yes, it is! On the other side, for legal reasons, your IP address will be stored when you send an image. Don't panic, it is normally the case of all sites on which you send files!" msgstr "Yes, it is! On the other side, for legal reasons, your IP address will be stored when you send an image. Don't panic, it is normally the case of all sites on which you send files!" +#: msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via Flattr or with BitCoin." msgstr "Yes, it is! On the other side, if you want to support the developer, you can do it via Flattr or with BitCoin." @@ -503,10 +448,7 @@ msgstr "and on" msgid "core developer" msgstr "core developer" -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:125 -#: lib/Lutim/Command/cron/stats.pm:97 -#: themes/default/templates/index.html.ep:3 +#: lib/Lutim/Command/cron/stats.pm:113 lib/Lutim/Command/cron/stats.pm:124 lib/Lutim/Command/cron/stats.pm:141 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6 msgid "no time limit" msgstr "no time limit" diff --git a/themes/default/lib/Lutim/I18N/es.po b/themes/default/lib/Lutim/I18N/es.po index 576d5aed47c7a91503852058c2eab3636529bbf9..7f7a1beef0aedf4f28e4ecca4f1f6bdabd0ad0c3 100644 --- a/themes/default/lib/Lutim/I18N/es.po +++ b/themes/default/lib/Lutim/I18N/es.po @@ -18,19 +18,11 @@ msgstr "" "Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. ($delay) -#. (config('max_delay') #. (7) #. (30) -#: lib/Lutim/Command/cron/stats.pm:100 -#: lib/Lutim/Command/cron/stats.pm:110 -#: lib/Lutim/Command/cron/stats.pm:111 -#: lib/Lutim/Command/cron/stats.pm:127 -#: lib/Lutim/Command/cron/stats.pm:128 -#: lib/Lutim/Command/cron/stats.pm:99 -#: themes/default/templates/partial/lutim.js.ep:235 -#: themes/default/templates/partial/lutim.js.ep:244 -#: themes/default/templates/partial/lutim.js.ep:245 +#. ($delay) +#. (config('max_delay') +#: lib/Lutim/Command/cron/stats.pm:115 lib/Lutim/Command/cron/stats.pm:116 lib/Lutim/Command/cron/stats.pm:126 lib/Lutim/Command/cron/stats.pm:127 lib/Lutim/Command/cron/stats.pm:143 lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:235 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/partial/lutim.js.ep:245 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9 msgid "%1 days" msgstr "%1 días" @@ -43,18 +35,11 @@ msgstr "%1 imágenes enviadas a esta instancia desde el inicio." msgid "-or-" msgstr "-o-" -#: lib/Lutim/Command/cron/stats.pm:101 -#: lib/Lutim/Command/cron/stats.pm:112 -#: lib/Lutim/Command/cron/stats.pm:129 -#: themes/default/templates/index.html.ep:5 +#: lib/Lutim/Command/cron/stats.pm:117 lib/Lutim/Command/cron/stats.pm:128 lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38 msgid "1 year" msgstr "1 año" -#: lib/Lutim/Command/cron/stats.pm:109 -#: lib/Lutim/Command/cron/stats.pm:126 -#: lib/Lutim/Command/cron/stats.pm:98 -#: themes/default/templates/index.html.ep:4 -#: themes/default/templates/partial/lutim.js.ep:244 +#: lib/Lutim/Command/cron/stats.pm:114 lib/Lutim/Command/cron/stats.pm:125 lib/Lutim/Command/cron/stats.pm:142 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7 msgid "24 hours" msgstr "24 horas" @@ -62,22 +47,19 @@ msgstr "24 horas" msgid ": Error while trying to get the counter." msgstr ": Error al intentar obtener el contador." -#: lib/Lutim/Command/cron/stats.pm:94 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "" -#: lib/Lutim/Controller.pm:286 +#: lib/Lutim/Controller.pm:288 msgid "An error occured while downloading the image." msgstr "Error al intentar modificar la imagen." -#: themes/default/templates/about.html.ep:41 -#: themes/default/templates/myfiles.html.ep:27 -#: themes/default/templates/stats.html.ep:25 +#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:27 themes/default/templates/stats.html.ep:25 msgid "Back to homepage" msgstr "Volver a la página inicial" -#: themes/default/templates/index.html.ep:193 -#: themes/default/templates/index.html.ep:194 +#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194 msgid "Click to open the file browser" msgstr "Clic para abrir el explorador de archivos" @@ -85,23 +67,11 @@ msgstr "Clic para abrir el explorador de archivos" msgid "Contributors" msgstr "Contribuidores" -#: themes/default/templates/partial/lutim.js.ep:310 -#: themes/default/templates/partial/lutim.js.ep:359 -#: themes/default/templates/partial/lutim.js.ep:437 +#: themes/default/templates/partial/lutim.js.ep:310 themes/default/templates/partial/lutim.js.ep:359 themes/default/templates/partial/lutim.js.ep:437 msgid "Copy all view links to clipboard" msgstr "Copiar todos los enlaces de visualización al portapapeles" -#: themes/default/templates/index.html.ep:18 -#: themes/default/templates/index.html.ep:36 -#: themes/default/templates/index.html.ep:69 -#: themes/default/templates/index.html.ep:77 -#: themes/default/templates/index.html.ep:85 -#: themes/default/templates/index.html.ep:93 -#: themes/default/templates/partial/common.js.ep:45 -#: themes/default/templates/partial/lutim.js.ep:176 -#: themes/default/templates/partial/lutim.js.ep:188 -#: themes/default/templates/partial/lutim.js.ep:202 -#: themes/default/templates/partial/lutim.js.ep:217 +#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/partial/common.js.ep:45 themes/default/templates/partial/lutim.js.ep:176 themes/default/templates/partial/lutim.js.ep:188 themes/default/templates/partial/lutim.js.ep:202 themes/default/templates/partial/lutim.js.ep:217 msgid "Copy to clipboard" msgstr "Copiar al portapapeles" @@ -117,26 +87,19 @@ msgstr "" msgid "Delay repartition chart for enabled images" msgstr "" -#: themes/default/templates/index.html.ep:115 -#: themes/default/templates/index.html.ep:147 -#: themes/default/templates/index.html.ep:178 -#: themes/default/templates/myfiles.html.ep:16 -#: themes/default/templates/partial/lutim.js.ep:256 +#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:16 themes/default/templates/partial/lutim.js.ep:256 msgid "Delete at first view?" msgstr "¿Borrar en la primera vista?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:112 themes/default/templates/raw.html.ep:5 msgid "Deleted images in 30 days" msgstr "" -#: themes/default/templates/index.html.ep:98 -#: themes/default/templates/myfiles.html.ep:19 -#: themes/default/templates/partial/common.js.ep:37 -#: themes/default/templates/partial/common.js.ep:40 +#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:19 themes/default/templates/partial/common.js.ep:37 themes/default/templates/partial/common.js.ep:40 msgid "Deletion link" msgstr "Enlace para borrar" @@ -144,15 +107,11 @@ msgstr "Enlace para borrar" msgid "Download all images" msgstr "Descargar todas las imágenes" -#: themes/default/templates/index.html.ep:81 -#: themes/default/templates/index.html.ep:83 -#: themes/default/templates/partial/lutim.js.ep:194 -#: themes/default/templates/partial/lutim.js.ep:198 +#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:194 themes/default/templates/partial/lutim.js.ep:198 msgid "Download link" msgstr "Enlace de descarga" -#: themes/default/templates/index.html.ep:28 -#: themes/default/templates/index.html.ep:31 +#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 msgid "Download zip link" msgstr "Enlace de descarga del archivo de las imágenes" @@ -164,8 +123,7 @@ msgstr "Arrastre y suelte imágenes aquí" msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want." msgstr "Arrastre y suelte una imagen en el área apropiada, o use el método tradicional para enviar ficheros, y Lutim proporcionará cuatro URLs. Una para ver la imagen, otra para descargarla directamente, una que upede usar en redes sociales, y una última para borrar la imagen cuando lo desee." -#: themes/default/templates/index.html.ep:150 -#: themes/default/templates/index.html.ep:181 +#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181 msgid "Encrypt the image (Lutim does not keep the key)." msgstr "Las imágenes se cifran en el servidor (Lutim no guarda la clave)." @@ -189,21 +147,19 @@ msgstr "Nombre de archivo" msgid "For more details, see the homepage of the project." msgstr "Para más detalles, vea la página del proyecto." -#: themes/default/templates/layouts/default.html.ep:50 +#: themes/default/templates/layouts/default.html.ep:49 msgid "Fork me!" msgstr "¡Clóname!" -#: themes/default/templates/index.html.ep:10 -#: themes/default/templates/index.html.ep:13 +#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 msgid "Gallery link" msgstr "Enlace a la galería" -#: themes/default/templates/partial/lutim.js.ep:125 -#: themes/default/templates/partial/lutim.js.ep:142 +#: themes/default/templates/partial/lutim.js.ep:125 themes/default/templates/partial/lutim.js.ep:142 msgid "Hit Ctrl+C, then Enter to copy the short link" msgstr "Presione Ctrl + C, entonces Ingresar para copiar el enlace" -#: themes/default/templates/layouts/default.html.ep:45 +#: themes/default/templates/layouts/default.html.ep:44 msgid "Homepage" msgstr "Página inicial" @@ -223,27 +179,30 @@ msgstr "¿Cómo informar sobre una imagen?" msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained." msgstr "Si los ficheros se borran por haberlo solicitado al enviarlos, se retiene su huella digital SHA512." -#: themes/default/templates/index.html.ep:163 -#: themes/default/templates/index.html.ep:203 +#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203 msgid "Image URL" msgstr "URL de la imagen" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:109 themes/default/templates/raw.html.ep:2 msgid "Image delay" msgstr "" -#: lib/Lutim/Controller.pm:715 +#: lib/Lutim/Controller.pm:702 msgid "Image not found." msgstr "Imagen no encontrada." -#: themes/default/templates/layouts/default.html.ep:49 +#: themes/default/templates/layouts/default.html.ep:48 msgid "Informations" msgstr "Informaciones" -#: themes/default/templates/layouts/default.html.ep:55 +#: themes/default/templates/layouts/default.html.ep:56 msgid "Install webapp" msgstr "Instalar webapp" +#: themes/default/templates/layouts/default.html.ep:55 +msgid "Instance's statistics" +msgstr "" + #: themes/default/templates/about.html.ep:11 msgid "Is it really anonymous?" msgstr "¿Es realmente anónimo?" @@ -256,26 +215,23 @@ msgstr "¿Es realmente gratis?" msgid "Juste like you pronounce the French word lutin (/ly.tɛ̃/)." msgstr "Tal y como se pronuncia la palabra francesa lutin (/ly.tɛ̃/)." -#: themes/default/templates/index.html.ep:153 -#: themes/default/templates/index.html.ep:184 +#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184 msgid "Keep EXIF tags" msgstr "Mantener las etiquetas EXIF" -#: themes/default/templates/index.html.ep:118 -#: themes/default/templates/index.html.ep:166 -#: themes/default/templates/index.html.ep:206 -#: themes/default/templates/partial/lutim.js.ep:260 +#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:260 msgid "Let's go!" msgstr "¡Vamos allá!" -#: themes/default/templates/layouts/default.html.ep:48 +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Liberapay button" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:47 msgid "License:" msgstr "Licencia:" -#: themes/default/templates/index.html.ep:89 -#: themes/default/templates/index.html.ep:91 -#: themes/default/templates/partial/lutim.js.ep:208 -#: themes/default/templates/partial/lutim.js.ep:212 +#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:208 themes/default/templates/partial/lutim.js.ep:212 msgid "Link for share on social networks" msgstr "Enlace para compartir en redes sociales" @@ -287,15 +243,11 @@ msgstr "Lutim es un servicio de alojamiento de imágenes anónimo y gratuito. Ta msgid "Main developers" msgstr "Desarrolladores principales" -#: themes/default/templates/index.html.ep:73 -#: themes/default/templates/index.html.ep:75 -#: themes/default/templates/partial/lutim.js.ep:182 -#: themes/default/templates/partial/lutim.js.ep:185 +#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:182 themes/default/templates/partial/lutim.js.ep:185 msgid "Markdown syntax" msgstr "Sintaxis de Markdown" -#: themes/default/templates/layouts/default.html.ep:54 -#: themes/default/templates/myfiles.html.ep:2 +#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2 msgid "My images" msgstr "Mis Imágenes" @@ -303,8 +255,7 @@ msgstr "Mis Imágenes" msgid "No limit" msgstr "Sin fecha de caducidad" -#: themes/default/templates/index.html.ep:165 -#: themes/default/templates/index.html.ep:198 +#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198 msgid "Only images are allowed" msgstr "Sólo se admiten imágenes" @@ -333,20 +284,27 @@ msgstr "Enviar una imagen" msgid "Share it!" msgstr "¡Compártelo!" -#: themes/default/templates/layouts/default.html.ep:51 +#: themes/default/templates/layouts/default.html.ep:50 msgid "Share on Twitter" msgstr "Compartir en Twitter" -#: themes/default/templates/index.html.ep:133 -#: themes/default/templates/partial/lutim.js.ep:271 +#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:271 msgid "Something bad happened" msgstr "Algo malo ha pasado" #. ($c->config('contact') -#: lib/Lutim/Controller.pm:723 +#: lib/Lutim/Controller.pm:709 msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)." msgstr "Algo malo ha pasado. Inténtelo de nuevo más tarde o contacte con el administrador (%1)." +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Support the author on Liberapay" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Support the author on Tipeee" +msgstr "" + #: themes/default/templates/about.html.ep:13 msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)." msgstr "La dirección IP del remitente de la imagen se retiene durante un tiempo, que depende de lo que elija el administrador (para la instancia oficial, que está localizada en Francia, es un año)." @@ -355,26 +313,23 @@ msgstr "La dirección IP del remitente de la imagen se retiene durante un tiempo msgid "The Lutim software is a free software, which allows you to download and install it on you own server. Have a look at the AGPL to see what you can do." msgstr "El software Lutim es software libre, lo que le permite descargarlo e instalarlo en su propio servidor. Eche un vistazo a la licencia AGPL para ver qué puede hacer." -#: lib/Lutim/Controller.pm:305 +#: lib/Lutim/Controller.pm:307 msgid "The URL is not valid." msgstr "La URL no es válida." -#: lib/Lutim/Controller.pm:117 -#: lib/Lutim/Controller.pm:186 +#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188 msgid "The delete token is invalid." msgstr "El código de borrado no es válido." #. ($upload->filename) -#: lib/Lutim/Controller.pm:449 +#: lib/Lutim/Controller.pm:445 msgid "The file %1 is not an image." msgstr "El archivo %1 no es una imagen." -#. ($max_file_size) #. ($tx->res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:269 -#: lib/Lutim/Controller.pm:338 -#: themes/default/templates/partial/lutim.js.ep:332 +#. ($max_file_size) +#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:332 msgid "The file exceed the size limit (%1)" msgstr "El archivo supera el límite de tamaño (%1)" @@ -383,17 +338,16 @@ msgid "The graph's datas are not updated in real-time." msgstr "Los datos del gráfico no se actualizan en tiempo real." #. ($image->filename) -#: lib/Lutim/Controller.pm:188 +#: lib/Lutim/Controller.pm:190 msgid "The image %1 has already been deleted." msgstr "La imagen %1 ya se ha borrado." #. ($image->filename) -#: lib/Lutim/Controller.pm:197 -#: lib/Lutim/Controller.pm:202 +#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204 msgid "The image %1 has been successfully deleted" msgstr "La imagen %1 se ha borrado correctamente" -#: lib/Lutim/Controller.pm:125 +#: lib/Lutim/Controller.pm:128 msgid "The image's delay has been successfully modified" msgstr "Se ha modificado correctamente el tiempo de la imagen" @@ -406,37 +360,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at msgstr "Puede, opcionalmente, solicitar que la imagen publicada en Lutim se elimine con la primera vista (o descarga) o tras un tiempo seleccionado de entre varios propuestos." #. ($c->config->{contact}) -#: lib/Lutim/Controller.pm:444 +#: lib/Lutim/Controller.pm:442 msgid "There is no more available URL. Retry or contact the administrator. %1" msgstr "No más URL disponibles. Inténtelo de nuevo o contacte con el administrador. %1" -#: lib/Lutim/Command/cron/stats.pm:102 +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Tipeee button" +msgstr "" + +#: lib/Lutim/Command/cron/stats.pm:118 themes/default/templates/raw.html.ep:11 msgid "Total" msgstr "" -#: themes/default/templates/index.html.ep:60 -#: themes/default/templates/partial/lutim.js.ep:45 +#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:45 msgid "Tweet it!" msgstr "¡Tuitéalo!" #. ($short) -#: lib/Lutim/Controller.pm:159 -#: lib/Lutim/Controller.pm:231 +#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233 msgid "Unable to find the image %1." msgstr "No se ha podido encontrar la imagen %1." -#: lib/Lutim.pm:85 -#: lib/Lutim/Controller.pm:534 -#: lib/Lutim/Controller.pm:580 -#: lib/Lutim/Controller.pm:624 -#: lib/Lutim/Controller.pm:664 -#: lib/Lutim/Controller.pm:676 -#: lib/Lutim/Controller.pm:687 -#: lib/Lutim/Controller.pm:712 +#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61 msgid "Unable to find the image: it has been deleted." msgstr "No se ha podido encontrar la imagen: ha sido borrada." -#: lib/Lutim/Controller.pm:101 +#: lib/Lutim/Controller.pm:105 msgid "Unable to get counter" msgstr "Imposible recuperar el contador" @@ -444,8 +393,7 @@ msgstr "Imposible recuperar el contador" msgid "Unlike many image sharing services, you don't give us rights on uploaded images." msgstr "A diferencia de muchos servicios de compartición de imágenes, usted no cede los derechos de las imágenes que sube." -#: themes/default/templates/index.html.ep:162 -#: themes/default/templates/index.html.ep:201 +#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201 msgid "Upload an image with its URL" msgstr "Subir una imagen con la URL" @@ -457,16 +405,12 @@ msgstr "Enviado el" msgid "Uploaded files by days" msgstr "Archivos enviados por día" -#. ($config->{contact}) -#: lib/Lutim.pm:189 +#. ($c->app->config('contact') +#: lib/Lutim/Plugin/Helpers.pm:156 msgid "Uploading is currently disabled, please try later or contact the administrator (%1)." msgstr "La carga está deshabilitada en estos momentos, por favor inténtelo más tarde o contacte con el administrador (%1)." -#: themes/default/templates/index.html.ep:65 -#: themes/default/templates/index.html.ep:67 -#: themes/default/templates/myfiles.html.ep:14 -#: themes/default/templates/partial/lutim.js.ep:168 -#: themes/default/templates/partial/lutim.js.ep:172 +#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:14 themes/default/templates/partial/lutim.js.ep:168 themes/default/templates/partial/lutim.js.ep:172 msgid "View link" msgstr "Enlace de visualización" @@ -502,10 +446,7 @@ msgstr "y en" msgid "core developer" msgstr "desarrollador principal" -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:125 -#: lib/Lutim/Command/cron/stats.pm:97 -#: themes/default/templates/index.html.ep:3 +#: lib/Lutim/Command/cron/stats.pm:113 lib/Lutim/Command/cron/stats.pm:124 lib/Lutim/Command/cron/stats.pm:141 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6 msgid "no time limit" msgstr "Sin tiempo límite" diff --git a/themes/default/lib/Lutim/I18N/fr.po b/themes/default/lib/Lutim/I18N/fr.po index b3b2108fc475df1a8ec23a0fbdb4458da03069ff..9dd6e3c1a6b39330dff97b785bd1b7a73c63d772 100644 --- a/themes/default/lib/Lutim/I18N/fr.po +++ b/themes/default/lib/Lutim/I18N/fr.po @@ -18,19 +18,11 @@ msgstr "" "Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. ($delay) -#. (config('max_delay') #. (7) #. (30) -#: lib/Lutim/Command/cron/stats.pm:100 -#: lib/Lutim/Command/cron/stats.pm:110 -#: lib/Lutim/Command/cron/stats.pm:111 -#: lib/Lutim/Command/cron/stats.pm:127 -#: lib/Lutim/Command/cron/stats.pm:128 -#: lib/Lutim/Command/cron/stats.pm:99 -#: themes/default/templates/partial/lutim.js.ep:235 -#: themes/default/templates/partial/lutim.js.ep:244 -#: themes/default/templates/partial/lutim.js.ep:245 +#. ($delay) +#. (config('max_delay') +#: lib/Lutim/Command/cron/stats.pm:115 lib/Lutim/Command/cron/stats.pm:116 lib/Lutim/Command/cron/stats.pm:126 lib/Lutim/Command/cron/stats.pm:127 lib/Lutim/Command/cron/stats.pm:143 lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:235 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/partial/lutim.js.ep:245 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9 msgid "%1 days" msgstr "%1 jours" @@ -43,18 +35,11 @@ msgstr "%1 images envoyées sur cette instance depuis le début." msgid "-or-" msgstr "-ou-" -#: lib/Lutim/Command/cron/stats.pm:101 -#: lib/Lutim/Command/cron/stats.pm:112 -#: lib/Lutim/Command/cron/stats.pm:129 -#: themes/default/templates/index.html.ep:5 +#: lib/Lutim/Command/cron/stats.pm:117 lib/Lutim/Command/cron/stats.pm:128 lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38 msgid "1 year" msgstr "1 an" -#: lib/Lutim/Command/cron/stats.pm:109 -#: lib/Lutim/Command/cron/stats.pm:126 -#: lib/Lutim/Command/cron/stats.pm:98 -#: themes/default/templates/index.html.ep:4 -#: themes/default/templates/partial/lutim.js.ep:244 +#: lib/Lutim/Command/cron/stats.pm:114 lib/Lutim/Command/cron/stats.pm:125 lib/Lutim/Command/cron/stats.pm:142 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7 msgid "24 hours" msgstr "24 heures" @@ -62,22 +47,19 @@ msgstr "24 heures" msgid ": Error while trying to get the counter." msgstr " : Erreur en essayant de récupérer le compteur." -#: lib/Lutim/Command/cron/stats.pm:94 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "Images actives" -#: lib/Lutim/Controller.pm:286 +#: lib/Lutim/Controller.pm:288 msgid "An error occured while downloading the image." msgstr "Une erreur est survenue lors du téléchargement de l’image." -#: themes/default/templates/about.html.ep:41 -#: themes/default/templates/myfiles.html.ep:27 -#: themes/default/templates/stats.html.ep:25 +#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:27 themes/default/templates/stats.html.ep:25 msgid "Back to homepage" msgstr "Retour à la page d’accueil" -#: themes/default/templates/index.html.ep:193 -#: themes/default/templates/index.html.ep:194 +#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194 msgid "Click to open the file browser" msgstr "Cliquez pour utiliser le navigateur de fichier" @@ -85,23 +67,11 @@ msgstr "Cliquez pour utiliser le navigateur de fichier" msgid "Contributors" msgstr "Contributeurs" -#: themes/default/templates/partial/lutim.js.ep:310 -#: themes/default/templates/partial/lutim.js.ep:359 -#: themes/default/templates/partial/lutim.js.ep:437 +#: themes/default/templates/partial/lutim.js.ep:310 themes/default/templates/partial/lutim.js.ep:359 themes/default/templates/partial/lutim.js.ep:437 msgid "Copy all view links to clipboard" msgstr "Copier tous les liens de visualisation dans le presse-papier" -#: themes/default/templates/index.html.ep:18 -#: themes/default/templates/index.html.ep:36 -#: themes/default/templates/index.html.ep:69 -#: themes/default/templates/index.html.ep:77 -#: themes/default/templates/index.html.ep:85 -#: themes/default/templates/index.html.ep:93 -#: themes/default/templates/partial/common.js.ep:45 -#: themes/default/templates/partial/lutim.js.ep:176 -#: themes/default/templates/partial/lutim.js.ep:188 -#: themes/default/templates/partial/lutim.js.ep:202 -#: themes/default/templates/partial/lutim.js.ep:217 +#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/partial/common.js.ep:45 themes/default/templates/partial/lutim.js.ep:176 themes/default/templates/partial/lutim.js.ep:188 themes/default/templates/partial/lutim.js.ep:202 themes/default/templates/partial/lutim.js.ep:217 msgid "Copy to clipboard" msgstr "Copier dans le presse-papier" @@ -117,26 +87,19 @@ msgstr "Graphe de répartition des délais pour les images supprimées" msgid "Delay repartition chart for enabled images" msgstr "Graphe de répartition des délais pour les images actives" -#: themes/default/templates/index.html.ep:115 -#: themes/default/templates/index.html.ep:147 -#: themes/default/templates/index.html.ep:178 -#: themes/default/templates/myfiles.html.ep:16 -#: themes/default/templates/partial/lutim.js.ep:256 +#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:16 themes/default/templates/partial/lutim.js.ep:256 msgid "Delete at first view?" msgstr "Supprimer au premier accès ?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "Images supprimées" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:112 themes/default/templates/raw.html.ep:5 msgid "Deleted images in 30 days" msgstr "Images supprimées dans 30 jours" -#: themes/default/templates/index.html.ep:98 -#: themes/default/templates/myfiles.html.ep:19 -#: themes/default/templates/partial/common.js.ep:37 -#: themes/default/templates/partial/common.js.ep:40 +#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:19 themes/default/templates/partial/common.js.ep:37 themes/default/templates/partial/common.js.ep:40 msgid "Deletion link" msgstr "Lien de suppression" @@ -144,15 +107,11 @@ msgstr "Lien de suppression" msgid "Download all images" msgstr "Télécharger toutes les images" -#: themes/default/templates/index.html.ep:81 -#: themes/default/templates/index.html.ep:83 -#: themes/default/templates/partial/lutim.js.ep:194 -#: themes/default/templates/partial/lutim.js.ep:198 +#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:194 themes/default/templates/partial/lutim.js.ep:198 msgid "Download link" msgstr "Lien de téléchargement" -#: themes/default/templates/index.html.ep:28 -#: themes/default/templates/index.html.ep:31 +#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 msgid "Download zip link" msgstr "Lien de téléchargement de l’archive des images" @@ -164,8 +123,7 @@ msgstr "Déposez vos images ici" msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want." msgstr "Faites glisser des images dans la zone prévue à cet effet ou sélectionnez un fichier de façon classique et Lutim vous fournira quatre URLs en retour. Une pour afficher l’image, une autre pour la télécharger directement, une pour l’utiliser sur les réseaux sociaux et une dernière pour supprimer votre image quand vous le souhaitez" -#: themes/default/templates/index.html.ep:150 -#: themes/default/templates/index.html.ep:181 +#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181 msgid "Encrypt the image (Lutim does not keep the key)." msgstr "Chiffrer l’image (Lutim ne stocke pas la clé)." @@ -189,21 +147,19 @@ msgstr "Nom du fichier" msgid "For more details, see the homepage of the project." msgstr "Pour plus de détails, consultez la page Github du projet." -#: themes/default/templates/layouts/default.html.ep:50 +#: themes/default/templates/layouts/default.html.ep:49 msgid "Fork me!" msgstr "Créez un fork !" -#: themes/default/templates/index.html.ep:10 -#: themes/default/templates/index.html.ep:13 +#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 msgid "Gallery link" msgstr "Lien vers la galerie" -#: themes/default/templates/partial/lutim.js.ep:125 -#: themes/default/templates/partial/lutim.js.ep:142 +#: themes/default/templates/partial/lutim.js.ep:125 themes/default/templates/partial/lutim.js.ep:142 msgid "Hit Ctrl+C, then Enter to copy the short link" msgstr "Faites Ctrl+C puis appuyez sur la touche Entrée pour copier le lien" -#: themes/default/templates/layouts/default.html.ep:45 +#: themes/default/templates/layouts/default.html.ep:44 msgid "Homepage" msgstr "Accueil" @@ -223,27 +179,30 @@ msgstr "Comment peut-on faire pour signaler une image ?" msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained." msgstr "Si les fichiers sont bien supprimés si vous en avez exprimé le choix, leur empreinte SHA512 est toutefois conservée." -#: themes/default/templates/index.html.ep:163 -#: themes/default/templates/index.html.ep:203 +#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203 msgid "Image URL" msgstr "URL de l’image" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:109 themes/default/templates/raw.html.ep:2 msgid "Image delay" msgstr "Durée de rétention de l’image" -#: lib/Lutim/Controller.pm:715 +#: lib/Lutim/Controller.pm:702 msgid "Image not found." msgstr "Image non trouvée." -#: themes/default/templates/layouts/default.html.ep:49 +#: themes/default/templates/layouts/default.html.ep:48 msgid "Informations" msgstr "Informations" -#: themes/default/templates/layouts/default.html.ep:55 +#: themes/default/templates/layouts/default.html.ep:56 msgid "Install webapp" msgstr "Installer la webapp" +#: themes/default/templates/layouts/default.html.ep:55 +msgid "Instance's statistics" +msgstr "Statistiques de l’instance" + #: themes/default/templates/about.html.ep:11 msgid "Is it really anonymous?" msgstr "C’est vraiment anonyme ?" @@ -256,26 +215,23 @@ msgstr "C’est vraiment gratuit ?" msgid "Juste like you pronounce the French word lutin (/ly.tɛ̃/)." msgstr "Comme on prononce lutin (/ly.tɛ̃/)." -#: themes/default/templates/index.html.ep:153 -#: themes/default/templates/index.html.ep:184 +#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184 msgid "Keep EXIF tags" msgstr "Conserver les données EXIF" -#: themes/default/templates/index.html.ep:118 -#: themes/default/templates/index.html.ep:166 -#: themes/default/templates/index.html.ep:206 -#: themes/default/templates/partial/lutim.js.ep:260 +#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:260 msgid "Let's go!" msgstr "Allons-y !" -#: themes/default/templates/layouts/default.html.ep:48 +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Liberapay button" +msgstr "Bouton Liberapay" + +#: themes/default/templates/layouts/default.html.ep:47 msgid "License:" msgstr "Licence :" -#: themes/default/templates/index.html.ep:89 -#: themes/default/templates/index.html.ep:91 -#: themes/default/templates/partial/lutim.js.ep:208 -#: themes/default/templates/partial/lutim.js.ep:212 +#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:208 themes/default/templates/partial/lutim.js.ep:212 msgid "Link for share on social networks" msgstr "Lien pour partager sur les réseaux sociaux" @@ -287,15 +243,11 @@ msgstr "Lutim est un service gratuit et anonyme d’hébergement d’images. Il msgid "Main developers" msgstr "Développeurs de l’application" -#: themes/default/templates/index.html.ep:73 -#: themes/default/templates/index.html.ep:75 -#: themes/default/templates/partial/lutim.js.ep:182 -#: themes/default/templates/partial/lutim.js.ep:185 +#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:182 themes/default/templates/partial/lutim.js.ep:185 msgid "Markdown syntax" msgstr "Syntaxe Markdown" -#: themes/default/templates/layouts/default.html.ep:54 -#: themes/default/templates/myfiles.html.ep:2 +#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2 msgid "My images" msgstr "Mes images" @@ -303,8 +255,7 @@ msgstr "Mes images" msgid "No limit" msgstr "Pas de date d’expiration" -#: themes/default/templates/index.html.ep:165 -#: themes/default/templates/index.html.ep:198 +#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198 msgid "Only images are allowed" msgstr "Seules les images sont acceptées" @@ -333,20 +284,27 @@ msgstr "Envoyer une image" msgid "Share it!" msgstr "Partagez !" -#: themes/default/templates/layouts/default.html.ep:51 +#: themes/default/templates/layouts/default.html.ep:50 msgid "Share on Twitter" msgstr "Partager sur Twitter" -#: themes/default/templates/index.html.ep:133 -#: themes/default/templates/partial/lutim.js.ep:271 +#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:271 msgid "Something bad happened" msgstr "Un problème est survenu" #. ($c->config('contact') -#: lib/Lutim/Controller.pm:723 +#: lib/Lutim/Controller.pm:709 msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)." msgstr "Quelque chose s’est mal passé lors de la création de l’archive. Veuillez réessayer plus tard ou contactez l’administrateur (%1)." +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Support the author on Liberapay" +msgstr "Supporter l’auteur sur Liberapay" + +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Support the author on Tipeee" +msgstr "Supporter l’auteur sur Tipeee" + #: themes/default/templates/about.html.ep:13 msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)." msgstr "" @@ -357,26 +315,23 @@ msgstr "" msgid "The Lutim software is a free software, which allows you to download and install it on you own server. Have a look at the AGPL to see what you can do." msgstr "Le logiciel Lutim est un logiciel libre, ce qui vous permet de le télécharger et de l’installer sur votre propre serveur. Jetez un coup d’œil à l’AGPL pour voir quels sont vos droits" -#: lib/Lutim/Controller.pm:305 +#: lib/Lutim/Controller.pm:307 msgid "The URL is not valid." msgstr "L’URL n’est pas valide." -#: lib/Lutim/Controller.pm:117 -#: lib/Lutim/Controller.pm:186 +#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188 msgid "The delete token is invalid." msgstr "Le jeton de suppression est invalide." #. ($upload->filename) -#: lib/Lutim/Controller.pm:449 +#: lib/Lutim/Controller.pm:445 msgid "The file %1 is not an image." msgstr "Le fichier %1 n’est pas une image." -#. ($max_file_size) #. ($tx->res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:269 -#: lib/Lutim/Controller.pm:338 -#: themes/default/templates/partial/lutim.js.ep:332 +#. ($max_file_size) +#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:332 msgid "The file exceed the size limit (%1)" msgstr "Le fichier dépasse la limite de taille (%1)" @@ -385,17 +340,16 @@ msgid "The graph's datas are not updated in real-time." msgstr "Les données du graphique ne sont pas mises à jour en temps réél." #. ($image->filename) -#: lib/Lutim/Controller.pm:188 +#: lib/Lutim/Controller.pm:190 msgid "The image %1 has already been deleted." msgstr "L’image %1 a déjà été supprimée." #. ($image->filename) -#: lib/Lutim/Controller.pm:197 -#: lib/Lutim/Controller.pm:202 +#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204 msgid "The image %1 has been successfully deleted" msgstr "L’image %1 a été supprimée avec succès." -#: lib/Lutim/Controller.pm:125 +#: lib/Lutim/Controller.pm:128 msgid "The image's delay has been successfully modified" msgstr "Le délai de l’image a été modifié avec succès." @@ -408,37 +362,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at msgstr "Les images déposées sur Lutim peuvent être stockées indéfiniment, ou s’effacer dès le premier affichage ou au bout du délai choisi parmi ceux proposés." #. ($c->config->{contact}) -#: lib/Lutim/Controller.pm:444 +#: lib/Lutim/Controller.pm:442 msgid "There is no more available URL. Retry or contact the administrator. %1" msgstr "Il n’y a plus d’URL disponible. Veuillez réessayer ou contacter l’administrateur. %1." -#: lib/Lutim/Command/cron/stats.pm:102 +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Tipeee button" +msgstr "Bouton Tipeee" + +#: lib/Lutim/Command/cron/stats.pm:118 themes/default/templates/raw.html.ep:11 msgid "Total" msgstr "Total" -#: themes/default/templates/index.html.ep:60 -#: themes/default/templates/partial/lutim.js.ep:45 +#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:45 msgid "Tweet it!" msgstr "Tweetez !" #. ($short) -#: lib/Lutim/Controller.pm:159 -#: lib/Lutim/Controller.pm:231 +#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233 msgid "Unable to find the image %1." msgstr "Impossible de trouver l’image %1." -#: lib/Lutim.pm:85 -#: lib/Lutim/Controller.pm:534 -#: lib/Lutim/Controller.pm:580 -#: lib/Lutim/Controller.pm:624 -#: lib/Lutim/Controller.pm:664 -#: lib/Lutim/Controller.pm:676 -#: lib/Lutim/Controller.pm:687 -#: lib/Lutim/Controller.pm:712 +#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61 msgid "Unable to find the image: it has been deleted." msgstr "Impossible de trouver l’image : elle a été supprimée." -#: lib/Lutim/Controller.pm:101 +#: lib/Lutim/Controller.pm:105 msgid "Unable to get counter" msgstr "Impossible de récupérer le compteur" @@ -446,8 +395,7 @@ msgstr "Impossible de récupérer le compteur" msgid "Unlike many image sharing services, you don't give us rights on uploaded images." msgstr "Au contraire de la majorité des services de partages d’image, vous ne nous cédez aucun droit sur les images envoyées." -#: themes/default/templates/index.html.ep:162 -#: themes/default/templates/index.html.ep:201 +#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201 msgid "Upload an image with its URL" msgstr "Déposer une image par son URL" @@ -459,16 +407,12 @@ msgstr "Envoyé le" msgid "Uploaded files by days" msgstr "Fichiers envoyés, par jour" -#. ($config->{contact}) -#: lib/Lutim.pm:189 +#. ($c->app->config('contact') +#: lib/Lutim/Plugin/Helpers.pm:156 msgid "Uploading is currently disabled, please try later or contact the administrator (%1)." msgstr "L’envoi d’images est actuellement désactivé, veuillez réessayer plus tard ou contacter l’administrateur (%1)." -#: themes/default/templates/index.html.ep:65 -#: themes/default/templates/index.html.ep:67 -#: themes/default/templates/myfiles.html.ep:14 -#: themes/default/templates/partial/lutim.js.ep:168 -#: themes/default/templates/partial/lutim.js.ep:172 +#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:14 themes/default/templates/partial/lutim.js.ep:168 themes/default/templates/partial/lutim.js.ep:172 msgid "View link" msgstr "Lien d’affichage" @@ -504,10 +448,7 @@ msgstr "et sur" msgid "core developer" msgstr "développeur principal" -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:125 -#: lib/Lutim/Command/cron/stats.pm:97 -#: themes/default/templates/index.html.ep:3 +#: lib/Lutim/Command/cron/stats.pm:113 lib/Lutim/Command/cron/stats.pm:124 lib/Lutim/Command/cron/stats.pm:141 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6 msgid "no time limit" msgstr "Pas de limitation de durée" diff --git a/themes/default/lib/Lutim/I18N/oc.po b/themes/default/lib/Lutim/I18N/oc.po index f18e05e51201d2f472c6ae5e250793b47cef3b28..cd5acb7ebff836a10feb4f6822e01cdffab6c9db 100644 --- a/themes/default/lib/Lutim/I18N/oc.po +++ b/themes/default/lib/Lutim/I18N/oc.po @@ -17,19 +17,11 @@ msgstr "" "Language: oc\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. ($delay) -#. (config('max_delay') #. (7) #. (30) -#: lib/Lutim/Command/cron/stats.pm:100 -#: lib/Lutim/Command/cron/stats.pm:110 -#: lib/Lutim/Command/cron/stats.pm:111 -#: lib/Lutim/Command/cron/stats.pm:127 -#: lib/Lutim/Command/cron/stats.pm:128 -#: lib/Lutim/Command/cron/stats.pm:99 -#: themes/default/templates/partial/lutim.js.ep:235 -#: themes/default/templates/partial/lutim.js.ep:244 -#: themes/default/templates/partial/lutim.js.ep:245 +#. ($delay) +#. (config('max_delay') +#: lib/Lutim/Command/cron/stats.pm:115 lib/Lutim/Command/cron/stats.pm:116 lib/Lutim/Command/cron/stats.pm:126 lib/Lutim/Command/cron/stats.pm:127 lib/Lutim/Command/cron/stats.pm:143 lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:235 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/partial/lutim.js.ep:245 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9 msgid "%1 days" msgstr "%1 jorns" @@ -42,18 +34,11 @@ msgstr "%1 imatges mandats sus aquesta instància dempuèi lo començament." msgid "-or-" msgstr "-o-" -#: lib/Lutim/Command/cron/stats.pm:101 -#: lib/Lutim/Command/cron/stats.pm:112 -#: lib/Lutim/Command/cron/stats.pm:129 -#: themes/default/templates/index.html.ep:5 +#: lib/Lutim/Command/cron/stats.pm:117 lib/Lutim/Command/cron/stats.pm:128 lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38 msgid "1 year" msgstr "1 an" -#: lib/Lutim/Command/cron/stats.pm:109 -#: lib/Lutim/Command/cron/stats.pm:126 -#: lib/Lutim/Command/cron/stats.pm:98 -#: themes/default/templates/index.html.ep:4 -#: themes/default/templates/partial/lutim.js.ep:244 +#: lib/Lutim/Command/cron/stats.pm:114 lib/Lutim/Command/cron/stats.pm:125 lib/Lutim/Command/cron/stats.pm:142 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:244 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7 msgid "24 hours" msgstr "24 oras" @@ -61,22 +46,19 @@ msgstr "24 oras" msgid ": Error while trying to get the counter." msgstr " : Error al moment de recuperar lo comptador." -#: lib/Lutim/Command/cron/stats.pm:94 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "Imatges actius" -#: lib/Lutim/Controller.pm:286 +#: lib/Lutim/Controller.pm:288 msgid "An error occured while downloading the image." msgstr "Una error es apareguda pendent lo telecargament de l'imatge." -#: themes/default/templates/about.html.ep:41 -#: themes/default/templates/myfiles.html.ep:27 -#: themes/default/templates/stats.html.ep:25 +#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:27 themes/default/templates/stats.html.ep:25 msgid "Back to homepage" msgstr "Tornar a la pagina d'acuèlh" -#: themes/default/templates/index.html.ep:193 -#: themes/default/templates/index.html.ep:194 +#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194 msgid "Click to open the file browser" msgstr "Clicatz per utilizar lo navigador de fichièr" @@ -84,23 +66,11 @@ msgstr "Clicatz per utilizar lo navigador de fichièr" msgid "Contributors" msgstr "Contributors" -#: themes/default/templates/partial/lutim.js.ep:310 -#: themes/default/templates/partial/lutim.js.ep:359 -#: themes/default/templates/partial/lutim.js.ep:437 +#: themes/default/templates/partial/lutim.js.ep:310 themes/default/templates/partial/lutim.js.ep:359 themes/default/templates/partial/lutim.js.ep:437 msgid "Copy all view links to clipboard" msgstr "Copiar totes los ligams de visualizacion dins lo quichapapièrs" -#: themes/default/templates/index.html.ep:18 -#: themes/default/templates/index.html.ep:36 -#: themes/default/templates/index.html.ep:69 -#: themes/default/templates/index.html.ep:77 -#: themes/default/templates/index.html.ep:85 -#: themes/default/templates/index.html.ep:93 -#: themes/default/templates/partial/common.js.ep:45 -#: themes/default/templates/partial/lutim.js.ep:176 -#: themes/default/templates/partial/lutim.js.ep:188 -#: themes/default/templates/partial/lutim.js.ep:202 -#: themes/default/templates/partial/lutim.js.ep:217 +#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/partial/common.js.ep:45 themes/default/templates/partial/lutim.js.ep:176 themes/default/templates/partial/lutim.js.ep:188 themes/default/templates/partial/lutim.js.ep:202 themes/default/templates/partial/lutim.js.ep:217 msgid "Copy to clipboard" msgstr "Copiar dins lo quichapapièrs" @@ -116,26 +86,19 @@ msgstr "Grafic de despartiment dels delais pels imatges desactivats" msgid "Delay repartition chart for enabled images" msgstr "Grafic de despartiment dels delais pels imatges activats" -#: themes/default/templates/index.html.ep:115 -#: themes/default/templates/index.html.ep:147 -#: themes/default/templates/index.html.ep:178 -#: themes/default/templates/myfiles.html.ep:16 -#: themes/default/templates/partial/lutim.js.ep:256 +#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:16 themes/default/templates/partial/lutim.js.ep:256 msgid "Delete at first view?" msgstr "Suprimir al primièr accès ?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "Imatges suprimits" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:112 themes/default/templates/raw.html.ep:5 msgid "Deleted images in 30 days" msgstr "Imatges per èsser suprimits dins 30 jorns" -#: themes/default/templates/index.html.ep:98 -#: themes/default/templates/myfiles.html.ep:19 -#: themes/default/templates/partial/common.js.ep:37 -#: themes/default/templates/partial/common.js.ep:40 +#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:19 themes/default/templates/partial/common.js.ep:37 themes/default/templates/partial/common.js.ep:40 msgid "Deletion link" msgstr "Ligam de supression" @@ -143,15 +106,11 @@ msgstr "Ligam de supression" msgid "Download all images" msgstr "Telecargar totes los imatges" -#: themes/default/templates/index.html.ep:81 -#: themes/default/templates/index.html.ep:83 -#: themes/default/templates/partial/lutim.js.ep:194 -#: themes/default/templates/partial/lutim.js.ep:198 +#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:194 themes/default/templates/partial/lutim.js.ep:198 msgid "Download link" msgstr "Ligam de telecargament" -#: themes/default/templates/index.html.ep:28 -#: themes/default/templates/index.html.ep:31 +#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 msgid "Download zip link" msgstr "Ligam de telecargament de l'archiu dels imatges" @@ -163,8 +122,7 @@ msgstr "Lisatz e depausatz vòstres imatges aquí" msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want." msgstr "Depausatz vòstres imatges dins la zòna prevista per aquò o seleccionatz un fichièr d'un biais classic e Lutim vos donarà quatre URLs en torna. Una per afichar l'imatge, una mai per lo telecargar dirèctament, una per l'utilizar suls malhums socials e una darrièra per suprimir vòstre imatge quand volguèssetz." -#: themes/default/templates/index.html.ep:150 -#: themes/default/templates/index.html.ep:181 +#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181 msgid "Encrypt the image (Lutim does not keep the key)." msgstr "Chifrar l'imatge (Lutim garda pas la clau)." @@ -188,21 +146,19 @@ msgstr "Nom del fichièr" msgid "For more details, see the homepage of the project." msgstr "Per mai de detalhs, consultatz la pagina Github del projècte." -#: themes/default/templates/layouts/default.html.ep:50 +#: themes/default/templates/layouts/default.html.ep:49 msgid "Fork me!" msgstr "Creatz un fork !" -#: themes/default/templates/index.html.ep:10 -#: themes/default/templates/index.html.ep:13 +#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 msgid "Gallery link" msgstr "Ligam cap a la galariá" -#: themes/default/templates/partial/lutim.js.ep:125 -#: themes/default/templates/partial/lutim.js.ep:142 +#: themes/default/templates/partial/lutim.js.ep:125 themes/default/templates/partial/lutim.js.ep:142 msgid "Hit Ctrl+C, then Enter to copy the short link" msgstr "Fasètz Ctrl+C puèi picatz Entrada per copiar lo ligam" -#: themes/default/templates/layouts/default.html.ep:45 +#: themes/default/templates/layouts/default.html.ep:44 msgid "Homepage" msgstr "Acuèlh" @@ -222,27 +178,30 @@ msgstr "Qué far per senhalar un imatge ?" msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained." msgstr "Se los fichièrs son ben estats suprimits se o avètz demandat, lors signaturas SHA512 son gardadas." -#: themes/default/templates/index.html.ep:163 -#: themes/default/templates/index.html.ep:203 +#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203 msgid "Image URL" msgstr "URL de l'imatge" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:109 themes/default/templates/raw.html.ep:2 msgid "Image delay" msgstr "Delai de l'imatge" -#: lib/Lutim/Controller.pm:715 +#: lib/Lutim/Controller.pm:702 msgid "Image not found." msgstr "Imatge pas trobat." -#: themes/default/templates/layouts/default.html.ep:49 +#: themes/default/templates/layouts/default.html.ep:48 msgid "Informations" msgstr "Informacions" -#: themes/default/templates/layouts/default.html.ep:55 +#: themes/default/templates/layouts/default.html.ep:56 msgid "Install webapp" msgstr "Installar la webapp" +#: themes/default/templates/layouts/default.html.ep:55 +msgid "Instance's statistics" +msgstr "" + #: themes/default/templates/about.html.ep:11 msgid "Is it really anonymous?" msgstr "Es vertadièrament anonim ?" @@ -255,26 +214,23 @@ msgstr "Es vertadièrament gratuit ?" msgid "Juste like you pronounce the French word lutin (/ly.tɛ̃/)." msgstr "Òm pronóncia coma en occitan lengadocian, LU-TI-N, amb una M finala que sona N, o coma la paraula francesa lutin (/ly.tɛ̃/)." -#: themes/default/templates/index.html.ep:153 -#: themes/default/templates/index.html.ep:184 +#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184 msgid "Keep EXIF tags" msgstr "Conservar las donadas EXIF" -#: themes/default/templates/index.html.ep:118 -#: themes/default/templates/index.html.ep:166 -#: themes/default/templates/index.html.ep:206 -#: themes/default/templates/partial/lutim.js.ep:260 +#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:260 msgid "Let's go!" msgstr "Zo !" -#: themes/default/templates/layouts/default.html.ep:48 +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Liberapay button" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:47 msgid "License:" msgstr "Licéncia :" -#: themes/default/templates/index.html.ep:89 -#: themes/default/templates/index.html.ep:91 -#: themes/default/templates/partial/lutim.js.ep:208 -#: themes/default/templates/partial/lutim.js.ep:212 +#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:208 themes/default/templates/partial/lutim.js.ep:212 msgid "Link for share on social networks" msgstr "Ligam per partejar suls malhums socials" @@ -286,15 +242,11 @@ msgstr "Lutim es un servici gratuit e anonim d’albergament d’imatges. S’ag msgid "Main developers" msgstr "Desvolopaires de l'aplicacion" -#: themes/default/templates/index.html.ep:73 -#: themes/default/templates/index.html.ep:75 -#: themes/default/templates/partial/lutim.js.ep:182 -#: themes/default/templates/partial/lutim.js.ep:185 +#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:182 themes/default/templates/partial/lutim.js.ep:185 msgid "Markdown syntax" msgstr "Sintaxi Markdown" -#: themes/default/templates/layouts/default.html.ep:54 -#: themes/default/templates/myfiles.html.ep:2 +#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2 msgid "My images" msgstr "Mos imatges" @@ -302,8 +254,7 @@ msgstr "Mos imatges" msgid "No limit" msgstr "Pas cap de data d'expiracion" -#: themes/default/templates/index.html.ep:165 -#: themes/default/templates/index.html.ep:198 +#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198 msgid "Only images are allowed" msgstr "Solament son acceptats los imatges" @@ -332,20 +283,27 @@ msgstr "Mandar un imatge" msgid "Share it!" msgstr "Partejatz !" -#: themes/default/templates/layouts/default.html.ep:51 +#: themes/default/templates/layouts/default.html.ep:50 msgid "Share on Twitter" msgstr "Partejar sus Twitter" -#: themes/default/templates/index.html.ep:133 -#: themes/default/templates/partial/lutim.js.ep:271 +#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:271 msgid "Something bad happened" msgstr "Un problèma es aparegut" #. ($c->config('contact') -#: lib/Lutim/Controller.pm:723 +#: lib/Lutim/Controller.pm:709 msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)." msgstr "Quicòm a trucat pendent la creacion de l'archiu. Mercés de tornar ensajar pus tard o de contactar l'administrator (%1)." +#: themes/default/templates/layouts/default.html.ep:52 +msgid "Support the author on Liberapay" +msgstr "" + +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Support the author on Tipeee" +msgstr "" + #: themes/default/templates/about.html.ep:13 msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)." msgstr "L’IP de la persona que mandèt l'imatge es gardada pendent un delai que depend de l'administrator de l'instància (per l'instància oficiala que lo servidor es en França, es un delai d'un an)." @@ -354,26 +312,23 @@ msgstr "L’IP de la persona que mandèt l'imatge es gardada pendent un delai qu msgid "The Lutim software is a free software, which allows you to download and install it on you own server. Have a look at the AGPL to see what you can do." msgstr "Lo logicial Lutim es un logicial liure, que permet de lo telecargar e de l’installar sus vòstre pròpri servidor. Gaitatz l’AGPL per veire que son vòstres dreits" -#: lib/Lutim/Controller.pm:305 +#: lib/Lutim/Controller.pm:307 msgid "The URL is not valid." msgstr "L'URL n'es pas valida." -#: lib/Lutim/Controller.pm:117 -#: lib/Lutim/Controller.pm:186 +#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188 msgid "The delete token is invalid." msgstr "Lo geton de supression es invalida." #. ($upload->filename) -#: lib/Lutim/Controller.pm:449 +#: lib/Lutim/Controller.pm:445 msgid "The file %1 is not an image." msgstr "Lo fichièr %1 es pas un imatge." -#. ($max_file_size) #. ($tx->res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:269 -#: lib/Lutim/Controller.pm:338 -#: themes/default/templates/partial/lutim.js.ep:332 +#. ($max_file_size) +#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:332 msgid "The file exceed the size limit (%1)" msgstr "Lo fichièr depassa lo limit de talha (%1)" @@ -382,17 +337,16 @@ msgid "The graph's datas are not updated in real-time." msgstr "Las donadas del grafic son pas mesas a jorn en temps real." #. ($image->filename) -#: lib/Lutim/Controller.pm:188 +#: lib/Lutim/Controller.pm:190 msgid "The image %1 has already been deleted." msgstr "L'imatge %1 es ja estat suprimit." #. ($image->filename) -#: lib/Lutim/Controller.pm:197 -#: lib/Lutim/Controller.pm:202 +#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204 msgid "The image %1 has been successfully deleted" msgstr "L'imatge %1 es estat suprimit amb succès." -#: lib/Lutim/Controller.pm:125 +#: lib/Lutim/Controller.pm:128 msgid "The image's delay has been successfully modified" msgstr "Lo delai de l'imatge es plan estat modificat." @@ -405,37 +359,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at msgstr "Los imatges depausats sus Lutim pòdon èsser gardats sens fin, o s’escafar tre lo primièr afichatge o al cap d'un delai causit entre los prepausats." #. ($c->config->{contact}) -#: lib/Lutim/Controller.pm:444 +#: lib/Lutim/Controller.pm:442 msgid "There is no more available URL. Retry or contact the administrator. %1" msgstr "I a pas mai d'URL disponibla. Mercés de tornar ensajar o de contactar l'administrator. %1." -#: lib/Lutim/Command/cron/stats.pm:102 +#: themes/default/templates/layouts/default.html.ep:51 +msgid "Tipeee button" +msgstr "" + +#: lib/Lutim/Command/cron/stats.pm:118 themes/default/templates/raw.html.ep:11 msgid "Total" msgstr "Total" -#: themes/default/templates/index.html.ep:60 -#: themes/default/templates/partial/lutim.js.ep:45 +#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:45 msgid "Tweet it!" msgstr "Tweetejatz !" #. ($short) -#: lib/Lutim/Controller.pm:159 -#: lib/Lutim/Controller.pm:231 +#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233 msgid "Unable to find the image %1." msgstr "Impossible de trobar l'imatge %1." -#: lib/Lutim.pm:85 -#: lib/Lutim/Controller.pm:534 -#: lib/Lutim/Controller.pm:580 -#: lib/Lutim/Controller.pm:624 -#: lib/Lutim/Controller.pm:664 -#: lib/Lutim/Controller.pm:676 -#: lib/Lutim/Controller.pm:687 -#: lib/Lutim/Controller.pm:712 +#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:615 lib/Lutim/Controller.pm:654 lib/Lutim/Controller.pm:666 lib/Lutim/Controller.pm:677 lib/Lutim/Controller.pm:699 lib/Lutim/Plugin/Helpers.pm:61 msgid "Unable to find the image: it has been deleted." msgstr "Impossible de trobar l'imatge : es estat suprimit." -#: lib/Lutim/Controller.pm:101 +#: lib/Lutim/Controller.pm:105 msgid "Unable to get counter" msgstr "Impossible de recuperar lo comptador" @@ -443,8 +392,7 @@ msgstr "Impossible de recuperar lo comptador" msgid "Unlike many image sharing services, you don't give us rights on uploaded images." msgstr "A l'invèrse de la màger part dels servicis de partiment d'imatge, daissatz pas cap de dreit suls imatges que mandatz." -#: themes/default/templates/index.html.ep:162 -#: themes/default/templates/index.html.ep:201 +#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201 msgid "Upload an image with its URL" msgstr "Depausar un imatge per son URL" @@ -456,16 +404,12 @@ msgstr "Mandat lo" msgid "Uploaded files by days" msgstr "Fichièrs mandats per jorn" -#. ($config->{contact}) -#: lib/Lutim.pm:189 +#. ($c->app->config('contact') +#: lib/Lutim/Plugin/Helpers.pm:156 msgid "Uploading is currently disabled, please try later or contact the administrator (%1)." msgstr "La mesa en linha es desactivada pel moment, mercés de tornar ensajar mai tard o de contactar l'administrator (%1)." -#: themes/default/templates/index.html.ep:65 -#: themes/default/templates/index.html.ep:67 -#: themes/default/templates/myfiles.html.ep:14 -#: themes/default/templates/partial/lutim.js.ep:168 -#: themes/default/templates/partial/lutim.js.ep:172 +#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:14 themes/default/templates/partial/lutim.js.ep:168 themes/default/templates/partial/lutim.js.ep:172 msgid "View link" msgstr "Ligam d'afichatge" @@ -501,10 +445,7 @@ msgstr "e sus" msgid "core developer" msgstr "desvolopaire màger" -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:125 -#: lib/Lutim/Command/cron/stats.pm:97 -#: themes/default/templates/index.html.ep:3 +#: lib/Lutim/Command/cron/stats.pm:113 lib/Lutim/Command/cron/stats.pm:124 lib/Lutim/Command/cron/stats.pm:141 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6 msgid "no time limit" msgstr "Pas cap de limitacion de durada" diff --git a/themes/default/public/css/lutim.css b/themes/default/public/css/lutim.css index e1e58ca8c8f20f47acd99590c55277fb56787577..2d802aad20228baac00506dfec09a1cc95ad41bb 100644 --- a/themes/default/public/css/lutim.css +++ b/themes/default/public/css/lutim.css @@ -66,3 +66,11 @@ label.always-encrypt { .adjust-addon .btn { width: 43px; } +#tipeee-img { + margin-top: -4px; +} +#liberapay-img { + height: 21px; + line-height: 21px; + margin-top: -5.33333px; +} diff --git a/themes/default/public/img/liberapay.svg b/themes/default/public/img/liberapay.svg new file mode 100644 index 0000000000000000000000000000000000000000..1537ec9681617207aa44e1bc32c7f2228415015d --- /dev/null +++ b/themes/default/public/img/liberapay.svg @@ -0,0 +1,63 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/themes/default/public/img/tipeee-tip-btn.png b/themes/default/public/img/tipeee-tip-btn.png new file mode 100644 index 0000000000000000000000000000000000000000..221237a335e807f4f3954e6fa563612ec7b16b5b Binary files /dev/null and b/themes/default/public/img/tipeee-tip-btn.png differ diff --git a/themes/default/templates/layouts/default.html.ep b/themes/default/templates/layouts/default.html.ep index b88acec6b08a589f4ed178508e074f1b09bea903..a19fcd3b55bc36e21fe6c86791c972b494ca3a52 100644 --- a/themes/default/templates/layouts/default.html.ep +++ b/themes/default/templates/layouts/default.html.ep @@ -3,7 +3,6 @@ % my $twitter_url = 'https://twitter.com/share'; % my $url = url_for('/')->to_abs(); % $twitter_url .= '?url='.url_escape("$url") -% .'&via=framasky' % .'&text=Check out this %23Lutim instance! '; @@ -48,10 +47,12 @@ <%= l('License:') %> <%= link_to 'https://www.gnu.org/licenses/agpl-3.0.html' => begin %>AGPL<% end %> —  <%= link_to url_for('about') => begin %><%= l('Informations') %><% end %> —  <%= link_to 'https://framagit.org/luc/lutim' => (title => l('Fork me!')) => begin %><% end %>  - <%= link_to $twitter_url => (title => l('Share on Twitter')) => begin %><% end %>  - <%= link_to 'https://flattr.com/submit/auto?user_id=_SKy_&url='.$url.'&title=Lutim&category=software' => (title => 'Flattr this') => begin %><% end %>  + <%= link_to $twitter_url => (title => l('Share on Twitter')) => begin %><% end %>  + <%= link_to 'https://tipeee.com/fiat-tux' => (title => l('Support the author on Tipeee')) => begin %><%= l('Tipeee button') %><% end %>  + <%= link_to 'https://liberapay.com/sky' => (title => l('Support the author on Liberapay')) => begin %><%= l('Liberapay button') %><% end %>  <%= link_to 'bitcoin:1JCEtmx9pyzWfitMQj2pKAk8GNgyix7RmA?label=lutim' => (title => 'Give Bitcoins') => begin %><% end %> —  <%= link_to url_for('myfiles') => begin %><%= l('My images') %><% end %> —  + <%= link_to url_for('stats') => begin %><%= l('Instance\'s statistics') %><% end %> —  mozilla rocket logo <%= l('Install webapp') %>

diff --git a/utilities/locales_files.txt b/utilities/locales_files.txt deleted file mode 100644 index d2491d474b3add09689478343a6d9ca0e5e5aafe..0000000000000000000000000000000000000000 --- a/utilities/locales_files.txt +++ /dev/null @@ -1,11 +0,0 @@ -themes/default/templates/about.html.ep -themes/default/templates/index.html.ep -themes/default/templates/stats.html.ep -themes/default/templates/myfiles.html.ep -themes/default/templates/gallery.html.ep -themes/default/templates/layouts/default.html.ep -themes/default/templates/partial/common.js.ep -themes/default/templates/partial/lutim.js.ep -lib/Lutim.pm -lib/Lutim/Controller.pm -lib/Lutim/Command/cron/stats.pm diff --git a/utilities/migrations.sql b/utilities/migrations.sql new file mode 100644 index 0000000000000000000000000000000000000000..7663d0319132e73859aaeda06a4b6958e094b322 --- /dev/null +++ b/utilities/migrations.sql @@ -0,0 +1,20 @@ +-- 1 up +CREATE TABLE IF NOT EXISTS lutim ( + short text PRIMARY KEY, + path text default null, + footprint text default null, + enabled integer, + mediatype text default null, + filename text default null, + counter integer default 0, + delete_at_first_view integer default null, + delete_at_day integer default null, + created_at integer default null, + created_by text default null, + last_access_at integer default null, + mod_token text default null, + width integer default null, + height integer default null +); +-- 1 down +DROP TABLE lutim;