From c311ee56ecb521d0b3e952f6c719884ce5cf2133 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 27 Feb 2016 01:32:36 +0100 Subject: [PATCH] Show note about disruptive versions on update notification --- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 1 + src/main/resources/i18n/sone.en.properties | 1 + src/main/resources/templates/notify/newVersionNotification.html | 3 +++ 3 files changed, 5 insertions(+) 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> -- 2.7.4