From: David ‘Bombe’ Roden Date: Tue, 9 Jul 2013 20:15:44 +0000 (+0200) Subject: Merge remote-tracking branch 'beak/next' into next X-Git-Tag: 0.8.7^2~40 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=c842faebb65eb5210de8f6a2d0be85307d0c163f;hp=927cded118021c66bd9f6e1ed2fcf56e3c06c19e Merge remote-tracking branch 'beak/next' into next --- diff --git a/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java b/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java index 36ac8cd..c8075c5 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java +++ b/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java @@ -65,4 +65,5 @@ public class L10nFilter implements Filter { } return new MessageFormat(webInterface.getL10n().getString(String.valueOf(data)), new Locale(webInterface.getL10n().getSelectedLanguage().shortCode)).format(parameterValues.toArray()); } + } diff --git a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java index aea76c4..fe8c32e 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -97,6 +97,9 @@ public class CreateSonePage extends SoneTemplatePage { @Override protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { super.processTemplate(request, templateContext); + List localSones = new ArrayList(webInterface.getCore().getLocalSones()); + Collections.sort(localSones, Sone.NICE_NAME_COMPARATOR); + templateContext.set("sones", localSones); List ownIdentitiesWithoutSone = getOwnIdentitiesWithoutSone(webInterface.getCore()); templateContext.set("identitiesWithoutSone", ownIdentitiesWithoutSone); if (request.getMethod() == Method.POST) { diff --git a/src/main/resources/i18n/sone.de.properties b/src/main/resources/i18n/sone.de.properties index d0ec575..d7a4b9d 100644 --- a/src/main/resources/i18n/sone.de.properties +++ b/src/main/resources/i18n/sone.de.properties @@ -451,4 +451,6 @@ Notification.InsertedImages.Text=Diese Bilder wurden nach Freenet hoch geladen: Notification.ImageInsertFailed.Text=Diese Bilder konnten nicht nach Freenet hoch geladen werden: Notification.Mention.ShortText=Sie wurden erwähnt. Notification.Mention.Text=Sie wurden in diesen Nachrichten erwähnt: -Notification.SoneInsert.Duration={0,number} {0,choice,0#Sekunden|1#Sekunde|1 - - - -
- -
-
- - - +<%ifnull !currentSone> +
+ + + +
+ +
+
+ + +
+<%/if> diff --git a/src/main/resources/templates/notify/soneInsertNotification.html b/src/main/resources/templates/notify/soneInsertNotification.html index d760191..c15864f 100644 --- a/src/main/resources/templates/notify/soneInsertNotification.html +++ b/src/main/resources/templates/notify/soneInsertNotification.html @@ -1,7 +1,7 @@ <%if soneStatus|match value=="inserting"> - Your Sone <%insertSone.niceName|html> is now being inserted. + <%= Notification.SoneIsInserting.Text|l10n 0=insertSone.id|parse> <%elseif soneStatus|match value=="inserted"> - Your Sone <%insertSone.niceName|html> has been inserted in <%= Notification.SoneInsert.Duration|l10n 0=insertDuration>. + <%= Notification.SoneIsInserted.Text|l10n 0=insertSone.id 1=insertDuration|parse> <%elseif soneStatus|match value=="insert-aborted"> - Inserting your Sone <%insertSone.niceName|html> has failed. -<%/if> \ No newline at end of file + <%= Notification.SoneInsertAborted.Text|l10n 0=insertSone.id|parse> +<%/if>