Skip to content

Commit

Permalink
Replace followup with notification in some labels (#18700)
Browse files Browse the repository at this point in the history
* replace followup with notification in some labels

* update tests
  • Loading branch information
cconard96 authored Jan 10, 2025
1 parent 14ef3dd commit bcb1f51
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions phpunit/functional/NotificationAjaxSettingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions phpunit/functional/NotificationMailingSettingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions phpunit/functional/NotificationSettingConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/NotificationAjaxSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/NotificationMailingSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}


Expand Down
4 changes: 2 additions & 2 deletions templates/pages/setup/setup_notifications.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
class="form-check-input" type="checkbox" value="1"
{{ use_notifications ? 'checked="checked"' : '' }} />
<label class="form-check-label" for="use_notifications">
{{ __('Enable followup') }}
{{ __('Enable notifications') }}
</label>
</div>
</li>
Expand Down Expand Up @@ -112,7 +112,7 @@
<div class="list-group-item">
<div class="alert alert-important alert-warning m-3">
<i class="fa-fw ti ti-alert-triangle me-2"></i>
{{ __('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.') }}
</div>
</div>
{% endif %}
Expand Down

0 comments on commit bcb1f51

Please sign in to comment.