mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fix translators in messages/config.php (#19416)
* Fix translators in `messages/config.php` #19415 * Update messageConfig.php * Update config.php * Update messageConfig.php * Update CHANGELOG.md * Update framework/CHANGELOG.md Co-authored-by: Bizley <pawel@positive.codes> Co-authored-by: Bizley <pawel@positive.codes>
This commit is contained in:
@ -28,6 +28,7 @@ Yii Framework 2 Change Log
|
|||||||
- Bug #19368: Fix PHP 8.1 error when `$fileMimeType` is `null` in `yii\validators\FileValidator::validateMimeType()` (bizley)
|
- Bug #19368: Fix PHP 8.1 error when `$fileMimeType` is `null` in `yii\validators\FileValidator::validateMimeType()` (bizley)
|
||||||
- Enh #19384: Normalize `setBodyParams()` and `getBodyParam()` in `yii\web\Request` (WinterSilence, albertborsos)
|
- Enh #19384: Normalize `setBodyParams()` and `getBodyParam()` in `yii\web\Request` (WinterSilence, albertborsos)
|
||||||
- Bug #19386: Fix recursive calling `yii\helpers\BaseArrayHelper::htmlDecode()` (WinterSilence)
|
- Bug #19386: Fix recursive calling `yii\helpers\BaseArrayHelper::htmlDecode()` (WinterSilence)
|
||||||
|
- Enh #19416: Update and improve configurations for `yii\console\controllers\MessageController` (WinterSilence)
|
||||||
|
|
||||||
|
|
||||||
2.0.45 February 11, 2022
|
2.0.45 February 11, 2022
|
||||||
|
|||||||
@ -12,12 +12,17 @@ return [
|
|||||||
'messagePath' => __DIR__,
|
'messagePath' => __DIR__,
|
||||||
// array, required, list of language codes that the extracted messages
|
// array, required, list of language codes that the extracted messages
|
||||||
// should be translated to. For example, ['zh-CN', 'de'].
|
// should be translated to. For example, ['zh-CN', 'de'].
|
||||||
'languages' => ['af', 'ar', 'az', 'be', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'el', 'es', 'et', 'fa', 'fi', 'fr', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'it', 'ja', 'ka', 'kk', 'ko', 'kz', 'lt', 'lv', 'ms', 'nb-NO', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sr', 'sr-Latn', 'sv', 'tg', 'th', 'tr', 'uk', 'uz', 'uz-Cy', 'vi', 'zh-CN', 'zh-TW'],
|
'languages' => [
|
||||||
|
'af', 'ar', 'az', 'be', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'el', 'es', 'et', 'fa', 'fi', 'fr', 'he', 'hi',
|
||||||
|
'pt-BR', 'ro', 'hr', 'hu', 'hy', 'id', 'it', 'ja', 'ka', 'kk', 'ko', 'kz', 'lt', 'lv', 'ms', 'nb-NO', 'nl',
|
||||||
|
'pl', 'pt', 'ru', 'sk', 'sl', 'sr', 'sr-Latn', 'sv', 'tg', 'th', 'tr', 'uk', 'uz', 'uz-Cy', 'vi', 'zh-CN',
|
||||||
|
'zh-TW'
|
||||||
|
],
|
||||||
// string, the name of the function for translating messages.
|
// string, the name of the function for translating messages.
|
||||||
// Defaults to 'Yii::t'. This is used as a mark to find the messages to be
|
// 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
|
// translated. You may use a string for single function name or an array for
|
||||||
// multiple function names.
|
// multiple function names.
|
||||||
'translator' => 'Yii::t',
|
'translator' => ['\Yii::t', 'Yii::t'],
|
||||||
// boolean, whether to sort messages by keys when merging new messages
|
// boolean, whether to sort messages by keys when merging new messages
|
||||||
// with the existing ones. Defaults to false, which means the new (untranslated)
|
// with the existing ones. Defaults to false, which means the new (untranslated)
|
||||||
// messages will be separated from the old (translated) ones.
|
// messages will be separated from the old (translated) ones.
|
||||||
@ -39,13 +44,13 @@ return [
|
|||||||
// Note, the '/' characters in a pattern matches both '/' and '\'.
|
// Note, the '/' characters in a pattern matches both '/' and '\'.
|
||||||
// See helpers/FileHelper::findFiles() description for more details on pattern matching rules.
|
// See helpers/FileHelper::findFiles() description for more details on pattern matching rules.
|
||||||
'except' => [
|
'except' => [
|
||||||
'.svn',
|
'.*',
|
||||||
'.git',
|
'/.*',
|
||||||
'.gitignore',
|
|
||||||
'.gitkeep',
|
|
||||||
'.hgignore',
|
|
||||||
'.hgkeep',
|
|
||||||
'/messages',
|
'/messages',
|
||||||
|
'/tests',
|
||||||
|
'/runtime',
|
||||||
|
'/vendor',
|
||||||
|
'/BaseYii.php',
|
||||||
],
|
],
|
||||||
// array, list of patterns that specify which files (not directories) should be processed.
|
// array, list of patterns that specify which files (not directories) should be processed.
|
||||||
// If empty or not set, all files will be processed.
|
// If empty or not set, all files will be processed.
|
||||||
@ -53,9 +58,9 @@ return [
|
|||||||
// If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
|
// If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
|
||||||
'only' => ['*.php'],
|
'only' => ['*.php'],
|
||||||
'phpFileHeader' => '/**
|
'phpFileHeader' => '/**
|
||||||
* @link http://www.yiiframework.com/
|
* @link https://www.yiiframework.com/
|
||||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||||
* @license http://www.yiiframework.com/license/
|
* @license https://www.yiiframework.com/license/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
',
|
',
|
||||||
|
|||||||
@ -5,12 +5,17 @@ return [
|
|||||||
'sourcePath' => __DIR__ . DIRECTORY_SEPARATOR . '..',
|
'sourcePath' => __DIR__ . DIRECTORY_SEPARATOR . '..',
|
||||||
// array, required, list of language codes that the extracted messages
|
// array, required, list of language codes that the extracted messages
|
||||||
// should be translated to. For example, ['zh-CN', 'de'].
|
// should be translated to. For example, ['zh-CN', 'de'].
|
||||||
'languages' => ['de'],
|
'languages' => [
|
||||||
|
'af', 'ar', 'az', 'be', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'el', 'es', 'et', 'fa', 'fi', 'fr', 'he', 'hi',
|
||||||
|
'pt-BR', 'ro', 'hr', 'hu', 'hy', 'id', 'it', 'ja', 'ka', 'kk', 'ko', 'kz', 'lt', 'lv', 'ms', 'nb-NO', 'nl',
|
||||||
|
'pl', 'pt', 'ru', 'sk', 'sl', 'sr', 'sr-Latn', 'sv', 'tg', 'th', 'tr', 'uk', 'uz', 'uz-Cy', 'vi', 'zh-CN',
|
||||||
|
'zh-TW'
|
||||||
|
],
|
||||||
// string, the name of the function for translating messages.
|
// string, the name of the function for translating messages.
|
||||||
// Defaults to 'Yii::t'. This is used as a mark to find the messages to be
|
// 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
|
// translated. You may use a string for single function name or an array for
|
||||||
// multiple function names.
|
// multiple function names.
|
||||||
'translator' => 'Yii::t',
|
'translator' => ['\Yii::t', 'Yii::t'],
|
||||||
// boolean, whether to sort messages by keys when merging new messages
|
// boolean, whether to sort messages by keys when merging new messages
|
||||||
// with the existing ones. Defaults to false, which means the new (untranslated)
|
// with the existing ones. Defaults to false, which means the new (untranslated)
|
||||||
// messages will be separated from the old (translated) ones.
|
// messages will be separated from the old (translated) ones.
|
||||||
@ -31,15 +36,14 @@ return [
|
|||||||
// See helpers/FileHelper::findFiles() for pattern matching rules.
|
// See helpers/FileHelper::findFiles() for pattern matching rules.
|
||||||
// If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
|
// If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
|
||||||
'except' => [
|
'except' => [
|
||||||
'.svn',
|
'.*',
|
||||||
'.git',
|
'/.*',
|
||||||
'.gitignore',
|
|
||||||
'.gitkeep',
|
|
||||||
'.hgignore',
|
|
||||||
'.hgkeep',
|
|
||||||
'/messages',
|
'/messages',
|
||||||
|
'/tests',
|
||||||
|
'/runtime',
|
||||||
|
'/vendor',
|
||||||
|
'/BaseYii.php',
|
||||||
],
|
],
|
||||||
|
|
||||||
// 'php' output format is for saving messages to php files.
|
// 'php' output format is for saving messages to php files.
|
||||||
'format' => 'php',
|
'format' => 'php',
|
||||||
// Root directory containing message translations.
|
// Root directory containing message translations.
|
||||||
|
|||||||
Reference in New Issue
Block a user