From: David ‘Bombe’ Roden Date: Sat, 27 Feb 2016 00:32:36 +0000 (+0100) Subject: Show note about disruptive versions on update notification X-Git-Tag: 0.9.5^2~43^2~3 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=c311ee56ecb521d0b3e952f6c719884ce5cf2133 Show note about disruptive versions on update notification --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 4da2177..934b4b5 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -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); } diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 40a12b1..ae57376 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -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: diff --git a/src/main/resources/templates/notify/newVersionNotification.html b/src/main/resources/templates/notify/newVersionNotification.html index 599a7e6..f35ecaf 100644 --- a/src/main/resources/templates/notify/newVersionNotification.html +++ b/src/main/resources/templates/notify/newVersionNotification.html @@ -1 +1,4 @@
<%= Notification.NewVersion.Text|l10n|replace needle=="{version}" replacement=latestVersion|replace needle=="{edition}" replacement=latestEdition|parse sone=="nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI">
+<%if disruptive> +
<%= Notification.NewVersion.Disruptive.Text|l10n|html|replace needle=="{em}" replacement==""|replace needle=="{/em}" replacement=="">
+<%/if>