From 2e583139c9a5b9f5894ab1732c7becf15982de5f Mon Sep 17 00:00:00 2001 From: "bladeroot - Yuriy A. Myronchuk" Date: Wed, 16 Sep 2015 08:48:42 +0000 Subject: [PATCH] * change language --- src/grid/AccountGridView.php | 47 ++++++++++++++++++------------------ src/grid/HdomainGridView.php | 2 ++ src/views/account/view.php | 6 ++--- src/views/db/view.php | 6 ++--- src/views/hdomain/view.php | 5 ++-- 5 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/grid/AccountGridView.php b/src/grid/AccountGridView.php index 5d0128b8..0a7cebd8 100644 --- a/src/grid/AccountGridView.php +++ b/src/grid/AccountGridView.php @@ -21,43 +21,44 @@ class AccountGridView extends \hipanel\grid\BoxedGridView static public function defaultColumns() { return [ - 'account' => [ - 'class' => MainColumn::className(), - 'attribute' => 'login', - 'filterAttribute' => 'login_like', + 'account' => [ + 'class' => MainColumn::className(), + 'label' => Yii::t('app', 'Account'), + 'attribute' => 'login', + 'filterAttribute' => 'login_like', ], - 'state' => [ - 'class' => RefColumn::className(), - 'format' => 'raw', - 'value' => function ($model) { + 'state' => [ + 'class' => RefColumn::className(), + 'format' => 'raw', + 'value' => function ($model) { return State::widget(compact('model')); }, - 'gtype' => 'state,account', + 'gtype' => 'state,account', ], - 'server' => [ - 'class' => ServerColumn::className() + 'server' => [ + 'class' => ServerColumn::className() ], - 'sshftp_ips' => [ - 'attribute' => 'sshftp_ips', - 'format' => 'raw', - 'value' => function ($model) { + 'sshftp_ips' => [ + 'attribute' => 'sshftp_ips', + 'format' => 'raw', + 'value' => function ($model) { return ArraySpoiler::widget([ 'data' => $model->sshftp_ips, 'visibleCount' => 3 ]); } ], - 'actions' => [ - 'class' => ActionColumn::className(), - 'template' => '{view} {update} {delete}' + 'actions' => [ + 'class' => ActionColumn::className(), + 'template' => '{view} {update} {delete}' ], - 'type' => [ - 'class' => RefColumn::className(), - 'format' => 'raw', - 'value' => function ($model) { + 'type' => [ + 'class' => RefColumn::className(), + 'format' => 'raw', + 'value' => function ($model) { return Type::widget(compact('model')); }, - 'gtype' => 'type,account', + 'gtype' => 'type,account', ], ]; } diff --git a/src/grid/HdomainGridView.php b/src/grid/HdomainGridView.php index e84b6bec..12a9fe24 100644 --- a/src/grid/HdomainGridView.php +++ b/src/grid/HdomainGridView.php @@ -77,6 +77,7 @@ static public function defaultColumns() } ], 'service' => [ + 'label' => Yii::t('app', 'Service'), 'value' => function ($model) { return $model->getAttribute('vhost')['service']; } @@ -96,6 +97,7 @@ static public function defaultColumns() } ], 'aliases' => [ + 'label' => Yii::t('app', 'Aliases'), 'format' => 'raw', 'value' => function ($model) { return ArraySpoiler::widget([ diff --git a/src/views/account/view.php b/src/views/account/view.php index 2bd7f502..171aa07a 100644 --- a/src/views/account/view.php +++ b/src/views/account/view.php @@ -14,9 +14,9 @@ use yii\helpers\Url; $this->title = $model->login; -$this->subtitle = Yii::t('app', 'account detailed information') . ' #' . $model->id; +$this->subtitle = Yii::t('app', 'Account detailed information') . ' #' . $model->id; $this->breadcrumbs->setItems([ - ['label' => 'Accounts', 'url' => ['index']], + ['label' => Yii::t('app', 'Accounts'), 'url' => ['index']], $this->title, ]); @@ -112,7 +112,7 @@ 'button' => ['label' => '' . Yii::t('app', 'Delete')], 'body' => Yii::t('app', 'Are you sure you want to delete account {name}? You will loose all data, that relates this account!', ['name' => $model->login]), 'modal' => [ - 'header' => Html::tag('h4', Yii::t('app', 'Confirm account deleting deleting')), + 'header' => Html::tag('h4', Yii::t('app', 'Confirm account deleting')), 'headerOptions' => ['class' => 'label-danger'], 'footer' => [ 'label' => Yii::t('app', 'Delete'), diff --git a/src/views/db/view.php b/src/views/db/view.php index 1a3bd3c3..1a152805 100644 --- a/src/views/db/view.php +++ b/src/views/db/view.php @@ -8,9 +8,9 @@ use yii\helpers\Html; $this->title = $model->name; -$this->subtitle = Yii::t('app', 'database detailed information') . ' #' . $model->id; +$this->subtitle = Yii::t('app', 'Database detailed information') . ' #' . $model->id; $this->breadcrumbs->setItems([ - ['label' => 'Databases', 'url' => ['index']], + ['label' => Yii::t('app', 'Databases'), 'url' => ['index']], $this->title, ]); ?> @@ -141,4 +141,4 @@ - \ No newline at end of file + diff --git a/src/views/hdomain/view.php b/src/views/hdomain/view.php index 3806dce1..1de0ae34 100644 --- a/src/views/hdomain/view.php +++ b/src/views/hdomain/view.php @@ -8,9 +8,9 @@ use yii\web\JsExpression; $this->title = $model->domain; -$this->subtitle = Yii::t('app', 'hosting domain detailed information') . ' #' . $model->id; +$this->subtitle = Yii::t('app', 'Hosting domain detailed information') . ' #' . $model->id; $this->breadcrumbs->setItems([ - ['label' => 'Domains', 'url' => ['index']], + ['label' => Yii::t('app', 'Domains'), 'url' => ['index']], $this->title, ]); ?> @@ -93,6 +93,7 @@ 'dns_on', [ 'attribute' => 'aliases', + 'label' => Yii::t('app', 'Aliases'), 'format' => 'raw', 'value' => function ($model) { $html = [];