From f3457039cb10e8bb60dd8976fb6077997cb262fd Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 31 Dec 2022 19:07:05 +0100 Subject: [PATCH] release 1.5 (see changelog) --- changelog => CHANGELOG.md | 8 ++ README.md | 47 +++++++++- _admin.php | 78 ++++++++-------- _define.php | 56 +++++------ _install.php | 127 +++++++++++++------------ _prepend.php | 15 --- _public.php | 166 ++++++++++++++------------------- dcstore.xml | 13 +++ index.php | 190 ++++++++++++++++++-------------------- js/config.js | 6 -- js/index.js | 12 +++ locales/fr/main.lang.php | 57 ++++-------- locales/fr/main.po | 28 ++---- 13 files changed, 398 insertions(+), 405 deletions(-) rename changelog => CHANGELOG.md (55%) delete mode 100644 _prepend.php create mode 100644 dcstore.xml delete mode 100644 js/config.js create mode 100644 js/index.js diff --git a/changelog b/CHANGELOG.md similarity index 55% rename from changelog rename to CHANGELOG.md index 0e9d7db..5b96f5d 100644 --- a/changelog +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +1.5 - 2022.12.31 +* update to dotclear 2.24 +* use json intead of serialize +* use short settings names +* use anonymous functions +* use abstract plugin id +* fix phpstan and php-cs-fixer errors + v1.4 - 20-12-2022 - Pierre Van Glebeke * màj partielle dc2.24 diff --git a/README.md b/README.md index 571c872..fa197a9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,45 @@ -# construction -Cette extension permet de placer son blog en maintenance. Il est possible également de renseigner plusieurs IP autorisées. +# README + +[![Release](https://img.shields.io/github/v/release/JcDenis/construction)](https://github.com/JcDenis/construction/releases) +[![Date](https://img.shields.io/github/release-date/JcDenis/construction)](https://github.com/JcDenis/construction/releases) +[![Issues](https://img.shields.io/github/issues/JcDenis/construction)](https://github.com/JcDenis/construction/issues) +[![Dotclear](https://img.shields.io/badge/dotclear-v2.24-blue.svg)](https://fr.dotclear.org/download) +[![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/construction) +[![License](https://img.shields.io/github/license/JcDenis/construction)](https://github.com/JcDenis/construction/blob/master/LICENSE) + +## WHAT IS DISCLAIMER ? + +_construction_ is a plugin for the open-source +web publishing software called Dotclear. + +Put your blog on construction mode with a custom message on frontend. +Blog can be accessible to defined IP addresses. + +## REQUIREMENTS + + _construction_ requires: + + * admin permissions on blog + * Dotclear 2.24 + +## USAGE + +First install _construction_, manualy from a zip package or from +Dotaddict repository. (See Dotclear's documentation to know how do this) + +You can activate and setup _construction_ from sidebar menu "Construction". + +## LINKS + + * License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html) + * Source & contribution : [GitHub Page](https://github.com/JcDenis/construction) + * Packages & details : [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/construction) + * Help & discuss : [Dotclear forum](http://forum.dotclear.org/viewtopic.php?id=42875) + +## CONTRIBUTORS + + * Osku (author) + * Pierre Van Glabeke + * Jean-Christian Denis + + You are welcome to contribute to this code. diff --git a/_admin.php b/_admin.php index 4f064f2..cecc92e 100644 --- a/_admin.php +++ b/_admin.php @@ -1,47 +1,41 @@ blog->settings->addNamespace('construction'); -$menu_class = ''; - -if (dcCore::app()->blog->settings->construction->construction_flag) -{ - dcCore::app()->addBehavior('adminPageHTMLHead','constructionadminPageHTMLHead'); - $menu_class = 'construction-blog'; +/** + * @brief construction, a plugin for Dotclear 2 + * + * @package Dotclear + * @subpackage Plugin + * + * @author Osku and contributors + * + * @copyright Jean-Christian Denis + * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html + */ +if (!defined('DC_CONTEXT_ADMIN')) { + return null; } -$_menu['Blog']->addItem(__('Construction'), - 'plugin.php?p=construction','index.php?pf=construction/icon.png', - preg_match('/plugin.php\?p=construction(&.*)?$/',$_SERVER['REQUEST_URI']), - dcCore::app()->auth->check('admin',dcCore::app()->blog->id), - $menu_class +dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem( + __('Construction'), + dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)), + urldecode(dcPage::getPF(basename(__DIR__) . '/icon.png')), + preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__))) . '(&.*)?$/', $_SERVER['REQUEST_URI']), + dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_ADMIN]), dcCore::app()->blog->id), + dcCore::app()->blog->settings->get(basename(__DIR__))->get('flag') ? 'construction-blog' : '' ); -function constructionadminPageHTMLHead() -{ - echo ''."\n"; -} - -dcCore::app()->addBehavior('adminDashboardFavorites','constructionDashboardFavorites'); - -function constructionDashboardFavorites($core,$favs) -{ - $favs->register('construction', array( - 'title' => __('Construction'), - 'url' => 'plugin.php?p=construction', - 'small-icon' => 'index.php?pf=construction/icon.png', - 'large-icon' => 'index.php?pf=construction/icon-big.png', - 'permissions' => 'usage,contentadmin' - )); -} \ No newline at end of file +dcCore::app()->addBehaviors([ + 'adminPageHTMLHead' => function () { + if (dcCore::app()->blog->settings->get(basename(__DIR__))->get('flag')) { + echo dcPage::cssModuleLoad(basename(__DIR__) . '/css/admin.css'); + } + }, + 'adminDashboardFavoritesV2' => function (dcFavorites $favs) { + $favs->register(basename(__DIR__), [ + 'title' => __('Construction'), + 'url' => dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)), + 'small-icon' => urldecode(dcPage::getPF(basename(__DIR__) . '/icon.png')), + 'large-icon' => urldecode(dcPage::getPF(basename(__DIR__) . '/icon-big.png')), + 'permissions' => dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_ADMIN]), + ]); + }, +]); diff --git a/_define.php b/_define.php index e98f22e..c5fdb56 100644 --- a/_define.php +++ b/_define.php @@ -1,29 +1,33 @@ registerModule( - /* Name */ "Construction", - /* Description*/ "Place your blog maintenance", - /* Author */ "Osku and contributors", - /* Version */ '1.4', - /* Properties */ - array( - 'permissions' => 'admin', - 'priority' => 2000, - 'type' => 'plugin', - 'dc_min' => '2.24', - 'support' => 'http://forum.dotclear.org/viewtopic.php?id=42875', - 'details' => 'http://plugins.dotaddict.org/dc2/details/construction' - ) -); \ No newline at end of file + 'Construction', + 'Place your blog maintenance', + 'Osku and contributors', + '1.5', + [ + 'requires' => [['core', '2.24']], + 'permissions' => dcCore::app()->auth->makePermissions([ + dcAuth::PERMISSION_ADMIN, + ]), + 'priority' => 2000, + 'type' => 'plugin', + 'support' => 'http://forum.dotclear.org/viewtopic.php?id=42875', + 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__), + 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml', + ] +); diff --git a/_install.php b/_install.php index ac8ff91..90c3e9b 100644 --- a/_install.php +++ b/_install.php @@ -1,67 +1,78 @@ plugins->moduleInfo('construction','version'); - -$current_version = dcCore::app()->getVersion('construction'); - -if (version_compare($current_version,$new_version,'>=')) { - return; +/** + * @brief construction, a plugin for Dotclear 2 + * + * @package Dotclear + * @subpackage Plugin + * + * @author Osku and contributors + * + * @copyright Jean-Christian Denis + * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html + */ +if (!defined('DC_CONTEXT_ADMIN')) { + return null; } -dcCore::app()->blog->settings->addNamespace('construction'); -$s =& dcCore::app()->blog->settings->construction; +try { + // Version + if (!dcCore::app()->newVersion( + basename(__DIR__), + dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version') + )) { + return null; + } -$s->put('construction_flag', - false, - 'boolean', - 'Construction blog flag', - true, - true -); + $s = dcCore::app()->blog->settings->get(basename(__DIR__)); -$s->put('construction_allowed_ip', - serialize(array('127.0.0.1')), - 'string', - 'Construction blog allowed ip', - true, - true -); + $s->put( + 'flag', + false, + 'boolean', + 'Construction blog flag', + false, + true + ); -$s->put('construction_title', - __('Work in progress'), - 'string', - 'Construction blog title', - true, - true -); + $s->put( + 'allowed_ip', + json_encode(['127.0.0.1']), + 'string', + 'Construction blog allowed ip', + false, + true + ); -$s->put('construction_message', - __('

The blog is currently under construction.

'), - 'string', - 'Construction blog message', - true, - true -); + $s->put( + 'title', + __('Work in progress'), + 'string', + 'Construction blog title', + false, + true + ); -$s->put('construction_extra_urls', - serialize(array()), - 'string', - 'Construction blog message', - true, - true -); + $s->put( + 'message', + __('

The blog is currently under construction.

'), + 'string', + 'Construction blog message', + false, + true + ); -dcCore::app()->setVersion('construction',$new_version); -return true; \ No newline at end of file + $s->put( + 'extra_urls', + json_encode([]), + 'string', + 'Construction blog message', + false, + true + ); + + return true; +} catch (Exception $e) { + dcCore::app()->error->add($e->getMessage()); +} + +return false; diff --git a/_prepend.php b/_prepend.php deleted file mode 100644 index 39c6412..0000000 --- a/_prepend.php +++ /dev/null @@ -1,15 +0,0 @@ -blog->settings->construction->construction_flag) -{ - dcCore::app()->addBehavior('publicBeforeDocument',array('publicBehaviorsConstruction','checkVisitor')); +/** + * @brief construction, a plugin for Dotclear 2 + * + * @package Dotclear + * @subpackage Plugin + * + * @author Osku and contributors + * + * @copyright Jean-Christian Denis + * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html + */ +if (!defined('DC_RC_PATH')) { + return null; } -dcCore::app()->tpl->addValue('ConstructionMessage',array('tplConstruction','ConstructionMessage')); -dcCore::app()->tpl->addValue('ConstructionTitle',array('tplConstruction','ConstructionTitle')); +dcCore::app()->addBehavior('publicBeforeDocument', function () { + if (!dcCore::app()->blog->settings->get(basename(__DIR__))->get('flag')) { + return; + } -class publicBehaviorsConstruction -{ - public static function checkVisitor($core) - { - $tplset = dcCore::app()->themes->moduleInfo(dcCore::app()->blog->settings->system->theme,'tplset'); - if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) { - dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), dirname(__FILE__).'/default-templates/'.$tplset); - } else { - dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), dirname(__FILE__).'/default-templates/'.DC_DEFAULT_TPLSET); + $tplset = dcCore::app()->themes->moduleInfo(dcCore::app()->blog->settings->get('system')->get('theme'), 'tplset'); + if (!empty($tplset) && is_dir(implode(DIRECTORY_SEPARATOR, [__DIR__, 'default-templates', $tplset]))) { + dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), implode(DIRECTORY_SEPARATOR, [__DIR__, 'default-templates', $tplset])); + } else { + dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), implode(DIRECTORY_SEPARATOR, [__DIR__, 'default-templates', DC_DEFAULT_TPLSET])); + } + + $all_allowed_ip = json_decode(dcCore::app()->blog->settings->get(basename(__DIR__))->get('allowed_ip'), true); + if (!is_array($all_allowed_ip)) { + $all_allowed_ip = []; + } + $extra_urls = json_decode(dcCore::app()->blog->settings->get(basename(__DIR__))->get('extra_urls'), true); + if (!in_array(http::realIP(), $all_allowed_ip)) { + dcCore::app()->url->registerDefault(function ($args) { + dcCore::app()->url->type = 'default'; + + throw new Exception('Blog under construction', 503); + }); + dcCore::app()->url->registerError(function ($args, $type, $e) { + header('Content-Type: text/html; charset=UTF-8'); + http::head(503, 'Service Unavailable'); + dcCore::app()->url->type = '503'; + dcCore::app()->ctx->__set('current_tpl', '503.html'); + dcCore::app()->ctx->__set('content_type', 'text/html'); + + echo dcCore::app()->tpl->getData(dcCore::app()->ctx->__get('current_tpl')); + + # --BEHAVIOR-- publicAfterDocument + dcCore::app()->callBehavior('publicAfterDocumentV2'); + exit; + }); + + foreach (dcCore::app()->url->getTypes() as $k => $v) { + if (($k != 'contactme') && !in_array($k, $extra_urls)) { + dcCore::app()->url->register($k, $v['url'], $v['representation'], function () { + throw new Exception('Blog under construction', 503); + }); + } } - $all_allowed_ip = unserialize(dcCore::app()->blog->settings->construction->construction_allowed_ip); - $extra_urls = unserialize(dcCore::app()->blog->settings->construction->construction_extra_urls); - if (!in_array(http::realIP(),$all_allowed_ip)) - { - dcCore::app()->url->registerDefault(array('urlConstruction','constructionHandler')); - dcCore::app()->url->registerError(array('urlConstruction','default503')); - - foreach (dcCore::app()->url->getTypes() as $k=>$v) - { - if (($k != 'contactme') && !in_array($k,$extra_urls)) - { - dcCore::app()->url->register($k,$v['url'],$v['representation'],array('urlConstruction','p503')); - } - } + } +}); - } - } -} - -class urlConstruction extends dcUrlHandlers -{ - public static function p503() - { - throw new Exception ("Blog under construction",503); - } - - public static function default503($args,$type,$e) - { - //if ($e->getCode() == 503) { - $_ctx =& $GLOBALS['_ctx']; - $core =& $GLOBALS['core']; - - header('Content-Type: text/html; charset=UTF-8'); - http::head(503,'Service Unavailable'); - dcCore::app()->url->type = '503'; - $_ctx->current_tpl = '503.html'; - $_ctx->content_type = 'text/html'; - - echo dcCore::app()->tpl->getData($_ctx->current_tpl); - - # --BEHAVIOR-- publicAfterDocument - dcCore::app()->callBehavior('publicAfterDocument',$core); - exit; - //} - } - - public static function constructionHandler($args) - { - $core =& $GLOBALS['core']; - dcCore::app()->url->type = 'default'; - self::p503(); - return; - } -} - -class tplConstruction -{ - public static function ConstructionMessage($attr) - { - $core =& $GLOBALS['core']; - $f = dcCore::app()->tpl->getFilters($attr); - return 'blog->settings->construction->construction_message').'; ?>'; - } - - public static function ConstructionTitle($attr) - { - $core =& $GLOBALS['core']; - $f = dcCore::app()->tpl->getFilters($attr); - return 'blog->settings->construction->construction_title').'; ?>'; - } -} \ No newline at end of file +dcCore::app()->tpl->addValue('ConstructionMessage', function ($attr) { + return 'tpl->getFilters($attr), + 'dcCore::app()->blog->settings->get("' . basename(__DIR__) . '")->get("message")' + ) . '; ?>'; +}); +dcCore::app()->tpl->addValue('ConstructionTitle', function ($attr) { + return 'tpl->getFilters($attr), + 'dcCore::app()->blog->settings->get("' . basename(__DIR__) . '")->get("title")' + ) . '; ?>'; +}); diff --git a/dcstore.xml b/dcstore.xml new file mode 100644 index 0000000..83a9919 --- /dev/null +++ b/dcstore.xml @@ -0,0 +1,13 @@ + + + + Construction + 1.5 + Osku and contributors + Place your blog maintenance + https://github.com/JcDenis/construction/releases/download/v1.5/plugin-construction.zip + 2.24 + https://plugins.dotaddict.org/dc2/details/construction + http://forum.dotclear.org/viewtopic.php?id=42875 + + diff --git a/index.php b/index.php index 853dd93..1b65f64 100644 --- a/index.php +++ b/index.php @@ -1,125 +1,115 @@ auth->makePermissions([ + dcAuth::PERMISSION_ADMIN, +])); -$page_title = __('Construction'); +$s = dcCore::app()->blog->settings->get(basename(__DIR__)); -dcCore::app()->blog->settings->addNamespace('construction'); -$s =& dcCore::app()->blog->settings->construction; - -$flag = $s->construction_flag; -$allowed_ip = array(); -$myip = http::realIP(); -// editeur pour le message -$post_format = dcCore::app()->auth->getOption('post_format'); - $post_editor = dcCore::app()->auth->getOption('editor'); - $admin_post_behavior = ''; - if ($post_editor && !empty($post_editor[$post_format])) { - $admin_post_behavior = dcCore::app()->callBehavior('adminPostEditor', $post_editor[$post_format], - 'user_desc', array('#user_desc') - ); +if (!empty($_POST['saveconfig'])) { + try { + $allowed_ip = []; + foreach (explode("\n", $_POST['construction_allowed_ip']) as $ip) { + $allowed_ip[] = trim($ip); + } + $extra_urls = []; + foreach (explode(',', $_POST['construction_extra_urls']) as $url) { + $extra_urls[] = trim($url); } -if (!empty($_POST['saveconfig'])) -{ - try - { - $flag = (empty($_POST['construction_flag']))?false:true; - $s->put('construction_flag',$flag,'boolean','Construction blog flag'); - $all_ip = explode("\n",$_POST['construction_allowed_ip']); - foreach ($all_ip as $ip) { - $allowed_ip[] = trim($ip); - } - $urls = explode(",",$_POST['construction_extra_urls']); - foreach ($urls as $url) { - $extra_urls[] = trim($url); - } - $s->put('construction_allowed_ip',serialize($allowed_ip),'string','Construction blog allowed ip'); - $s->put('construction_title',$_POST['construction_title'],'string','Construction blog title'); - $s->put('construction_message',$_POST['construction_message'],'string','Construction blog message'); - $s->put('construction_extra_urls',serialize($extra_urls),'string','Construction extra allowed URLs'); + $s->put('flag', empty($_POST['construction_flag']) ? false : true); + $s->put('allowed_ip', json_encode($allowed_ip)); + $s->put('title', $_POST['construction_title']); + $s->put('message', $_POST['construction_message']); + $s->put('extra_urls', json_encode($extra_urls)); - dcCore::app()->blog->triggerBlog(); - http::redirect($p_url.'&saved=1'); - } - catch (Exception $e) - { - dcCore::app()->error->add($e->getMessage()); - } + dcCore::app()->blog->triggerBlog(); + + dcAdminNotices::addSuccessNotice( + __('Settings successfully updated.') + ); + + dcCore::app()->adminurl->redirect( + 'admin.plugin.' . basename(__DIR__) + ); + } catch (Exception $e) { + dcCore::app()->error->add($e->getMessage()); + } } -$nb_rows = count(unserialize($s->construction_allowed_ip)); +$nb_rows = count(json_decode($s->get('allowed_ip'), true)); if ($nb_rows < 2) { - $nb_rows = 2; + $nb_rows = 2; } elseif ($nb_rows > 10) { - $nb_rows = 10; + $nb_rows = 10; } -?> - - - <?php echo $page_title; ?> - - - -blog->name) => '', - ''.$page_title.'' => '' - )); -if (!empty($msg)) { - dcPage::message($msg);} - if (!empty($_GET['saved'])) { - dcPage::success(__('Configuration successfully updated.')); -} - -echo '
-
+$editor = dcCore::app()->auth->getOption('editor'); + +echo ' +' . __('Construction') . '' . +dcPage::jsConfirmClose('opts-forms') . +dcCore::app()->callBehavior('adminPostEditor', $editor['xhtml'], 'construction', ['#construction_message'], 'xhtml') . +dcPage::jsModuleLoad(basename(__DIR__) . '/js/index.js') . ' +' . + +dcPage::breadcrumb([ + __('Plugins') => '', + __('Construction') => '', +]) . +dcPage::notices() . ' + +
+
-

'.__('Configuration').'

-

'. -form::checkbox('construction_flag', 1, $s->construction_flag). -' +

' . __('Configuration') . '

+ +

' . +form::checkbox('construction_flag', 1, $s->get('flag')) . ' +

-

'. -form::textarea('construction_allowed_ip',20,$nb_rows,html::escapeHTML(implode("\n",unserialize($s->construction_allowed_ip)))). + +

' . +form::textarea('construction_allowed_ip', 20, $nb_rows, html::escapeHTML(implode("\n", json_decode($s->get('allowed_ip'), true)))) . '

-

'.sprintf(__('Your IP is %s - the allowed IP can view the blog normally.'),$myip).'

-

'. -form::field('construction_extra_urls',20,255,html::escapeHTML(implode(',',unserialize($s->construction_extra_urls))),'maximal'). +

' . sprintf(__('Your IP is %s - the allowed IP can view the blog normally.'), (string) http::realIP()) . '

+ +

' . +form::field('construction_extra_urls', 20, 255, html::escapeHTML(implode(',', json_decode($s->get('extra_urls'), true))), 'maximal') . '

+
-

'.__('Presentation').'

-

'. -form::field('construction_title',20,255,html::escapeHTML($s->construction_title),'maximal'). +

' . __('Presentation') . '

+

' . +form::field('construction_title', 20, 255, html::escapeHTML($s->get('title')), 'maximal') . '

-

'. -form::textarea('construction_message',40,10,html::escapeHTML($s->construction_message)). + +

' . +form::textarea('construction_message', 40, 10, html::escapeHTML($s->get('message'))) . '

-

'.form::hidden(array('p'),'construction'). -dcCore::app()->formNonce(). -' +

' . +form::hidden(['p'], 'construction') . +dcCore::app()->formNonce() . ' +

-
'; -?> +
+ - \ No newline at end of file +'; diff --git a/js/config.js b/js/config.js deleted file mode 100644 index 99ce262..0000000 --- a/js/config.js +++ /dev/null @@ -1,6 +0,0 @@ -$(function() { - if ($.isFunction(jsToolBar)) { - var tbUser = new jsToolBar(document.getElementById('construction_message')); - tbUser.draw('xhtml'); - } -}); \ No newline at end of file diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..3ff3ed5 --- /dev/null +++ b/js/index.js @@ -0,0 +1,12 @@ +/*global $, dotclear, jsToolBar */ +'use strict'; + +$(() => { + if (typeof jsToolBar === 'function') { + $('#disclaimer_text').each(function () { + const tbWidgetTextDisclaimer = new jsToolBar(this); + tbWidgetTextDisclaimer.context = 'disclaimer_text'; + tbWidgetTextDisclaimer.draw('xhtml'); + }); + } +}); \ No newline at end of file diff --git a/locales/fr/main.lang.php b/locales/fr/main.lang.php index bda3cc7..758c37a 100644 --- a/locales/fr/main.lang.php +++ b/locales/fr/main.lang.php @@ -1,39 +1,22 @@ The blog is currently under construction.

'] = '

Le blog est actuellement en construction.

'; - -#index.php:94 -$GLOBALS['__l10n']['Configuration'] = 'Configuration'; - -#index.php:99 -$GLOBALS['__l10n']['Allowed IP:'] = 'IP autorisées :'; - -#index.php:102 -$GLOBALS['__l10n']['Your IP is %s - the allowed IP can view the blog normally.'] = 'Votre IP est %s - les IP autorisées peuvent visualiser le blog normalement.'; - -#index.php:103 -$GLOBALS['__l10n']['Extra allowed URL types:'] = 'Autres types d\'URL autorisées :'; - -#index.php:108 -$GLOBALS['__l10n']['Presentation'] = 'Présentation'; - -#index.php:112 -$GLOBALS['__l10n']['Message:'] = 'Message :'; - -$GLOBALS['__l10n']['Place your blog maintenance'] = 'Mettez votre blog en maintenance'; - -$GLOBALS['__l10n']['construction'] = 'construction'; +/** + * @package Dotclear + * + * @copyright Olivier Meunier & Association Dotclear + * @copyright GPL-2.0-only + */ +# +# DOT NOT MODIFY THIS FILE ! +# +l10n::$locales['Construction'] = 'Construction'; +l10n::$locales['Work in progress'] = 'Travaux en cours'; +l10n::$locales['

The blog is currently under construction.

'] = '

Le blog est actuellement en construction.

'; +l10n::$locales['Settings successfully updated.'] = 'Paramètres mis à jour.'; +l10n::$locales['Configuration'] = 'Configuration'; +l10n::$locales['Allowed IP:'] = 'IP autorisées :'; +l10n::$locales['Your IP is %s - the allowed IP can view the blog normally.'] = 'Votre IP est %s - les IP autorisées peuvent visualiser le blog normalement.'; +l10n::$locales['Extra allowed URL types:'] = 'Autres types d\'URL autorisées :'; +l10n::$locales['Presentation'] = 'Présentation'; +l10n::$locales['Message:'] = 'Message :'; +l10n::$locales['Place your blog maintenance'] = 'Mettez votre blog en maintenance'; diff --git a/locales/fr/main.po b/locales/fr/main.po index 9a19641..12876f1 100644 --- a/locales/fr/main.po +++ b/locales/fr/main.po @@ -1,61 +1,45 @@ -# Language: Français -# Module: construction - 1.3.1 -# Date: 2018-02-18 16:09:52 -# Translated with translater 2018.02.14 - msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: construction 1.3.1\n" +"Project-Id-Version: construction 1.5\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2018-02-18T16:09:52+00:00\n" -"Last-Translator: brol\n" +"PO-Revision-Date: 2022-12-31T18:01:51+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:24 -#: _admin.php:41 -#: index.php:15 msgid "Construction" msgstr "Construction" -#: _install.php:43 msgid "Work in progress" msgstr "Travaux en cours" -#: _install.php:51 msgid "

The blog is currently under construction.

" msgstr "

Le blog est actuellement en construction.

" -#: index.php:94 +msgid "Settings successfully updated." +msgstr "Paramètres mis à jour." + msgid "Configuration" msgstr "Configuration" -#: index.php:99 msgid "Allowed IP:" msgstr "IP autorisées :" -#: index.php:102 msgid "Your IP is %s - the allowed IP can view the blog normally." msgstr "Votre IP est %s - les IP autorisées peuvent visualiser le blog normalement." -#: index.php:103 msgid "Extra allowed URL types:" msgstr "Autres types d'URL autorisées :" -#: index.php:108 msgid "Presentation" msgstr "Présentation" -#: index.php:112 msgid "Message:" msgstr "Message :" msgid "Place your blog maintenance" msgstr "Mettez votre blog en maintenance" -msgid "construction" -msgstr "construction" -