From 1da5fe9674f587e785bf82cb9eaec9cac5cf0d3a Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 17 Dec 2022 17:38:59 +0100 Subject: [PATCH] add error 404 from saba to plugin activityReport --- _prepend.php | 29 +++++++++++++++++++++++ _public.php | 2 ++ locales/fr/main.po | 29 ++++------------------- locales/fr/public.po | 56 ++------------------------------------------ 4 files changed, 38 insertions(+), 78 deletions(-) create mode 100644 _prepend.php diff --git a/_prepend.php b/_prepend.php new file mode 100644 index 0000000..d65efe5 --- /dev/null +++ b/_prepend.php @@ -0,0 +1,29 @@ +activityReport->addAction( + 'blog', + 'saba404', + __('404 error (saba)'), + __('New 404 error page at "%s"'), + 'sabaBeforeErrorDocument', + function () { + $logs = [dcCore::app()->blog->url . urldecode($_SERVER['QUERY_STRING'])]; + dcCore::app()->activityReport->addLog('blog', 'saba404', $logs); + } + ); +} diff --git a/_public.php b/_public.php index 75261bc..ea7701a 100644 --- a/_public.php +++ b/_public.php @@ -259,6 +259,8 @@ class urlSaba extends dcUrlHandlers return false; } + dcCore::app()->callBehavior('sabaBeforeErrorDocument'); + # Clean URI $_GET['q'] = implode('%20', $q); $_SERVER['QUERY_STRING'] = ''; diff --git a/locales/fr/main.po b/locales/fr/main.po index ffd641f..7c6807d 100644 --- a/locales/fr/main.po +++ b/locales/fr/main.po @@ -1,85 +1,66 @@ -# Language: Français -# Module: saba - 2021.08.21 -# Date: 2021-08-22 23:22:12 -# Translated with translater 2021.08.18 - msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: saba 2021.08.21\n" +"Project-Id-Version: saba 2022.11.20\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-08-22T23:22:12+00:00\n" +"PO-Revision-Date: 2022-12-17T16:29:12+00:00\n" "Last-Translator: Jean-Christian Denis\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: _admin.php:38 msgid "Search Across Blog Archive" msgstr "Rechercher dans les archives" -#: _admin.php:41 msgid "Enable advanced search on this blog" msgstr "Activer la recherche avancée sur ce blog" -#: _admin.php:44 msgid "Enable suggestion for page 404" msgstr "Activer la suggestion sur la page 404" -#: _admin.php:46 msgid "This suggests visitors some posts on page 404." msgstr "Ceci suggère au visiteurs des billets sur la page 404." -#: _widgets.php:18 +msgid "404 error (saba)" +msgstr "Erreur 404 (saba)" + msgid "Advanced search" msgstr "Recherche avancée" -#: _widgets.php:21 msgid "Add more search options on public side" msgstr "Ajoute plus d'options de recherche" -#: _widgets.php:26 msgid "Disable filter on post types" msgstr "Désactiver le filtre de type de billets" -#: _widgets.php:30 msgid "Hidden types:" msgstr "Billets cachés :" -#: _widgets.php:33 msgid "Disable filter on post options" msgstr "Désactiver le filtre des options de billet" -#: _widgets.php:37 msgid "Hidden options:" msgstr "Options cachées :" -#: _widgets.php:40 msgid "Disable filter on categories" msgstr "Désactiver le filtre de catégories" -#: _widgets.php:44 msgid "Hidden categories:" msgstr "Catégories cachées" -#: _widgets.php:47 msgid "Disable filter on authors" msgstr "Désactiver le filtre d'auteurs" -#: _widgets.php:51 msgid "Hidden authors:" msgstr "Auteurs cachés" -#: _widgets.php:54 msgid "Disable filter on order" msgstr "Désactiver le filtre d'ordre" -#: _widgets.php:60 msgid "Disable filter on age" msgstr "Désactiver le filtre de date" -#: default-templates/saba_404_dotty.html:22 msgid "Suggested items:" msgstr "Articles suggérés :" diff --git a/locales/fr/public.po b/locales/fr/public.po index 9372aae..4782d84 100644 --- a/locales/fr/public.po +++ b/locales/fr/public.po @@ -1,118 +1,66 @@ -# Language: Français -# Module: saba - 2021.08.21 -# Date: 2021-08-22 23:22:12 -# Translated with translater 2021.08.18 - msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: saba 2021.08.21\n" +"Project-Id-Version: saba 2022.11.20\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-08-22T23:22:12+00:00\n" +"PO-Revision-Date: 2022-12-17T16:29:12+00:00\n" "Last-Translator: Jean-Christian Denis\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: _public.php:293 -#: _public.php:303 -msgid "Selected entry" -msgstr "Billet sélectionné" - -#: _public.php:294 msgid "With comments" msgstr "Avec commentaires" -#: _public.php:295 msgid "With trackbacks" msgstr "Avec rétroliens" -#: _public.php:302 -msgid "Title" -msgstr "Titre" - -#: _public.php:304 -msgid "Author" -msgstr "Auteur·rice" - -#: _public.php:305 -msgid "Date" -msgstr "Date" - -#: _public.php:306 -msgid "Update" -msgstr "Mise à jour" - -#: _public.php:307 msgid "Comments count" msgstr "Nombre de commentaires" -#: _public.php:308 msgid "Trackbacks count" msgstr "Nombre de rétroliens" -#: _public.php:315 msgid "All" msgstr "Tous" -#: _public.php:316 msgid "Less than a month" msgstr "Moins d'un mois" -#: _public.php:317 msgid "From 1 to 6 month" msgstr "De 1 à 6 mois" -#: _public.php:318 msgid "From 6 to 12 month" msgstr "De 6 à 12 mois" -#: _public.php:319 msgid "More than a year" msgstr "Plus d'un an" -#: _public.php:326 -msgid "Entry" -msgstr "Publication" - -#: _public.php:327 -msgid "Page" -msgstr "Page" - -#: _public.php:328 msgid "Poll" msgstr "Sondage" -#: _public.php:329 msgid "Event" msgstr "Événement" -#: _widgets.php:114 msgid "Reverse order" msgstr "Inverser l'ordre" -#: _widgets.php:115 msgid "Filter order" msgstr "Options de tri" -#: _widgets.php:135 msgid "Filter options" msgstr "Options du filtre" -#: _widgets.php:151 msgid "Filter by age" msgstr "Filtrer par date" -#: _widgets.php:171 msgid "Filter by type" msgstr "Filtrer par type" -#: _widgets.php:192 msgid "Filter by category" msgstr "Filter par catégorie" -#: _widgets.php:213 msgid "Filter by author" msgstr "Filtrer par auteur"