Skip to content

Commit 6e98ce5

Browse files
authored
fix: Add missing translation (#9719)
* fix: Add missing translation * docs: Update changelog * fix: Apply suggestions * fix: Restore and mark as deprecated `forNoHiddenValue()` * fix: Minor typo
1 parent 05495dd commit 6e98ce5

File tree

7 files changed

+30
-4
lines changed

7 files changed

+30
-4
lines changed

system/Honeypot/Exceptions/HoneypotException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public static function forNoNameField()
4141
* Thrown when the hidden value of config is false.
4242
*
4343
* @return static
44+
*
45+
* @deprecated 4.6.4 Never used.
4446
*/
4547
public static function forNoHiddenValue()
4648
{

system/I18n/Exceptions/I18nException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function forInvalidOverDay(string $lastDay, string $day)
7272
*/
7373
public static function forInvalidHour(string $hour)
7474
{
75-
return new static(lang('Time.invalidHour', [$hour]));
75+
return new static(lang('Time.invalidHours', [$hour]));
7676
}
7777

7878
/**

system/Images/Handlers/ImageMagickHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ protected function supportedFormatCheck()
320320
switch ($this->image()->imageType) {
321321
case IMAGETYPE_WEBP:
322322
if (! in_array('WEBP', Imagick::queryFormats(), true)) {
323-
throw ImageException::forInvalidImageCreate(lang('images.webpNotSupported'));
323+
throw ImageException::forInvalidImageCreate(lang('Images.webpNotSupported'));
324324
}
325325
break;
326326
}

system/Language/en/Honeypot.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* This file is part of CodeIgniter 4 framework.
7+
*
8+
* (c) CodeIgniter Foundation <[email protected]>
9+
*
10+
* For the full copyright and license information, please view
11+
* the LICENSE file that was distributed with this source code.
12+
*/
13+
14+
// Honeypot language settings
15+
return [
16+
'noTemplate' => 'The HTML template for the Honeypot is not configured.',
17+
'noNameField' => 'The name of the Honeypot field is not set.',
18+
'theClientIsABot' => 'The Honeypot client may be a bot.',
19+
];

system/Language/en/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
'invalidParameter' => 'A parameter does not match the expected type.',
1717
'missingDefaultRoute' => 'Unable to determine what should be displayed. A default route has not been specified in the routing file.',
1818
'invalidDynamicController' => 'A dynamic controller is not allowed for security reasons. Route handler: "{0}"',
19-
'invalidControllerName' => 'The namespace delimiter is a backslash (\), not a slash (/). Route handler: "{0}"',
19+
'invalidControllerName' => 'The namespace delimiter is a backslash (\\), not a slash (/). Route handler: "{0}"',
2020
];

system/Router/Exceptions/RouterException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class RouterException extends FrameworkException implements ExceptionInterface
2828
*/
2929
public static function forInvalidParameterType()
3030
{
31-
return new static(lang('Router.invalidParameterType'));
31+
return new static(lang('Router.invalidParameter'));
3232
}
3333

3434
/**

user_guide_src/source/changelogs/v4.6.4.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ BREAKING
1818
Message Changes
1919
***************
2020

21+
- Added ``Honeypot.noTemplate``, ``Honeypot.noNameField``, ``Honeypot.theClientIsABot``.
22+
2123
*******
2224
Changes
2325
*******
@@ -28,6 +30,9 @@ Changes
2830
Deprecations
2931
************
3032

33+
- **Exception:**
34+
- The ``CodeIgniter\Honeypot\Exceptions\HoneypotException::forNoHiddenValue()`` method has been deprecated. Never used.
35+
3136
**********
3237
Bugs Fixed
3338
**********

0 commit comments

Comments
 (0)