From 809b0ee345170fbd99ea933bb8c7f53a56fc5737 Mon Sep 17 00:00:00 2001 From: Eugeny Galkovskiy Date: Fri, 29 Sep 2017 16:20:47 +0300 Subject: [PATCH] Переводы 1 --- backend/config/main.php | 1 + backend/views/ajax/_table.php | 2 +- backend/views/layouts/main.php | 16 ++++++++-------- backend/views/layouts/menu_items.php | 32 ++++++++++++++++---------------- backend/views/persone/_form.php | 2 +- backend/views/persone/_search.php | 4 ++-- backend/views/persone/create.php | 4 ++-- backend/views/persone/index.php | 4 ++-- backend/views/persone/update.php | 6 +++--- backend/views/persone/view.php | 4 ++-- backend/views/settings/_contact_tab.php | 6 +++--- backend/views/settings/codes.php | 4 ++-- backend/views/settings/robots.php | 2 +- backend/views/settings/settings.php | 10 +++++----- backend/views/site/error.php | 8 ++++---- backend/views/site/gallery.php | 4 ++-- backend/views/site/index.php | 2 +- backend/views/site/instruction.php | 2 +- backend/views/sitemap/index.php | 6 +++--- backend/views/sitemap/update.php | 42 +++++++++++++++++++++--------------------- common/config/main.php | 2 +- common/messages/en/app.php | 7 ++++++- common/messages/en/core.php | 2 ++ common/messages/ru/app.php | 14 +++++++++++++- common/messages/ru/core.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ frontend/widgets/views/_sidebar.php | 4 ++-- 26 files changed, 154 insertions(+), 85 deletions(-) create mode 100644 common/messages/en/core.php create mode 100644 common/messages/ru/core.php diff --git a/backend/config/main.php b/backend/config/main.php index 216d1c3..d67e0c6 100755 --- a/backend/config/main.php +++ b/backend/config/main.php @@ -13,6 +13,7 @@ return [ 'id' => 'app-backend', 'homeUrl' => '/admin', + 'language' => 'ru', 'basePath' => dirname(__DIR__), 'controllerNamespace' => 'backend\controllers', 'bootstrap' => [ 'log' ], diff --git a/backend/views/ajax/_table.php b/backend/views/ajax/_table.php index cff995e..5451e74 100755 --- a/backend/views/ajax/_table.php +++ b/backend/views/ajax/_table.php @@ -14,7 +14,7 @@ # - Sessions + Сессии diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php index d05a9bc..3a37792 100755 --- a/backend/views/layouts/main.php +++ b/backend/views/layouts/main.php @@ -80,7 +80,7 @@ ( empty( $avatar ) ? 'http://placehold.it/128x128' : $avatar ), [ 'alt' => $userData->fullname, - 'title' => \Yii::t('core', 'Change image'), + 'title' => \Yii::t('core', 'Изменить изображение'), 'class' => 'img-circle profile_img', ] ), @@ -89,14 +89,14 @@ ?>
- +

fullname, [ 'profile/index' ], [ - 'title' => \Yii::t('core', 'Change name'), + 'title' => \Yii::t('core', 'Изменить имя'), ] ); ?> @@ -153,7 +153,7 @@ 'i', '', [ 'class' => 'fa fa-user pull-right' ] - ) . ' Profile', + ) . ' Профиль', [ '/profile' ] ) ?> @@ -163,7 +163,7 @@ 'i', '', [ 'class' => 'fa fa-cogs pull-right' ] - ) . ' Settings', + ) . ' Настройки', [ '/settings' ] ) ?> @@ -173,7 +173,7 @@ 'i', '', [ 'class' => 'fa fa-sign-out pull-right' ] - ) . ' Log out', + ) . ' Выйти', [ '/site/logout' ], [ 'data-method' => 'POST', @@ -202,9 +202,9 @@
diff --git a/backend/views/layouts/menu_items.php b/backend/views/layouts/menu_items.php index 27f659f..b79ac6a 100755 --- a/backend/views/layouts/menu_items.php +++ b/backend/views/layouts/menu_items.php @@ -8,7 +8,7 @@ if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) { $homeLink = [ [ - 'label' => \Yii::t('core', 'My website'), + 'label' => \Yii::t('core', 'Мой сайт'), 'url' => $urlManagerFrontend->createUrl([ 'site/index' ]), 'icon' => 'home', 'template' => '{icon}{label}{badge}', @@ -22,7 +22,7 @@ $homeLink, [ [ - 'label' => \Yii::t('core', 'Main'), + 'label' => \Yii::t('core', 'Главная'), 'url' => [ '/site/index' ], 'icon' => ( \Yii::$app->controller->id === 'site' ) ? 'check' : 'undo', 'active' => function () { @@ -30,17 +30,17 @@ }, ], [ - 'label' => \Yii::t('core', 'Static pages'), + 'label' => \Yii::t('core', 'Статические страницы'), 'url' => '#', 'icon' => 'file-text', 'items' => [ [ - 'label' => \Yii::t('core', 'Pages'), + 'label' => \Yii::t('core', 'Страницы'), 'url' => [ '/page/index' ], 'icon' => 'file-text', ], [ - 'label' => \Yii::t('core', 'Categories'), + 'label' => \Yii::t('core', 'Категории'), 'url' => [ '/page-category/index' ], 'icon' => 'archive', ], @@ -52,7 +52,7 @@ 'icon' => 'leaf', 'items' => [ [ - 'label' => \Yii::t('core', 'Seo pages'), + 'label' => \Yii::t('core', 'Seo страницы'), 'url' => [ '/alias/index' ], 'icon' => 'file-text', ], @@ -62,56 +62,56 @@ 'icon' => 'android', ], [ - 'label' => \Yii::t('core', 'Codes'), + 'label' => \Yii::t('core', 'Коды'), 'url' => [ '/settings/codes' ], 'icon' => 'code', ], [ - 'label' => \Yii::t('core', 'Sitemap'), + 'label' => \Yii::t('core', 'Карта сайта'), 'url' => [ '/sitemap/index' ], 'icon' => 'map-signs', ], ], ], [ - 'label' => \Yii::t('core', 'Blog'), + 'label' => \Yii::t('core', 'Блог'), 'url' => '#', 'icon' => 'pencil', 'items' => [ [ - 'label' => \Yii::t('blog', 'Articles'), + 'label' => \Yii::t('blog', 'Статьи'), 'url' => [ '/blog-article/index' ], 'icon' => 'file-text', ], [ - 'label' => \Yii::t('blog', 'Categories'), + 'label' => \Yii::t('blog', 'Категории'), 'url' => [ '/blog-category/index' ], 'icon' => 'list', ], [ - 'label' => \Yii::t('blog', 'Tags'), + 'label' => \Yii::t('blog', 'Теги'), 'url' => [ '/blog-tag/index' ], 'icon' => 'code', ], ], ], [ - 'label' => \Yii::t('app', 'Persones'), + 'label' => \Yii::t('app', 'Персонал'), 'url' => [ 'persone/index' ], 'icon' => 'users', ], [ - 'label' => \Yii::t('core', 'Image manager'), + 'label' => \Yii::t('core', 'Менеджер изображений'), 'url' => [ '/imagemanager' ], 'icon' => 'image', ], [ - 'label' => \Yii::t('artbox-comment', 'Comments'), + 'label' => \Yii::t('artbox-comment', 'Комментарии'), 'url' => [ '/comment' ], 'icon' => 'comment', ], [ - 'label' => \Yii::t('app', 'Gallery'), + 'label' => \Yii::t('app', 'Галерея'), 'url' => [ 'site/gallery' ], 'icon' => 'camera', ], diff --git a/backend/views/persone/_form.php b/backend/views/persone/_form.php index 4ab2a0d..9f440b3 100644 --- a/backend/views/persone/_form.php +++ b/backend/views/persone/_form.php @@ -44,7 +44,7 @@
isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), + $model->isNewRecord ? Yii::t('app', 'Создать') : Yii::t('app', 'Обновить'), [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ] ) ?>
diff --git a/backend/views/persone/_search.php b/backend/views/persone/_search.php index b454bbf..e89b966 100644 --- a/backend/views/persone/_search.php +++ b/backend/views/persone/_search.php @@ -20,8 +20,8 @@ use yii\widgets\ActiveForm; field($model, 'image_id') ?>
- 'btn btn-primary']) ?> - 'btn btn-default']) ?> + 'btn btn-primary']) ?> + 'btn btn-default']) ?>
diff --git a/backend/views/persone/create.php b/backend/views/persone/create.php index ce7ad9e..446b3aa 100644 --- a/backend/views/persone/create.php +++ b/backend/views/persone/create.php @@ -11,9 +11,9 @@ * @var PersoneLang[] $modelLangs */ - $this->title = Yii::t('app', 'Create Persone'); + $this->title = Yii::t('app', 'Добавить сотрудника'); $this->params[ 'breadcrumbs' ][] = [ - 'label' => Yii::t('app', 'Persones'), + 'label' => Yii::t('app', 'Персонал'), 'url' => [ 'index' ], ]; $this->params[ 'breadcrumbs' ][] = $this->title; diff --git a/backend/views/persone/index.php b/backend/views/persone/index.php index 697c146..3e1dff3 100644 --- a/backend/views/persone/index.php +++ b/backend/views/persone/index.php @@ -14,7 +14,7 @@ * @var PersoneSearch $searchModel */ - $this->title = Yii::t('app', 'Persones'); + $this->title = Yii::t('app', 'Персонал'); $this->params[ 'breadcrumbs' ][] = $this->title; ?>
@@ -27,7 +27,7 @@ render('_search', ['model' => $searchModel]); ?>

- 'btn btn-success' ]) ?> + 'btn btn-success' ]) ?>

'Persone', + 'modelClass' => 'Сотрудник', ] ) . $model->id; $this->params[ 'breadcrumbs' ][] = [ - 'label' => Yii::t('app', 'Persones'), + 'label' => Yii::t('app', 'Персонал'), 'url' => [ 'index' ], ]; $this->params[ 'breadcrumbs' ][] = [ @@ -29,7 +29,7 @@ 'id' => $model->id, ], ]; - $this->params[ 'breadcrumbs' ][] = Yii::t('app', 'Update'); + $this->params[ 'breadcrumbs' ][] = Yii::t('app', 'Обновить'); ?>
diff --git a/backend/views/persone/view.php b/backend/views/persone/view.php index be4dace..1a30b40 100644 --- a/backend/views/persone/view.php +++ b/backend/views/persone/view.php @@ -13,7 +13,7 @@ $this->title = $model->id; $this->params[ 'breadcrumbs' ][] = [ - 'label' => Yii::t('app', 'Persones'), + 'label' => Yii::t('app', 'Персонал'), 'url' => [ 'index' ], ]; $this->params[ 'breadcrumbs' ][] = $this->title; @@ -28,7 +28,7 @@

$model->id, diff --git a/backend/views/settings/_contact_tab.php b/backend/views/settings/_contact_tab.php index d20c83b..909f389 100755 --- a/backend/views/settings/_contact_tab.php +++ b/backend/views/settings/_contact_tab.php @@ -10,13 +10,13 @@ */ echo $form->field($model, 'phone') ->textInput() - ->hint(\Yii::t('core', 'Contact phone for website')); + ->hint(\Yii::t('core', 'Контактный телефон для сайта')); echo $form->field($model, 'phone2') ->textInput() - ->hint(\Yii::t('core', 'Contact phone for website')); + ->hint(\Yii::t('core', 'Контактный телефон для сайта')); echo $form->field($model, 'email') ->textInput() - ->hint(\Yii::t('core', 'Contact email for website')); + ->hint(\Yii::t('core', 'Контактный email для сайта')); echo $form->field($model, 'skype') ->textInput(); echo $form->field($model, 'house') diff --git a/backend/views/settings/codes.php b/backend/views/settings/codes.php index fbc8577..d8597d1 100755 --- a/backend/views/settings/codes.php +++ b/backend/views/settings/codes.php @@ -10,7 +10,7 @@ use yii\web\View; use yiister\gentelella\widgets\Panel; - $this->title = Yii::t('core', 'Codes'); + $this->title = Yii::t('core', 'Коды'); $this->params[ 'breadcrumbs' ][] = $this->title; ?> @@ -36,7 +36,7 @@ ->textInput(); echo Html::submitButton( - \Yii::t('core', 'Save'), + \Yii::t('core', 'Сохранить'), [ 'class' => 'btn btn-primary', ] diff --git a/backend/views/settings/robots.php b/backend/views/settings/robots.php index b832f85..7333c8a 100755 --- a/backend/views/settings/robots.php +++ b/backend/views/settings/robots.php @@ -31,7 +31,7 @@ ->textarea([ 'rows' => 15 ]); echo Html::submitButton( - \Yii::t('core', 'Save'), + \Yii::t('core', 'Сохранить'), [ 'class' => 'btn btn-primary', ] diff --git a/backend/views/settings/settings.php b/backend/views/settings/settings.php index 09f9591..b40d491 100755 --- a/backend/views/settings/settings.php +++ b/backend/views/settings/settings.php @@ -36,7 +36,7 @@ ], 'items' => [ [ - 'label' => \Yii::t('core', 'Main'), + 'label' => \Yii::t('core', 'Главная'), 'content' => $this->render( '_main_tab', [ @@ -46,7 +46,7 @@ ), ], [ - 'label' => \Yii::t('core', 'Contact'), + 'label' => \Yii::t('core', 'Контакты'), 'content' => $this->render( '_contact_tab', [ @@ -56,7 +56,7 @@ ), ], [ - 'label' => \Yii::t('core', 'Social'), + 'label' => \Yii::t('core', 'Социальные сети'), 'content' => $this->render( '_social_tab', [ @@ -66,7 +66,7 @@ ), ], [ - 'label' => \Yii::t('core', 'Codes'), + 'label' => \Yii::t('core', 'Коды'), 'content' => $this->render( '_codes_tab', [ @@ -90,7 +90,7 @@ ); echo Html::submitButton( - 'Save', + 'Сохранить', [ 'class' => 'btn btn-primary', ] diff --git a/backend/views/site/error.php b/backend/views/site/error.php index 877471a..371798e 100755 --- a/backend/views/site/error.php +++ b/backend/views/site/error.php @@ -18,14 +18,14 @@

- Obaju template +

-

We are sorry - this page is not here anymore

-

Error 404 - Page not found

+

Извините, страница не доступна по данному адресу

+

Ошибка 404 - Страница не найдена

-

Go to Homepage +

Вернуться на главную

diff --git a/backend/views/site/gallery.php b/backend/views/site/gallery.php index a32a185..f84e934 100755 --- a/backend/views/site/gallery.php +++ b/backend/views/site/gallery.php @@ -13,7 +13,7 @@ Panel::begin( [ - 'header' => 'Gallery', + 'header' => 'Галерея', ] ); @@ -29,7 +29,7 @@
'btn btn-lg btn-primary', ] diff --git a/backend/views/site/index.php b/backend/views/site/index.php index 78eaa57..9dd737a 100755 --- a/backend/views/site/index.php +++ b/backend/views/site/index.php @@ -23,7 +23,7 @@
0
-

Sessions

+

Сессии

Lorem ipsum psdea itgum rixt.

diff --git a/backend/views/site/instruction.php b/backend/views/site/instruction.php index cf0473d..e2a09df 100755 --- a/backend/views/site/instruction.php +++ b/backend/views/site/instruction.php @@ -15,7 +15,7 @@
'Instruction', + 'header' => 'Инструкции', ] ) ?>
diff --git a/backend/views/sitemap/index.php b/backend/views/sitemap/index.php index ace4e26..55a565f 100755 --- a/backend/views/sitemap/index.php +++ b/backend/views/sitemap/index.php @@ -34,7 +34,7 @@ [ 'prefix' => 'fa fa-', ] - ) . \Yii::t('core', 'Edit'), + ) . \Yii::t('core', 'Редактировать'), [ 'update' ], [ 'class' => 'btn btn-app', @@ -53,7 +53,7 @@ ] ) . Html::tag( 'span', - \Yii::t('core', 'Generate'), + \Yii::t('core', 'Сгенерировать'), [ 'class' => 'indexed', ] @@ -80,7 +80,7 @@ echo Html::tag( 'div', Html::a( - \Yii::t('core', 'View generated sitemap.xml'), + \Yii::t('core', 'Посмотреть сгенерированный sitemap.xml'), $sitemap->getUrl(), [ 'target' => '_blank', diff --git a/backend/views/sitemap/update.php b/backend/views/sitemap/update.php index 7613798..0a53531 100755 --- a/backend/views/sitemap/update.php +++ b/backend/views/sitemap/update.php @@ -13,15 +13,15 @@ * @var SitemapDynamic[] $entity_models */ $this->params[ 'breadcrumbs' ][] = [ - 'label' => \Yii::t('core', 'Sitemap'), + 'label' => \Yii::t('core', 'Карта сайта'), 'url' => [ 'index' ], ]; - $this->title = \Yii::t('core', 'Update sitemap'); + $this->title = \Yii::t('core', 'Обновить карту сайта'); $this->params[ 'breadcrumbs' ][] = $this->title; $form = ActiveForm::begin(); $xPanel = Panel::begin( [ - 'header' => \Yii::t('core', 'Static pages'), + 'header' => \Yii::t('core', 'Статические страницы'), 'collapsable' => true, 'options' => [ 'class' => 'x_panel dynamic_fields', @@ -51,13 +51,13 @@ ) ->dropDownList( [ - 'always' => 'always', - 'hourly' => 'hourly', - 'daily' => 'daily', - 'weekly' => 'weekly', - 'monthly' => 'monthly', - 'yearly' => 'yearly', - 'never' => 'never', + 'always' => 'всегда', + 'hourly' => 'ежечасно', + 'daily' => 'ежедневно', + 'weekly' => 'еженедельно', + 'monthly' => 'ежемесячно', + 'yearly' => 'ежегодно', + 'never' => 'никогда', ] ) . $form->field( $model, @@ -81,7 +81,7 @@ ); } echo Html::button( - \Yii::t('core', 'Add field'), + \Yii::t('core', 'Добавить поле'), [ 'class' => 'btn btn-default', 'onclick' => 'sitemap_add(this)', @@ -93,7 +93,7 @@ $xPanel::end(); $xPanel2 = Panel::begin( [ - 'header' => \Yii::t('core', 'Dynamic pages'), + 'header' => \Yii::t('core', 'Динамические страницы'), 'collapsable' => true, ] ); @@ -141,13 +141,13 @@ ->label(false) ->dropDownList( [ - 'always' => 'always', - 'hourly' => 'hourly', - 'daily' => 'daily', - 'weekly' => 'weekly', - 'monthly' => 'monthly', - 'yearly' => 'yearly', - 'never' => 'never', + 'always' => 'всегда', + 'hourly' => 'ежечасно', + 'daily' => 'ежедневно', + 'weekly' => 'еженедельно', + 'monthly' => 'ежемесячно', + 'yearly' => 'ежегодно', + 'never' => 'никогда', ] ); ?> @@ -170,13 +170,13 @@ } $xPanel2::end(); echo Html::submitButton( - \Yii::t('core', 'Save'), + \Yii::t('core', 'Сохранить'), [ 'class' => 'btn btn-success', ] ); echo Html::submitButton( - \Yii::t('core', 'Save and generate'), + \Yii::t('core', 'Сохранить и сгенерировать'), [ 'class' => 'btn btn-primary', 'name' => 'action', diff --git a/common/config/main.php b/common/config/main.php index 025ffa8..9a735ed 100755 --- a/common/config/main.php +++ b/common/config/main.php @@ -30,7 +30,7 @@ 'translations' => [ 'core' => [ 'class' => 'yii\i18n\PhpMessageSource', - 'basePath' => '@artbox/core/messages', + 'basePath' => '@common/messages', ], 'app' => [ 'class' => 'yii\i18n\PhpMessageSource', diff --git a/common/messages/en/app.php b/common/messages/en/app.php index e3b6834..1e33138 100755 --- a/common/messages/en/app.php +++ b/common/messages/en/app.php @@ -1,2 +1,7 @@ 'Главная', + 'Submit' => 'Применить', + 'Save' => 'Сохранить', + 'Company name' => 'Название компании', +]; \ No newline at end of file diff --git a/common/messages/en/core.php b/common/messages/en/core.php new file mode 100644 index 0000000..a1b26e6 --- /dev/null +++ b/common/messages/en/core.php @@ -0,0 +1,2 @@ + 'Главная', + 'Submit' => 'Применить', + 'Save' => 'Сохранить', + 'Company name' => 'Название компании', + 'Profile' => 'Профиль', + 'Host' => 'Сервер', + 'User' => 'Логин', + 'Pass' => 'Пароль', + 'Create Page' => 'Создать страницу', + 'Add' => 'Добавить', + 'Blog Articles' => 'Список статей', + ]; \ No newline at end of file diff --git a/common/messages/ru/core.php b/common/messages/ru/core.php new file mode 100644 index 0000000..3c6c145 --- /dev/null +++ b/common/messages/ru/core.php @@ -0,0 +1,49 @@ + 'Главная', + 'Submit' => 'Применить', + 'Save' => 'Сохранить', + 'Company name' => 'Название компании', + 'Old password' => 'Старый пароль', + 'New password' => 'Новый пароль', + 'New password repeat' => 'Повторить новый пароль', + 'Profile information' => 'Информация о профиле', + 'Personal information' => 'Персональная информация', + 'Change password' => 'Изменить пароль', + 'Name' => 'Имя', + 'Surname' => 'Фамилия', + 'Profile' => 'Профиль', + 'Settings' => 'Настройки', + 'Company logo' => 'Логотип компании', + 'About us' => 'О компании', + 'Phone' => 'Телефон', + 'Additional phone' => 'Дополнительный телефон', + 'House' => 'Дом', + 'Street' => 'Улица', + 'Office' => 'Офис', + 'City' => 'Город', + 'Country' => 'Страна', + 'Latitude' => 'Широта', + 'Longitude' => 'Долгота', + 'Google Analytics Key' => 'Код Google Analytics', + 'Pages' => 'Страницы', + 'Create Page' => 'Создать страницу', + 'Categories' => 'Категории', + 'Search for a categories ...' => 'Поиск по категориям', + 'Update' => 'Обновить', + 'Search' => 'Найти', + 'Reset' => 'Сброс', + 'Gallery' => 'Галерея', + 'Add' => 'Добавить', + 'Common' => 'Общее', + 'Title' => 'Заголовок', + 'Body' => 'Тело', + 'Aliases' => 'Псевдонимы', + 'Route' => 'Путь', + 'Value' => 'Значение', + 'Google analytics code' => 'Код Google аналитики', + 'Yandex metrics code' => 'Код Яндекс метрики', + 'Tag Manager code' => 'Код Tag Manager', + 'Sitemap' => 'Карта сайта', + 'Blog Articles' => 'Список статей', +]; \ No newline at end of file diff --git a/frontend/widgets/views/_sidebar.php b/frontend/widgets/views/_sidebar.php index 1685a39..3831b91 100755 --- a/frontend/widgets/views/_sidebar.php +++ b/frontend/widgets/views/_sidebar.php @@ -45,7 +45,7 @@ _________________________________________________________ -->