I have Yii2 basic application and it takes long time to start execute yii message/extract command. Is there something wrong? or it is like this as usual?
I have three locales messages folder, ar, fr and de.
I have Yii2 basic application and it takes long time to start execute yii message/extract command. Is there something wrong? or it is like this as usual?
I have three locales messages folder, ar, fr and de.
Have you configured it so it is scanning your application code only?
I don’t know exactly but the following is a copy of app/config/i18n.php:
return [
'color' => null,
'interactive' => true,
'sourcePath' => dirname(__dir__),
'messagePath' => dirname(__dir__). DIRECTORY_SEPARATOR . 'messages',
'languages' => ['ar','es','de'],
'translator' => 'Yii::t',
'sort' => false,
'overwrite' => true,
'removeUnused' => false,
'markUnused' => true,
'except' => [
'.svn',
'.git',
'.gitignore',
'.gitkeep',
'.hgignore',
'.hgkeep',
'/messages',
'/BaseYii.php',
],
'only' => [
'*.php',
],
'format' => 'php',
'db' => 'db',
'sourceMessageTable' => '{{%source_message}}',
'messageTable' => '{{%message}}',
'catalog' => 'messages',
'ignoreCategories' => [],
];
Try adding vendor to except list.
Wow! after adding /vendor to the except list, also I added /web, it worked as a bullet shot! thanks.