Browse Source

Removed translations for messages intended for developers

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
a29df58516
  1. 2
      framework/yii/log/EmailTarget.php
  2. 4
      framework/yii/web/Response.php
  3. 4
      framework/yii/web/VerbFilter.php

2
framework/yii/log/EmailTarget.php

@ -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);

4
framework/yii/web/Response.php

@ -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
$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;

4
framework/yii/web/VerbFilter.php

@ -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;

Loading…
Cancel
Save