Commit a29df585 by Alexander Makarov

Removed translations for messages intended for developers

parent cc243457
...@@ -59,7 +59,7 @@ class EmailTarget extends Target ...@@ -59,7 +59,7 @@ class EmailTarget extends Target
// moved initialization of subject here because of the following issue // moved initialization of subject here because of the following issue
// https://github.com/yiisoft/yii2/issues/1446 // https://github.com/yiisoft/yii2/issues/1446
if (empty($this->message['subject'])) { if (empty($this->message['subject'])) {
$this->message['subject'] = Yii::t('yii', 'Application Log'); $this->message['subject'] = 'Application Log';
} }
$messages = array_map([$this, 'formatMessage'], $this->messages); $messages = array_map([$this, 'formatMessage'], $this->messages);
$body = wordwrap(implode("\n", $messages), 70); $body = wordwrap(implode("\n", $messages), 70);
......
...@@ -386,7 +386,7 @@ class Response extends \yii\base\Response ...@@ -386,7 +386,7 @@ class Response extends \yii\base\Response
$range = $this->getHttpRange($contentLength); $range = $this->getHttpRange($contentLength);
if ($range === false) { if ($range === false) {
$headers->set('Content-Range', "bytes */$contentLength"); $headers->set('Content-Range', "bytes */$contentLength");
throw new HttpException(416, Yii::t('yii', 'Requested range not satisfiable')); throw new HttpException(416, 'Requested range not satisfiable');
} }
$headers->setDefault('Pragma', 'public') $headers->setDefault('Pragma', 'public')
...@@ -428,7 +428,7 @@ class Response extends \yii\base\Response ...@@ -428,7 +428,7 @@ class Response extends \yii\base\Response
$range = $this->getHttpRange($fileSize); $range = $this->getHttpRange($fileSize);
if ($range === false) { if ($range === false) {
$headers->set('Content-Range', "bytes */$fileSize"); $headers->set('Content-Range', "bytes */$fileSize");
throw new HttpException(416, Yii::t('yii', 'Requested range not satisfiable')); throw new HttpException(416, 'Requested range not satisfiable');
} }
list($begin, $end) = $range; list($begin, $end) = $range;
......
...@@ -100,9 +100,7 @@ class VerbFilter extends Behavior ...@@ -100,9 +100,7 @@ class VerbFilter extends Behavior
$event->isValid = false; $event->isValid = false;
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7
Yii::$app->getResponse()->getHeaders()->set('Allow', implode(', ', $allowed)); Yii::$app->getResponse()->getHeaders()->set('Allow', implode(', ', $allowed));
throw new MethodNotAllowedHttpException(Yii::t('yii', 'Method Not Allowed. This url can only handle the following request methods: {methods}.', [ throw new MethodNotAllowedHttpException('Method Not Allowed. This url can only handle the following request methods: ' . implode(', ', $allowed) . '.');
'methods' => implode(', ', $allowed),
]));
} }
return $event->isValid; return $event->isValid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment