Show a link to the Sone homepage in the new-version notification.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 25 Jan 2011 20:24:49 +0000 (21:24 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 26 Jan 2011 06:31:38 +0000 (07:31 +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 67a3952..9023ccf 100644 (file)
@@ -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);
        }
index 50dab27..35bc436 100644 (file)
@@ -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}​!
index 23a5855..fdb8b2a 100644 (file)
@@ -1 +1 @@
-<div class="text"><%= Notification.NewVersion.Text|l10n|html|replace needle="{version}" replacementKey=version></div>
+<div class="text"><%= Notification.NewVersion.Text|l10n|replace needle="{version}" replacementKey=latestVersion|replace needle="{edition}" replacementKey=latestEdition|parse sone=currentSone></div>