Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
de87f43d
Commit
de87f43d
authored
Oct 02, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4292: The error messages for console commands will not be translated
parent
eec716d8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
Application.php
framework/console/Application.php
+1
-1
HelpController.php
framework/console/controllers/HelpController.php
+4
-6
No files found.
framework/console/Application.php
View file @
de87f43d
...
...
@@ -160,7 +160,7 @@ class Application extends \yii\base\Application
try
{
return
(
int
)
parent
::
runAction
(
$route
,
$params
);
}
catch
(
InvalidRouteException
$e
)
{
throw
new
Exception
(
Yii
::
t
(
'yii'
,
'Unknown command "{command}".'
,
[
'command'
=>
$route
])
,
0
,
$e
);
throw
new
Exception
(
"Unknown command
\"
$route
\"
."
,
0
,
$e
);
}
}
...
...
framework/console/controllers/HelpController.php
View file @
de87f43d
...
...
@@ -51,9 +51,8 @@ class HelpController extends Controller
if
(
$command
!==
null
)
{
$result
=
Yii
::
$app
->
createController
(
$command
);
if
(
$result
===
false
)
{
throw
new
Exception
(
Yii
::
t
(
'yii'
,
'No help for unknown command "{command}".'
,
[
'command'
=>
$this
->
ansiFormat
(
$command
,
Console
::
FG_YELLOW
),
]));
$name
=
$this
->
ansiFormat
(
$command
,
Console
::
FG_RED
);
throw
new
Exception
(
"No help for unknown command
\"
$name
\"
."
);
}
list
(
$controller
,
$actionID
)
=
$result
;
...
...
@@ -251,9 +250,8 @@ class HelpController extends Controller
{
$action
=
$controller
->
createAction
(
$actionID
);
if
(
$action
===
null
)
{
throw
new
Exception
(
Yii
::
t
(
'yii'
,
'No help for unknown sub-command "{command}".'
,
[
'command'
=>
rtrim
(
$controller
->
getUniqueId
()
.
'/'
.
$actionID
,
'/'
),
]));
$name
=
$this
->
ansiFormat
(
rtrim
(
$controller
->
getUniqueId
()
.
'/'
.
$actionID
,
'/'
),
Console
::
FG_RED
);
throw
new
Exception
(
"No help for unknown sub-command
\"
$name
\"
."
);
}
$description
=
$controller
->
getActionHelp
(
$action
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment