Merge remote-tracking branch 'beak/next' into next
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 9 Jul 2013 20:15:44 +0000 (22:15 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 9 Jul 2013 20:15:44 +0000 (22:15 +0200)
src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java
src/main/java/net/pterodactylus/sone/web/CreateSonePage.java
src/main/resources/i18n/sone.de.properties
src/main/resources/i18n/sone.en.properties
src/main/resources/i18n/sone.fr.properties
src/main/resources/i18n/sone.ja.properties
src/main/resources/i18n/sone.no.properties
src/main/resources/i18n/sone.pl.properties
src/main/resources/i18n/sone.ru.properties
src/main/resources/templates/include/updateStatus.html
src/main/resources/templates/notify/soneInsertNotification.html

index 36ac8cd..c8075c5 100644 (file)
@@ -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());
        }
+
 }
index aea76c4..fe8c32e 100644 (file)
@@ -97,6 +97,9 @@ public class CreateSonePage extends SoneTemplatePage {
        @Override
        protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
                super.processTemplate(request, templateContext);
+               List<Sone> localSones = new ArrayList<Sone>(webInterface.getCore().getLocalSones());
+               Collections.sort(localSones, Sone.NICE_NAME_COMPARATOR);
+               templateContext.set("sones", localSones);
                List<OwnIdentity> ownIdentitiesWithoutSone = getOwnIdentitiesWithoutSone(webInterface.getCore());
                templateContext.set("identitiesWithoutSone", ownIdentitiesWithoutSone);
                if (request.getMethod() == Method.POST) {
index d0ec575..d7a4b9d 100644 (file)
@@ -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<Sekunden}
+Notification.SoneIsInserting.Text=Ihre Sone sone://{0} wird jetzt hoch geladen.
+Notification.SoneIsInserted.Text=Ihre Sone sone://{0} wurde in {1,number} {1,choice,0#Sekunden|1#Sekunde|1<Sekunden} hoch geladen.
+Notification.SoneInsertAborted.Text=Ihre Sone sone://{0} konnte nicht hoch geladen werden.
index 6bab23e..9ecd0de 100644 (file)
@@ -451,4 +451,6 @@ Notification.InsertedImages.Text=The following images have been inserted:
 Notification.ImageInsertFailed.Text=The following images could not be inserted:
 Notification.Mention.ShortText=You have been mentioned.
 Notification.Mention.Text=You have been mentioned in the following posts:
-Notification.SoneInsert.Duration={0,number} {0,choice,0#seconds|1#second|1<seconds}
+Notification.SoneIsInserting.Text=Your Sone sone://{0} is now being inserted.
+Notification.SoneIsInserted.Text=Your Sone sone://{0} has been inserted in {1,number} {1,choice,0#seconds|1#second|1<seconds}.
+Notification.SoneInsertAborted.Text=Your Sone sone://{0} could not be inserted.
index 397032f..c55159d 100644 (file)
@@ -451,5 +451,7 @@ Notification.InsertedImages.Text=Les images suivantes ont été insérées:
 Notification.ImageInsertFailed.Text=Les images suivantes ne peuvent être insérées:
 Notification.Mention.ShortText=Vous avez été mentionné.
 Notification.Mention.Text=Vous avez été mentionné dans les messages suivants:
-Notification.SoneInsert.Duration={0,number} {0,choice,0#seconds|1#second|1<seconds}
-# 120-121
+Notification.SoneIsInserting.Text=Your Sone sone://{0} is now being inserted.
+Notification.SoneIsInserted.Text=Your Sone sone://{0} has been inserted in {1,number} {1,choice,0#seconds|1#second|1<seconds}.
+Notification.SoneInsertAborted.Text=Your Sone sone://{0} could not be inserted.
+# 120-121, 454-456
index cf6e026..145ae82 100644 (file)
@@ -451,5 +451,7 @@ Notification.InsertedImages.Text=次の画像のインサートされました:
 Notification.ImageInsertFailed.Text=次の画像のインサートに失敗しました:
 Notification.Mention.ShortText=誰かにメンションされました。
 Notification.Mention.Text=次の投稿でメンションされています:
-Notification.SoneInsert.Duration={0,number} {0,choice,0#秒|1#秒|1<秒}
-# 120-121
+Notification.SoneIsInserting.Text=Your Sone sone://{0} is now being inserted.
+Notification.SoneIsInserted.Text=Your Sone sone://{0} has been inserted in {1,number} {1,choice,0#seconds|1#second|1<seconds}.
+Notification.SoneInsertAborted.Text=Your Sone sone://{0} could not be inserted.
+# 120-121, 454-456
index c61d7a5..92ac37b 100644 (file)
@@ -451,5 +451,7 @@ Notification.InsertedImages.Text=De følgende bildene har blitt lastet opp:
 Notification.ImageInsertFailed.Text=De følgende bildene kunne ikke bli innsatt:
 Notification.Mention.ShortText=Du har blitt nevnt:
 Notification.Mention.Text=Du har blitt nevnt i følgende innlegg:
-Notification.SoneInsert.Duration={0,number} {0,choice,0#sekund|1#sekund|1<sekunder}
-# 120-121
+Notification.SoneIsInserting.Text=Your Sone sone://{0} is now being inserted.
+Notification.SoneIsInserted.Text=Your Sone sone://{0} has been inserted in {1,number} {1,choice,0#seconds|1#second|1<seconds}.
+Notification.SoneInsertAborted.Text=Your Sone sone://{0} could not be inserted.
+# 120-121, 454-456
index caac397..8a40478 100644 (file)
@@ -451,5 +451,7 @@ Notification.InsertedImages.Text=Załadowano nastepujące obrazy:
 Notification.ImageInsertFailed.Text=Nie można załadowac następujących obrazów:
 Notification.Mention.ShortText=Zostałeś oznaczony.
 Notification.Mention.Text=Zostałeś oznaczony w następujących postach:
-Notification.SoneInsert.Duration={0,number} {0,choice,0#seconds|1#second|1<seconds}
-# 120-121
+Notification.SoneIsInserting.Text=Your Sone sone://{0} is now being inserted.
+Notification.SoneIsInserted.Text=Your Sone sone://{0} has been inserted in {1,number} {1,choice,0#seconds|1#second|1<seconds}.
+Notification.SoneInsertAborted.Text=Your Sone sone://{0} could not be inserted.
+# 120-121, 454-456
index b34c905..09efa9f 100644 (file)
@@ -451,5 +451,7 @@ Notification.InsertedImages.Text=Следующие изображения бы
 Notification.ImageInsertFailed.Text=Следующие изображения не могут быть выгружены:
 Notification.Mention.ShortText=Вас упомянули.
 Notification.Mention.Text=Вас упомянули в следующих сообщениях:
-Notification.SoneInsert.Duration={0,number} {0,choice,0#секунд|1#секунда|2#секунды|4<секунд}
-# 120-121
+Notification.SoneIsInserting.Text=Your Sone sone://{0} is now being inserted.
+Notification.SoneIsInserted.Text=Your Sone sone://{0} has been inserted in {1,number} {1,choice,0#seconds|1#second|1<seconds}.
+Notification.SoneInsertAborted.Text=Your Sone sone://{0} could not be inserted.
+# 120-121, 454-456
index dde0486..aa87ce8 100644 (file)
@@ -1,15 +1,17 @@
-<form id="update-status" action="createPost.html" method="post">
-       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-       <label for="sender"><%= Page.Index.Label.Sender|l10n|html></label>
-       <div class="sender">
-               <select name="sender" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">
-                       <%foreach localSones localSone|sort>
-                               <option value="<% localSone.id|html>"<%if localSone.current> selected="selected"<%/if>><% localSone.niceName|html></option>
-                       <%/foreach>
-               </select>
-       </div>
-       <div class="select-sender"><button type="button" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">+</button></div><label for="text"><%= Page.Index.Label.Text|l10n|html></label>
-       <textarea class="rip-out status-input" name="text"></textarea>
-       <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
-</form>
+<%ifnull !currentSone>
+    <form id="update-status" action="createPost.html" method="post">
+        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+        <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+        <label for="sender"><%= Page.Index.Label.Sender|l10n|html></label>
+        <div class="sender">
+            <select name="sender" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">
+                <%foreach localSones localSone|sort>
+                    <option value="<% localSone.id|html>"<%if localSone.current> selected="selected"<%/if>><% localSone.niceName|html></option>
+                <%/foreach>
+            </select>
+        </div>
+        <div class="select-sender"><button type="button" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">+</button></div><label for="text"><%= Page.Index.Label.Text|l10n|html></label>
+        <textarea class="rip-out status-input" name="text"></textarea>
+        <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
+    </form>
+<%/if>
index d760191..c15864f 100644 (file)
@@ -1,7 +1,7 @@
 <%if soneStatus|match value=="inserting">
-       Your Sone <a href="viewSone.html?sone=<%insertSone.id|html>"><%insertSone.niceName|html></a> is now being inserted.
+       <%= Notification.SoneIsInserting.Text|l10n 0=insertSone.id|parse>
 <%elseif soneStatus|match value=="inserted">
-       Your Sone <a href="viewSone.html?sone=<%insertSone.id|html>"><%insertSone.niceName|html></a> 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 <a href="viewSone.html?sone=<%insertSone.id|html>"><%insertSone.niceName|html></a> has failed.
-<%/if>
\ No newline at end of file
+       <%= Notification.SoneInsertAborted.Text|l10n 0=insertSone.id|parse>
+<%/if>