From bcb1f51ab557b9abff984931a3646db48ac8f668 Mon Sep 17 00:00:00 2001 From: Curtis Conard Date: Fri, 10 Jan 2025 09:17:00 -0500 Subject: [PATCH] Replace followup with notification in some labels (#18700) * replace followup with notification in some labels * update tests --- phpunit/functional/NotificationAjaxSettingTest.php | 6 +++--- phpunit/functional/NotificationMailingSettingTest.php | 6 +++--- phpunit/functional/NotificationSettingConfigTest.php | 8 ++++---- src/NotificationAjaxSetting.php | 4 ++-- src/NotificationMailingSetting.php | 4 ++-- templates/pages/setup/setup_notifications.html.twig | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/phpunit/functional/NotificationAjaxSettingTest.php b/phpunit/functional/NotificationAjaxSettingTest.php index ce95ec88c39..a984df604a3 100644 --- a/phpunit/functional/NotificationAjaxSettingTest.php +++ b/phpunit/functional/NotificationAjaxSettingTest.php @@ -48,8 +48,8 @@ public function testGetTable() public function testGetTypeName() { - $this->assertSame('Browser followups configuration', \NotificationAjaxSetting::getTypeName()); - $this->assertSame('Browser followups configuration', \NotificationAjaxSetting::getTypeName(10)); + $this->assertSame('Browser notifications configuration', \NotificationAjaxSetting::getTypeName()); + $this->assertSame('Browser notifications configuration', \NotificationAjaxSetting::getTypeName(10)); } public function testDefineTabs() @@ -77,7 +77,7 @@ public function testDisplayTabContentForItem() public function testGetEnableLabel() { $settings = new \NotificationAjaxSetting(); - $this->assertSame('Enable followups from browser', $settings->getEnableLabel()); + $this->assertSame('Enable browser notifications', $settings->getEnableLabel()); } public function testGetMode() diff --git a/phpunit/functional/NotificationMailingSettingTest.php b/phpunit/functional/NotificationMailingSettingTest.php index ebf21c96a72..0ce1295737b 100644 --- a/phpunit/functional/NotificationMailingSettingTest.php +++ b/phpunit/functional/NotificationMailingSettingTest.php @@ -48,8 +48,8 @@ public function testGetTable() public function testGetTypeName() { - $this->assertSame('Email followups configuration', \NotificationMailingSetting::getTypeName()); - $this->assertSame('Email followups configuration', \NotificationMailingSetting::getTypeName(10)); + $this->assertSame('Email notifications configuration', \NotificationMailingSetting::getTypeName()); + $this->assertSame('Email notifications configuration', \NotificationMailingSetting::getTypeName(10)); } public function testDefineTabs() @@ -83,7 +83,7 @@ public function testDisplayTabContentForItem() public function testGetEnableLabel() { $settings = new \NotificationMailingSetting(); - $this->assertSame('Enable followups via email', $settings->getEnableLabel()); + $this->assertSame('Enable email notifications', $settings->getEnableLabel()); } public function testGetMode() diff --git a/phpunit/functional/NotificationSettingConfigTest.php b/phpunit/functional/NotificationSettingConfigTest.php index fc8f6d01207..1b580059c61 100644 --- a/phpunit/functional/NotificationSettingConfigTest.php +++ b/phpunit/functional/NotificationSettingConfigTest.php @@ -114,8 +114,8 @@ public function testShowForm() $content = ob_get_clean(); $this->assertStringContainsString('Notifications configuration', $content); $this->assertStringContainsString('Notification templates', $content); - $this->assertStringContainsString('Browser followups configuration', $content); - $this->assertStringNotContainsString('Email followups configuration', $content); + $this->assertStringContainsString('Browser notifications configuration', $content); + $this->assertStringNotContainsString('Email notifications configuration', $content); $CFG_GLPI['notifications_mailing'] = 1; @@ -124,8 +124,8 @@ public function testShowForm() $content = ob_get_clean(); $this->assertStringContainsString('Notifications configuration', $content); $this->assertStringContainsString('Notification templates', $content); - $this->assertStringContainsString('Browser followups configuration', $content); - $this->assertStringContainsString('Email followups configuration', $content); + $this->assertStringContainsString('Browser notifications configuration', $content); + $this->assertStringContainsString('Email notifications configuration', $content); //reset $CFG_GLPI['use_notifications'] = 0; diff --git a/src/NotificationAjaxSetting.php b/src/NotificationAjaxSetting.php index 0cb6bb74100..88b2abee1c3 100644 --- a/src/NotificationAjaxSetting.php +++ b/src/NotificationAjaxSetting.php @@ -42,12 +42,12 @@ class NotificationAjaxSetting extends NotificationSetting { public static function getTypeName($nb = 0) { - return __('Browser followups configuration'); + return __('Browser notifications configuration'); } public function getEnableLabel() { - return __('Enable followups from browser'); + return __('Enable browser notifications'); } public static function getMode() diff --git a/src/NotificationMailingSetting.php b/src/NotificationMailingSetting.php index 24a3a235ad6..d9f925f3af3 100644 --- a/src/NotificationMailingSetting.php +++ b/src/NotificationMailingSetting.php @@ -43,13 +43,13 @@ class NotificationMailingSetting extends NotificationSetting { public static function getTypeName($nb = 0) { - return __('Email followups configuration'); + return __('Email notifications configuration'); } public function getEnableLabel() { - return __('Enable followups via email'); + return __('Enable email notifications'); } diff --git a/templates/pages/setup/setup_notifications.html.twig b/templates/pages/setup/setup_notifications.html.twig index eb5b99a3478..0440085746f 100644 --- a/templates/pages/setup/setup_notifications.html.twig +++ b/templates/pages/setup/setup_notifications.html.twig @@ -56,7 +56,7 @@ class="form-check-input" type="checkbox" value="1" {{ use_notifications ? 'checked="checked"' : '' }} /> @@ -112,7 +112,7 @@
- {{ __('Unable to configure notifications: please configure at least one followup type using the above configuration.') }} + {{ __('Unable to configure notifications: please configure at least one notification type using the above configuration.') }}
{% endif %}