diff --git a/backend/modules/content/views/article/_form.php b/backend/modules/content/views/article/_form.php index 665fab2ed..3eb1f38fc 100644 --- a/backend/modules/content/views/article/_form.php +++ b/backend/modules/content/views/article/_form.php @@ -21,7 +21,7 @@ field($model, 'title')->textInput(['maxlength' => true]) ?> field($model, 'slug') - ->hint(Yii::t('backend', 'If you\'ll leave this field empty, slug will be generated automatically')) + ->hint(Yii::t('backend', 'If you leave this field empty, the slug will be generated automatically')) ->textInput(['maxlength' => true]) ?> field($model, 'category_id')->dropDownList(\yii\helpers\ArrayHelper::map( diff --git a/backend/modules/content/views/category/_form.php b/backend/modules/content/views/category/_form.php index 82151c360..fbd3e5f5e 100644 --- a/backend/modules/content/views/category/_form.php +++ b/backend/modules/content/views/category/_form.php @@ -19,7 +19,7 @@ field($model, 'title')->textInput(['maxlength' => 512]) ?> field($model, 'slug') - ->hint(Yii::t('backend', 'If you\'ll leave this field empty, slug will be generated automatically')) + ->hint(Yii::t('backend', 'If you leave this field empty, the slug will be generated automatically')) ->textInput(['maxlength' => 1024]) ?> field($model, 'parent_id')->dropDownList($categories, ['prompt' => '']) ?> diff --git a/common/messages/es/backend.php b/common/messages/es/backend.php index fc1b003ad..351ac3220 100644 --- a/common/messages/es/backend.php +++ b/common/messages/es/backend.php @@ -72,7 +72,7 @@ 'I18n Messages' => 'Textos I18N', 'I18n Source Messages' => 'Textos Originales I18N', 'ID' => 'ID', - 'If you\'ll leave this field empty, slug will be generated automatically' => 'Si dejas este campo vacío, el slug se generará de forma automática', + 'If you leave this field empty, the slug will be generated automatically' => 'Si dejas este campo vacío, el slug se generará de forma automática', 'Incorrect username or password.' => 'Nombre usuario o contraseña incorrecto', 'Internal IP' => 'IP interna', 'Invalidate tag' => 'Etiqueta no válida', diff --git a/common/messages/pl/backend.php b/common/messages/pl/backend.php index ce1bc2658..83e96e050 100644 --- a/common/messages/pl/backend.php +++ b/common/messages/pl/backend.php @@ -69,7 +69,7 @@ 'I18n Messages' => 'I18n Tłumaczenia', 'I18n Source Messages' => 'I18n Teksty', 'ID' => 'ID', - 'If you\'ll leave this field empty, slug will be generated automatically' => 'Jeżeli zostawisz te pole puste slug zostanie utworzony automatycznie', + 'If you leave this field empty, the slug will be generated automatically' => 'Jeżeli zostawisz te pole puste slug zostanie utworzony automatycznie', 'Incorrect username or password.' => 'Nieprawidłowa nazwa użytkownika lub hasło', 'Internal IP' => 'Wewnętrzne IP', 'Invalidate tag' => 'Unieważnij tag', diff --git a/common/messages/pt-BR/backend.php b/common/messages/pt-BR/backend.php index 00511751e..355402d97 100644 --- a/common/messages/pt-BR/backend.php +++ b/common/messages/pt-BR/backend.php @@ -72,7 +72,7 @@ 'I18n Messages' => 'Mensagens I18N', 'I18n Source Messages' => 'Fonte de Mensagens I18N', 'ID' => 'ID', - 'If you\'ll leave this field empty, slug will be generated automatically' => 'Se deixar esse campo vazio, slug será gerado automaticamente', + 'If you leave this field empty, the slug will be generated automatically' => 'Se deixar esse campo vazio, slug será gerado automaticamente', 'Incorrect username or password.' => 'Usuário ou senha incorreto', 'Internal IP' => 'IP interno', 'Invalidate tag' => 'Etiqueta inválida', diff --git a/common/messages/ru/backend.php b/common/messages/ru/backend.php index 793b52a00..19b45be26 100644 --- a/common/messages/ru/backend.php +++ b/common/messages/ru/backend.php @@ -69,7 +69,7 @@ 'I18n Messages' => 'I18N переводы', 'I18n Source Messages' => 'Тексты', 'ID' => 'ID', - 'If you\'ll leave this field empty, slug will be generated automatically' => 'Если вы оставите это поле пустым, ЧПУ будет сгенерирован автоматически', + 'If you leave this field empty, the slug will be generated automatically' => 'Если вы оставите это поле пустым, ЧПУ будет сгенерирован автоматически', 'Incorrect username or password.' => 'Неправильный логин или пароль', 'Internal IP' => 'Внутренний IP', 'Invalidate tag' => 'Сбросить тег', diff --git a/common/messages/uk/backend.php b/common/messages/uk/backend.php index 703d658ef..6e310eb3e 100644 --- a/common/messages/uk/backend.php +++ b/common/messages/uk/backend.php @@ -69,7 +69,7 @@ 'I18n Messages' => 'I18N переклади', 'I18n Source Messages' => 'Тексти', 'ID' => 'ID', - 'If you\'ll leave this field empty, slug will be generated automatically' => 'Якщо ви залишете це поле пустим, ЧПУ буде сгенеровано автоматично', + 'If you leave this field empty, the slug will be generated automatically' => 'Якщо ви залишете це поле пустим, ЧПУ буде сгенеровано автоматично', 'Incorrect username or password.' => 'Неправильні им’я користувача або пароль', 'Internal IP' => 'Внутрішній IP', 'Invalidate tag' => 'Скинути тег', diff --git a/common/messages/vi/backend.php b/common/messages/vi/backend.php index 2852e3b02..aa63757d7 100644 --- a/common/messages/vi/backend.php +++ b/common/messages/vi/backend.php @@ -72,7 +72,7 @@ 'I18n Messages' => 'I18N Messages', 'I18n Source Messages' => 'I18n Source Messages', 'ID' => 'ID', - 'If you\'ll leave this field empty, slug will be generated automatically' => 'Nếu bạn để trống, slug sẽ được tạo tự động', + 'If you leave this field empty, the slug will be generated automatically' => 'Nếu bạn để trống, slug sẽ được tạo tự động', 'Incorrect username or password.' => 'Sai tên đăng nhập hoặc mật khẩu', 'Internal IP' => 'Internal IP', 'Invalidate tag' => 'Invalidate tag', diff --git a/common/messages/zh/backend.php b/common/messages/zh/backend.php index 96f2e38cb..8ee94a60b 100644 --- a/common/messages/zh/backend.php +++ b/common/messages/zh/backend.php @@ -72,7 +72,7 @@ 'I18n Messages' => '国际化信息', 'I18n Source Messages' => '国际化源信息', 'ID' => 'ID', - 'If you\'ll leave this field empty, slug will be generated automatically' => '如果该字段留空的话,系统将自动生成一个slug', + 'If you leave this field empty, the slug will be generated automatically' => '如果该字段留空的话,系统将自动生成一个slug', 'Incorrect username or password.' => '用户名或密码错误', 'Internal IP' => '内网IP', 'Invalidate tag' => '无效的标签', diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index a3fc28e66..93f736bb7 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -3,8 +3,6 @@ namespace frontend\controllers; use cheatsheet\Time; -use common\sitemap\ArticleUrlGenerator; -use common\sitemap\PageUrlGenerator; use common\sitemap\UrlsIterator; use frontend\models\ContactForm; use Sitemaped\Element\Urlset\Urlset; @@ -75,12 +73,12 @@ public function actionContact() 'options' => ['class' => 'alert-success'] ]); return $this->refresh(); - } else { - Yii::$app->getSession()->setFlash('alert', [ - 'body' => \Yii::t('frontend', 'There was an error sending email.'), - 'options' => ['class' => 'alert-danger'] - ]); } + + Yii::$app->getSession()->setFlash('alert', [ + 'body' => \Yii::t('frontend', 'There was an error sending email.'), + 'options' => ['class' => 'alert-danger'] + ]); } return $this->render('contact', [ @@ -92,6 +90,7 @@ public function actionContact() * @param string $format * @param bool $gzip * @return string + * @throws BadRequestHttpException */ public function actionSitemap($format = Sitemap::FORMAT_XML, $gzip = false) {