From 43fda4aa8ef284cec04e16d1c7282675f2700b4c Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Fri, 17 Apr 2020 11:46:12 +0200 Subject: [PATCH] Fix #4004: Missing translation strings --- protected/humhub/docs/CHANGELOG.md | 1 + .../admin/views/logging/log_entries.php | 9 +++--- .../modules/admin/views/space/index.php | 9 ++++-- .../modules/friendship/views/manage/list.php | 2 +- .../friendship/views/manage/requests.php | 2 +- .../friendship/views/manage/sent-requests.php | 2 +- .../modules/topic/views/manage/overview.php | 29 +++++++++---------- .../humhub/modules/user/models/Invite.php | 3 ++ .../widgets/PermisionGridModuleFilter.php | 5 ++-- 9 files changed, 35 insertions(+), 27 deletions(-) diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index 815b1e55bf..b11ef27e01 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -6,6 +6,7 @@ HumHub Change Log ---------------------- - Fix #4001: LDAP user sync error +- Fix #4004: Missing translation strings 1.5.0 (April 15, 2020) diff --git a/protected/humhub/modules/admin/views/logging/log_entries.php b/protected/humhub/modules/admin/views/logging/log_entries.php index ab833c7ccc..c090c601e9 100644 --- a/protected/humhub/modules/admin/views/logging/log_entries.php +++ b/protected/humhub/modules/admin/views/logging/log_entries.php @@ -35,16 +35,16 @@ use yii\log\Logger; switch ($entry->level) { case Logger::LEVEL_INFO: $labelClass = 'label-info'; - $levelName = 'Info'; + $levelName = Yii::t('AdminModule.information', 'Info'); break; case Logger::LEVEL_WARNING: $labelClass = 'label-warning'; - $levelName = 'Warning'; + $levelName = Yii::t('AdminModule.information', 'Warning'); break; case Logger::LEVEL_ERROR: default: $labelClass = 'label-danger'; - $levelName = 'Error'; + $levelName = Yii::t('AdminModule.information', 'Error'); } ?> @@ -61,7 +61,8 @@ use yii\log\Logger; totalCount): ?> -
post(['flush']) ?>
+
post(['flush']) ?>
diff --git a/protected/humhub/modules/admin/views/space/index.php b/protected/humhub/modules/admin/views/space/index.php index 286cad3f4f..1e1c75589e 100644 --- a/protected/humhub/modules/admin/views/space/index.php +++ b/protected/humhub/modules/admin/views/space/index.php @@ -20,7 +20,7 @@ use yii\helpers\Url;
-
+
'get', 'action' => Url::to(['/admin/space'])]); ?>
@@ -46,13 +46,16 @@ use yii\helpers\Url; 'columns' => [ ['class' => SpaceImageColumn::class], ['class' => SpaceTitleColumn::class], - 'memberCount', + [ + 'attribute' => 'memberCount', + 'label' => Yii::t('SpaceModule.base', 'Members') + ], ['class' => ImageColumn::class, 'userAttribute' => 'ownerUser'], [ 'attribute' => 'ownerUser.profile.lastname', 'class' => DisplayNameColumn::class, 'userAttribute' => 'ownerUser', - 'label' => 'Owner' + 'label' => Yii::t('SpaceModule.base', 'Owner') ], ['class' => SpaceActionColumn::class], ], diff --git a/protected/humhub/modules/friendship/views/manage/list.php b/protected/humhub/modules/friendship/views/manage/list.php index 554089cd93..d34aab62e9 100644 --- a/protected/humhub/modules/friendship/views/manage/list.php +++ b/protected/humhub/modules/friendship/views/manage/list.php @@ -19,7 +19,7 @@ use humhub\widgets\GridView; 'profile.firstname', 'profile.lastname', [ - 'header' => Yii::t('FriendshipModule.base', 'Actions'), + 'header' => Yii::t('base', 'Actions'), 'class' => 'yii\grid\ActionColumn', 'buttons' => [ 'update' => function () { diff --git a/protected/humhub/modules/friendship/views/manage/requests.php b/protected/humhub/modules/friendship/views/manage/requests.php index 4a86af496f..baf6de463e 100644 --- a/protected/humhub/modules/friendship/views/manage/requests.php +++ b/protected/humhub/modules/friendship/views/manage/requests.php @@ -18,7 +18,7 @@ use humhub\widgets\GridView; 'profile.firstname', 'profile.lastname', [ - 'header' => 'Actions', + 'header' => Yii::t('base', 'Actions'), 'class' => 'yii\grid\ActionColumn', 'buttons' => [ 'update' => function ($url, $model) { diff --git a/protected/humhub/modules/friendship/views/manage/sent-requests.php b/protected/humhub/modules/friendship/views/manage/sent-requests.php index 5c958795e0..4c74b19c98 100644 --- a/protected/humhub/modules/friendship/views/manage/sent-requests.php +++ b/protected/humhub/modules/friendship/views/manage/sent-requests.php @@ -19,7 +19,7 @@ use humhub\widgets\GridView; 'profile.firstname', 'profile.lastname', [ - 'header' => 'Actions', + 'header' => Yii::t('base', 'Actions'), 'class' => 'yii\grid\ActionColumn', 'buttons' => [ 'update' => function () { diff --git a/protected/humhub/modules/topic/views/manage/overview.php b/protected/humhub/modules/topic/views/manage/overview.php index f90e3c5756..e5a835c84e 100644 --- a/protected/humhub/modules/topic/views/manage/overview.php +++ b/protected/humhub/modules/topic/views/manage/overview.php @@ -24,27 +24,26 @@ use yii\helpers\Html; ?> -
Topic Overview'); ?>
- + $contentContainer]); ?> - +
-
-
- 'height:36px', 'class' => 'form-control', 'placeholder' => Yii::t('TopicModule.base', 'Add Topic') ]) ?> - +
+
+ 'height:36px', 'class' => 'form-control', 'placeholder' => Yii::t('TopicModule.base', 'Add Topic')]) ?> + icon('fa-plus')->loader()->submit() ?> -
+
'Actions', + 'header' => Yii::t('base', 'Actions'), 'class' => 'yii\grid\ActionColumn', 'options' => ['width' => '80px'], 'buttons' => [ - 'update' => function($url, $model) use ($contentContainer) { + 'update' => function ($url, $model) use ($contentContainer) { /* @var $model \humhub\modules\topic\models\Topic */ return ModalButton::primary()->load($contentContainer->createUrl('edit', ['id' => $model->id]))->icon('fa-pencil')->xs()->loader(false); }, - 'view' => function($url, $model) use ($contentContainer) { + 'view' => function ($url, $model) use ($contentContainer) { /* @var $model \humhub\modules\topic\models\Topic */ return Button::primary()->link($model->getUrl())->icon('fa-filter')->xs()->loader(false); }, - 'delete' => function($url, $model) use ($contentContainer) { + 'delete' => function ($url, $model) use ($contentContainer) { /* @var $model \humhub\modules\topic\models\Topic */ return Button::danger()->icon('fa-times')->action('topic.removeOverviewTopic', $contentContainer->createUrl('delete', ['id' => $model->id]))->confirm( - Yii::t('TopicModule.base', 'Confirm topic deletion'), - Yii::t('TopicModule.base', 'Do you really want to delete this topic?'), - Yii::t('base', 'Delete'))->xs()->loader(false); + Yii::t('TopicModule.base', 'Confirm topic deletion'), + Yii::t('TopicModule.base', 'Do you really want to delete this topic?'), + Yii::t('base', 'Delete'))->xs()->loader(false); }, ], ], diff --git a/protected/humhub/modules/user/models/Invite.php b/protected/humhub/modules/user/models/Invite.php index 4d9fdfb166..0958bcf183 100644 --- a/protected/humhub/modules/user/models/Invite.php +++ b/protected/humhub/modules/user/models/Invite.php @@ -91,6 +91,9 @@ class Invite extends ActiveRecord { return [ 'email' => Yii::t('UserModule.invite', 'Email'), + 'created_at' => Yii::t('UserModule.base', 'Created at'), + 'source' => Yii::t('UserModule.base', 'Source'), + 'language' => Yii::t('base', 'Language'), ]; } diff --git a/protected/humhub/modules/user/widgets/PermisionGridModuleFilter.php b/protected/humhub/modules/user/widgets/PermisionGridModuleFilter.php index e5dfe7d7e5..578ea2b2ba 100644 --- a/protected/humhub/modules/user/widgets/PermisionGridModuleFilter.php +++ b/protected/humhub/modules/user/widgets/PermisionGridModuleFilter.php @@ -11,6 +11,7 @@ namespace humhub\modules\user\widgets; use humhub\libs\Html; use humhub\modules\user\assets\PermissionGridModuleFilterAsset; use humhub\widgets\JsWidget; +use Yii; /** * Renders a dropdown in order to filter the permission overview by module. @@ -33,7 +34,7 @@ class PermisionGridModuleFilter extends JsWidget public function run() { PermissionGridModuleFilterAsset::register($this->view); - return Html::dropDownList('', [], ['all' => 'All'], $this->getOptions()); + return Html::dropDownList('', [], ['all' => Yii::t('base', 'All')], $this->getOptions()); } public function getData() @@ -51,4 +52,4 @@ class PermisionGridModuleFilter extends JsWidget ]; } -} \ No newline at end of file +}