From: David ‘Bombe’ Roden Date: Tue, 25 Jan 2011 20:24:49 +0000 (+0100) Subject: Show a link to the Sone homepage in the new-version notification. X-Git-Tag: 0.4.3^2~4 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=90c0deafa5446199a89d9b7e1b8c1f239d0c667a;p=Sone.git Show a link to the Sone homepage in the new-version notification. --- 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>