Browse Source

applied new style of Yii::t params to all occurences

tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
6507e2e316
  1. 3
      framework/yii/console/Application.php
  2. 4
      framework/yii/console/Controller.php
  3. 4
      framework/yii/console/controllers/HelpController.php
  4. 2
      framework/yii/web/Controller.php

3
framework/yii/console/Application.php

@ -9,6 +9,7 @@
namespace yii\console; namespace yii\console;
use Yii;
use yii\base\InvalidRouteException; use yii\base\InvalidRouteException;
/** /**
@ -129,7 +130,7 @@ class Application extends \yii\base\Application
try { try {
return parent::runAction($route, $params); return parent::runAction($route, $params);
} catch (InvalidRouteException $e) { } catch (InvalidRouteException $e) {
throw new Exception(\Yii::t('yii', 'Unknown command "{command}".', array('{command}' => $route)), 0, $e); throw new Exception(Yii::t('yii', 'Unknown command "{command}".', array('command' => $route)), 0, $e);
} }
} }

4
framework/yii/console/Controller.php

@ -99,7 +99,7 @@ class Controller extends \yii\base\Controller
$args[] = $value; $args[] = $value;
} else { } else {
throw new Exception(Yii::t('yii', 'Unknown option: --{name}', array( throw new Exception(Yii::t('yii', 'Unknown option: --{name}', array(
'{name}' => $name, 'name' => $name,
))); )));
} }
} }
@ -125,7 +125,7 @@ class Controller extends \yii\base\Controller
if (!empty($missing)) { if (!empty($missing)) {
throw new Exception(Yii::t('yii', 'Missing required arguments: {params}', array( throw new Exception(Yii::t('yii', 'Missing required arguments: {params}', array(
'{params}' => implode(', ', $missing), 'params' => implode(', ', $missing),
))); )));
} }

4
framework/yii/console/controllers/HelpController.php

@ -58,7 +58,7 @@ class HelpController extends Controller
$result = Yii::$app->createController($command); $result = Yii::$app->createController($command);
if ($result === false) { if ($result === false) {
throw new Exception(Yii::t('yii', 'No help for unknown command "{command}".', array( throw new Exception(Yii::t('yii', 'No help for unknown command "{command}".', array(
'{command}' => $this->ansiFormat($command, Console::FG_YELLOW), 'command' => $this->ansiFormat($command, Console::FG_YELLOW),
))); )));
} }
@ -243,7 +243,7 @@ class HelpController extends Controller
$action = $controller->createAction($actionID); $action = $controller->createAction($actionID);
if ($action === null) { if ($action === null) {
throw new Exception(Yii::t('yii', 'No help for unknown sub-command "{command}".', array( throw new Exception(Yii::t('yii', 'No help for unknown sub-command "{command}".', array(
'{command}' => rtrim($controller->getUniqueId() . '/' . $actionID, '/'), 'command' => rtrim($controller->getUniqueId() . '/' . $actionID, '/'),
))); )));
} }
if ($action instanceof InlineAction) { if ($action instanceof InlineAction) {

2
framework/yii/web/Controller.php

@ -60,7 +60,7 @@ class Controller extends \yii\base\Controller
if (!empty($missing)) { if (!empty($missing)) {
throw new HttpException(400, Yii::t('yii', 'Missing required parameters: {params}', array( throw new HttpException(400, Yii::t('yii', 'Missing required parameters: {params}', array(
'{params}' => implode(', ', $missing), 'params' => implode(', ', $missing),
))); )));
} }

Loading…
Cancel
Save