release 0.1 - 2021.09.11
parent
84aa0e52b2
commit
3d0d791540
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -1,10 +1,13 @@
|
||||||
0.0.2
|
0.2 -dev
|
||||||
- [ ] add global config for file size limit
|
- [ ] add global config for file size limit
|
||||||
- [ ] add function to summarize by action what was done
|
- [ ] add function to summarize by action what was done
|
||||||
- [x] use _requires_ or dc_min in _fixdcstore_
|
- [ ] add module to check depracated Dotclear function
|
||||||
- [x] fix unwanted translation of module name in _fixdcstore_
|
- [ ] add module to check deprecated PHP function
|
||||||
- [x] add modifier _first upper case_ : _\u_ in _fixphpheader_
|
- [ ] add module to check directory structure
|
||||||
- [x] fix whitespace and newline for bloc content in _fixphpheader_
|
- [ ] add DA badge to module _gitshields_
|
||||||
|
|
||||||
0.0.1
|
0.1 - 2021.09.11
|
||||||
|
- First release
|
||||||
|
|
||||||
|
0.0.1 - 2021.09.11
|
||||||
- First pre-release
|
- First pre-release
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
[![Release](https://img.shields.io/github/v/release/JcDenis/improve)](https://github.com/JcDenis/improve/releases)
|
[![Release](https://img.shields.io/github/v/release/JcDenis/improve)](https://github.com/JcDenis/improve/releases)
|
||||||
[![Date](https://img.shields.io/github/release-date/JcDenis/improve)](https://github.com/JcDenis/improve/releases)
|
[![Date](https://img.shields.io/github/release-date/JcDenis/improve)](https://github.com/JcDenis/improve/releases)
|
||||||
[![Issue](https://img.shields.io/github/issues/JcDenis/improve)](https://github.com/JcDenis/improve/issues)
|
[![Issues](https://img.shields.io/github/issues/JcDenis/improve)](https://github.com/JcDenis/improve/issues)
|
||||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.19-blue.svg)](https://fr.dotclear.org/download)
|
[![Dotclear](https://img.shields.io/badge/dotclear-v2.19-blue.svg)](https://fr.dotclear.org/download)
|
||||||
|
[![Dotclear](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/improve)
|
||||||
[![License](https://img.shields.io/github/license/JcDenis/improve)](https://github.com/JcDenis/improve/blob/master/LICENSE)
|
[![License](https://img.shields.io/github/license/JcDenis/improve)](https://github.com/JcDenis/improve/blob/master/LICENSE)
|
||||||
|
|
||||||
## WHAT IS IMPROVE ?
|
## WHAT IS IMPROVE ?
|
||||||
|
|
|
@ -19,7 +19,7 @@ $this->registerModule(
|
||||||
'improve',
|
'improve',
|
||||||
'Tiny tools to fix things for module devs',
|
'Tiny tools to fix things for module devs',
|
||||||
'Jean-Christian Denis and contributors',
|
'Jean-Christian Denis and contributors',
|
||||||
'0.0.1',
|
'0.1',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.19']],
|
'requires' => [['core', '2.19']],
|
||||||
'permissions' => null,
|
'permissions' => null,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<modules xmlns:da="http://dotaddict.org/da/">
|
<modules xmlns:da="http://dotaddict.org/da/">
|
||||||
<module id="improve">
|
<module id="improve">
|
||||||
<name>improve</name>
|
<name>improve</name>
|
||||||
<version>0.0.1</version>
|
<version>0.1</version>
|
||||||
<author>Jean-Christian Denis and contributors</author>
|
<author>Jean-Christian Denis and contributors</author>
|
||||||
<desc>Tiny tools to fix things for module devs</desc>
|
<desc>Tiny tools to fix things for module devs</desc>
|
||||||
<file>https://github.com/JcDenis/improve/releases/download/v0.0.1/plugin-improve.zip</file>
|
<file>https://github.com/JcDenis/improve/releases/download/v0.1/plugin-improve.zip</file>
|
||||||
<da:dcmin>2.19</da:dcmin>
|
<da:dcmin>2.19</da:dcmin>
|
||||||
<da:details>https://github.com/JcDenis/improve</da:details>
|
<da:details>https://github.com/JcDenis/improve</da:details>
|
||||||
<da:support>https://github.com/JcDenis/improve</da:support>
|
<da:support>https://github.com/JcDenis/improve</da:support>
|
||||||
|
|
|
@ -19,11 +19,12 @@ class ImproveActionGitshields extends ImproveAction
|
||||||
'target' => '/^([^\n]+)[\r\n|\n]{1,}/ms'
|
'target' => '/^([^\n]+)[\r\n|\n]{1,}/ms'
|
||||||
];
|
];
|
||||||
protected $bloc_content = [
|
protected $bloc_content = [
|
||||||
'[![Release](https://img.shields.io/github/v/release/%username%/%module%)](https://github.com/%username%/%module%/releases)',
|
'release' => '[![Release](https://img.shields.io/github/v/release/%username%/%module%)](https://github.com/%username%/%module%/releases)',
|
||||||
'[![Date](https://img.shields.io/github/release-date/%username%/%module%)](https://github.com/%username%/%module%/releases)',
|
'date' => '[![Date](https://img.shields.io/github/release-date/%username%/%module%)](https://github.com/%username%/%module%/releases)',
|
||||||
'[![Issue](https://img.shields.io/github/issues/%username%/%module%)](https://github.com/%username%/%module%/issues)',
|
'issues' => '[![Issues](https://img.shields.io/github/issues/%username%/%module%)](https://github.com/%username%/%module%/issues)',
|
||||||
'[![Dotclear](https://img.shields.io/badge/dotclear-v%dotclear%-blue.svg)](https://fr.dotclear.org/download)',
|
'dotclear' => '[![Dotclear](https://img.shields.io/badge/dotclear-v%dotclear%-blue.svg)](https://fr.dotclear.org/download)',
|
||||||
'[![License](https://img.shields.io/github/license/%username%/%module%)](https://github.com/%username%/%module%/blob/master/LICENSE)'
|
'dotaddict' => '[![Dotclear](https://img.shields.io/badge/dotaddict-official-green.svg)](https://%type%s.dotaddict.org/dc2/details/%module%)',
|
||||||
|
'license' => '[![License](https://img.shields.io/github/license/%username%/%module%)](https://github.com/%username%/%module%/blob/master/LICENSE)'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected function init(): bool
|
protected function init(): bool
|
||||||
|
@ -48,15 +49,23 @@ class ImproveActionGitshields extends ImproveAction
|
||||||
public function configure($url): ?string
|
public function configure($url): ?string
|
||||||
{
|
{
|
||||||
if (!empty($_POST['save']) && !empty($_POST['username'])) {
|
if (!empty($_POST['save']) && !empty($_POST['username'])) {
|
||||||
$this->setPreferences('username', (string) $_POST['username']);
|
$this->setPreferences([
|
||||||
|
'username' => (string) $_POST['username'],
|
||||||
|
'dotaddict' => !empty($_POST['dotaddict'])
|
||||||
|
]);
|
||||||
$this->redirect($url);
|
$this->redirect($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
return '
|
return '
|
||||||
<p><label for="bloc_action">' . __('Your Github user name :') . '</label>' .
|
<p><label for="username">' . __('Your Github user name :') . '</label>' .
|
||||||
form::field('username', 60, 100, $this->getPreference('username')) . '
|
form::field('username', 60, 100, $this->getPreference('username')) . '
|
||||||
</p><p class="form-note">' . __('Used in your Github URL: http://github.com/username/module_id.') . '<br />' .
|
</p><p class="form-note">' . __('Used in your Github URL: http://github.com/username/module_id.') . '<br />' .
|
||||||
__('If you have badges not created by this tool in the README.md file you should remove them manually.') . '</p>';
|
__('If you have badges not created by this tool in the README.md file you should remove them manually.') . '</p>
|
||||||
|
|
||||||
|
<p><label for="dotaddict">' .
|
||||||
|
form::checkbox('dotaddict', 1, !empty($this->getPreference('dotaddict'))) . ' '.
|
||||||
|
__('Include Dotaddict badge') . '</label>
|
||||||
|
</p><p class="form-note">' . __('If your plugin or theme is on Dotaddict, you can add a badge to link to its details in Dotaddict.') . '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function openModule(string $module_type, array $module_info): ?bool
|
public function openModule(string $module_type, array $module_info): ?bool
|
||||||
|
@ -83,22 +92,19 @@ class ImproveActionGitshields extends ImproveAction
|
||||||
|
|
||||||
private function replaceInfo()
|
private function replaceInfo()
|
||||||
{
|
{
|
||||||
$bloc = $this->bloc_content;
|
|
||||||
|
|
||||||
if (empty($bloc)) {
|
|
||||||
self::notice(__('bloc is empty'), false);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$username = $this->getPreference('username');
|
$username = $this->getPreference('username');
|
||||||
$module = $this->module['id'];
|
$module = $this->module['id'];
|
||||||
|
$type = $this->module['type'];
|
||||||
$dotclear = $this->getDotclearVersion();
|
$dotclear = $this->getDotclearVersion();
|
||||||
|
|
||||||
foreach($bloc as $k => $v) {
|
$bloc = [];
|
||||||
|
foreach($this->bloc_content as $k => $v) {
|
||||||
|
if ($k == 'dotaddict' && empty($this->getPreference('dotaddict'))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$bloc[$k] = trim(str_replace(
|
$bloc[$k] = trim(str_replace(
|
||||||
['%username%', '%module%', '%dotclear%', "\r\n", "\n"],
|
['%username%', '%module%', '%dotclear%', '%type%', "\r\n", "\n"],
|
||||||
[$username, $module, $dotclear, '', ''],
|
[$username, $module, $dotclear, $type, '', ''],
|
||||||
$v
|
$v
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// Language: Français
|
// Language: Français
|
||||||
// Module: improve - 0.0.1
|
// Module: improve - 0.1
|
||||||
// Date: 2021-09-11 20:19:34
|
// Date: 2021-09-11 20:59:33
|
||||||
// Translated with dcTranslater - 2021.09.02.1
|
// Translated with dcTranslater - 2021.09.02.1
|
||||||
|
|
||||||
#inc/class.improve.php:77
|
#inc/class.improve.php:77
|
||||||
|
@ -64,24 +64,26 @@ $GLOBALS['__l10n']['no details URL'] = 'Lien de détail non défini';
|
||||||
#inc/lib.improve.action.dcstore.php:162
|
#inc/lib.improve.action.dcstore.php:162
|
||||||
$GLOBALS['__l10n']['no support URL'] = 'Lien de support non défini';
|
$GLOBALS['__l10n']['no support URL'] = 'Lien de support non défini';
|
||||||
|
|
||||||
#inc/lib.improve.action.gitshields.php:33
|
#inc/lib.improve.action.gitshields.php:34
|
||||||
$GLOBALS['__l10n']['Fix shields badges'] = 'Fixer les badges shields.io';
|
$GLOBALS['__l10n']['Fix shields badges'] = 'Fixer les badges shields.io';
|
||||||
|
|
||||||
#inc/lib.improve.action.gitshields.php:34
|
#inc/lib.improve.action.gitshields.php:35
|
||||||
$GLOBALS['__l10n']['Add and maintain shields.io badges to the REDAME.md file'] = 'Ajoute et maintient à jour les badges shields.io du fichier README.md';
|
$GLOBALS['__l10n']['Add and maintain shields.io badges to the REDAME.md file'] = 'Ajoute et maintient à jour les badges shields.io du fichier README.md';
|
||||||
|
|
||||||
#inc/lib.improve.action.gitshields.php:56
|
#inc/lib.improve.action.gitshields.php:60
|
||||||
$GLOBALS['__l10n']['Your Github user name :'] = 'Votre "username" Github :';
|
$GLOBALS['__l10n']['Your Github user name :'] = 'Votre "username" Github :';
|
||||||
|
|
||||||
#inc/lib.improve.action.gitshields.php:58
|
#inc/lib.improve.action.gitshields.php:62
|
||||||
$GLOBALS['__l10n']['Used in your Github URL: http://github.com/username/module_id.'] = 'Utilisé dans l\'URL Github tel que : http://github.com/username/module_id.';
|
$GLOBALS['__l10n']['Used in your Github URL: http://github.com/username/module_id.'] = 'Utilisé dans l\'URL Github tel que : http://github.com/username/module_id.';
|
||||||
|
|
||||||
#inc/lib.improve.action.gitshields.php:59
|
#inc/lib.improve.action.gitshields.php:63
|
||||||
$GLOBALS['__l10n']['If you have badges not created by this tool in the README.md file you should remove them manually.'] = 'Si vous avez déjà des badges non créés par cet outil, vous devrez les retirer manuellement.';
|
$GLOBALS['__l10n']['If you have badges not created by this tool in the README.md file you should remove them manually.'] = 'Si vous avez déjà des badges non créés par cet outil, vous devrez les retirer manuellement.';
|
||||||
|
|
||||||
#inc/lib.improve.action.gitshields.php:89
|
#inc/lib.improve.action.gitshields.php:67
|
||||||
#inc/lib.improve.action.phpheader.php:153
|
$GLOBALS['__l10n']['Include Dotaddict badge'] = 'Inclure le badge Dotaddict';
|
||||||
$GLOBALS['__l10n']['bloc is empty'] = 'le bloc est vide';
|
|
||||||
|
#inc/lib.improve.action.gitshields.php:68
|
||||||
|
$GLOBALS['__l10n']['If your plugin or theme is on Dotaddict, you can add a badge to link to its details in Dotaddict.'] = 'Si votre plugin ou theme est sur Dotaddict, vous pouvez ajouter un badge lier à ses détails sur DA.';
|
||||||
|
|
||||||
#inc/lib.improve.action.licensefile.php:29
|
#inc/lib.improve.action.licensefile.php:29
|
||||||
$GLOBALS['__l10n']['Fix license file'] = 'Fixer le fichier de licence';
|
$GLOBALS['__l10n']['Fix license file'] = 'Fixer le fichier de licence';
|
||||||
|
@ -195,6 +197,9 @@ $GLOBALS['__l10n']['You can use wildcards %s'] = 'Vous pouvez utiliser les joker
|
||||||
#inc/lib.improve.action.phpheader.php:93
|
#inc/lib.improve.action.phpheader.php:93
|
||||||
$GLOBALS['__l10n']['Do not put structural elements to the begining of lines.'] = 'Ne pas mettre d\'élément de structure en début de ligne';
|
$GLOBALS['__l10n']['Do not put structural elements to the begining of lines.'] = 'Ne pas mettre d\'élément de structure en début de ligne';
|
||||||
|
|
||||||
|
#inc/lib.improve.action.phpheader.php:153
|
||||||
|
$GLOBALS['__l10n']['bloc is empty'] = 'le bloc est vide';
|
||||||
|
|
||||||
#inc/lib.improve.action.phpheader.php:182
|
#inc/lib.improve.action.phpheader.php:182
|
||||||
$GLOBALS['__l10n']['failed to parse bloc'] = 'impossible de traiter le bloc';
|
$GLOBALS['__l10n']['failed to parse bloc'] = 'impossible de traiter le bloc';
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# Language: Français
|
# Language: Français
|
||||||
# Module: improve - 0.0.1
|
# Module: improve - 0.1
|
||||||
# Date: 2021-09-11 20:19:34
|
# Date: 2021-09-11 20:59:33
|
||||||
# Translated with translater 2021.09.02.1
|
# Translated with translater 2021.09.02.1
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Project-Id-Version: improve 0.0.1\n"
|
"Project-Id-Version: improve 0.1\n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: 2021-09-11T20:19:34+00:00\n"
|
"PO-Revision-Date: 2021-09-11T20:59:33+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"
|
||||||
|
@ -95,30 +95,33 @@ msgstr "Lien de détail non défini"
|
||||||
msgid "no support URL"
|
msgid "no support URL"
|
||||||
msgstr "Lien de support non défini"
|
msgstr "Lien de support non défini"
|
||||||
|
|
||||||
#: inc/lib.improve.action.gitshields.php:33
|
#: inc/lib.improve.action.gitshields.php:34
|
||||||
msgid "Fix shields badges"
|
msgid "Fix shields badges"
|
||||||
msgstr "Fixer les badges shields.io"
|
msgstr "Fixer les badges shields.io"
|
||||||
|
|
||||||
#: inc/lib.improve.action.gitshields.php:34
|
#: inc/lib.improve.action.gitshields.php:35
|
||||||
msgid "Add and maintain shields.io badges to the REDAME.md file"
|
msgid "Add and maintain shields.io badges to the REDAME.md file"
|
||||||
msgstr "Ajoute et maintient à jour les badges shields.io du fichier README.md"
|
msgstr "Ajoute et maintient à jour les badges shields.io du fichier README.md"
|
||||||
|
|
||||||
#: inc/lib.improve.action.gitshields.php:56
|
#: inc/lib.improve.action.gitshields.php:60
|
||||||
msgid "Your Github user name :"
|
msgid "Your Github user name :"
|
||||||
msgstr "Votre \"username\" Github :"
|
msgstr "Votre \"username\" Github :"
|
||||||
|
|
||||||
#: inc/lib.improve.action.gitshields.php:58
|
#: inc/lib.improve.action.gitshields.php:62
|
||||||
msgid "Used in your Github URL: http://github.com/username/module_id."
|
msgid "Used in your Github URL: http://github.com/username/module_id."
|
||||||
msgstr "Utilisé dans l'URL Github tel que : http://github.com/username/module_id."
|
msgstr "Utilisé dans l'URL Github tel que : http://github.com/username/module_id."
|
||||||
|
|
||||||
#: inc/lib.improve.action.gitshields.php:59
|
#: inc/lib.improve.action.gitshields.php:63
|
||||||
msgid "If you have badges not created by this tool in the README.md file you should remove them manually."
|
msgid "If you have badges not created by this tool in the README.md file you should remove them manually."
|
||||||
msgstr "Si vous avez déjà des badges non créés par cet outil, vous devrez les retirer manuellement."
|
msgstr "Si vous avez déjà des badges non créés par cet outil, vous devrez les retirer manuellement."
|
||||||
|
|
||||||
#: inc/lib.improve.action.gitshields.php:89
|
#: inc/lib.improve.action.gitshields.php:67
|
||||||
#: inc/lib.improve.action.phpheader.php:153
|
msgid "Include Dotaddict badge"
|
||||||
msgid "bloc is empty"
|
msgstr "Inclure le badge Dotaddict"
|
||||||
msgstr "le bloc est vide"
|
|
||||||
|
#: inc/lib.improve.action.gitshields.php:68
|
||||||
|
msgid "If your plugin or theme is on Dotaddict, you can add a badge to link to its details in Dotaddict."
|
||||||
|
msgstr "Si votre plugin ou theme est sur Dotaddict, vous pouvez ajouter un badge lier à ses détails sur DA."
|
||||||
|
|
||||||
#: inc/lib.improve.action.licensefile.php:29
|
#: inc/lib.improve.action.licensefile.php:29
|
||||||
msgid "Fix license file"
|
msgid "Fix license file"
|
||||||
|
@ -269,6 +272,10 @@ msgstr "Vous pouvez utiliser les jokers suivants :"
|
||||||
msgid "Do not put structural elements to the begining of lines."
|
msgid "Do not put structural elements to the begining of lines."
|
||||||
msgstr "Ne pas mettre d'élément de structure en début de ligne"
|
msgstr "Ne pas mettre d'élément de structure en début de ligne"
|
||||||
|
|
||||||
|
#: inc/lib.improve.action.phpheader.php:153
|
||||||
|
msgid "bloc is empty"
|
||||||
|
msgstr "le bloc est vide"
|
||||||
|
|
||||||
#: inc/lib.improve.action.phpheader.php:182
|
#: inc/lib.improve.action.phpheader.php:182
|
||||||
msgid "failed to parse bloc"
|
msgid "failed to parse bloc"
|
||||||
msgstr "impossible de traiter le bloc"
|
msgstr "impossible de traiter le bloc"
|
||||||
|
|
Loading…
Reference in New Issue