From 9318058f2b65b6eb54489b0f9afdf413643f0c14 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 27 May 2017 20:14:39 +0200 Subject: [PATCH 01/11] Update Changelog --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index f2ce7c6..11ef4fe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,8 @@ Revision history for Lutim 0.8 2017-? - Improve statistics page + - Add database abstraction layer (#42) + - Asks for Mojolicious 7.31 minimum (to install it: `carton update`) 0.7.1 2016-06-21 - Fix dependency bug -- GitLab From 6738c497302cc6ab11d334d9f88ff9ca8d8c4190 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 27 May 2017 20:43:51 +0200 Subject: [PATCH 02/11] Add Liberapay and Tipeee buttons to support the author --- CHANGELOG | 2 + themes/default/lib/Lutim/I18N/de.po | 122 ++++++++++-------- themes/default/lib/Lutim/I18N/en.po | 122 ++++++++++-------- themes/default/lib/Lutim/I18N/es.po | 122 ++++++++++-------- themes/default/lib/Lutim/I18N/fr.po | 122 ++++++++++-------- themes/default/lib/Lutim/I18N/oc.po | 122 ++++++++++-------- themes/default/public/css/lutim.css | 8 ++ themes/default/public/img/liberapay.svg | 63 +++++++++ themes/default/public/img/tipeee-tip-btn.png | Bin 0 -> 1268 bytes .../default/templates/layouts/default.html.ep | 7 +- 10 files changed, 432 insertions(+), 258 deletions(-) create mode 100644 themes/default/public/img/liberapay.svg create mode 100644 themes/default/public/img/tipeee-tip-btn.png diff --git a/CHANGELOG b/CHANGELOG index 11ef4fe..800abe6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,8 @@ Revision history for Lutim - Improve statistics page - Add database abstraction layer (#42) - Asks for Mojolicious 7.31 minimum (to install it: `carton update`) + - Add Liberapay and Tipeee buttons + - Remove Flattr button 0.7.1 2016-06-21 - Fix dependency bug diff --git a/themes/default/lib/Lutim/I18N/de.po b/themes/default/lib/Lutim/I18N/de.po index 660d645..f6cfebc 100644 --- a/themes/default/lib/Lutim/I18N/de.po +++ b/themes/default/lib/Lutim/I18N/de.po @@ -22,12 +22,12 @@ msgstr "" #. (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 +#: lib/Lutim/Command/cron/stats.pm:107 +#: lib/Lutim/Command/cron/stats.pm:108 +#: lib/Lutim/Command/cron/stats.pm:118 +#: lib/Lutim/Command/cron/stats.pm:119 +#: lib/Lutim/Command/cron/stats.pm:135 +#: lib/Lutim/Command/cron/stats.pm:136 #: themes/default/templates/partial/lutim.js.ep:235 #: themes/default/templates/partial/lutim.js.ep:244 #: themes/default/templates/partial/lutim.js.ep:245 @@ -43,16 +43,16 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:109 +#: lib/Lutim/Command/cron/stats.pm:120 +#: lib/Lutim/Command/cron/stats.pm:137 #: themes/default/templates/index.html.ep:5 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 +#: lib/Lutim/Command/cron/stats.pm:106 +#: lib/Lutim/Command/cron/stats.pm:117 +#: lib/Lutim/Command/cron/stats.pm:134 #: themes/default/templates/index.html.ep:4 #: themes/default/templates/partial/lutim.js.ep:244 msgid "24 hours" @@ -62,11 +62,11 @@ 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:102 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." @@ -125,11 +125,11 @@ msgstr "" msgid "Delete at first view?" msgstr "Nach erstem Aufruf löschen?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:103 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:104 msgid "Deleted images in 30 days" msgstr "" @@ -189,7 +189,7 @@ 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!" @@ -203,7 +203,7 @@ msgstr "Link zur Galerie" 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" @@ -228,22 +228,26 @@ msgstr "Wenn du versuchst, ein Bild während dem Hochladen zu löschen, wird die msgid "Image URL" msgstr "Bild-URL" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:101 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?" @@ -268,7 +272,11 @@ msgstr "Behalte EXIF-Daten" 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:" @@ -335,7 +343,7 @@ 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" @@ -345,10 +353,18 @@ 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,25 +373,25 @@ 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 +#: 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 +401,17 @@ 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,11 +424,15 @@ 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:110 msgid "Total" msgstr "" @@ -422,23 +442,23 @@ 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.pm:86 +#: 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 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" @@ -504,9 +524,9 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:105 +#: lib/Lutim/Command/cron/stats.pm:116 +#: lib/Lutim/Command/cron/stats.pm:133 #: themes/default/templates/index.html.ep:3 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 979e9c6..b277167 100644 --- a/themes/default/lib/Lutim/I18N/en.po +++ b/themes/default/lib/Lutim/I18N/en.po @@ -20,12 +20,12 @@ msgstr "" #. (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 +#: lib/Lutim/Command/cron/stats.pm:107 +#: lib/Lutim/Command/cron/stats.pm:108 +#: lib/Lutim/Command/cron/stats.pm:118 +#: lib/Lutim/Command/cron/stats.pm:119 +#: lib/Lutim/Command/cron/stats.pm:135 +#: lib/Lutim/Command/cron/stats.pm:136 #: themes/default/templates/partial/lutim.js.ep:235 #: themes/default/templates/partial/lutim.js.ep:244 #: themes/default/templates/partial/lutim.js.ep:245 @@ -41,16 +41,16 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:109 +#: lib/Lutim/Command/cron/stats.pm:120 +#: lib/Lutim/Command/cron/stats.pm:137 #: themes/default/templates/index.html.ep:5 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 +#: lib/Lutim/Command/cron/stats.pm:106 +#: lib/Lutim/Command/cron/stats.pm:117 +#: lib/Lutim/Command/cron/stats.pm:134 #: themes/default/templates/index.html.ep:4 #: themes/default/templates/partial/lutim.js.ep:244 msgid "24 hours" @@ -60,11 +60,11 @@ 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:102 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." @@ -123,11 +123,11 @@ msgstr "" msgid "Delete at first view?" msgstr "Delete at first view?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:103 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:104 msgid "Deleted images in 30 days" msgstr "" @@ -187,7 +187,7 @@ 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!" @@ -201,7 +201,7 @@ msgstr "" 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" @@ -226,22 +226,26 @@ msgstr "If the files are deleted if you ask it while posting it, their SHA512 fo msgid "Image URL" msgstr "Image URL" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:101 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?" @@ -266,7 +270,11 @@ msgstr "Keep EXIF tags" 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:" @@ -331,7 +339,7 @@ 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" @@ -341,10 +349,18 @@ 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,25 +369,25 @@ 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 +#: 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 +397,17 @@ 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,11 +420,15 @@ 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:110 msgid "Total" msgstr "" @@ -418,23 +438,23 @@ 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.pm:86 +#: 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 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 "" @@ -503,9 +523,9 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:105 +#: lib/Lutim/Command/cron/stats.pm:116 +#: lib/Lutim/Command/cron/stats.pm:133 #: themes/default/templates/index.html.ep:3 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 576d5ae..4336442 100644 --- a/themes/default/lib/Lutim/I18N/es.po +++ b/themes/default/lib/Lutim/I18N/es.po @@ -22,12 +22,12 @@ msgstr "" #. (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 +#: lib/Lutim/Command/cron/stats.pm:107 +#: lib/Lutim/Command/cron/stats.pm:108 +#: lib/Lutim/Command/cron/stats.pm:118 +#: lib/Lutim/Command/cron/stats.pm:119 +#: lib/Lutim/Command/cron/stats.pm:135 +#: lib/Lutim/Command/cron/stats.pm:136 #: themes/default/templates/partial/lutim.js.ep:235 #: themes/default/templates/partial/lutim.js.ep:244 #: themes/default/templates/partial/lutim.js.ep:245 @@ -43,16 +43,16 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:109 +#: lib/Lutim/Command/cron/stats.pm:120 +#: lib/Lutim/Command/cron/stats.pm:137 #: themes/default/templates/index.html.ep:5 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 +#: lib/Lutim/Command/cron/stats.pm:106 +#: lib/Lutim/Command/cron/stats.pm:117 +#: lib/Lutim/Command/cron/stats.pm:134 #: themes/default/templates/index.html.ep:4 #: themes/default/templates/partial/lutim.js.ep:244 msgid "24 hours" @@ -62,11 +62,11 @@ 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:102 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." @@ -125,11 +125,11 @@ msgstr "" msgid "Delete at first view?" msgstr "¿Borrar en la primera vista?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:103 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:104 msgid "Deleted images in 30 days" msgstr "" @@ -189,7 +189,7 @@ 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!" @@ -203,7 +203,7 @@ msgstr "Enlace a la galería" 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" @@ -228,22 +228,26 @@ msgstr "Si los ficheros se borran por haberlo solicitado al enviarlos, se retien msgid "Image URL" msgstr "URL de la imagen" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:101 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?" @@ -268,7 +272,11 @@ msgstr "Mantener las etiquetas EXIF" 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:" @@ -333,7 +341,7 @@ 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" @@ -343,10 +351,18 @@ 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,25 +371,25 @@ 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 +#: 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 +399,17 @@ 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,11 +422,15 @@ 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:110 msgid "Total" msgstr "" @@ -420,23 +440,23 @@ 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.pm:86 +#: 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 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" @@ -502,9 +522,9 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:105 +#: lib/Lutim/Command/cron/stats.pm:116 +#: lib/Lutim/Command/cron/stats.pm:133 #: themes/default/templates/index.html.ep:3 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 b3b2108..f4da711 100644 --- a/themes/default/lib/Lutim/I18N/fr.po +++ b/themes/default/lib/Lutim/I18N/fr.po @@ -22,12 +22,12 @@ msgstr "" #. (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 +#: lib/Lutim/Command/cron/stats.pm:107 +#: lib/Lutim/Command/cron/stats.pm:108 +#: lib/Lutim/Command/cron/stats.pm:118 +#: lib/Lutim/Command/cron/stats.pm:119 +#: lib/Lutim/Command/cron/stats.pm:135 +#: lib/Lutim/Command/cron/stats.pm:136 #: themes/default/templates/partial/lutim.js.ep:235 #: themes/default/templates/partial/lutim.js.ep:244 #: themes/default/templates/partial/lutim.js.ep:245 @@ -43,16 +43,16 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:109 +#: lib/Lutim/Command/cron/stats.pm:120 +#: lib/Lutim/Command/cron/stats.pm:137 #: themes/default/templates/index.html.ep:5 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 +#: lib/Lutim/Command/cron/stats.pm:106 +#: lib/Lutim/Command/cron/stats.pm:117 +#: lib/Lutim/Command/cron/stats.pm:134 #: themes/default/templates/index.html.ep:4 #: themes/default/templates/partial/lutim.js.ep:244 msgid "24 hours" @@ -62,11 +62,11 @@ 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:102 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." @@ -125,11 +125,11 @@ msgstr "Graphe de répartition des délais pour les images actives" msgid "Delete at first view?" msgstr "Supprimer au premier accès ?" -#: lib/Lutim/Command/cron/stats.pm:95 +#: lib/Lutim/Command/cron/stats.pm:103 msgid "Deleted images" msgstr "Images supprimées" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:104 msgid "Deleted images in 30 days" msgstr "Images supprimées dans 30 jours" @@ -189,7 +189,7 @@ 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 !" @@ -203,7 +203,7 @@ msgstr "Lien vers la galerie" 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" @@ -228,22 +228,26 @@ msgstr "Si les fichiers sont bien supprimés si vous en avez exprimé le choix, msgid "Image URL" msgstr "URL de l’image" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:101 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 ?" @@ -268,7 +272,11 @@ msgstr "Conserver les données EXIF" 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 :" @@ -333,7 +341,7 @@ 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" @@ -343,10 +351,18 @@ 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,25 +373,25 @@ 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 +#: 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 +401,17 @@ 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,11 +424,15 @@ 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:110 msgid "Total" msgstr "Total" @@ -422,23 +442,23 @@ 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.pm:86 +#: 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 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" @@ -504,9 +524,9 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:105 +#: lib/Lutim/Command/cron/stats.pm:116 +#: lib/Lutim/Command/cron/stats.pm:133 #: themes/default/templates/index.html.ep:3 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 f18e05e..049c526 100644 --- a/themes/default/lib/Lutim/I18N/oc.po +++ b/themes/default/lib/Lutim/I18N/oc.po @@ -21,12 +21,12 @@ msgstr "" #. (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 +#: lib/Lutim/Command/cron/stats.pm:107 +#: lib/Lutim/Command/cron/stats.pm:108 +#: lib/Lutim/Command/cron/stats.pm:118 +#: lib/Lutim/Command/cron/stats.pm:119 +#: lib/Lutim/Command/cron/stats.pm:135 +#: lib/Lutim/Command/cron/stats.pm:136 #: themes/default/templates/partial/lutim.js.ep:235 #: themes/default/templates/partial/lutim.js.ep:244 #: themes/default/templates/partial/lutim.js.ep:245 @@ -42,16 +42,16 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:109 +#: lib/Lutim/Command/cron/stats.pm:120 +#: lib/Lutim/Command/cron/stats.pm:137 #: themes/default/templates/index.html.ep:5 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 +#: lib/Lutim/Command/cron/stats.pm:106 +#: lib/Lutim/Command/cron/stats.pm:117 +#: lib/Lutim/Command/cron/stats.pm:134 #: themes/default/templates/index.html.ep:4 #: themes/default/templates/partial/lutim.js.ep:244 msgid "24 hours" @@ -61,11 +61,11 @@ 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:102 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." @@ -124,11 +124,11 @@ msgstr "Grafic de despartiment dels delais pels imatges activats" 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:103 msgid "Deleted images" msgstr "Imatges suprimits" -#: lib/Lutim/Command/cron/stats.pm:96 +#: lib/Lutim/Command/cron/stats.pm:104 msgid "Deleted images in 30 days" msgstr "Imatges per èsser suprimits dins 30 jorns" @@ -188,7 +188,7 @@ 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 !" @@ -202,7 +202,7 @@ msgstr "Ligam cap a la galariá" 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" @@ -227,22 +227,26 @@ msgstr "Se los fichièrs son ben estats suprimits se o avètz demandat, lors sig msgid "Image URL" msgstr "URL de l'imatge" -#: lib/Lutim/Command/cron/stats.pm:93 +#: lib/Lutim/Command/cron/stats.pm:101 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 ?" @@ -267,7 +271,11 @@ msgstr "Conservar las donadas EXIF" 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 :" @@ -332,7 +340,7 @@ 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" @@ -342,10 +350,18 @@ 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,25 +370,25 @@ 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 +#: 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 +398,17 @@ 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,11 +421,15 @@ 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:110 msgid "Total" msgstr "Total" @@ -419,23 +439,23 @@ 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.pm:86 +#: 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 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" @@ -501,9 +521,9 @@ 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 +#: lib/Lutim/Command/cron/stats.pm:105 +#: lib/Lutim/Command/cron/stats.pm:116 +#: lib/Lutim/Command/cron/stats.pm:133 #: themes/default/templates/index.html.ep:3 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 e1e58ca..2d802aa 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 0000000..1537ec9 --- /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 GIT binary patch literal 1268 zcmV004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x00(qQO+^Rc1sf6>BY5$W9RL6W_(?=TR7l6omQ83}RTRg6 z_r96TOlC5ZNzycpRBLO43U(1G*4C1$&}hLH3x#ImT9=hB+;k%dcGHDB7b2*jLN*0O z#L$IN)QCn5+CWnplSw9-ugv$y`?%M|n@$oYGj^h24jkU)a_>3+bI$*qcg6hp#GAld zz&`elB!PFu{P@H=F!+C?*+CL=j{*Z2^mKGwYgYlJ+?~t&_wS1kEsy>)IHf@f(3-A? zA0je-25WVV+|)GMv^vHnLqVj^=bEn7P^I!Nz-f)}`S9-R!%Ah)HIwMYbM(Ia0;*EQ zjKwL<{(&$$%V7WI3-p|R27to!Pb5G1v_o)8(f#x>`YyeKClY4m?HiaYam>YKoI(jZ zox#Z$0gYD5txh8*jS!+`**(z+-l4(zy0>j0&ET{~hJu90o+UW?6i%*yf8;P)DXI&L zq(7O&$rZ5T3AzsK$I~AL4NkELfOlvRdn1eaR}5|0O`OuUv$=Mh&cJD<2t09=@bjkt zFv2|yU44V>&9CVhJAn}n;pB=`?=BL4@icuG&!HU$r%*&li4l#UN)_@`-;(-h5>=@* z0BWVM))Eb0)>;Cs6rx3zn|6f|*y#+lrI=e`)1)*rOLgHMb}EAm1d!bUgp^q8N!Lig zk9VLSJF|h4$zp^<^qxOU=(*$Qt=*|LwR=lw+eX_CwR=m=-P;ZvQc}IUL}}(X7hJJK z^25)_-};X7-2AqqrI}gmOcnq$zRv19?~(rerrS&&55du62*cPGxEYIMC(_u-G-fRB z^7DZ?2b=6}L|j*NV?#G)p1bGd3)txm%vc<4+X$~0Bh-yBSI}{&lV;z!tDI_C^kH8{)v#*NMLR62TLr?xkQiz30y&y1biF_C*=Kc7^`S z7u-zd@)V|jg!-td*OkDNBY66wbR8VVf8rw)pcAqZY9&0i_3Th2XHc3vR_V7{{8m$tY}U4i*FFVE>xvT;rpKvvNh+# z{P@Jq*tJIbeaLVR+Okl^dI{^cw4(?-{usm8uHcDAs4XtDcH@1lcmidb=t_0xa%l~Q z;eM5B`)_T{Mj=o&6FZT@*~rz~-$q-mV%vmH9mf-m0N^`xknq?^>|7pQGg}i~h05UK!H!UzVEiyM$ zGB7$aH99gjD=;!TFfiOW$YTHi03~!qSaf7zbY(hiZ)9m^c>ppnF*YqQH!U$UR53C- eFflqYGb=DMIxsNUU!;Nn0000to_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') %>

-- GitLab From b710c3250baa3cc6eecbece937cf45c6e2d13e58 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 2 Jun 2017 18:17:52 +0200 Subject: [PATCH 03/11] Add missing vim modeline This commit is dedicated to Schoumi, who is supporting me on Tipeee. Many thanks :-) --- lib/Lutim.pm | 1 + lib/Lutim/Command/cron.pm | 1 + lib/Lutim/Command/cron/cleanbdd.pm | 1 + lib/Lutim/Command/cron/cleanfiles.pm | 1 + lib/Lutim/Command/cron/stats.pm | 1 + lib/Mounter.pm | 1 + 6 files changed, 6 insertions(+) diff --git a/lib/Lutim.pm b/lib/Lutim.pm index 854e272..cbaf2c7 100644 --- a/lib/Lutim.pm +++ b/lib/Lutim.pm @@ -1,3 +1,4 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim; use Mojo::Base 'Mojolicious'; use Mojo::Util qw(quote); diff --git a/lib/Lutim/Command/cron.pm b/lib/Lutim/Command/cron.pm index 163620c..a4d10c9 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 c1c5f28..c554a6e 100644 --- a/lib/Lutim/Command/cron/cleanbdd.pm +++ b/lib/Lutim/Command/cron/cleanbdd.pm @@ -1,3 +1,4 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::Command::cron::cleanbdd; use Mojo::Base 'Mojolicious::Command'; use Lutim::DB::Image; diff --git a/lib/Lutim/Command/cron/cleanfiles.pm b/lib/Lutim/Command/cron/cleanfiles.pm index a2e7d76..a30e019 100644 --- a/lib/Lutim/Command/cron/cleanfiles.pm +++ b/lib/Lutim/Command/cron/cleanfiles.pm @@ -1,3 +1,4 @@ +# 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); diff --git a/lib/Lutim/Command/cron/stats.pm b/lib/Lutim/Command/cron/stats.pm index 08c79b5..4c6733a 100644 --- a/lib/Lutim/Command/cron/stats.pm +++ b/lib/Lutim/Command/cron/stats.pm @@ -1,3 +1,4 @@ +# 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; diff --git a/lib/Mounter.pm b/lib/Mounter.pm index f40d2c8..5887a57 100644 --- a/lib/Mounter.pm +++ b/lib/Mounter.pm @@ -1,3 +1,4 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Mounter; use Mojo::Base 'Mojolicious'; use FindBin qw($Bin); -- GitLab From 381f4e934e30845083a014e311c9a683b6394ac4 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 2 Jun 2017 18:21:03 +0200 Subject: [PATCH 04/11] Putting helpers in separate file This commit is dedicated to guilhemB, who is supporting me on Tipeee. Many thanks :-) --- lib/Lutim.pm | 225 +------------------------------- lib/Lutim/Plugin/Helpers.pm | 247 ++++++++++++++++++++++++++++++++++++ 2 files changed, 249 insertions(+), 223 deletions(-) create mode 100644 lib/Lutim/Plugin/Helpers.pm diff --git a/lib/Lutim.pm b/lib/Lutim.pm index cbaf2c7..6958a30 100644 --- a/lib/Lutim.pm +++ b/lib/Lutim.pm @@ -1,10 +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 { @@ -72,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/Plugin/Helpers.pm b/lib/Lutim/Plugin/Helpers.pm new file mode 100644 index 0000000..972ab31 --- /dev/null +++ b/lib/Lutim/Plugin/Helpers.pm @@ -0,0 +1,247 @@ +# 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->config->{pgdb}->{host}; + $addr .= ':'.$c->config->{pgdb}->{port} if defined $c->config->{pgdb}->{port}; + $addr .= '/'.$c->config->{pgdb}->{database}; + state $pg = Mojo::Pg->new($addr); + $pg->password($c->config->{pgdb}->{pwd}); + $pg->username($c->config->{pgdb}->{user}); + return $pg; +} + +sub _render_file { + 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); +} + +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->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); + } + } +} + +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).', $config->{contact}) + ); + return 1; + } + return 0; +} + +sub _max_delay { + my $c = shift; + + return $c->config->{max_delay} if ($c->config->{max_delay} >= 0); + + warn "max_delay set to a negative value. Default to 0."; + return 0; +} + +sub _default_delay { + my $c = shift; + + return $c->config->{default_delay} if ($c->config->{default_delay} >= 0); + + warn "default_delay set to a negative value. Default to 0."; + return 0; +} + +sub _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(); +} -- GitLab From c2110dc171cdca75dd31b2f80efd97c0a5c10a53 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 2 Jun 2017 19:18:10 +0200 Subject: [PATCH 05/11] [Not tested] Add Pg support This commit is dedicated to Schoumi, who is supporting me on Tipeee. Many thanks :-) --- lib/Lutim/DB/Image.pm | 6 +- lib/Lutim/DB/Image/Pg.pm | 214 +++++++++++++++++++++++++++++++++++ lib/Lutim/DB/Image/SQLite.pm | 4 +- utilities/migrations.sql | 20 ++++ 4 files changed, 240 insertions(+), 4 deletions(-) create mode 100644 lib/Lutim/DB/Image/Pg.pm create mode 100644 utilities/migrations.sql diff --git a/lib/Lutim/DB/Image.pm b/lib/Lutim/DB/Image.pm index 0e936e0..36677d9 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 0000000..8263ed0 --- /dev/null +++ b/lib/Lutim/DB/Image/Pg.pm @@ -0,0 +1,214 @@ +# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: +package Lutim::DB::Image::Pg; +use Mojo::Base 'Lutim::DB::Image'; +use Mojolicious::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->record(1); + $i->_slurp; + + 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->record(1); + $c = $c->_slurp; + + 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 IS ?', $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 = "" 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; + + 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->record(1); + $i->_slurp; + + 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->record(1); + $i->_slurp; + + 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 $images = $c->app->pg->db->query('SELECT * FROM lutim WHERE short = ?', $c->short)->hashes; + + if ($images->size) { + my $image = $images->first; + + $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 a165d37..67c2205 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); diff --git a/utilities/migrations.sql b/utilities/migrations.sql new file mode 100644 index 0000000..c35f272 --- /dev/null +++ b/utilities/migrations.sql @@ -0,0 +1,20 @@ +-- 1 up +CREATE TABLE IF NOT EXISTS lutim ( + short text PRIMARY KEY, + path text, + footprint text, + enabled integer, + mediatype text, + filename text, + counter integer default 0, + delete_at_first_view integer, + delete_at_day integer, + created_at integer, + created_by text, + last_access_at integer, + mod_token text, + width integer, + height integer)' +); +-- 1 down +DROP TABLE lutim; -- GitLab From 9aed9a0f03a2421d7fe2141bb1c443c6feb1463f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 3 Jun 2017 22:22:08 +0200 Subject: [PATCH 06/11] Fix typos and oblivions --- cpanfile | 1 + cpanfile.snapshot | 122 +++++++++++++++++++++++++++++++++++- lib/Lutim/Controller.pm | 2 +- lib/Lutim/DB/Image/Pg.pm | 6 +- lib/Lutim/Plugin/Helpers.pm | 28 +++++---- 5 files changed, 139 insertions(+), 20 deletions(-) diff --git a/cpanfile b/cpanfile index 7f71d89..6e95b8a 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 901f302..62286ff 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: @@ -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/Controller.pm b/lib/Lutim/Controller.pm index 1a94305..0c452e3 100644 --- a/lib/Lutim/Controller.pm +++ b/lib/Lutim/Controller.pm @@ -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/Pg.pm b/lib/Lutim/DB/Image/Pg.pm index 8263ed0..23c70c9 100644 --- a/lib/Lutim/DB/Image/Pg.pm +++ b/lib/Lutim/DB/Image/Pg.pm @@ -1,7 +1,7 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::DB::Image::Pg; use Mojo::Base 'Lutim::DB::Image'; -use Mojolicious::Collection 'c'; +use Mojo::Collection 'c'; has 'record' => 0; @@ -71,9 +71,9 @@ 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); + $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->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); } diff --git a/lib/Lutim/Plugin/Helpers.pm b/lib/Lutim/Plugin/Helpers.pm index 972ab31..a2c248c 100644 --- a/lib/Lutim/Plugin/Helpers.pm +++ b/lib/Lutim/Plugin/Helpers.pm @@ -38,18 +38,18 @@ sub _pg { my $c = shift; my $addr = 'postgresql://'; - $addr .= $c->config->{pgdb}->{host}; - $addr .= ':'.$c->config->{pgdb}->{port} if defined $c->config->{pgdb}->{port}; - $addr .= '/'.$c->config->{pgdb}->{database}; + $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->config->{pgdb}->{pwd}); - $pg->username($c->config->{pgdb}->{user}); + $pg->password($c->app->config('pgdb')->{pwd}); + $pg->username($c->app->config('pgdb')->{user}); return $pg; } sub _render_file { my $c = shift; - my ($filename, $path, $mediatype, $dl, $expires, $nocache, $key, $thumb) = @_; + my ($im_loaded, $filename, $path, $mediatype, $dl, $expires, $nocache, $key, $thumb) = @_; $dl = 'attachment' if ($mediatype =~ m/svg/); $filename = quote($filename); @@ -116,11 +116,11 @@ sub _provisioning { # 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++) { + 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->config->{length}); + $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) @@ -128,7 +128,7 @@ sub _provisioning { ->enabled(1) ->delete_at_first_view(0) ->delete_at_day(0) - ->mod_token($c->shortener($c->config->{token_length})) + ->mod_token($c->shortener($c->app->config('token_length'))) ->write; $img = Lutim::DB::Image->new(app => $c->app); @@ -153,7 +153,7 @@ sub _stop_upload { 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}) + stop_upload => $c->l('Uploading is currently disabled, please try later or contact the administrator (%1).', $c->app->config('contact')) ); return 1; } @@ -163,7 +163,7 @@ sub _stop_upload { sub _max_delay { my $c = shift; - return $c->config->{max_delay} if ($c->config->{max_delay} >= 0); + return $c->app->config('max_delay') if ($c->app->config('max_delay') >= 0); warn "max_delay set to a negative value. Default to 0."; return 0; @@ -172,7 +172,7 @@ sub _max_delay { sub _default_delay { my $c = shift; - return $c->config->{default_delay} if ($c->config->{default_delay} >= 0); + return $c->app->config('default_delay') if ($c->app->config('default_delay') >= 0); warn "default_delay set to a negative value. Default to 0."; return 0; @@ -245,3 +245,5 @@ sub _delete_image { unlink $img->path or warn "Could not unlink ".$img->path.": $!"; $img->disable(); } + +1; -- GitLab From 1f03678348674f4cb1df7bea3e58a5b402a8265f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sun, 4 Jun 2017 11:00:52 +0200 Subject: [PATCH 07/11] Extract i18n strings from directories, not files --- Makefile | 13 +-- themes/default/lib/Lutim/I18N/de.po | 161 +++++++-------------------- themes/default/lib/Lutim/I18N/en.po | 162 ++++++++-------------------- themes/default/lib/Lutim/I18N/es.po | 161 +++++++-------------------- themes/default/lib/Lutim/I18N/fr.po | 161 +++++++-------------------- themes/default/lib/Lutim/I18N/oc.po | 161 +++++++-------------------- utilities/locales_files.txt | 11 -- 7 files changed, 213 insertions(+), 617 deletions(-) delete mode 100644 utilities/locales_files.txt diff --git a/Makefile b/Makefile index 4b5c2aa..3629796 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 @@ -9,14 +9,15 @@ CARTON=carton exec LUTIM=script/lutim 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 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 diff --git a/themes/default/lib/Lutim/I18N/de.po b/themes/default/lib/Lutim/I18N/de.po index f6cfebc..e7df418 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:107 -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:118 -#: lib/Lutim/Command/cron/stats.pm:119 -#: lib/Lutim/Command/cron/stats.pm:135 -#: lib/Lutim/Command/cron/stats.pm:136 -#: 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:109 -#: lib/Lutim/Command/cron/stats.pm:120 -#: lib/Lutim/Command/cron/stats.pm:137 -#: 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:106 -#: lib/Lutim/Command/cron/stats.pm:117 -#: lib/Lutim/Command/cron/stats.pm:134 -#: 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,7 +47,7 @@ msgstr "24 Stunden" msgid ": Error while trying to get the counter." msgstr ":Fehler beim Abrufen des Zählers." -#: lib/Lutim/Command/cron/stats.pm:102 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "" @@ -70,14 +55,11 @@ msgstr "" 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:103 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:104 +#: 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)" @@ -193,13 +151,11 @@ msgstr "Besuche für mehr Details die 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!" @@ -280,10 +231,7 @@ msgstr "" 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" @@ -297,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" @@ -313,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" @@ -347,8 +290,7 @@ msgstr "Teile es!" 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" @@ -377,8 +319,7 @@ msgstr "Lutim ist freie msgid "The URL is not valid." msgstr "Die URL ist nicht gültig." -#: lib/Lutim/Controller.pm:120 -#: lib/Lutim/Controller.pm:188 +#: 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." @@ -387,12 +328,10 @@ msgstr "Das Token zum Löschen ist ungültig." 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:271 -#: lib/Lutim/Controller.pm:340 -#: 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)" @@ -406,8 +345,7 @@ msgid "The image %1 has already been deleted." msgstr "Das Bild %1 wurde schon gelöscht." #. ($image->filename) -#: lib/Lutim/Controller.pm:199 -#: lib/Lutim/Controller.pm:204 +#: 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." @@ -432,29 +370,20 @@ msgstr "Es sind keine URLs mehr verfügbar. Versuche es erneut oder kontaktiere msgid "Tipeee button" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:110 +#: 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:162 -#: lib/Lutim/Controller.pm:233 +#: 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:86 -#: 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/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." @@ -466,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" @@ -479,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" @@ -524,10 +448,7 @@ msgstr "und auf" msgid "core developer" msgstr "Haupt-Entwickler" -#: lib/Lutim/Command/cron/stats.pm:105 -#: lib/Lutim/Command/cron/stats.pm:116 -#: lib/Lutim/Command/cron/stats.pm:133 -#: 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 b277167..216915c 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:107 -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:118 -#: lib/Lutim/Command/cron/stats.pm:119 -#: lib/Lutim/Command/cron/stats.pm:135 -#: lib/Lutim/Command/cron/stats.pm:136 -#: 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:109 -#: lib/Lutim/Command/cron/stats.pm:120 -#: lib/Lutim/Command/cron/stats.pm:137 -#: 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:106 -#: lib/Lutim/Command/cron/stats.pm:117 -#: lib/Lutim/Command/cron/stats.pm:134 -#: 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,7 +45,7 @@ msgstr "24 hours" msgid ": Error while trying to get the counter." msgstr "" -#: lib/Lutim/Command/cron/stats.pm:102 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "" @@ -68,14 +53,11 @@ msgstr "" 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:103 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:104 +#: 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)." @@ -191,13 +149,11 @@ msgstr "For more details, see the hom 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 "" @@ -221,12 +177,11 @@ 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:101 +#: lib/Lutim/Command/cron/stats.pm:109 themes/default/templates/raw.html.ep:2 msgid "Image delay" msgstr "" @@ -258,15 +213,11 @@ 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!" @@ -278,10 +229,7 @@ msgstr "" 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" @@ -293,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 "" @@ -309,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" @@ -343,8 +286,7 @@ msgstr "" 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" @@ -373,8 +315,7 @@ msgstr "The Lutim software is a res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:271 -#: lib/Lutim/Controller.pm:340 -#: 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)" @@ -402,8 +341,7 @@ msgid "The image %1 has already been deleted." msgstr "The image %1 has already been deleted." #. ($image->filename) -#: lib/Lutim/Controller.pm:199 -#: lib/Lutim/Controller.pm:204 +#: 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" @@ -428,29 +366,20 @@ msgstr "There is no more available URL. Retry or contact the administrator. %1" msgid "Tipeee button" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:110 +#: 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:162 -#: lib/Lutim/Controller.pm:233 +#: 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:86 -#: 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/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." @@ -462,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" @@ -475,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" @@ -504,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." @@ -523,10 +448,7 @@ msgstr "and on" msgid "core developer" msgstr "core developer" -#: lib/Lutim/Command/cron/stats.pm:105 -#: lib/Lutim/Command/cron/stats.pm:116 -#: lib/Lutim/Command/cron/stats.pm:133 -#: 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 4336442..7f7a1be 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:107 -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:118 -#: lib/Lutim/Command/cron/stats.pm:119 -#: lib/Lutim/Command/cron/stats.pm:135 -#: lib/Lutim/Command/cron/stats.pm:136 -#: 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:109 -#: lib/Lutim/Command/cron/stats.pm:120 -#: lib/Lutim/Command/cron/stats.pm:137 -#: 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:106 -#: lib/Lutim/Command/cron/stats.pm:117 -#: lib/Lutim/Command/cron/stats.pm:134 -#: 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,7 +47,7 @@ msgstr "24 horas" msgid ": Error while trying to get the counter." msgstr ": Error al intentar obtener el contador." -#: lib/Lutim/Command/cron/stats.pm:102 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "" @@ -70,14 +55,11 @@ msgstr "" 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:103 +#: lib/Lutim/Command/cron/stats.pm:111 themes/default/templates/raw.html.ep:4 msgid "Deleted images" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:104 +#: 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)." @@ -193,13 +151,11 @@ msgstr "Para más detalles, vea la p 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" @@ -223,12 +179,11 @@ 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:101 +#: lib/Lutim/Command/cron/stats.pm:109 themes/default/templates/raw.html.ep:2 msgid "Image delay" msgstr "" @@ -260,15 +215,11 @@ 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á!" @@ -280,10 +231,7 @@ msgstr "" 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" @@ -295,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" @@ -311,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" @@ -345,8 +288,7 @@ msgstr "¡Compártelo!" 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" @@ -375,8 +317,7 @@ msgstr "El software Lutim es res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:271 -#: lib/Lutim/Controller.pm:340 -#: 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)" @@ -404,8 +343,7 @@ msgid "The image %1 has already been deleted." msgstr "La imagen %1 ya se ha borrado." #. ($image->filename) -#: lib/Lutim/Controller.pm:199 -#: lib/Lutim/Controller.pm:204 +#: 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" @@ -430,29 +368,20 @@ msgstr "No más URL disponibles. Inténtelo de nuevo o contacte con el administr msgid "Tipeee button" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:110 +#: 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:162 -#: lib/Lutim/Controller.pm:233 +#: 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:86 -#: 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/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." @@ -464,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" @@ -477,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" @@ -522,10 +446,7 @@ msgstr "y en" msgid "core developer" msgstr "desarrollador principal" -#: lib/Lutim/Command/cron/stats.pm:105 -#: lib/Lutim/Command/cron/stats.pm:116 -#: lib/Lutim/Command/cron/stats.pm:133 -#: 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 f4da711..9dd6e3c 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:107 -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:118 -#: lib/Lutim/Command/cron/stats.pm:119 -#: lib/Lutim/Command/cron/stats.pm:135 -#: lib/Lutim/Command/cron/stats.pm:136 -#: 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:109 -#: lib/Lutim/Command/cron/stats.pm:120 -#: lib/Lutim/Command/cron/stats.pm:137 -#: 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:106 -#: lib/Lutim/Command/cron/stats.pm:117 -#: lib/Lutim/Command/cron/stats.pm:134 -#: 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,7 +47,7 @@ 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:102 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "Images actives" @@ -70,14 +55,11 @@ msgstr "Images actives" msgid "An error occured while downloading the image." msgstr "Une erreur est survenue lors du téléchargement de l’image." -#: themes/default/templates/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:103 +#: 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:104 +#: 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é)." @@ -193,13 +151,11 @@ msgstr "Pour plus de détails, consultez la page 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 !" @@ -280,10 +231,7 @@ msgstr "Bouton Liberapay" 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" @@ -295,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" @@ -311,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" @@ -345,8 +288,7 @@ msgstr "Partagez !" 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" @@ -377,8 +319,7 @@ msgstr "Le logiciel Lutim est un res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:271 -#: lib/Lutim/Controller.pm:340 -#: 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)" @@ -406,8 +345,7 @@ msgid "The image %1 has already been deleted." msgstr "L’image %1 a déjà été supprimée." #. ($image->filename) -#: lib/Lutim/Controller.pm:199 -#: lib/Lutim/Controller.pm:204 +#: 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." @@ -432,29 +370,20 @@ msgstr "Il n’y a plus d’URL disponible. Veuillez réessayer ou contacter l msgid "Tipeee button" msgstr "Bouton Tipeee" -#: lib/Lutim/Command/cron/stats.pm:110 +#: 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:162 -#: lib/Lutim/Controller.pm:233 +#: 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:86 -#: 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/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." @@ -466,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" @@ -479,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" @@ -524,10 +448,7 @@ msgstr "et sur" msgid "core developer" msgstr "développeur principal" -#: lib/Lutim/Command/cron/stats.pm:105 -#: lib/Lutim/Command/cron/stats.pm:116 -#: lib/Lutim/Command/cron/stats.pm:133 -#: 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 049c526..cd5acb7 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:107 -#: lib/Lutim/Command/cron/stats.pm:108 -#: lib/Lutim/Command/cron/stats.pm:118 -#: lib/Lutim/Command/cron/stats.pm:119 -#: lib/Lutim/Command/cron/stats.pm:135 -#: lib/Lutim/Command/cron/stats.pm:136 -#: 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:109 -#: lib/Lutim/Command/cron/stats.pm:120 -#: lib/Lutim/Command/cron/stats.pm:137 -#: 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:106 -#: lib/Lutim/Command/cron/stats.pm:117 -#: lib/Lutim/Command/cron/stats.pm:134 -#: 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,7 +46,7 @@ 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:102 +#: lib/Lutim/Command/cron/stats.pm:110 themes/default/templates/raw.html.ep:3 msgid "Active images" msgstr "Imatges actius" @@ -69,14 +54,11 @@ msgstr "Imatges actius" msgid "An error occured while downloading the image." msgstr "Una error es apareguda pendent lo telecargament de l'imatge." -#: themes/default/templates/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:103 +#: 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:104 +#: 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)." @@ -192,13 +150,11 @@ msgstr "Per mai de detalhs, consultatz la pagina 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 !" @@ -279,10 +230,7 @@ msgstr "" 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" @@ -294,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" @@ -310,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" @@ -344,8 +287,7 @@ msgstr "Partejatz !" 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" @@ -374,8 +316,7 @@ msgstr "Lo logicial Lutim es un res->max_message_size) #. ($c->req->max_message_size) -#: lib/Lutim/Controller.pm:271 -#: lib/Lutim/Controller.pm:340 -#: 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)" @@ -403,8 +342,7 @@ msgid "The image %1 has already been deleted." msgstr "L'imatge %1 es ja estat suprimit." #. ($image->filename) -#: lib/Lutim/Controller.pm:199 -#: lib/Lutim/Controller.pm:204 +#: 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." @@ -429,29 +367,20 @@ msgstr "I a pas mai d'URL disponibla. Mercés de tornar ensajar o de contactar l msgid "Tipeee button" msgstr "" -#: lib/Lutim/Command/cron/stats.pm:110 +#: 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:162 -#: lib/Lutim/Controller.pm:233 +#: 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:86 -#: 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/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." @@ -463,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" @@ -476,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" @@ -521,10 +445,7 @@ msgstr "e sus" msgid "core developer" msgstr "desvolopaire màger" -#: lib/Lutim/Command/cron/stats.pm:105 -#: lib/Lutim/Command/cron/stats.pm:116 -#: lib/Lutim/Command/cron/stats.pm:133 -#: 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/utilities/locales_files.txt b/utilities/locales_files.txt deleted file mode 100644 index d2491d4..0000000 --- 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 -- GitLab From e0f8ddec647c7aa7b68eb32c4a464a926447010c Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sun, 4 Jun 2017 11:02:56 +0200 Subject: [PATCH 08/11] Add functional tests This commit is dedicated to Brigitte, the queen of elves, who is supporting me. Many thanks :-) --- .gitignore | 2 +- .gitlab-ci.yml | 18 +++ Makefile | 9 ++ cpanfile.snapshot | 26 ++--- lib/Lutim/Command/cron/cleanbdd.pm | 10 +- lib/Lutim/Command/cron/cleanfiles.pm | 10 +- lib/Lutim/Command/cron/stats.pm | 9 +- lib/Lutim/Command/cron/watch.pm | 10 +- lib/Lutim/Controller.pm | 2 +- lib/Lutim/DB/SQLite.pm | 9 +- lib/Mounter.pm | 10 +- t/basic.t | 9 -- t/sqlite.conf | 169 +++++++++++++++++++++++++++ t/test.t | 107 +++++++++++++++++ 14 files changed, 370 insertions(+), 30 deletions(-) create mode 100644 .gitlab-ci.yml delete mode 100644 t/basic.t create mode 100644 t/sqlite.conf create mode 100644 t/test.t diff --git a/.gitignore b/.gitignore index 66ca220..8850a34 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 0000000..3ce11b4 --- /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/Makefile b/Makefile index 3629796..23631ba 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ 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) $(EXTRACTDIR) -o $(EN) 2>/dev/null @@ -15,6 +16,14 @@ locales: $(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: podcheck test-sqlite + clean: rm -rf lutim.db files/ diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 62286ff..7ea7c60 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -309,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 diff --git a/lib/Lutim/Command/cron/cleanbdd.pm b/lib/Lutim/Command/cron/cleanbdd.pm index c554a6e..c13b744 100644 --- a/lib/Lutim/Command/cron/cleanbdd.pm +++ b/lib/Lutim/Command/cron/cleanbdd.pm @@ -2,6 +2,7 @@ package Lutim::Command::cron::cleanbdd; use Mojo::Base 'Mojolicious::Command'; use Lutim::DB::Image; +use Mojo::File; use FindBin qw($Bin); use File::Spec qw(catfile); @@ -11,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 a30e019..59a2def 100644 --- a/lib/Lutim/Command/cron/cleanfiles.pm +++ b/lib/Lutim/Command/cron/cleanfiles.pm @@ -4,6 +4,7 @@ use Mojo::Base 'Mojolicious::Command'; use Mojo::Util qw(slurp decode); use Lutim::DB::Image; use Lutim; +use Mojo::File; use FindBin qw($Bin); use File::Spec qw(catfile); @@ -13,8 +14,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 4c6733a..7c83920 100644 --- a/lib/Lutim/Command/cron/stats.pm +++ b/lib/Lutim/Command/cron/stats.pm @@ -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, theme => 'default', default => { stats_day_num => 365, diff --git a/lib/Lutim/Command/cron/watch.pm b/lib/Lutim/Command/cron/watch.pm index 1e0f1a7..4eb2ba5 100644 --- a/lib/Lutim/Command/cron/watch.pm +++ b/lib/Lutim/Command/cron/watch.pm @@ -5,6 +5,7 @@ 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 +16,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 0c452e3..bff11ee 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); diff --git a/lib/Lutim/DB/SQLite.pm b/lib/Lutim/DB/SQLite.pm index b6d1530..83bc9c2 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/Mounter.pm b/lib/Mounter.pm index 5887a57..19d21cb 100644 --- a/lib/Mounter.pm +++ b/lib/Mounter.pm @@ -1,6 +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); @@ -10,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', diff --git a/t/basic.t b/t/basic.t deleted file mode 100644 index 5f257e5..0000000 --- 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/sqlite.conf b/t/sqlite.conf new file mode 100644 index 0000000..6d09e79 --- /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 0000000..2c999c2 --- /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(); -- GitLab From 8421efc3dae38557ef812734b4f86424e0d9eafe Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sun, 4 Jun 2017 17:38:00 +0200 Subject: [PATCH 09/11] Fix #9 Add functional tests This commit is dedicated to Schoumi, who is supporting me on Tipeee. Many thanks :-) --- Makefile | 20 +++- lib/Lutim/Command/cron/cleanbdd.pm | 2 +- lib/Lutim/Command/cron/cleanfiles.pm | 3 +- lib/Lutim/Command/cron/stats.pm | 2 +- lib/Lutim/Command/cron/watch.pm | 1 - lib/Lutim/DB/Image/Pg.pm | 30 ++--- lib/Lutim/DB/Image/SQLite.pm | 36 +++--- lib/Mounter.pm | 2 + t/create-pg-testdb.sql | 2 + t/postgresql.conf | 169 +++++++++++++++++++++++++++ utilities/migrations.sql | 24 ++-- 11 files changed, 243 insertions(+), 48 deletions(-) create mode 100644 t/create-pg-testdb.sql create mode 100644 t/postgresql.conf diff --git a/Makefile b/Makefile index 23631ba..05f6844 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,10 @@ podcheck: test-sqlite: MOJO_CONFIG=t/sqlite.conf $(CARTON) $(REAL_LUTIM) test -test: podcheck test-sqlite +test-pg: + MOJO_CONFIG=t/postgresql.conf $(CARTON) $(REAL_LUTIM) test + +test: podcheck test-sqlite test-pg clean: rm -rf lutim.db files/ @@ -33,3 +36,18 @@ dev: 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/lib/Lutim/Command/cron/cleanbdd.pm b/lib/Lutim/Command/cron/cleanbdd.pm index c13b744..b65589b 100644 --- a/lib/Lutim/Command/cron/cleanbdd.pm +++ b/lib/Lutim/Command/cron/cleanbdd.pm @@ -1,8 +1,8 @@ # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: package Lutim::Command::cron::cleanbdd; use Mojo::Base 'Mojolicious::Command'; -use Lutim::DB::Image; use Mojo::File; +use Lutim::DB::Image; use FindBin qw($Bin); use File::Spec qw(catfile); diff --git a/lib/Lutim/Command/cron/cleanfiles.pm b/lib/Lutim/Command/cron/cleanfiles.pm index 59a2def..1293213 100644 --- a/lib/Lutim/Command/cron/cleanfiles.pm +++ b/lib/Lutim/Command/cron/cleanfiles.pm @@ -1,10 +1,9 @@ # 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 Mojo::File; use FindBin qw($Bin); use File::Spec qw(catfile); diff --git a/lib/Lutim/Command/cron/stats.pm b/lib/Lutim/Command/cron/stats.pm index 7c83920..f4848d4 100644 --- a/lib/Lutim/Command/cron/stats.pm +++ b/lib/Lutim/Command/cron/stats.pm @@ -1,10 +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); diff --git a/lib/Lutim/Command/cron/watch.pm b/lib/Lutim/Command/cron/watch.pm index 4eb2ba5..31eda39 100644 --- a/lib/Lutim/Command/cron/watch.pm +++ b/lib/Lutim/Command/cron/watch.pm @@ -1,7 +1,6 @@ # 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; diff --git a/lib/Lutim/DB/Image/Pg.pm b/lib/Lutim/DB/Image/Pg.pm index 23c70c9..8340f26 100644 --- a/lib/Lutim/DB/Image/Pg.pm +++ b/lib/Lutim/DB/Image/Pg.pm @@ -46,8 +46,7 @@ sub select_created_after { sub { my ($e, $num) = @_; my $i = Lutim::DB::Image->new(app => $c->app); - $i->record(1); - $i->_slurp; + $i->_slurp($e); push @images, $i; } @@ -61,8 +60,7 @@ sub select_empty { my $record = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NULL LIMIT 1')->hashes->first; - $c->record(1); - $c = $c->_slurp; + $c = $c->_slurp($record); return $c; } @@ -84,7 +82,7 @@ sub count_short { my $c = shift; my $short = shift; - return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE short IS ?', $short)->hashes->first->{count}; + return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE short = ?', $short)->hashes->first->{count}; } sub count_empty { @@ -121,7 +119,7 @@ sub get_no_longer_viewed_files { my ($e, $num) = @_; my $i = Lutim::DB::Image->new(app => $c->app); $i->record(1); - $i->_slurp; + $i->_slurp($e); push @images, $i; } @@ -141,8 +139,7 @@ sub get_images_to_clean { sub { my ($e, $num) = @_; my $i = Lutim::DB::Image->new(app => $c->app); - $i->record(1); - $i->_slurp; + $i->_slurp($e); push @images, $i; } @@ -162,8 +159,7 @@ sub get_50_oldest { sub { my ($e, $num) = @_; my $i = Lutim::DB::Image->new(app => $c->app); - $i->record(1); - $i->_slurp; + $i->_slurp($e); push @images, $i; } @@ -183,12 +179,20 @@ sub disable { sub _slurp { my $c = shift; + my $r = shift; - my $images = $c->app->pg->db->query('SELECT * FROM lutim WHERE short = ?', $c->short)->hashes; + 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) { - my $image = $images->first; + if ($images->size) { + $image = $images->first; + } + } + if ($image) { $c->short($image->{short}); $c->path($image->{path}); $c->footprint($image->{footprint}); diff --git a/lib/Lutim/DB/Image/SQLite.pm b/lib/Lutim/DB/Image/SQLite.pm index 67c2205..65de29c 100644 --- a/lib/Lutim/DB/Image/SQLite.pm +++ b/lib/Lutim/DB/Image/SQLite.pm @@ -217,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/Mounter.pm b/lib/Mounter.pm index 19d21cb..58527d6 100644 --- a/lib/Mounter.pm +++ b/lib/Mounter.pm @@ -28,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/create-pg-testdb.sql b/t/create-pg-testdb.sql new file mode 100644 index 0000000..d65625c --- /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 0000000..c9205a1 --- /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/utilities/migrations.sql b/utilities/migrations.sql index c35f272..7663d03 100644 --- a/utilities/migrations.sql +++ b/utilities/migrations.sql @@ -1,20 +1,20 @@ -- 1 up CREATE TABLE IF NOT EXISTS lutim ( short text PRIMARY KEY, - path text, - footprint text, + path text default null, + footprint text default null, enabled integer, - mediatype text, - filename text, + mediatype text default null, + filename text default null, counter integer default 0, - delete_at_first_view integer, - delete_at_day integer, - created_at integer, - created_by text, - last_access_at integer, - mod_token text, - width integer, - height integer)' + 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; -- GitLab From efb71654d6e1aaa8482184eef7fdb89b095cccd8 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 5 Jun 2017 09:58:38 +0200 Subject: [PATCH 10/11] Update CHANGELOG --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 800abe6..5428759 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,9 +3,11 @@ 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 -- GitLab From a8d38f6ea84e80627e98f1e970ff782bb760191d Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 5 Jun 2017 10:00:36 +0200 Subject: [PATCH 11/11] Fix bug --- lib/Lutim/DB/Image/Pg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lutim/DB/Image/Pg.pm b/lib/Lutim/DB/Image/Pg.pm index 8340f26..1e7d406 100644 --- a/lib/Lutim/DB/Image/Pg.pm +++ b/lib/Lutim/DB/Image/Pg.pm @@ -101,7 +101,7 @@ sub clean_ips_until { my $c = shift; my $time = shift; - $c->app->pg->db->query('UPDATE lutim SET created_by = "" WHERE path IS NOT NULL AND created_at < ?', $time); + $c->app->pg->db->query('UPDATE lutim SET created_by = NULL WHERE path IS NOT NULL AND created_at < ?', $time); return $c; } -- GitLab