From 90c0deafa5446199a89d9b7e1b8c1f239d0c667a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 25 Jan 2011 21:24:49 +0100 Subject: [PATCH] Show a link to the Sone homepage in the new-version notification. --- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 3 ++- src/main/resources/i18n/sone.en.properties | 2 +- src/main/resources/templates/notify/newVersionNotification.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 67a3952..9023ccf 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -766,7 +766,8 @@ public class WebInterface implements CoreListener { */ @Override public void updateFound(Version version, long releaseTime, long latestEdition) { - newVersionNotification.getTemplateContext().set("version", version); + newVersionNotification.getTemplateContext().set("latestVersion", version); + newVersionNotification.getTemplateContext().set("latestEdition", latestEdition); newVersionNotification.getTemplateContext().set("releaseTime", releaseTime); notificationManager.addNotification(newVersionNotification); } diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 50dab27..35bc436 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -245,4 +245,4 @@ Notification.SoneIsBeingRescued.Text=The following Sones are currently being res 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=A new version of the Sone plugin was found: Version {version}. +Notification.NewVersion.Text=Version {version} of the Sone plugin was found. Download it from USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/{edition}​! diff --git a/src/main/resources/templates/notify/newVersionNotification.html b/src/main/resources/templates/notify/newVersionNotification.html index 23a5855..fdb8b2a 100644 --- a/src/main/resources/templates/notify/newVersionNotification.html +++ b/src/main/resources/templates/notify/newVersionNotification.html @@ -1 +1 @@ -
<%= Notification.NewVersion.Text|l10n|html|replace needle="{version}" replacementKey=version>
+
<%= Notification.NewVersion.Text|l10n|replace needle="{version}" replacementKey=latestVersion|replace needle="{edition}" replacementKey=latestEdition|parse sone=currentSone>
-- 2.7.4