use last activityReport plugin
parent
fa53d53657
commit
0568131cb3
|
@ -21,7 +21,6 @@ L10n::$locales['Beware: All actions done here are irreversible and are directly
|
||||||
L10n::$locales['Show Dotclear default properties'] = 'Afficher les propriétés de Dotclear';
|
L10n::$locales['Show Dotclear default properties'] = 'Afficher les propriétés de Dotclear';
|
||||||
L10n::$locales['Hide Dotclear default properties'] = 'Cacher les propriétés de Dotclear';
|
L10n::$locales['Hide Dotclear default properties'] = 'Cacher les propriétés de Dotclear';
|
||||||
L10n::$locales['Failed to load cleaner'] = 'Impossible de charger le nettoyeur';
|
L10n::$locales['Failed to load cleaner'] = 'Impossible de charger le nettoyeur';
|
||||||
L10n::$locales['Plugin dcAdvancedCleaner'] = 'Plugin dcAdvancedCleaner';
|
L10n::$locales['Uninstalling module'] = 'Désinstallation de module';
|
||||||
L10n::$locales['New action from dcAdvancedCleaner has been made with type="%s", action="%s", ns="%s".'] = 'Une nouvelle action depuis dcAdvancedCleaner a été effectuée avec : type="%s", action="%s", ns="%s"';
|
|
||||||
L10n::$locales['Advanced cleaner'] = 'Nettoyeur avancé';
|
L10n::$locales['Advanced cleaner'] = 'Nettoyeur avancé';
|
||||||
L10n::$locales['Make a huge cleaning of dotclear'] = 'Faites un énorme nettoyage de dotclear';
|
L10n::$locales['Make a huge cleaning of dotclear'] = 'Faites un énorme nettoyage de dotclear';
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
# Language: Français
|
# Language: Français
|
||||||
# Module: dcAdvancedCleaner - 0.11
|
# Module: dcAdvancedCleaner - 0.2
|
||||||
# Date: 2023-04-16 00:08:42
|
# Date: 2023-04-20 14:01:57
|
||||||
# Author: , contact@jcdenis.fr
|
# Author: , contact@jcdenis.fr
|
||||||
# Translated with translater 2023.03.19
|
# Translated with translater 2023.03.19
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Project-Id-Version: dcAdvancedCleaner 0.11\n"
|
"Project-Id-Version: dcAdvancedCleaner 0.2\n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: 2023-04-16T00:08:42+00:00\n"
|
"PO-Revision-Date: 2023-04-20T14:01:57+00:00\n"
|
||||||
"Last-Translator: Jean-Christian Denis\n"
|
"Last-Translator: Jean-Christian Denis\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
#: src/Manage.php:77
|
#: src/Manage.php:82
|
||||||
msgid "Action successfuly excecuted"
|
msgid "Action successfuly excecuted"
|
||||||
msgstr "Action exécutée avec succès"
|
msgstr "Action exécutée avec succès"
|
||||||
|
|
||||||
#: src/Manage.php:128
|
#: src/Manage.php:120
|
||||||
msgid "There is nothing to display"
|
msgid "There is nothing to display"
|
||||||
msgstr "Il n'y a rien à afficher"
|
msgstr "Il n'y a rien à afficher"
|
||||||
|
|
||||||
#: src/Manage.php:142
|
#: src/Manage.php:155
|
||||||
msgid "There are %s entries"
|
msgid "There are %s entries"
|
||||||
msgstr "Il y a %s entrées"
|
msgstr "Il y a %s entrées"
|
||||||
|
|
||||||
#: src/Manage.php:143
|
#: src/Manage.php:156
|
||||||
msgid "Objects"
|
msgid "Objects"
|
||||||
msgstr "Objets"
|
msgstr "Objets"
|
||||||
|
|
||||||
#: src/Manage.php:163
|
#: src/Manage.php:176
|
||||||
msgid "Values from official distribution"
|
msgid "Values from official distribution"
|
||||||
msgstr "Valeurs de la distribution officielle"
|
msgstr "Valeurs de la distribution officielle"
|
||||||
|
|
||||||
#: src/Manage.php:172
|
#: src/Manage.php:185
|
||||||
msgid "Action on selected rows:"
|
msgid "Action on selected rows:"
|
||||||
msgstr "Action sur les lignes sélectionnées :"
|
msgstr "Action sur les lignes sélectionnées :"
|
||||||
|
|
||||||
#: src/Manage.php:180
|
#: src/Manage.php:193
|
||||||
msgid "Beware: All actions done here are irreversible and are directly applied"
|
msgid "Beware: All actions done here are irreversible and are directly applied"
|
||||||
msgstr "Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées"
|
msgstr "Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées"
|
||||||
|
|
||||||
#: src/Manage.php:188
|
#: src/Manage.php:201
|
||||||
msgid "Show Dotclear default properties"
|
msgid "Show Dotclear default properties"
|
||||||
msgstr "Afficher les propriétés de Dotclear"
|
msgstr "Afficher les propriétés de Dotclear"
|
||||||
|
|
||||||
#: src/Manage.php:188
|
#: src/Manage.php:201
|
||||||
msgid "Hide Dotclear default properties"
|
msgid "Hide Dotclear default properties"
|
||||||
msgstr "Cacher les propriétés de Dotclear"
|
msgstr "Cacher les propriétés de Dotclear"
|
||||||
|
|
||||||
|
@ -56,13 +56,9 @@ msgstr "Cacher les propriétés de Dotclear"
|
||||||
msgid "Failed to load cleaner"
|
msgid "Failed to load cleaner"
|
||||||
msgstr "Impossible de charger le nettoyeur"
|
msgstr "Impossible de charger le nettoyeur"
|
||||||
|
|
||||||
#: src/Prepend.php:40
|
#: src/Prepend.php:48
|
||||||
msgid "Plugin dcAdvancedCleaner"
|
msgid "Uninstalling module"
|
||||||
msgstr "Plugin dcAdvancedCleaner"
|
msgstr "Désinstallation de module"
|
||||||
|
|
||||||
#: src/Prepend.php:47
|
|
||||||
msgid "New action from dcAdvancedCleaner has been made with type=\"%s\", action=\"%s\", ns=\"%s\"."
|
|
||||||
msgstr "Une nouvelle action depuis dcAdvancedCleaner a été effectuée avec : type=\"%s\", action=\"%s\", ns=\"%s\""
|
|
||||||
|
|
||||||
msgid "Advanced cleaner"
|
msgid "Advanced cleaner"
|
||||||
msgstr "Nettoyeur avancé"
|
msgstr "Nettoyeur avancé"
|
||||||
|
|
|
@ -67,7 +67,7 @@ class Manage extends dcNsProcess
|
||||||
true,
|
true,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
dcPage::addSuccessNotice(__('Configuration successfuly updated'));
|
dcPage::addSuccessNotice(__('Configuration successfully updated.'));
|
||||||
dcCore::app()->adminurl?->redirect(
|
dcCore::app()->adminurl?->redirect(
|
||||||
'admin.plugin.' . My::id(),
|
'admin.plugin.' . My::id(),
|
||||||
['part' => $vars->cleaner->id]
|
['part' => $vars->cleaner->id]
|
||||||
|
|
|
@ -16,6 +16,12 @@ namespace Dotclear\Plugin\dcAdvancedCleaner;
|
||||||
|
|
||||||
use dcCore;
|
use dcCore;
|
||||||
use dcNsProcess;
|
use dcNsProcess;
|
||||||
|
use Dotclear\Plugin\activityReport\{
|
||||||
|
Action,
|
||||||
|
ActivityReport,
|
||||||
|
Group
|
||||||
|
};
|
||||||
|
use Dotclear\Plugin\Uninstaller\Uninstaller;
|
||||||
|
|
||||||
class Prepend extends dcNsProcess
|
class Prepend extends dcNsProcess
|
||||||
{
|
{
|
||||||
|
@ -34,22 +40,22 @@ class Prepend extends dcNsProcess
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('ACTIVITY_REPORT_V2')) {
|
// log plugin Uninstaller actions
|
||||||
dcCore::app()->activityReport->addGroup(
|
if (defined('ACTIVITY_REPORT') && ACTIVITY_REPORT == 3) {
|
||||||
My::id(),
|
$group = new Group(My::id(), My::name());
|
||||||
__('Plugin dcAdvancedCleaner')
|
$group->add(new Action(
|
||||||
);
|
'uninstaller',
|
||||||
|
__('Uninstalling module'),
|
||||||
dcCore::app()->activityReport->addAction(
|
'%s',
|
||||||
My::id(),
|
'UninstallerBeforeAction',
|
||||||
'maintenance',
|
function (string $id, string $action, string $ns): void {
|
||||||
__('Maintenance'),
|
$success = Uninstaller::instance()->cleaners->get($id)?->get($action)?->success;
|
||||||
__('New action from dcAdvancedCleaner has been made with type="%s", action="%s", ns="%s".'),
|
if (!is_null($success)) {
|
||||||
'dcAdvancedCleanerBeforeAction',
|
ActivityReport::instance()->addLog(My::id(), 'uninstaller', [sprintf($success, $ns)]);
|
||||||
function ($type, $action, $ns) {
|
|
||||||
dcCore::app()->activityReport->addLog(My::id(), 'maintenance', [$type,$action, $ns]);
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
));
|
||||||
|
ActivityReport::instance()->groups->add($group);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue