From 16c264ebcb571d2098a7c8d774f894e36559e2d1 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Wed, 26 Apr 2023 21:35:29 +0200 Subject: [PATCH] release 2.2 --- CHANGELOG.md | 6 ++++ README.md | 6 ++-- _define.php | 16 +++++------ dcstore.xml | 6 ++-- locales/fr/main.lang.php | 60 +++++++++++++++++++++------------------- 5 files changed, 51 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2852d9..22e5028 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +2.2 - 2023.04.26 +* require dotclear 2.26 +* use namespace +* use dotclear Date Helper +* fix nullsafe warnings + 2.1 - 2022.12.31 * update to dotclear 2.24 * update to jquery plugin 2.1.0 (2016) diff --git a/README.md b/README.md index 884f709..94d6321 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Release](https://img.shields.io/github/v/release/JcDenis/countdown)](https://github.com/JcDenis/countdown/releases) [![Date](https://img.shields.io/github/release-date/JcDenis/countdown)](https://github.com/JcDenis/countdown/releases) [![Issues](https://img.shields.io/github/issues/JcDenis/countdown)](https://github.com/JcDenis/countdown/issues) -[![Dotclear](https://img.shields.io/badge/dotclear-v2.24-blue.svg)](https://fr.dotclear.org/download) +[![Dotclear](https://img.shields.io/badge/dotclear-v2.22-blue.svg)](https://fr.dotclear.org/download) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/countdown) [![License](https://img.shields.io/github/license/JcDenis/countdown)](https://github.com/JcDenis/countdown/blob/master/LICENSE) @@ -19,8 +19,7 @@ It adds widget showing a countdown since/from a predefined date. _countdown_ requires: * permissions to manage widgets - * Dotclear 2.24 - * jQuery libs + * Dotclear 2.26 ## USAGE @@ -28,6 +27,7 @@ First install _countdown_, manualy from a zip package or from Dotaddict repository. (See Dotclear's documentation to know how do this) Add and configure "Countdown" from widgets manager. +It uses jquery for dynamic countdown. ## LINKS diff --git a/_define.php b/_define.php index 64d11f2..7eeaab3 100644 --- a/_define.php +++ b/_define.php @@ -10,7 +10,7 @@ * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ -if (!defined('DC_RC_PATH')) { +if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) { return; } @@ -18,15 +18,15 @@ $this->registerModule( 'CountDown', 'Countdown and stopwatch', 'Moe (http://gniark.net/) and contributors', - '2.1', + '2.2', [ - 'requires' => [['core', '2.24']], + 'requires' => [['core', '2.22']], 'permissions' => dcCore::app()->auth->makePermissions([ - dcAuth::PERMISSION_ADMIN, + dcCore::app()->auth::PERMISSION_ADMIN, ]), - 'type' => 'plugin', - 'support' => 'https://forum.dotclear.org/viewforum.php?id=16', - 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__), - 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml', + 'type' => 'plugin', + 'support' => 'https://forum.dotclear.org/viewforum.php?id=16', + 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__), + 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml', ] ); diff --git a/dcstore.xml b/dcstore.xml index 115c743..6d5626c 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,11 +2,11 @@ CountDown - 2.1 + 2.2 Moe (http://gniark.net/) and contributors Countdown and stopwatch - https://github.com/JcDenis/countdown/releases/download/v2.1/plugin-countdown.zip - 2.24 + https://github.com/JcDenis/countdown/releases/download/v2.2/plugin-countdown.zip + 2.22 https://plugins.dotaddict.org/dc2/details/countdown https://forum.dotclear.org/viewforum.php?id=16 diff --git a/locales/fr/main.lang.php b/locales/fr/main.lang.php index d108c4a..5ab8a30 100644 --- a/locales/fr/main.lang.php +++ b/locales/fr/main.lang.php @@ -9,32 +9,34 @@ # DOT NOT MODIFY THIS FILE ! # -l10n::$locales['Countdown and stopwatch'] = 'Compte à rebours ou chronomètre'; -l10n::$locales['A countdown to a future date or stopwatch to a past date'] = 'Un compte à rebours vers une date à venir ou un chronomètre vers une date passée'; -l10n::$locales['Countdown'] = 'Chronomètre'; -l10n::$locales['Text displayed if the date is in the future:'] = 'Texte affiché si la date est dans le futur :'; -l10n::$locales['In'] = 'Dans'; -l10n::$locales['Text displayed if the date is in the past:'] = 'Texte affiché si la date est passée :'; -l10n::$locales['For'] = 'Depuis'; -l10n::$locales['all'] = 'tous'; -l10n::$locales['year'] = 'an'; -l10n::$locales['month'] = 'mois'; -l10n::$locales['day'] = 'jour'; -l10n::$locales['hour'] = 'heure'; -l10n::$locales['minute'] = 'minute'; -l10n::$locales['second'] = 'seconde'; -l10n::$locales['Number of values to be displayed:'] = 'Nombre de valeurs à afficher :'; -l10n::$locales['Show zeros before hours, minutes and seconds'] = 'Afficher des zéros devant les heures, les minutes et les secondes'; -l10n::$locales['Enable dynamic display'] = 'Activer l\'affichage dynamique'; -l10n::$locales['Dynamic display format (see jQuery Countdown Reference):'] = 'Format de l\'affichage dynamique (voir jQuery Countdown Reference) :'; -l10n::$locales['Dynamic display layout if the date is in the future (see jQuery Countdown Reference):'] = 'Mise en page de l\'affichage dynamique si la date est dans le futur (voir jQuery Countdown Reference) :'; -l10n::$locales['In {y<}{yn} {yl}, {y>} {o<}{on} {ol}, {o>} {w<}{wn} {wl}, {w>} {d<}{dn} {dl}, {d>} {hn} {hl}, {mn} {ml} and {sn} {sl}'] = 'Dans {y<}{yn} {yl}, {y>}{o<}{on} {ol}, {o>}{d<}{dn} {dl}, {d>}{hn} {hl}, {mn} {ml} et {sn} {sl}'; -l10n::$locales['Dynamic display layout if the date is in the past (see jQuery Countdown Reference):'] = 'Mise en page de l\'affichage dynamique si la date est passée (voir jQuery Countdown Reference) :'; -l10n::$locales['For {y<}{yn} {yl}, {y>} {o<}{on} {ol}, {o>} {w<}{wn} {wl}, {w>} {d<}{dn} {dl}, {d>} {hn} {hl}, {mn} {ml} and {sn} {sl}'] = 'Depuis {y<}{yn} {yl}, {y>} {o<}{on} {ol}, {o>} {w<}{wn} {wl}, {w>} {d<}{dn} {dl}, {d>} {hn} {hl}, {mn} {ml} et {sn} {sl}'; -l10n::$locales['years'] = 'ans'; -l10n::$locales['months'] = 'mois'; -l10n::$locales['days'] = 'jours'; -l10n::$locales['hours'] = 'heures'; -l10n::$locales['minutes'] = 'minutes'; -l10n::$locales['seconds'] = 'secondes'; -l10n::$locales['and'] = 'et'; +use Dotclear\Helper\L10n; + +L10n::$locales['Countdown and stopwatch'] = 'Compte à rebours ou chronomètre'; +L10n::$locales['A countdown to a future date or stopwatch to a past date'] = 'Un compte à rebours vers une date à venir ou un chronomètre vers une date passée'; +L10n::$locales['Countdown'] = 'Chronomètre'; +L10n::$locales['Text displayed if the date is in the future:'] = 'Texte affiché si la date est dans le futur :'; +L10n::$locales['In'] = 'Dans'; +L10n::$locales['Text displayed if the date is in the past:'] = 'Texte affiché si la date est passée :'; +L10n::$locales['For'] = 'Depuis'; +L10n::$locales['all'] = 'tous'; +L10n::$locales['year'] = 'an'; +L10n::$locales['month'] = 'mois'; +L10n::$locales['day'] = 'jour'; +L10n::$locales['hour'] = 'heure'; +L10n::$locales['minute'] = 'minute'; +L10n::$locales['second'] = 'seconde'; +L10n::$locales['Number of values to be displayed:'] = 'Nombre de valeurs à afficher :'; +L10n::$locales['Show zeros before hours, minutes and seconds'] = 'Afficher des zéros devant les heures, les minutes et les secondes'; +L10n::$locales['Enable dynamic display'] = 'Activer l\'affichage dynamique'; +L10n::$locales['Dynamic display format (see jQuery Countdown Reference):'] = 'Format de l\'affichage dynamique (voir jQuery Countdown Reference) :'; +L10n::$locales['Dynamic display layout if the date is in the future (see jQuery Countdown Reference):'] = 'Mise en page de l\'affichage dynamique si la date est dans le futur (voir jQuery Countdown Reference) :'; +L10n::$locales['In {y<}{yn} {yl}, {y>} {o<}{on} {ol}, {o>} {w<}{wn} {wl}, {w>} {d<}{dn} {dl}, {d>} {hn} {hl}, {mn} {ml} and {sn} {sl}'] = 'Dans {y<}{yn} {yl}, {y>}{o<}{on} {ol}, {o>}{d<}{dn} {dl}, {d>}{hn} {hl}, {mn} {ml} et {sn} {sl}'; +L10n::$locales['Dynamic display layout if the date is in the past (see jQuery Countdown Reference):'] = 'Mise en page de l\'affichage dynamique si la date est passée (voir jQuery Countdown Reference) :'; +L10n::$locales['For {y<}{yn} {yl}, {y>} {o<}{on} {ol}, {o>} {w<}{wn} {wl}, {w>} {d<}{dn} {dl}, {d>} {hn} {hl}, {mn} {ml} and {sn} {sl}'] = 'Depuis {y<}{yn} {yl}, {y>} {o<}{on} {ol}, {o>} {w<}{wn} {wl}, {w>} {d<}{dn} {dl}, {d>} {hn} {hl}, {mn} {ml} et {sn} {sl}'; +L10n::$locales['years'] = 'ans'; +L10n::$locales['months'] = 'mois'; +L10n::$locales['days'] = 'jours'; +L10n::$locales['hours'] = 'heures'; +L10n::$locales['minutes'] = 'minutes'; +L10n::$locales['seconds'] = 'secondes'; +L10n::$locales['and'] = 'et';