diff --git a/CHANGELOG.md b/CHANGELOG.md index a6551bc..71080d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +translater 2023.11.04 +=========================================================== +* Require Dotclear 2.28 +* Require PHP 8.1 +* Cosmetic code review + translater 2023.10.21 =========================================================== * Require Dotclear 2.28 diff --git a/README.md b/README.md index d186afb..ce63469 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # README -[![Release](https://img.shields.io/badge/release-2023.10.21-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/translater/releases) -![Date](https://img.shields.io/badge/date-2023.10.21-c44d58.svg) -[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download) +[![Release](https://img.shields.io/badge/release-2023.11.04-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/translater/releases) +![Date](https://img.shields.io/badge/date-2023.11.04-c44d58.svg) +[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/translater) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/translater/src/branch/master/LICENSE) @@ -10,7 +10,7 @@ _translater_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org). -> It helps dev to translate plugin and theme. +> Help dev to translate plugin and theme. ## REQUIREMENTS diff --git a/_define.php b/_define.php index 3284166..3204389 100644 --- a/_define.php +++ b/_define.php @@ -17,7 +17,7 @@ $this->registerModule( 'Translater', 'Translate your Dotclear plugins and themes', 'Jean-Christian Denis & contributors', - '2023.10.21', + '2023.11.04', [ 'requires' => [['core', '2.28']], 'permissions' => 'My', diff --git a/dcstore.xml b/dcstore.xml index 94c1556..0e68025 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,10 +2,10 @@ Translater - 2023.10.21 + 2023.11.04 Jean-Christian Denis & contributors Translate your Dotclear plugins and themes - https://git.dotclear.watch/JcDenis/translater/releases/download/v2023.10.21/plugin-translater.zip + https://git.dotclear.watch/JcDenis/translater/releases/download/v2023.11.04/plugin-translater.zip 2.28 https://git.dotclear.watch/JcDenis/translater/src/branch/master/README.md https://git.dotclear.watch/JcDenis/translater/issues diff --git a/src/Config.php b/src/Config.php index ef7b893..52fc9ba 100644 --- a/src/Config.php +++ b/src/Config.php @@ -120,7 +120,7 @@ class Config extends Process // parse_userinfo (new Para())->items([ (new Label(__('User info:')))->for('parse_userinfo'), - (new Input('parse_userinfo'))->size(65)->maxlenght(255)->value($s->parse_userinfo), + (new Input('parse_userinfo'))->size(65)->maxlength(255)->value($s->parse_userinfo), ]), (new Note())->text(sprintf( __('Following informations can be used: %s'), @@ -136,7 +136,7 @@ class Config extends Process // export_filename (new Para())->items([ (new Label(__('Name of exported package:')))->for('export_filename'), - (new Input('export_filename'))->size(65)->maxlenght(255)->value($s->export_filename), + (new Input('export_filename'))->size(65)->maxlength(255)->value($s->export_filename), ]), ]), (new Fieldset())->class('fieldset')->legend((new Legend(__('Backups'))))->fields([ diff --git a/src/Manage.php b/src/Manage.php index 51455a6..8f86c33 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -525,7 +525,7 @@ class Manage extends Process (new Select(['entries[' . $i . '][group]']))->default($rs['group'])->items(My::l10nGroupsCombo())->disabled($in_dc)->render(), Html::escapeHTML($msgid), (new Hidden(['entries[' . $i . '][msgid]'], Html::escapeHTML($msgid)))->render() . - (new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlenght(255)->value(Html::escapeHTML($rs['msgstr'][0]))->disabled($in_dc)->render(), + (new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlength(255)->value(Html::escapeHTML($rs['msgstr'][0]))->disabled($in_dc)->render(), implode('', $t_msgstr), implode('', $t_files) ); @@ -556,7 +556,7 @@ class Manage extends Process sprintf(__('Plural "%s"'), $plural), sprintf(__('Plural form of "%s"'), $rs['plural']), (new Hidden(['entries[' . $i . '][msgid_plural]'], Html::escapeHTML($rs['plural'])))->render() . - (new Input(['entries[' . $i . '][msgstr][' . ($j + 1) . ']']))->size(48)->maxlenght(255)->value(Html::escapeHTML($rs['msgstr'][$j + 1] ?? ''))->disbaled($in_dc)->render(), + (new Input(['entries[' . $i . '][msgstr][' . ($j + 1) . ']']))->size(48)->maxlength(255)->value(Html::escapeHTML($rs['msgstr'][$j + 1] ?? ''))->disabled($in_dc)->render(), implode('', $t_msgstr), '' ); @@ -569,8 +569,8 @@ class Manage extends Process ' offline', (new Checkbox(['entries[' . $i . '][check]']))->value(1)->render(), (new Select(['entries[' . $i . '][group]']))->items(My::l10nGroupsCombo())->default('main')->render(), - (new Input(['entries[' . $i . '][msgid]']))->size(48)->maxlenght(255)->render(), - (new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlenght(255)->render(), + (new Input(['entries[' . $i . '][msgid]']))->size(48)->maxlength(255)->render(), + (new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlength(255)->render(), '', '' ); diff --git a/src/My.php b/src/My.php index 8c54c89..c6fdd34 100644 --- a/src/My.php +++ b/src/My.php @@ -25,8 +25,8 @@ class My extends MyPlugin public static function checkCustomContext(int $context): ?bool { - // Limit to super admin - return match($context) { + return match ($context) { + // Limit to super admin self::MODULE => App::auth()->isSuperAdmin(), default => null, };