From d3722e836274a22abb46c11c70437a10718958e7 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 20 Oct 2021 03:13:48 +0300 Subject: [PATCH 1/5] Update property defaults in MessageController --- framework/console/controllers/MessageController.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php index c7ba5124eb7..d6e623b8342 100644 --- a/framework/console/controllers/MessageController.php +++ b/framework/console/controllers/MessageController.php @@ -63,7 +63,7 @@ class MessageController extends \yii\console\Controller * translated. You may use a string for single function name or an array for * multiple function names. */ - public $translator = 'Yii::t'; + public $translator = ['Yii::t', '\Yii::t']; /** * @var bool whether to sort messages by keys when merging new messages * with the existing ones. Defaults to false, which means the new (untranslated) @@ -91,13 +91,12 @@ class MessageController extends \yii\console\Controller * If a file/directory matches both a pattern in "only" and "except", it will NOT be processed. */ public $except = [ - '.svn', - '.git', - '.gitignore', - '.gitkeep', - '.hgignore', - '.hgkeep', + '.*', + '/.*', '/messages', + '/tests', + '/runtime', + '/vendor', '/BaseYii.php', // contains examples about Yii::t() ]; /** From 036f4be24e68bb147b481005b5ea2f8daba145f8 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 25 Oct 2021 04:59:21 +0300 Subject: [PATCH 2/5] Update CHANGELOG.md --- framework/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 1803b9a8e3c..ad16fecd4df 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -27,6 +27,7 @@ Yii Framework 2 Change Log - Bug #18913: Add filename validation for `MessageSource::getMessageFilePath()` (uaoleg) - Bug #18909: Fix bug with binding default action parameters for controllers (bizley) - Bug #18955: Check `yiisoft/yii2-swiftmailer` before using as default mailer in `yii\base\Application` (WinterSilence) +- Bug #18962: Fix default values of properties `$translator` and `$except` in `yii\console\MessageController` (WinterSilence) 2.0.43 August 09, 2021 From 8fba1d9b9dfdfd3afa1584df621935a6a9e211e4 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 25 Oct 2021 14:57:19 +0300 Subject: [PATCH 3/5] Update CHANGELOG.md --- framework/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index ad16fecd4df..7b7ddd11add 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -27,7 +27,7 @@ Yii Framework 2 Change Log - Bug #18913: Add filename validation for `MessageSource::getMessageFilePath()` (uaoleg) - Bug #18909: Fix bug with binding default action parameters for controllers (bizley) - Bug #18955: Check `yiisoft/yii2-swiftmailer` before using as default mailer in `yii\base\Application` (WinterSilence) -- Bug #18962: Fix default values of properties `$translator` and `$except` in `yii\console\MessageController` (WinterSilence) +- Bug #18962: Extends ignore list in `yii\console\MessageController::$except` (WinterSilence) 2.0.43 August 09, 2021 From a195ba976148d97c75406f46be48e28c9795e224 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 25 Oct 2021 14:58:46 +0300 Subject: [PATCH 4/5] Update MessageController.php --- framework/console/controllers/MessageController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php index d6e623b8342..17dcb899dcb 100644 --- a/framework/console/controllers/MessageController.php +++ b/framework/console/controllers/MessageController.php @@ -58,12 +58,12 @@ class MessageController extends \yii\console\Controller */ public $languages = []; /** - * @var string the name of the function for translating messages. + * @var string|array the name of the function for translating messages. * Defaults to 'Yii::t'. This is used as a mark to find the messages to be * translated. You may use a string for single function name or an array for * multiple function names. */ - public $translator = ['Yii::t', '\Yii::t']; + public $translator = 'Yii::t'; /** * @var bool whether to sort messages by keys when merging new messages * with the existing ones. Defaults to false, which means the new (untranslated) From 38478c8839a9cad9549d293df3743a1a0666860e Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Mon, 25 Oct 2021 15:22:23 +0300 Subject: [PATCH 5/5] Update CHANGELOG.md --- framework/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 7b7ddd11add..774ff20e376 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -27,7 +27,7 @@ Yii Framework 2 Change Log - Bug #18913: Add filename validation for `MessageSource::getMessageFilePath()` (uaoleg) - Bug #18909: Fix bug with binding default action parameters for controllers (bizley) - Bug #18955: Check `yiisoft/yii2-swiftmailer` before using as default mailer in `yii\base\Application` (WinterSilence) -- Bug #18962: Extends ignore list in `yii\console\MessageController::$except` (WinterSilence) +- Enh #18962: Extend ignore list in `yii\console\MessageController::$except` (WinterSilence) 2.0.43 August 09, 2021