#1089 -- Show the specific commit messages of updates if the list is short enough.

This commit is contained in:
Buster "Silver Eagle" Neece 2019-02-07 18:47:37 -06:00
parent 1132c04eed
commit 5e03e90c8d
2 changed files with 46 additions and 12 deletions

View File

@ -7,8 +7,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-02-06T19:28:02+00:00\n"
"PO-Revision-Date: 2019-02-06T19:28:02+00:00\n"
"POT-Creation-Date: 2019-02-08T00:46:01+00:00\n"
"PO-Revision-Date: 2019-02-08T00:46:01+00:00\n"
"Language: \n"
#: /var/azuracast/www/src/Acl.php:171
@ -661,22 +661,38 @@ msgstr ""
msgid "You should update your <code>docker-compose.yml</code> file to reflect the newest changes. View the <a href=\"%s\" target=\"_blank\">latest version of the file</a> and update your file accordingly.<br>You can also use the <code>./docker.sh</code> utility script to automatically update your file."
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:104
msgid "New AzuraCast Release Version Available"
#: /var/azuracast/www/src/Notification/Manager.php:101
msgid "Follow the <a href=\"%s\" target=\"_blank\">update instructions</a> to update your installation."
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:105
msgid "<b>AzuraCast version %s is now available.</b> You are currently running version %s. Updating is highly recommended. Follow the <a href=\"%s\" target=\"_blank\">update instructions</a> to update your installation."
msgid "AzuraCast version %s is now available."
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:113
#: /var/azuracast/www/src/Notification/Manager.php:106
msgid "You are currently running version %s. Updating is highly recommended."
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:111
msgid "New AzuraCast Release Version Available"
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:121
msgid "The following improvements have been made since your last update:"
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:124
msgid "Your installation is currently %d update(s) behind the latest version."
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:125
msgid "You should update to take advantage of bug and security fixes."
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:131
msgid "New AzuraCast Updates Available"
msgstr ""
#: /var/azuracast/www/src/Notification/Manager.php:114
msgid "<b>Your installation is currently %d update(s) behind the latest version.</b> You should update to take advantage of bug and security fixes. Follow the <a href=\"%s\" target=\"_blank\">update instructions</a> to update your installation."
msgstr ""
#: /var/azuracast/www/src/Radio/Adapters.php:137
#: /var/azuracast/www/src/Radio/Adapters.php:141
#: /var/azuracast/www/src/Radio/Adapters.php:172

View File

@ -98,20 +98,38 @@ class Manager implements EventSubscriberInterface
}
$instructions_url = 'https://www.azuracast.com/install.html';
$instructions_string = __('Follow the <a href="%s" target="_blank">update instructions</a> to update your installation.', $instructions_url);
if ($update_data['needs_release_update']) {
$notification_parts = [
'<b>'.__('AzuraCast version %s is now available.', $update_data['latest_release']).'</b>',
__('You are currently running version %s. Updating is highly recommended.', $update_data['current_release']),
$instructions_string
];
$event->addNotification(new Notification(
__('New AzuraCast Release Version Available'),
__('<b>AzuraCast version %s is now available.</b> You are currently running version %s. Updating is highly recommended. Follow the <a href="%s" target="_blank">update instructions</a> to update your installation.', $update_data['latest_release'], $update_data['current_release'], $instructions_url),
implode(' ', $notification_parts),
Notification::INFO
));
return;
}
if (Entity\Settings::UPDATES_ALL === $check_for_updates && $update_data['needs_rolling_update']) {
$notification_parts = [];
if ($update_data['rolling_updates_available'] < 15 && !empty($update_data['rolling_updates_list'])) {
$notification_parts[] = __('The following improvements have been made since your last update:');
$notification_parts[] = '<ul><li>'.implode('</li><li>', $update_data['rolling_updates_list']).'</li></ul>';
} else {
$notification_parts[] = '<b>'.__('Your installation is currently %d update(s) behind the latest version.', $update_data['rolling_updates_available']).'</b>';
$notification_parts[] = __('You should update to take advantage of bug and security fixes.');
}
$notification_parts[] = $instructions_string;
$event->addNotification(new Notification(
__('New AzuraCast Updates Available'),
__('<b>Your installation is currently %d update(s) behind the latest version.</b> You should update to take advantage of bug and security fixes. Follow the <a href="%s" target="_blank">update instructions</a> to update your installation.', $update_data['rolling_updates_available'], $instructions_url),
implode(' ', $notification_parts),
Notification::INFO
));
return;