-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
translate/scan #48
Comments
Is your Translate Manager module configured properly in the console app? |
this my web.php $config = [ |
The module declaration is probably missing. Add this to your config in config/console.php: 'modules' => [
'translatemanager' => [
'class' => 'lajax\translatemanager\Module',
],
], |
Sorry, I mean |
Also you should have the same configuration for web and console. I am not very familiar with the basic app, but I think you should create a separate module config file for the extension, then require in each config file. Create console/translatemanager.php: return [
'class' => 'lajax\translatemanager\Module',
// additional config ...
]; In the web.php and console.php: 'modules' => [
'translatemanager' => require(__DIR__ . '/translatemanager.php'),
], |
Ok, very thanks. console.php return [ and web.php $config = [ ....
|
Good day,
I try ./yii translate/scan
and
Scanning translations...
PHP Notice 'yii\base\ErrorException' with message 'Trying to get property of non-object'
in /var/www/html/yii/vendor/lajax/yii2-translate-manager/services/Scanner.php:68
Stack trace:
#0 /var/www/html/yii/vendor/lajax/yii2-translate-manager/services/Scanner.php(68): yii\base\ErrorHandler->handleError(8, 'Trying to get p...', '/var/www/html/g...', 68, Array)
#1 /var/www/html/yii/vendor/lajax/yii2-translate-manager/commands/TranslatemanagerController.php(37): lajax\translatemanager\services\Scanner->run()
#2 [internal function]: lajax\translatemanager\commands\TranslatemanagerController->actionScan()
#3 /var/www/html/yii/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#4 /var/www/html/yii/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#5 /var/www/html/yii/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('scan', Array)
#6 /var/www/html/yii/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('scan', Array)
#7 /var/www/html/yii/vendor/yiisoft/yii2/console/Application.php(167): yii\base\Module->runAction('translate/scan', Array)
#8 /var/www/html/yii/vendor/yiisoft/yii2/console/Application.php(143): yii\console\Application->runAction('translate/scan', Array)
#9 /var/www/html/yii/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#10 /var/www/html/yii/yii(19): yii\base\Application->run()
#11 {main}
The text was updated successfully, but these errors were encountered: