Skip to content

Commit b4201e8

Browse files
committed
Rephrase language and buttons
Signed-off-by: Matt Friedman <maf675@gmail.com> Language updates Signed-off-by: Matt Friedman <maf675@gmail.com> Update tests Signed-off-by: Matt Friedman <maf675@gmail.com> Lang fixes Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent bf25224 commit b4201e8

6 files changed

Lines changed: 18 additions & 13 deletions

File tree

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ jobs:
125125
db: "mysql:5.7"
126126
- php: '8.3'
127127
db: "mysql:5.7"
128+
- php: '8.4'
129+
db: "mysql:5.7"
128130

129131
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
130132

@@ -247,6 +249,8 @@ jobs:
247249
db: "postgres:14"
248250
- php: '8.3'
249251
db: "postgres:14"
252+
- php: '8.4'
253+
db: "postgres:14"
250254

251255
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
252256

language/en/webpushnotifications_module_ucp.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939

4040
$lang = array_merge($lang, [
4141
'NOTIFICATION_METHOD_PHPBB_WPN_WEBPUSH' => 'Web Push',
42-
'NOTIFY_WEBPUSH_ENABLE_SHORT' => 'Enable Web Push notifications',
43-
'NOTIFY_WEBPUSH_ENABLE' => 'Enable receiving Web Push notifications',
44-
'NOTIFY_WEBPUSH_ENABLE_EXPLAIN' => 'Enable receiving browser-based push notifications.<br>The notifications can be turned off at any time in your browser settings, by unsubscribing, or by disabling the push notifications below.',
42+
'NOTIFY_WEBPUSH_NOTIFICATIONS' => 'Web Push Notifications',
43+
'NOTIFY_WEBPUSH_DISABLE' => 'Disable Push Notifications',
44+
'NOTIFY_WEBPUSH_ENABLE' => 'Enable Push Notifications',
45+
'NOTIFY_WEBPUSH_ENABLE_EXPLAIN' => 'Enabling push notifications will activate them on this device only. You can turn off notifications at any time through your browser settings or by clicking the button above. Additionally, if no web push notification types are selected below, you will not receive any web push notifications.',
4546
'NOTIFY_WEBPUSH_SUBSCRIBE' => 'Subscribe',
46-
'NOTIFY_WEBPUSH_UNSUBSCRIBE' => 'Unsubscribe',
4747
'NOTIFY_WEBPUSH_SUBSCRIBED' => 'Subscribed',
4848
'NOTIFY_WEBPUSH_DROPDOWN_TITLE' => 'Visit notifications settings to set your preferred push notifications.',
4949
'NOTIFY_WEBPUSH_DENIED' => 'You have denied notifications from this site. To subscribe, please allow notifications in your browser settings.',

language/ru/webpushnotifications_module_ucp.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939

4040
$lang = array_merge($lang, [
4141
'NOTIFICATION_METHOD_PHPBB_WPN_WEBPUSH' => 'Браузерные push—уведомления',
42-
'NOTIFY_WEBPUSH_ENABLE_SHORT' => 'Браузерные push—уведомления',
43-
'NOTIFY_WEBPUSH_ENABLE' => 'Включить браузерные push—уведомления',
44-
'NOTIFY_WEBPUSH_ENABLE_EXPLAIN' => 'Включение возможности получения браузерных push—уведомлений.<br>Данная возможность может быть отключена в любое время в настройках браузера, с помощью отписки от браузерных push—уведомлений в личном разделе или путём отключения данной функции ниже.',
42+
'NOTIFY_WEBPUSH_NOTIFICATIONS' => 'Web Push Notifications',
43+
'NOTIFY_WEBPUSH_DISABLE' => 'Disable Push Notifications',
44+
'NOTIFY_WEBPUSH_ENABLE' => 'Браузерные push—уведомления',
45+
'NOTIFY_WEBPUSH_ENABLE_EXPLAIN' => 'Включение возможности получения браузерных push—уведомлений. Данная возможность может быть отключена в любое время в настройках браузера, с помощью отписки от браузерных push—уведомлений в личном разделе или путём отключения данной функции ниже.',
4546
'NOTIFY_WEBPUSH_SUBSCRIBE' => 'Подписаться',
46-
'NOTIFY_WEBPUSH_UNSUBSCRIBE' => 'Отписаться',
4747
'NOTIFY_WEBPUSH_SUBSCRIBED' => 'Включено',
4848
'NOTIFY_WEBPUSH_DROPDOWN_TITLE' => 'Посетите настройки уведомлений, чтобы установить предпочтительные push-уведомления.',
4949
'NOTIFY_WEBPUSH_DENIED' => 'Вы запретили браузерные уведомления для даного сайта. Для того, чтобы подписаться, необходимо их разрешить в настройках браузера.',

styles/all/template/event/notification_dropdown_footer_after.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% if NOTIFICATIONS_WEBPUSH_ENABLE and notification_types is not defined %}
22
<div class="wpn-notification-dropdown-footer" title="{{ lang('NOTIFY_WEBPUSH_DROPDOWN_TITLE') }}">
3-
<span class="ellipsis-text">{{ lang('NOTIFY_WEBPUSH_ENABLE_SHORT') ~ lang('COLON') }}</span>
3+
<span class="ellipsis-text">{{ lang('NOTIFY_WEBPUSH_ENABLE') ~ lang('COLON') }}</span>
44
<button id="subscribe_webpush" name="subscribe_webpush" data-l-err="{{ lang('INFORMATION') }}" data-l-msg="{{ lang('NOTIFY_WEBPUSH_DENIED') }}">
55
<i class="icon fa-toggle-off fa-fw icon-lightgray"></i><span>{{ lang('NOTIFY_WEBPUSH_SUBSCRIBE') }}</span>
66
</button>

styles/prosilver/template/event/ucp_notifications_content_before.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<div class="inner">
44
<fieldset>
55
<dl>
6-
<dt><label for="subscribe_webpush">{{ lang('NOTIFY_WEBPUSH_ENABLE') ~ lang('COLON') }}</label><br><span>{{ lang('NOTIFY_WEBPUSH_ENABLE_EXPLAIN') }}</span></dt>
6+
<dt><label for="subscribe_webpush">{{ lang('NOTIFY_WEBPUSH_NOTIFICATIONS') ~ lang('COLON') }}</label></dt>
77
<dd>
8-
<input id="subscribe_webpush" type="submit" name="subscribe_webpush" value="{{ lang('NOTIFY_WEBPUSH_SUBSCRIBE') }}" class="button1 button button-form" data-l-err="{{ lang('INFORMATION') }}" data-l-msg="{{ lang('NOTIFY_WEBPUSH_DENIED') }}">
9-
<input id="unsubscribe_webpush" type="submit" name="unsubscribe_webpush" value="{{ lang('NOTIFY_WEBPUSH_UNSUBSCRIBE') }}" class="button1 button button-form hidden">
8+
<input id="subscribe_webpush" type="submit" name="subscribe_webpush" value="{{ lang('NOTIFY_WEBPUSH_ENABLE') }}" class="button1 button button-form" data-l-err="{{ lang('INFORMATION') }}" data-l-msg="{{ lang('NOTIFY_WEBPUSH_DENIED') }}">
9+
<input id="unsubscribe_webpush" type="submit" name="unsubscribe_webpush" value="{{ lang('NOTIFY_WEBPUSH_DISABLE') }}" class="button1 button button-form hidden">
10+
<br><br><span>{{ lang('NOTIFY_WEBPUSH_ENABLE_EXPLAIN') }}</span>
1011
</dd>
1112
</dl>
1213
</fieldset>

tests/functional/functional_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function test_ucp_module()
7171

7272
$crawler = self::request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options');
7373

74-
$this->assertContainsLang('NOTIFY_WEBPUSH_ENABLE', $crawler->filter('label[for="subscribe_webpush"]')->text());
74+
$this->assertContainsLang('NOTIFY_WEBPUSH_NOTIFICATIONS', $crawler->filter('label[for="subscribe_webpush"]')->text());
7575
$this->assertContainsLang('NOTIFICATION_METHOD_PHPBB_WPN_WEBPUSH', $crawler->filter('th.mark')->eq(2)->text());
7676

7777
// Assert checkbox is unchecked by default

0 commit comments

Comments
 (0)