Skip to content

Commit fe47615

Browse files
committed
code review
1 parent d63eaeb commit fe47615

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
translater 2023.11.04
2+
===========================================================
3+
* Require Dotclear 2.28
4+
* Require PHP 8.1
5+
* Cosmetic code review
6+
17
translater 2023.10.21
28
===========================================================
39
* Require Dotclear 2.28

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# README
22

3-
[![Release](https://img.shields.io/badge/release-2023.10.21-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/translater/releases)
4-
![Date](https://img.shields.io/badge/date-2023.10.21-c44d58.svg)
5-
[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download)
3+
[![Release](https://img.shields.io/badge/release-2023.11.04-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/translater/releases)
4+
![Date](https://img.shields.io/badge/date-2023.11.04-c44d58.svg)
5+
[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download)
66
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/translater)
77
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/translater/src/branch/master/LICENSE)
88

99
## ABOUT
1010

1111
_translater_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
1212

13-
> It helps dev to translate plugin and theme.
13+
> Help dev to translate plugin and theme.
1414
1515
## REQUIREMENTS
1616

_define.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
'Translater',
1818
'Translate your Dotclear plugins and themes',
1919
'Jean-Christian Denis & contributors',
20-
'2023.10.21',
20+
'2023.11.04',
2121
[
2222
'requires' => [['core', '2.28']],
2323
'permissions' => 'My',

dcstore.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<modules xmlns:da="http://dotaddict.org/da/">
33
<module id="translater">
44
<name>Translater</name>
5-
<version>2023.10.21</version>
5+
<version>2023.11.04</version>
66
<author>Jean-Christian Denis &amp; contributors</author>
77
<desc>Translate your Dotclear plugins and themes</desc>
8-
<file>https://git.dotclear.watch/JcDenis/translater/releases/download/v2023.10.21/plugin-translater.zip</file>
8+
<file>https://git.dotclear.watch/JcDenis/translater/releases/download/v2023.11.04/plugin-translater.zip</file>
99
<da:dcmin>2.28</da:dcmin>
1010
<da:details>https://git.dotclear.watch/JcDenis/translater/src/branch/master/README.md</da:details>
1111
<da:support>https://git.dotclear.watch/JcDenis/translater/issues</da:support>

src/Config.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static function render(): void
120120
// parse_userinfo
121121
(new Para())->items([
122122
(new Label(__('User info:')))->for('parse_userinfo'),
123-
(new Input('parse_userinfo'))->size(65)->maxlenght(255)->value($s->parse_userinfo),
123+
(new Input('parse_userinfo'))->size(65)->maxlength(255)->value($s->parse_userinfo),
124124
]),
125125
(new Note())->text(sprintf(
126126
__('Following informations can be used: %s'),
@@ -136,7 +136,7 @@ public static function render(): void
136136
// export_filename
137137
(new Para())->items([
138138
(new Label(__('Name of exported package:')))->for('export_filename'),
139-
(new Input('export_filename'))->size(65)->maxlenght(255)->value($s->export_filename),
139+
(new Input('export_filename'))->size(65)->maxlength(255)->value($s->export_filename),
140140
]),
141141
]),
142142
(new Fieldset())->class('fieldset')->legend((new Legend(__('Backups'))))->fields([

src/Manage.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public static function render(): void
525525
(new Select(['entries[' . $i . '][group]']))->default($rs['group'])->items(My::l10nGroupsCombo())->disabled($in_dc)->render(),
526526
Html::escapeHTML($msgid),
527527
(new Hidden(['entries[' . $i . '][msgid]'], Html::escapeHTML($msgid)))->render() .
528-
(new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlenght(255)->value(Html::escapeHTML($rs['msgstr'][0]))->disabled($in_dc)->render(),
528+
(new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlength(255)->value(Html::escapeHTML($rs['msgstr'][0]))->disabled($in_dc)->render(),
529529
implode('', $t_msgstr),
530530
implode('', $t_files)
531531
);
@@ -556,7 +556,7 @@ public static function render(): void
556556
sprintf(__('Plural "%s"'), $plural),
557557
sprintf(__('Plural form of "%s"'), $rs['plural']),
558558
(new Hidden(['entries[' . $i . '][msgid_plural]'], Html::escapeHTML($rs['plural'])))->render() .
559-
(new Input(['entries[' . $i . '][msgstr][' . ($j + 1) . ']']))->size(48)->maxlenght(255)->value(Html::escapeHTML($rs['msgstr'][$j + 1] ?? ''))->disbaled($in_dc)->render(),
559+
(new Input(['entries[' . $i . '][msgstr][' . ($j + 1) . ']']))->size(48)->maxlength(255)->value(Html::escapeHTML($rs['msgstr'][$j + 1] ?? ''))->disabled($in_dc)->render(),
560560
implode('', $t_msgstr),
561561
''
562562
);
@@ -569,8 +569,8 @@ public static function render(): void
569569
' offline',
570570
(new Checkbox(['entries[' . $i . '][check]']))->value(1)->render(),
571571
(new Select(['entries[' . $i . '][group]']))->items(My::l10nGroupsCombo())->default('main')->render(),
572-
(new Input(['entries[' . $i . '][msgid]']))->size(48)->maxlenght(255)->render(),
573-
(new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlenght(255)->render(),
572+
(new Input(['entries[' . $i . '][msgid]']))->size(48)->maxlength(255)->render(),
573+
(new Input(['entries[' . $i . '][msgstr][0]']))->size(48)->maxlength(255)->render(),
574574
'',
575575
''
576576
);

src/My.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class My extends MyPlugin
2525

2626
public static function checkCustomContext(int $context): ?bool
2727
{
28-
// Limit to super admin
29-
return match($context) {
28+
return match ($context) {
29+
// Limit to super admin
3030
self::MODULE => App::auth()->isSuperAdmin(),
3131
default => null,
3232
};

0 commit comments

Comments
 (0)