Show note about disruptive versions on update notification
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 27 Feb 2016 00:32:36 +0000 (01:32 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 27 Feb 2016 09:54:08 +0000 (10:54 +0100)
src/main/java/net/pterodactylus/sone/web/WebInterface.java
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/notify/newVersionNotification.html

index 4da2177..934b4b5 100644 (file)
@@ -1022,6 +1022,7 @@ public class WebInterface {
                newVersionNotification.getTemplateContext().set("latestVersion", updateFoundEvent.version());
                newVersionNotification.getTemplateContext().set("latestEdition", updateFoundEvent.latestEdition());
                newVersionNotification.getTemplateContext().set("releaseTime", updateFoundEvent.releaseTime());
+               newVersionNotification.getTemplateContext().set("disruptive", updateFoundEvent.disruptive());
                notificationManager.addNotification(newVersionNotification);
        }
 
index 40a12b1..ae57376 100644 (file)
@@ -455,6 +455,7 @@ Notification.SoneRescued.Text=The following Sones have been rescued:
 Notification.SoneRescued.Text.RememberToUnlock=Please remember to control the posts and replies you have given and don’t forget to unlock your Sones!
 Notification.LockedSones.Text=The following Sones have been locked for more than 5 minutes. Please check if you really want to keep these Sones locked:
 Notification.NewVersion.Text=Version {version} of the Sone plugin was found. Download it from USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/{edition}​!
+Notification.NewVersion.Disruptive.Text=It is {em}highly recommended{/em} that you update to this version as it may be possible that you are missing a lot of content with your current version!
 Notification.InsertingImages.Text=The following images are being inserted:
 Notification.InsertedImages.Text=The following images have been inserted:
 Notification.ImageInsertFailed.Text=The following images could not be inserted:
index 599a7e6..f35ecaf 100644 (file)
@@ -1 +1,4 @@
 <div class="text"><%= Notification.NewVersion.Text|l10n|replace needle=="{version}" replacement=latestVersion|replace needle=="{edition}" replacement=latestEdition|parse sone=="nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI"></div>
+<%if disruptive>
+       <div class="text"><%= Notification.NewVersion.Disruptive.Text|l10n|html|replace needle=="{em}" replacement=="<em>"|replace needle=="{/em}" replacement=="</em>"></div>
+<%/if>