Commit 0d556e295ba5fcd9b7e5fa5bf59e56088faca4f9
1 parent
5f694714
translations
Showing
7 changed files
with
60 additions
and
64 deletions
Show diff stats
common/config/main.php
@@ -35,22 +35,10 @@ | @@ -35,22 +35,10 @@ | ||
35 | 'class' => 'yii\i18n\PhpMessageSource', | 35 | 'class' => 'yii\i18n\PhpMessageSource', |
36 | 'basePath' => '@artbox/core/messages', | 36 | 'basePath' => '@artbox/core/messages', |
37 | ], | 37 | ], |
38 | - 'catalog' => [ | ||
39 | - 'class' => 'yii\i18n\PhpMessageSource', | ||
40 | - 'basePath' => '@artbox/catalog/messages', | ||
41 | - ], | ||
42 | 'app' => [ | 38 | 'app' => [ |
43 | 'class' => 'yii\i18n\PhpMessageSource', | 39 | 'class' => 'yii\i18n\PhpMessageSource', |
44 | 'basePath' => '@common/messages', | 40 | 'basePath' => '@common/messages', |
45 | ], | 41 | ], |
46 | - 'blog' => [ | ||
47 | - 'class' => 'yii\i18n\PhpMessageSource', | ||
48 | - 'basePath' => '@artbox/weblog/messages', | ||
49 | - ], | ||
50 | - 'order' => [ | ||
51 | - 'class' => 'yii\i18n\PhpMessageSource', | ||
52 | - 'basePath' => '@artbox/order/messages', | ||
53 | - ], | ||
54 | ], | 42 | ], |
55 | ], | 43 | ], |
56 | 'filedb' => [ | 44 | 'filedb' => [ |
1 | +<?php | ||
2 | +return [ | ||
3 | + 'Home' => 'Главная', | ||
4 | + 'Contacts' => 'Контакты', | ||
5 | + 'About' => 'О нас', | ||
6 | + 'Blog' => 'Блог', | ||
7 | + 'Events' => 'Мероприятия', | ||
8 | + 'Name' => 'Имя', | ||
9 | + 'Phone' => 'Телефон', | ||
10 | + 'Message' => 'Сообщения', | ||
11 | + 'You question' => 'Ваш вопрос', | ||
12 | + 'Send' => 'Отправить', | ||
13 | + 'Contact us!' => 'Свяжитесь с нами', | ||
14 | + 'Go to contact page' => 'Перейти на страницу контактов', | ||
15 | + 'Send message' => 'Отправить сообщение', | ||
16 | + 'Contact form' => "Форма для связи" | ||
17 | +]; | ||
0 | \ No newline at end of file | 18 | \ No newline at end of file |
1 | +<?php | ||
2 | +return [ | ||
3 | + 'Home' => 'Головна', | ||
4 | + 'Contacts' => 'Контакти', | ||
5 | + 'About' => 'Про нас', | ||
6 | + 'Blog' => 'Блог', | ||
7 | + 'Events' => 'Заходи', | ||
8 | + 'Name' => 'Ім\'я', | ||
9 | + 'Phone' => 'Телефон', | ||
10 | + 'Message' => 'Повідомленя', | ||
11 | + 'You question' => 'Ваше питання', | ||
12 | + 'Send' => 'Відправити', | ||
13 | + 'Contact us!' => 'Зв\'яжіться з нами', | ||
14 | + 'Go to contact page' => 'Перейти до сторінки контактів', | ||
15 | + 'Читать далее' => 'Читати далі', | ||
16 | + "Send message" => 'Надіслати повідомлення', | ||
17 | + "Contact form" => 'Форма для зв\'язку' | ||
18 | +]; | ||
0 | \ No newline at end of file | 19 | \ No newline at end of file |
frontend/config/main.php
1 | <?php | 1 | <?php |
2 | use artbox\core\components\LanguageRequest; | 2 | use artbox\core\components\LanguageRequest; |
3 | use artbox\core\components\SeoComponent; | 3 | use artbox\core\components\SeoComponent; |
4 | - use artbox\core\components\SeoUrlManager; | ||
5 | use artbox\core\seo\UrlManager; | 4 | use artbox\core\seo\UrlManager; |
6 | 5 | ||
7 | $params = array_merge( | 6 | $params = array_merge( |
@@ -46,9 +45,9 @@ | @@ -46,9 +45,9 @@ | ||
46 | ], | 45 | ], |
47 | ], | 46 | ], |
48 | 'labels' => [ | 47 | 'labels' => [ |
49 | - 'email' => 'Email', | ||
50 | - 'name' => 'Name', | ||
51 | - 'message' => 'You question', | 48 | + 'email' => \Yii::t('app','Email'), |
49 | + 'name' => \Yii::t('app','Name'), | ||
50 | + 'message' => \Yii::t('app','You question'), | ||
52 | ], | 51 | ], |
53 | 'inputOptions' => [ | 52 | 'inputOptions' => [ |
54 | 'message' => [ | 53 | 'message' => [ |
@@ -56,7 +55,7 @@ | @@ -56,7 +55,7 @@ | ||
56 | 'options' => [], | 55 | 'options' => [], |
57 | ], | 56 | ], |
58 | ], | 57 | ], |
59 | - 'buttonContent' => 'Send', | 58 | + 'buttonContent' => \Yii::t('app','Send'), |
60 | 'scenario' => 'feedback', | 59 | 'scenario' => 'feedback', |
61 | 'sendEmail' => false, | 60 | 'sendEmail' => false, |
62 | 'formId' => 'feedback-form', | 61 | 'formId' => 'feedback-form', |
@@ -97,10 +96,10 @@ | @@ -97,10 +96,10 @@ | ||
97 | ] | 96 | ] |
98 | ], | 97 | ], |
99 | 'labels' => [ | 98 | 'labels' => [ |
100 | - 'email' => 'Email', | ||
101 | - 'name' => 'Name', | ||
102 | - 'message' => 'Message', | ||
103 | - 'phone' => 'Phone' | 99 | + 'email' => \Yii::t('app','Email'), |
100 | + 'name' => \Yii::t('app', 'Name'), | ||
101 | + 'message' => \Yii::t('app','Message'), | ||
102 | + 'phone' => \Yii::t('app','Phone') | ||
104 | ], | 103 | ], |
105 | 104 | ||
106 | 'inputOptions' => [ | 105 | 'inputOptions' => [ |
@@ -123,7 +122,7 @@ | @@ -123,7 +122,7 @@ | ||
123 | 'buttonOptions' => [ | 122 | 'buttonOptions' => [ |
124 | 'class' => 'btn btn-template-main', | 123 | 'class' => 'btn btn-template-main', |
125 | ], | 124 | ], |
126 | - 'buttonContent' => '<i class="fa fa-envelope-o"></i> Send message', | 125 | + 'buttonContent' => '<i class="fa fa-envelope-o"></i>' .\Yii::t('app','Send message'), |
127 | 'sendEmail' => false, | 126 | 'sendEmail' => false, |
128 | 'ajax' => true, | 127 | 'ajax' => true, |
129 | 'formId' => 'contact-form', | 128 | 'formId' => 'contact-form', |
frontend/views/layouts/main.php
@@ -238,7 +238,8 @@ _________________________________________________________ --> | @@ -238,7 +238,8 @@ _________________________________________________________ --> | ||
238 | ); | 238 | ); |
239 | } | 239 | } |
240 | ?> | 240 | ?> |
241 | - <?php $lang = explode("-", \Yii::$app->language); ?> | 241 | + <?php $lang = explode("-", \Yii::$app->language); |
242 | + ?> | ||
242 | <div class="langs"> | 243 | <div class="langs"> |
243 | <a<?php if ($lang[ '0' ] == 'ru') { | 244 | <a<?php if ($lang[ '0' ] == 'ru') { |
244 | echo ' class="active"'; | 245 | echo ' class="active"'; |
@@ -316,7 +317,7 @@ _________________________________________________________ --> | @@ -316,7 +317,7 @@ _________________________________________________________ --> | ||
316 | ]; | 317 | ]; |
317 | } | 318 | } |
318 | $items[] = [ | 319 | $items[] = [ |
319 | - 'label' => \Yii::t('app', 'Contatcs'), | 320 | + 'label' => \Yii::t('app', 'Contacts'), |
320 | 'url' => [ 'site/contact' ], | 321 | 'url' => [ 'site/contact' ], |
321 | ]; | 322 | ]; |
322 | $items[] = [ | 323 | $items[] = [ |
@@ -449,43 +450,23 @@ _________________________________________________________ --> | @@ -449,43 +450,23 @@ _________________________________________________________ --> | ||
449 | <?php | 450 | <?php |
450 | } | 451 | } |
451 | ?> | 452 | ?> |
452 | - <a href="#" class="btn btn-template-transparent-primary modal-link" data-form="feedback-modal" data-toggle="modal">Contact us!</a> | 453 | + <a href="#" class="btn btn-template-transparent-primary modal-link" data-form="feedback-modal" data-toggle="modal"><?=\Yii::t('app', 'Contact us!')?></a> |
453 | </div> | 454 | </div> |
454 | 455 | ||
455 | <div class="col-md-4 col-sm-12 col-md-offset-2"> | 456 | <div class="col-md-4 col-sm-12 col-md-offset-2"> |
456 | 457 | ||
457 | - <h4><?php echo \Yii::t('app', 'Contact'); ?></h4> | 458 | + <h4><?php echo \Yii::t('app', 'Contacts'); ?></h4> |
458 | 459 | ||
459 | <p> | 460 | <p> |
460 | <?php | 461 | <?php |
461 | - if (!empty($settings->office)) { | ||
462 | - echo \Yii::t( | ||
463 | - 'app', | ||
464 | - 'Office {office}', | ||
465 | - [ | ||
466 | - 'office' => $settings->office, | ||
467 | - ] | ||
468 | - ) . Html::tag('br'); | ||
469 | - } | ||
470 | - if (!empty($settings->street)) { | ||
471 | - echo $settings->street; | ||
472 | - if (!empty($settings->house)) { | ||
473 | - echo " " . $settings->house; | ||
474 | - } | ||
475 | - echo Html::tag('br'); | ||
476 | - } | ||
477 | - if (!empty($settings->city)) { | ||
478 | - echo $settings->city; | ||
479 | - echo Html::tag('br'); | ||
480 | - } | ||
481 | - if (!empty($settings->country)) { | ||
482 | - echo Html::tag('strong', $settings->country); | 462 | + if (!empty($settings->lang->address)) { |
463 | + echo Html::tag('strong', $settings->lang->address); | ||
483 | } | 464 | } |
484 | ?> | 465 | ?> |
485 | </p> | 466 | </p> |
486 | 467 | ||
487 | <?= Html::a( | 468 | <?= Html::a( |
488 | - 'Go to contact page', | 469 | + \Yii::t('app', 'Go to contact page'), |
489 | [ 'site/contact' ], | 470 | [ 'site/contact' ], |
490 | [ | 471 | [ |
491 | 'class' => 'btn btn-small btn-template-transparent-primary', | 472 | 'class' => 'btn btn-small btn-template-transparent-primary', |
frontend/views/site/contact.php
@@ -10,13 +10,12 @@ | @@ -10,13 +10,12 @@ | ||
10 | use common\models\Settings; | 10 | use common\models\Settings; |
11 | use frontend\assets\MapAsset; | 11 | use frontend\assets\MapAsset; |
12 | use yii\helpers\Html; | 12 | use yii\helpers\Html; |
13 | - use yii\bootstrap\ActiveForm; | ||
14 | use yii\web\View; | 13 | use yii\web\View; |
15 | 14 | ||
16 | MapAsset::register($this); | 15 | MapAsset::register($this); |
17 | $settings = Settings::getInstance(); | 16 | $settings = Settings::getInstance(); |
18 | 17 | ||
19 | - $this->title = \Yii::t('app', 'Contact'); | 18 | + $this->title = \Yii::t('app', 'Contacts'); |
20 | $this->params[ 'breadcrumbs' ][] = $this->title; | 19 | $this->params[ 'breadcrumbs' ][] = $this->title; |
21 | 20 | ||
22 | $js = <<< JS | 21 | $js = <<< JS |
@@ -59,18 +58,8 @@ JS; | @@ -59,18 +58,8 @@ JS; | ||
59 | <h3>Address</h3> | 58 | <h3>Address</h3> |
60 | <p> | 59 | <p> |
61 | <?php | 60 | <?php |
62 | - if (!empty( $settings->street )) { | ||
63 | - echo $settings->street; | ||
64 | - if (!empty( $settings->house )) { | ||
65 | - echo " " . $settings->house; | ||
66 | - } | ||
67 | - echo Html::tag('br'); | ||
68 | - } | ||
69 | - if (!empty( $settings->city )) { | ||
70 | - echo $settings->city; | ||
71 | - if (!empty( $settings->country )) { | ||
72 | - echo Html::tag('strong', ", " . $settings->country); | ||
73 | - } | 61 | + if (!empty( $settings->lang->address )) { |
62 | + echo $settings->lang->address; | ||
74 | } | 63 | } |
75 | ?> | 64 | ?> |
76 | </p> | 65 | </p> |
@@ -138,7 +127,7 @@ JS; | @@ -138,7 +127,7 @@ JS; | ||
138 | 127 | ||
139 | <div class="col-md-12"> | 128 | <div class="col-md-12"> |
140 | <div class="heading"> | 129 | <div class="heading"> |
141 | - <h2> Contact form </h2> | 130 | + <h2> <?=\Yii::t('app', 'Contact form')?> </h2> |
142 | </div> | 131 | </div> |
143 | </div> | 132 | </div> |
144 | 133 |