Merge branch 'release-0.12' 0.12
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 3 Feb 2015 17:58:50 +0000 (18:58 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 3 Feb 2015 17:58:50 +0000 (18:58 +0100)
34 files changed:
pom.xml
src/main/java/de/todesbaum/jsite/application/AbortedException.java
src/main/java/de/todesbaum/jsite/application/FileOption.java
src/main/java/de/todesbaum/jsite/application/Freenet7Interface.java
src/main/java/de/todesbaum/jsite/application/InsertListener.java
src/main/java/de/todesbaum/jsite/application/Node.java
src/main/java/de/todesbaum/jsite/application/Project.java
src/main/java/de/todesbaum/jsite/application/ProjectInsertListeners.java [new file with mode: 0644]
src/main/java/de/todesbaum/jsite/application/ProjectInserter.java
src/main/java/de/todesbaum/jsite/application/UpdateChecker.java
src/main/java/de/todesbaum/jsite/application/UpdateListener.java
src/main/java/de/todesbaum/jsite/application/WebOfTrustInterface.java
src/main/java/de/todesbaum/jsite/gui/FileScanner.java
src/main/java/de/todesbaum/jsite/gui/FileScannerListener.java
src/main/java/de/todesbaum/jsite/gui/KeyDialog.java
src/main/java/de/todesbaum/jsite/gui/NodeManagerListener.java
src/main/java/de/todesbaum/jsite/gui/NodeManagerPage.java
src/main/java/de/todesbaum/jsite/gui/PreferencesPage.java
src/main/java/de/todesbaum/jsite/gui/ProjectFilesPage.java
src/main/java/de/todesbaum/jsite/gui/ProjectInsertPage.java
src/main/java/de/todesbaum/jsite/gui/ProjectPage.java
src/main/java/de/todesbaum/jsite/i18n/I18n.java
src/main/java/de/todesbaum/jsite/i18n/I18nContainer.java
src/main/java/de/todesbaum/jsite/main/CLI.java
src/main/java/de/todesbaum/jsite/main/Configuration.java
src/main/java/de/todesbaum/jsite/main/ConfigurationLocator.java
src/main/java/de/todesbaum/jsite/main/Main.java
src/main/java/de/todesbaum/jsite/main/Version.java
src/main/resources/de/todesbaum/jsite/i18n/jSite.properties
src/main/resources/de/todesbaum/jsite/i18n/jSite_de.properties
src/main/resources/de/todesbaum/jsite/i18n/jSite_fi.properties [new file with mode: 0644]
src/main/resources/de/todesbaum/jsite/i18n/jSite_fr.properties
src/main/resources/de/todesbaum/jsite/i18n/jSite_pl.properties
src/main/resources/flag-fi.png [new file with mode: 0644]

diff --git a/pom.xml b/pom.xml
index 7302bb8..88db65b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -2,13 +2,22 @@
        <modelVersion>4.0.0</modelVersion>
        <groupId>net.pterodactylus</groupId>
        <artifactId>jSite</artifactId>
-       <version>0.11.1</version>
+       <version>${version}</version>
+       <properties>
+               <version>0.12</version>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+       </properties>
        <dependencies>
                <dependency>
                        <groupId>net.pterodactylus</groupId>
                        <artifactId>utils</artifactId>
                        <version>0.12.1</version>
                </dependency>
+               <dependency>
+                       <groupId>com.google.guava</groupId>
+                       <artifactId>guava</artifactId>
+                       <version>14.0.1</version>
+               </dependency>
        </dependencies>
        <repositories>
                <repository>
@@ -16,9 +25,6 @@
                        <url>http://maven.pterodactylus.net/</url>
                </repository>
        </repositories>
-       <properties>
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-       </properties>
        <build>
                <plugins>
                        <plugin>
@@ -27,6 +33,7 @@
                                <configuration>
                                        <source>1.6</source>
                                        <target>1.6</target>
+                                       <encoding>UTF-8</encoding>
                                </configuration>
                        </plugin>
                        <plugin>
                                        <mainClass>de.todesbaum.jsite.main.Main</mainClass>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>0.7.1.201405082137</version>
+                               <executions>
+                                       <execution>
+                                               <id>default-prepare-agent</id>
+                                               <goals>
+                                                       <goal>prepare-agent</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>default-report</id>
+                                               <phase>prepare-package</phase>
+                                               <goals>
+                                                       <goal>report</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>default-check</id>
+                                               <goals>
+                                                       <goal>check</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <rules>
+                                                               <!--  implmentation is needed only for Maven 2  -->
+                                                               <rule implementation="org.jacoco.maven.RuleConfiguration">
+                                                                       <element>BUNDLE</element>
+                                                                       <limits>
+                                                                               <!--  implmentation is needed only for Maven 2  -->
+                                                                               <limit implementation="org.jacoco.report.check.Limit">
+                                                                                       <counter>COMPLEXITY</counter>
+                                                                                       <value>COVEREDRATIO</value>
+                                                                                       <minimum>0.60</minimum>
+                                                                               </limit>
+                                                                       </limits>
+                                                               </rule>
+                                                       </rules>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
        </build>
        <reporting>
index 0dfd8c7..f399575 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - AbortedException.java - Copyright © 2010–2012 David Roden
+ * jSite - AbortedException.java - Copyright © 2010–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index c8824de..4c38286 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - FileOption.java - Copyright © 2006–2012 David Roden
+ * jSite - FileOption.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
 
 package de.todesbaum.jsite.application;
 
+import static com.google.common.base.Optional.absent;
+import static com.google.common.base.Optional.of;
+
+import com.google.common.base.Optional;
+
 /**
  * Container for various file options.
  *
@@ -34,9 +39,6 @@ public class FileOption {
        /** The default for the custom key. */
        private static final String DEFAULT_CUSTOM_KEY = "CHK@";
 
-       /** The default changed name. */
-       private static final String DEFAULT_CHANGED_NAME = null;
-
        /** The insert state. */
        private boolean insert;
 
@@ -62,7 +64,7 @@ public class FileOption {
        private String customKey;
 
        /** The changed name. */
-       private String changedName;
+       private Optional<String> changedName = absent();
 
        /** The default MIME type. */
        private final String defaultMimeType;
@@ -80,7 +82,6 @@ public class FileOption {
                insert = DEFAULT_INSERT;
                insertRedirect = DEFAULT_INSERT_REDIRECT;
                customKey = DEFAULT_CUSTOM_KEY;
-               changedName = DEFAULT_CHANGED_NAME;
                this.defaultMimeType = defaultMimeType;
                mimeType = defaultMimeType;
        }
@@ -278,24 +279,13 @@ public class FileOption {
        }
 
        /**
-        * Returns whether this file has a changed name. Use
-        * {@link #getChangedName()} is this method returns {@code true}.
-        *
-        * @return {@code true} if this file has a changed name, {@code false}
-        *         otherwise
-        */
-       public boolean hasChangedName() {
-               return (changedName != null) && (changedName.length() > 0);
-       }
-
-       /**
         * Returns the changed name for this file. This method will return {@code
         * null} or an empty {@link String} if this file should not be renamed.
         *
         * @return The changed name, or {@code null} if this file should not be
         *         renamed
         */
-       public String getChangedName() {
+       public Optional<String> getChangedName() {
                return changedName;
        }
 
@@ -307,7 +297,7 @@ public class FileOption {
         *            The new changed name for this file
         */
        public void setChangedName(String changedName) {
-               this.changedName = changedName;
+               this.changedName = ((changedName != null) && (changedName.length() > 0)) ? of(changedName) : Optional.<String>absent();
        }
 
        /**
@@ -349,7 +339,7 @@ public class FileOption {
                if (!customKey.equals(DEFAULT_CUSTOM_KEY)) {
                        return true;
                }
-               if (((changedName != null) && !changedName.equals(DEFAULT_CHANGED_NAME)) || ((DEFAULT_CHANGED_NAME != null) && !DEFAULT_CHANGED_NAME.equals(changedName))) {
+               if (changedName.isPresent()) {
                        return true;
                }
                if (!defaultMimeType.equals(mimeType)) {
index 78250b2..657adfe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - Freenet7Interface.java - Copyright © 2006–2012 David Roden
+ * jSite - Freenet7Interface.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 9b6b332..8d6eba0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - InsertListener.java - Copyright © 2006–2012 David Roden
+ * jSite - InsertListener.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index df7492f..2851e89 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - Node.java - Copyright © 2006–2012 David Roden
+ * jSite - Node.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 484de85..836a2cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - Project.java - Copyright © 2006–2012 David Roden
+ * jSite - Project.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
@@ -460,7 +460,7 @@ public class Project implements Comparable<Project> {
                        if ((fileOption.getCurrentHash() != null) && (fileOption.getCurrentHash().length() > 0) && (!fileOption.getCurrentHash().equals(fileOption.getLastInsertHash()) || fileOption.isForceInsert())) {
                                fileOption.setLastInsertEdition(edition);
                                fileOption.setLastInsertHash(fileOption.getCurrentHash());
-                               fileOption.setLastInsertFilename(fileOption.hasChangedName() ? fileOption.getChangedName() : fileOptionEntry.getKey());
+                               fileOption.setLastInsertFilename(fileOption.getChangedName().or(fileOptionEntry.getKey()));
                        }
                        fileOption.setForceInsert(false);
                }
diff --git a/src/main/java/de/todesbaum/jsite/application/ProjectInsertListeners.java b/src/main/java/de/todesbaum/jsite/application/ProjectInsertListeners.java
new file mode 100644 (file)
index 0000000..2bccf31
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * jSite - ProjectInsertListeners.java - Copyright © 2013–2014 David Roden
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package de.todesbaum.jsite.application;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Manages {@link InsertListener}s for the {@link ProjectInserter}.
+ *
+ * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
+ */
+class ProjectInsertListeners {
+
+       /** The list of insert listeners. */
+       private final List<InsertListener> insertListeners = new ArrayList<InsertListener>();
+
+       /**
+        * Adds a listener to the list of registered listeners.
+        *
+        * @param insertListener
+        *              The listener to add
+        */
+       void addInsertListener(InsertListener insertListener) {
+               insertListeners.add(insertListener);
+       }
+
+       /**
+        * Removes a listener from the list of registered listeners.
+        *
+        * @param insertListener
+        *              The listener to remove
+        */
+       void removeInsertListener(InsertListener insertListener) {
+               insertListeners.remove(insertListener);
+       }
+
+       /**
+        * Notifies all listeners that the project insert has started.
+        *
+        * @param project
+        * @see InsertListener#projectInsertStarted(Project)
+        */
+       void fireProjectInsertStarted(Project project) {
+               for (InsertListener insertListener : insertListeners) {
+                       insertListener.projectInsertStarted(project);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the insert has generated a URI.
+        *
+        * @param project
+        * @param uri
+        *              The generated URI
+        * @see InsertListener#projectURIGenerated(Project, String)
+        */
+       void fireProjectURIGenerated(Project project, String uri) {
+               for (InsertListener insertListener : insertListeners) {
+                       insertListener.projectURIGenerated(project, uri);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the insert has made some progress.
+        *
+        * @param project
+        * @see InsertListener#projectUploadFinished(Project)
+        */
+       void fireProjectUploadFinished(Project project) {
+               for (InsertListener insertListener : insertListeners) {
+                       insertListener.projectUploadFinished(project);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the insert has made some progress.
+        *
+        * @param project
+        * @param succeeded
+        *              The number of succeeded blocks
+        * @param failed
+        *              The number of failed blocks
+        * @param fatal
+        *              The number of fatally failed blocks
+        * @param total
+        *              The total number of blocks
+        * @param finalized
+        *              <code>true</code> if the total number of blocks has already been
+        *              finalized, <code>false</code> otherwise
+        * @see InsertListener#projectInsertProgress(Project, int, int, int, int,
+        *      boolean)
+        */
+       void fireProjectInsertProgress(Project project, int succeeded, int failed, int fatal, int total, boolean finalized) {
+               for (InsertListener insertListener : insertListeners) {
+                       insertListener.projectInsertProgress(project, succeeded, failed, fatal, total, finalized);
+               }
+       }
+
+       /**
+        * Notifies all listeners the project insert has finished.
+        *
+        * @param project
+        * @param success
+        *              <code>true</code> if the project was inserted successfully,
+        *              <code>false</code> if it failed
+        * @param cause
+        *              The cause of the failure, if any
+        * @see InsertListener#projectInsertFinished(Project, boolean, Throwable)
+        */
+       void fireProjectInsertFinished(Project project, boolean success, Throwable cause) {
+               for (InsertListener insertListener : insertListeners) {
+                       insertListener.projectInsertFinished(project, success, cause);
+               }
+       }
+
+}
index 30d4d7a..35a2452 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - ProjectInserter.java - Copyright © 2006–2012 David Roden
+ * jSite - ProjectInserter.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@ package de.todesbaum.jsite.application;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -35,6 +36,8 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import net.pterodactylus.util.io.StreamCopier.ProgressListener;
+
+import com.google.common.base.Optional;
 import de.todesbaum.jsite.gui.FileScanner;
 import de.todesbaum.jsite.gui.FileScanner.ScannedFile;
 import de.todesbaum.jsite.gui.FileScannerListener;
@@ -65,20 +68,19 @@ public class ProjectInserter implements FileScannerListener, Runnable {
        /** Counter for FCP connection identifier. */
        private static int counter = 0;
 
-       /** The list of insert listeners. */
-       private List<InsertListener> insertListeners = new ArrayList<InsertListener>();
+       private final ProjectInsertListeners projectInsertListeners = new ProjectInsertListeners();
 
        /** The freenet interface. */
-       protected Freenet7Interface freenetInterface;
+       private Freenet7Interface freenetInterface;
 
        /** The project to insert. */
-       protected Project project;
+       private Project project;
 
        /** The file scanner. */
        private FileScanner fileScanner;
 
        /** Object used for synchronization. */
-       protected final Object lockObject = new Object();
+       private final Object lockObject = new Object();
 
        /** The temp directory. */
        private String tempDirectory;
@@ -108,91 +110,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
         *            The listener to add
         */
        public void addInsertListener(InsertListener insertListener) {
-               insertListeners.add(insertListener);
-       }
-
-       /**
-        * Removes a listener from the list of registered listeners.
-        *
-        * @param insertListener
-        *            The listener to remove
-        */
-       public void removeInsertListener(InsertListener insertListener) {
-               insertListeners.remove(insertListener);
-       }
-
-       /**
-        * Notifies all listeners that the project insert has started.
-        *
-        * @see InsertListener#projectInsertStarted(Project)
-        */
-       protected void fireProjectInsertStarted() {
-               for (InsertListener insertListener : insertListeners) {
-                       insertListener.projectInsertStarted(project);
-               }
-       }
-
-       /**
-        * Notifies all listeners that the insert has generated a URI.
-        *
-        * @see InsertListener#projectURIGenerated(Project, String)
-        * @param uri
-        *            The generated URI
-        */
-       protected void fireProjectURIGenerated(String uri) {
-               for (InsertListener insertListener : insertListeners) {
-                       insertListener.projectURIGenerated(project, uri);
-               }
-       }
-
-       /**
-        * Notifies all listeners that the insert has made some progress.
-        *
-        * @see InsertListener#projectUploadFinished(Project)
-        */
-       protected void fireProjectUploadFinished() {
-               for (InsertListener insertListener : insertListeners) {
-                       insertListener.projectUploadFinished(project);
-               }
-       }
-
-       /**
-        * Notifies all listeners that the insert has made some progress.
-        *
-        * @see InsertListener#projectInsertProgress(Project, int, int, int, int,
-        *      boolean)
-        * @param succeeded
-        *            The number of succeeded blocks
-        * @param failed
-        *            The number of failed blocks
-        * @param fatal
-        *            The number of fatally failed blocks
-        * @param total
-        *            The total number of blocks
-        * @param finalized
-        *            <code>true</code> if the total number of blocks has already
-        *            been finalized, <code>false</code> otherwise
-        */
-       protected void fireProjectInsertProgress(int succeeded, int failed, int fatal, int total, boolean finalized) {
-               for (InsertListener insertListener : insertListeners) {
-                       insertListener.projectInsertProgress(project, succeeded, failed, fatal, total, finalized);
-               }
-       }
-
-       /**
-        * Notifies all listeners the project insert has finished.
-        *
-        * @see InsertListener#projectInsertFinished(Project, boolean, Throwable)
-        * @param success
-        *            <code>true</code> if the project was inserted successfully,
-        *            <code>false</code> if it failed
-        * @param cause
-        *            The cause of the failure, if any
-        */
-       protected void fireProjectInsertFinished(boolean success, Throwable cause) {
-               for (InsertListener insertListener : insertListeners) {
-                       insertListener.projectInsertFinished(project, success, cause);
-               }
+               projectInsertListeners.addInsertListener(insertListener);
        }
 
        /**
@@ -284,41 +202,14 @@ public class ProjectInserter implements FileScannerListener, Runnable {
        }
 
        /**
-        * Creates an input stream that delivers the given file, replacing edition
-        * tokens in the file’s content, if necessary.
-        *
-        * @param filename
-        *            The name of the file
-        * @param fileOption
-        *            The file options
-        * @param edition
-        *            The current edition
-        * @param length
-        *            An array containing a single long which is used to
-        *            <em>return</em> the final length of the file, after all
-        *            replacements
-        * @return The input stream for the file
-        * @throws IOException
-        *             if an I/O error occurs
-        */
-       private InputStream createFileInputStream(String filename, FileOption fileOption, int edition, long[] length) throws IOException {
-               File file = new File(project.getLocalPath(), filename);
-               length[0] = file.length();
-               return new FileInputStream(file);
-       }
-
-       /**
         * Creates a file entry suitable for handing in to
         * {@link ClientPutComplexDir#addFileEntry(FileEntry)}.
         *
         * @param file
-        *            The name and hash of the file to insert
-        * @param edition
-        *            The current edition
+        *              The name and hash of the file to insert
         * @return A file entry for the given file
         */
-       private FileEntry createFileEntry(ScannedFile file, int edition) {
-               FileEntry fileEntry = null;
+       private FileEntry createFileEntry(ScannedFile file) {
                String filename = file.getFilename();
                FileOption fileOption = project.getFileOption(filename);
                if (fileOption.isInsert()) {
@@ -327,21 +218,25 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                        if (!project.isAlwaysForceInsert() && !fileOption.isForceInsert() && file.getHash().equals(fileOption.getLastInsertHash())) {
                                /* only insert a redirect. */
                                logger.log(Level.FINE, String.format("Inserting redirect to edition %d for %s.", fileOption.getLastInsertEdition(), filename));
-                               return new RedirectFileEntry(fileOption.hasChangedName() ? fileOption.getChangedName() : filename, fileOption.getMimeType(), "SSK@" + project.getRequestURI() + "/" + project.getPath() + "-" + fileOption.getLastInsertEdition() + "/" + fileOption.getLastInsertFilename());
+                               return new RedirectFileEntry(fileOption.getChangedName().or(filename), fileOption.getMimeType(), "SSK@" + project.getRequestURI() + "/" + project.getPath() + "-" + fileOption.getLastInsertEdition() + "/" + fileOption.getLastInsertFilename());
                        }
                        try {
-                               long[] fileLength = new long[1];
-                               InputStream fileEntryInputStream = createFileInputStream(filename, fileOption, edition, fileLength);
-                               fileEntry = new DirectFileEntry(fileOption.hasChangedName() ? fileOption.getChangedName() : filename, fileOption.getMimeType(), fileEntryInputStream, fileLength[0]);
+                               return createFileEntry(filename, fileOption.getChangedName(), fileOption.getMimeType());
                        } catch (IOException ioe1) {
                                /* ignore, null is returned. */
                        }
                } else {
                        if (fileOption.isInsertRedirect()) {
-                               fileEntry = new RedirectFileEntry(fileOption.hasChangedName() ? fileOption.getChangedName() : filename, fileOption.getMimeType(), fileOption.getCustomKey());
+                               return new RedirectFileEntry(fileOption.getChangedName().or(filename), fileOption.getMimeType(), fileOption.getCustomKey());
                        }
                }
-               return fileEntry;
+               return null;
+       }
+
+       private FileEntry createFileEntry(String filename, Optional<String> changedName, String mimeType) throws FileNotFoundException {
+               File physicalFile = new File(project.getLocalPath(), filename);
+               InputStream fileEntryInputStream = new FileInputStream(physicalFile);
+               return new DirectFileEntry(changedName.or(filename), mimeType, fileEntryInputStream, physicalFile.length());
        }
 
        /**
@@ -399,10 +294,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                                logger.log(Level.FINEST, "Ignoring {0}.", fileOptionEntry.getKey());
                                continue;
                        }
-                       String fileName = fileOptionEntry.getKey();
-                       if (fileOption.hasChangedName()) {
-                               fileName = fileOption.getChangedName();
-                       }
+                       String fileName = fileOption.getChangedName().or(fileOptionEntry.getKey());
                        logger.log(Level.FINEST, "Adding “{0}” for {1}.", new Object[] { fileName, fileOptionEntry.getKey() });
                        if (!fileNames.add(fileName)) {
                                checkReport.addIssue("error.duplicate-file", true, fileName);
@@ -445,7 +337,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
         */
        @Override
        public void run() {
-               fireProjectInsertStarted();
+               projectInsertListeners.fireProjectInsertStarted(project);
                List<ScannedFile> files = fileScanner.getFiles();
 
                /* create connection to node */
@@ -462,7 +354,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                }
 
                if (!connected || cancelled) {
-                       fireProjectInsertFinished(false, cancelled ? new AbortedException() : cause);
+                       projectInsertListeners.fireProjectInsertFinished(project, false, cancelled ? new AbortedException() : cause);
                        return;
                }
 
@@ -473,7 +365,13 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                String dirURI = "USK@" + project.getInsertURI() + "/" + project.getPath() + "/" + edition + "/";
                ClientPutComplexDir putDir = new ClientPutComplexDir("dir-" + counter++, dirURI, tempDirectory);
                if ((project.getIndexFile() != null) && (project.getIndexFile().length() > 0)) {
-                       putDir.setDefaultName(project.getIndexFile());
+                       FileOption indexFileOption = project.getFileOption(project.getIndexFile());
+                       Optional<String> changedName = indexFileOption.getChangedName();
+                       if (changedName.isPresent()) {
+                               putDir.setDefaultName(changedName.get());
+                       } else {
+                               putDir.setDefaultName(project.getIndexFile());
+                       }
                }
                putDir.setVerbosity(Verbosity.ALL);
                putDir.setMaxRetries(-1);
@@ -481,12 +379,12 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                putDir.setPriorityClass(priority);
                putDir.setManifestPutter(manifestPutter);
                for (ScannedFile file : files) {
-                       FileEntry fileEntry = createFileEntry(file, edition);
+                       FileEntry fileEntry = createFileEntry(file);
                        if (fileEntry != null) {
                                try {
                                        putDir.addFileEntry(fileEntry);
                                } catch (IOException ioe1) {
-                                       fireProjectInsertFinished(false, ioe1);
+                                       projectInsertListeners.fireProjectInsertFinished(project, false, ioe1);
                                        return;
                                }
                        }
@@ -495,9 +393,9 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                /* start request */
                try {
                        client.execute(putDir, progressListener);
-                       fireProjectUploadFinished();
+                       projectInsertListeners.fireProjectUploadFinished(project);
                } catch (IOException ioe1) {
-                       fireProjectInsertFinished(false, ioe1);
+                       projectInsertListeners.fireProjectInsertFinished(project, false, ioe1);
                        return;
                }
 
@@ -515,7 +413,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                                String messageName = message.getName();
                                if ("URIGenerated".equals(messageName)) {
                                        finalURI = message.get("URI");
-                                       fireProjectURIGenerated(finalURI);
+                                       projectInsertListeners.fireProjectURIGenerated(project, finalURI);
                                }
                                if ("SimpleProgress".equals(messageName)) {
                                        int total = Integer.parseInt(message.get("Total"));
@@ -523,7 +421,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                                        int fatal = Integer.parseInt(message.get("FatallyFailed"));
                                        int failed = Integer.parseInt(message.get("Failed"));
                                        boolean finalized = Boolean.parseBoolean(message.get("FinalizedTotal"));
-                                       fireProjectInsertProgress(succeeded, failed, fatal, total, finalized);
+                                       projectInsertListeners.fireProjectInsertProgress(project, succeeded, failed, fatal, total, finalized);
                                }
                                success |= "PutSuccessful".equals(messageName);
                                finished = (success && (finalURI != null)) || "PutFailed".equals(messageName) || messageName.endsWith("Error");
@@ -539,7 +437,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                        project.setLastInsertionTime(System.currentTimeMillis());
                        project.onSuccessfulInsert();
                }
-               fireProjectInsertFinished(success, cancelled ? new AbortedException() : (disconnected ? new IOException("Connection terminated") : null));
+               projectInsertListeners.fireProjectInsertFinished(project, success, cancelled ? new AbortedException() : (disconnected ? new IOException("Connection terminated") : null));
        }
 
        //
@@ -554,7 +452,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                if (!fileScanner.isError()) {
                        new Thread(this).start();
                } else {
-                       fireProjectInsertFinished(false, null);
+                       projectInsertListeners.fireProjectInsertFinished(project, false, null);
                }
                fileScanner.removeFileScannerListener(this);
        }
index 11be944..24949a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - UpdateChecker.java - Copyright © 2008–2012 David Roden
+ * jSite - UpdateChecker.java - Copyright © 2008–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -51,10 +51,10 @@ public class UpdateChecker implements Runnable {
        private static int counter = 0;
 
        /** The edition for the update check URL. */
-       private static final int UPDATE_EDITION = 18;
+       private static final int UPDATE_EDITION = 7;
 
        /** The URL for update checks. */
-       private static final String UPDATE_KEY = "USK@e3myoFyp5avg6WYN16ImHri6J7Nj8980Fm~aQe4EX1U,QvbWT0ImE0TwLODTl7EoJx2NBnwDxTbLTE6zkB-eGPs,AQACAAE";
+       private static final String UPDATE_KEY = "USK@1waTsw46L9-JEQ8yX1khjkfHcn--g0MlMsTlYHax9zQ,oYyxr5jyFnaTsVGDQWk9e3ddOWGKnqEASxAk08MHT2Y,AQACAAE";
 
        /** Object used for synchronization. */
        private final Object syncObject = new Object();
index a37440c..68ca4da 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - UpdateListener.java - Copyright © 2008–2012 David Roden
+ * jSite - UpdateListener.java - Copyright © 2008–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index ea5c6b3..cf5435c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - WebOfTrustInterface.java - Copyright © 2012 David Roden
+ * jSite - WebOfTrustInterface.java - Copyright © 2012–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 
 package de.todesbaum.jsite.application;
 
+import static java.util.Collections.emptyList;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -38,7 +40,7 @@ import de.todesbaum.util.freenet.fcp2.wot.OwnIdentity;
  *
  * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
  */
-public class WebOfTrustInterface implements Runnable {
+public class WebOfTrustInterface {
 
        /** The logger. */
        private static final Logger logger = Logging.getLogger(WebOfTrustInterface.class);
@@ -46,18 +48,9 @@ public class WebOfTrustInterface implements Runnable {
        /** Unique ID for the command identifier. */
        private static final AtomicLong commandCounter = new AtomicLong(System.nanoTime());
 
-       /** Object used for synchronization. */
-       private final Object syncObject = new Object();
-
        /** The freenet interface. */
        private final Freenet7Interface freenetInterface;
 
-       /** Whether the interface should stop. */
-       private boolean shouldStop;
-
-       /** The own identities. */
-       private final List<OwnIdentity> ownIdentities = new ArrayList<OwnIdentity>();
-
        /**
         * Creates a new web of trust interface.
         *
@@ -79,47 +72,72 @@ public class WebOfTrustInterface implements Runnable {
         * @return The list of own identities
         */
        public List<OwnIdentity> getOwnIdentities() {
-               synchronized (ownIdentities) {
-                       return new ArrayList<OwnIdentity>(ownIdentities);
-               }
-       }
+               try {
+
+                       /* connect. */
+                       Connection connection = freenetInterface.getConnection("jSite-WoT-Connector");
+                       logger.log(Level.INFO, String.format("Trying to connect to node at %s...", freenetInterface.getNode()));
+                       if (!connection.connect()) {
+                               logger.log(Level.WARNING, "Connection failed.");
+                               return emptyList();
+                       }
+                       Client client = new Client(connection);
 
-       //
-       // ACTIONS
-       //
+                       /* send FCP command to WebOfTrust plugin. */
+                       sendFcpCommandToWotPlugin(client);
 
-       /**
-        * Starts the web of trust interface.
-        */
-       public void start() {
-               Thread webOfTrustThread = new Thread(this, "WebOfTrust Interface");
-               webOfTrustThread.start();
-       }
+                       /* read a message. */
+                       Message message = null;
+                       while (!client.isDisconnected() && (message == null)) {
+                               message = client.readMessage(1000);
+                       }
+                       if (message == null) {
+                               return emptyList();
+                       }
 
-       /**
-        * Stops the web of trust interface
-        */
-       public void stop() {
-               synchronized (syncObject) {
-                       shouldStop = true;
-                       syncObject.notifyAll();
+                       /* evaluate message. */
+                       List<OwnIdentity> ownIdentities = parseOwnIdentitiesFromMessage(message);
+
+            /* disconnect. */
+                       logger.log(Level.INFO, "Disconnecting from Node.");
+                       connection.disconnect();
+                       return ownIdentities;
+               } catch (IOException ioe1) {
+                       logger.log(Level.WARNING, String.format("Communication with node at %s failed.", freenetInterface.getNode()), ioe1);
+                       return emptyList();
                }
        }
 
-       //
-       // PRIVATE METHODS
-       //
+       private void sendFcpCommandToWotPlugin(Client client) throws IOException {
+               String messageIdentifier = "jSite-WoT-Command-" + commandCounter.getAndIncrement();
+               FcpPluginMessage pluginMessage = new FcpPluginMessage(messageIdentifier);
+               pluginMessage.setPluginName("plugins.WebOfTrust.WebOfTrust");
+               pluginMessage.setParameter("Message", "GetOwnIdentities");
+               client.execute(pluginMessage);
+       }
 
-       /**
-        * Returns whether the web of trust interface should stop.
-        *
-        * @return {@code true} if the web of trust interface should stop,
-        *         {@code false} otherwise
-        */
-       private boolean shouldStop() {
-               synchronized (syncObject) {
-                       return shouldStop;
+       private List<OwnIdentity> parseOwnIdentitiesFromMessage(Message message) {
+               List<OwnIdentity> ownIdentities = new ArrayList<OwnIdentity>();
+               if (message.getName().equals("FCPPluginReply")) {
+                       logger.log(Level.FINE, "Got matching Reply from WebOfTrust.");
+                               /* parse identities. */
+                       int identityCounter = -1;
+                       while (message.get("Replies.Identity" + ++identityCounter) != null) {
+                               String id = message.get("Replies.Identity" + identityCounter);
+                               String nickname = message.get("Replies.Nickname" + identityCounter);
+                               String requestUri = shortenUri(message.get("Replies.RequestURI" + identityCounter));
+                               String insertUri = shortenUri(message.get("Replies.InsertURI" + identityCounter));
+                               DefaultOwnIdentity ownIdentity = new DefaultOwnIdentity(id, nickname, requestUri, insertUri);
+                               logger.log(Level.FINE, String.format("Parsed Own Identity %s.", ownIdentity));
+                               ownIdentities.add(ownIdentity);
+                       }
+                       logger.log(Level.INFO, String.format("Parsed %d Own Identities.", ownIdentities.size()));
+               } else if ("ProtocolError".equals(message.getName())) {
+                       logger.log(Level.WARNING, "WebOfTrust Plugin not found!");
+               } else if ("Error".equals(message.getName())) {
+                       logger.log(Level.WARNING, "WebOfTrust Plugin returned an error!");
                }
+               return ownIdentities;
        }
 
        /**
@@ -141,96 +159,4 @@ public class WebOfTrustInterface implements Runnable {
                return shortenedUri;
        }
 
-       //
-       // RUNNABLE METHODS
-       //
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
-       public void run() {
-               boolean waitBeforeReconnect = false;
-               while (!shouldStop()) {
-
-                       /* wait a minute before reconnecting for another try. */
-                       if (waitBeforeReconnect) {
-                               logger.log(Level.FINE, "Waiting 60 seconds before reconnecting.");
-                               synchronized (syncObject) {
-                                       try {
-                                               syncObject.wait(60 * 1000);
-                                       } catch (InterruptedException ie1) {
-                                               /* ignore. */
-                                       }
-                               }
-                               if (shouldStop()) {
-                                       continue;
-                               }
-                       } else {
-                               waitBeforeReconnect = true;
-                       }
-
-                       try {
-
-                               /* connect. */
-                               Connection connection = freenetInterface.getConnection("jSite-WoT-Connector");
-                               logger.log(Level.INFO, String.format("Trying to connect to node at %s...", freenetInterface.getNode()));
-                               if (!connection.connect()) {
-                                       logger.log(Level.WARNING, "Connection failed.");
-                                       continue;
-                               }
-                               Client client = new Client(connection);
-
-                               /* send FCP command to WebOfTrust plugin. */
-                               String messageIdentifier = "jSite-WoT-Command-" + commandCounter.getAndIncrement();
-                               FcpPluginMessage pluginMessage = new FcpPluginMessage(messageIdentifier);
-                               pluginMessage.setPluginName("plugins.WebOfTrust.WebOfTrust");
-                               pluginMessage.setParameter("Message", "GetOwnIdentities");
-                               client.execute(pluginMessage);
-
-                               /* read a message. */
-                               Message message = null;
-                               while (!client.isDisconnected() && !shouldStop() && (message == null)) {
-                                       message = client.readMessage(1000);
-                               }
-                               if (message == null) {
-                                       continue;
-                               }
-
-                               /* evaluate message. */
-                               if (message.getName().equals("FCPPluginReply")) {
-                                       logger.log(Level.FINE, "Got matching Reply from WebOfTrust.");
-                                       /* parse identities. */
-                                       List<OwnIdentity> ownIdentities = new ArrayList<OwnIdentity>();
-                                       int identityCounter = -1;
-                                       while (message.get("Replies.Identity" + ++identityCounter) != null) {
-                                               String id = message.get("Replies.Identity" + identityCounter);
-                                               String nickname = message.get("Replies.Nickname" + identityCounter);
-                                               String requestUri = shortenUri(message.get("Replies.RequestURI" + identityCounter));
-                                               String insertUri = shortenUri(message.get("Replies.InsertURI" + identityCounter));
-                                               DefaultOwnIdentity ownIdentity = new DefaultOwnIdentity(id, nickname, requestUri, insertUri);
-                                               logger.log(Level.FINE, String.format("Parsed Own Identity %s.", ownIdentity));
-                                               ownIdentities.add(ownIdentity);
-                                       }
-                                       logger.log(Level.INFO, String.format("Parsed %d Own Identities.", ownIdentities.size()));
-
-                                       synchronized (this.ownIdentities) {
-                                               this.ownIdentities.clear();
-                                               this.ownIdentities.addAll(ownIdentities);
-                                       }
-                               } else if ("ProtocolError".equals(message.getName())) {
-                                       logger.log(Level.WARNING, "WebOfTrust Plugin not found!");
-                               }
-
-                               /* disconnect. */
-                               logger.log(Level.INFO, "Disconnecting from Node.");
-                               connection.disconnect();
-
-                       } catch (IOException ioe1) {
-                               logger.log(Level.WARNING, String.format("Communication with node at %s failed.", freenetInterface.getNode()), ioe1);
-                       }
-
-               }
-       }
-
 }
index d86a6ba..eef5158 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - FileScanner.java - Copyright © 2006–2012 David Roden
+ * jSite - FileScanner.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 63e2c3d..d3d5145 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - FileScannerListener.java - Copyright © 2006–2012 David Roden
+ * jSite - FileScannerListener.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index ae8cea4..6f2c38e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - KeyDialog.java - Copyright © 2010–2012 David Roden
+ * jSite - KeyDialog.java - Copyright © 2010–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 760c967..4eaff14 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - NodeManagerListener.java - Copyright © 2006–2012 David Roden
+ * jSite - NodeManagerListener.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 49c25bc..bbb32de 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - NodeManagerPage.java - Copyright © 2006–2012 David Roden
+ * jSite - NodeManagerPage.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -198,7 +198,6 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene
                nodeList.setName("node-list");
                nodeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
                nodeList.addListSelectionListener(this);
-               nodeList.setPreferredSize(new Dimension(250, -1));
 
                nodeNameTextField = new JTextField("");
                nodeNameTextField.getDocument().putProperty("Name", "node-name");
@@ -237,7 +236,9 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene
                nodeInformationPanel.add(nodePortSpinner, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 6, 0, 0), 0, 0));
 
                setLayout(new BorderLayout(12, 12));
-               add(new JScrollPane(nodeList), BorderLayout.LINE_START);
+        final JScrollPane nodeListScrollPane = new JScrollPane(nodeList);
+        nodeListScrollPane.setPreferredSize(new Dimension(250, -1));
+        add(nodeListScrollPane, BorderLayout.LINE_START);
                add(centerPanel, BorderLayout.CENTER);
 
                I18nContainer.getInstance().registerRunnable(new Runnable() {
@@ -347,6 +348,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene
        private void addNode() {
                Node node = new Node("localhost", 9481, I18n.getMessage("jsite.node-manager.new-node"));
                nodeListModel.addElement(node);
+        nodeList.setSelectedIndex(nodeListModel.size() - 1);
                deleteNodeAction.setEnabled(nodeListModel.size() > 1);
                wizard.setNextEnabled(true);
                fireNodesUpdated(getNodes());
index 914e74b..7cbeec6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - PreferencesPage.java - Copyright © 2009–2012 David Roden
+ * jSite - PreferencesPage.java - Copyright © 2009–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index a9c4699..0e700c9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - ProjectFilesPage.java - Copyright © 2006–2012 David Roden
+ * jSite - ProjectFilesPage.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -628,9 +628,9 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis
                        fileOptionsInsertRedirectCheckBox.setSelected(fileOption.isInsertRedirect());
                        fileOptionsCustomKeyTextField.setEnabled(fileOption.isInsertRedirect());
                        fileOptionsCustomKeyTextField.setText(fileOption.getCustomKey());
-                       fileOptionsRenameCheckBox.setSelected(fileOption.hasChangedName());
-                       fileOptionsRenameTextField.setEnabled(fileOption.hasChangedName());
-                       fileOptionsRenameTextField.setText(fileOption.getChangedName());
+                       fileOptionsRenameCheckBox.setSelected(fileOption.getChangedName().isPresent());
+                       fileOptionsRenameTextField.setEnabled(fileOption.getChangedName().isPresent());
+                       fileOptionsRenameTextField.setText(fileOption.getChangedName().or(""));
                        fileOptionsMIMETypeComboBox.getModel().setSelectedItem(fileOption.getMimeType());
                } else {
                        defaultFileCheckBox.setSelected(false);
index b73a49a..f68144d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - ProjectInsertPage.java - Copyright © 2006–2012 David Roden
+ * jSite - ProjectInsertPage.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index ceee143..1da83d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - ProjectPage.java - Copyright © 2006–2012 David Roden
+ * jSite - ProjectPage.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 4c1cceb..e2e3b3e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - I18n.java - Copyright © 2006–2012 David Roden
+ * jSite - I18n.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 9683dd3..2c2ee10 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - I18nContainer.java - Copyright © 2007–2012 David Roden
+ * jSite - I18nContainer.java - Copyright © 2007–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
index 9f0b2db..3280551 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - CLI.java - Copyright © 2006–2012 David Roden
+ * jSite - CLI.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -104,6 +104,7 @@ public class CLI implements InsertListener {
                freenetInterface.setNode(node);
 
                projectInserter.setFreenetInterface(freenetInterface);
+        projectInserter.setPriority(configuration.getPriority());
 
                Project currentProject = null;
                for (String argument : args) {
index 4b49577..2a27e89 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - Configuration.java - Copyright © 2006–2012 David Roden
+ * jSite - Configuration.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -430,7 +430,7 @@ public class Configuration {
                                        fileOptionNode.append("insert", String.valueOf(fileOption.isInsert()));
                                        fileOptionNode.append("insert-redirect", String.valueOf(fileOption.isInsertRedirect()));
                                        fileOptionNode.append("custom-key", fileOption.getCustomKey());
-                                       fileOptionNode.append("changed-name", fileOption.getChangedName());
+                                       fileOptionNode.append("changed-name", fileOption.getChangedName().orNull());
                                        fileOptionNode.append("mime-type", fileOption.getMimeType());
                                }
                        }
index 967f936..7d0a83b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - ConfigurationLocator.java - Copyright © 2011–2012 David Roden
+ * jSite - ConfigurationLocator.java - Copyright © 2011–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 8a4f905..59a3116 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - Main.java - Copyright © 2006–2012 David Roden
+ * jSite - Main.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
        private static final Logger logger = Logger.getLogger(Main.class.getName());
 
        /** The version. */
-       private static final Version VERSION = new Version(0, 11, 1);
+       private static final Version VERSION = new Version(0, 12);
 
        /** The configuration. */
        private Configuration configuration;
@@ -122,7 +122,13 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
        }
 
        /** The supported locales. */
-       private static final Locale[] SUPPORTED_LOCALES = new Locale[] { Locale.ENGLISH, Locale.GERMAN, Locale.FRENCH, new Locale("pl") };
+       private static final Locale[] SUPPORTED_LOCALES = new Locale[] {
+                       Locale.ENGLISH,
+                       Locale.GERMAN,
+                       Locale.FRENCH,
+                       new Locale("pl"),
+                       new Locale("fi")
+       };
 
        /** The actions that switch the language. */
        private Map<Locale, Action> languageActions = new HashMap<Locale, Action>();
@@ -195,7 +201,6 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                updateChecker.start();
 
                webOfTrustInterface = new WebOfTrustInterface(freenetInterface);
-               webOfTrustInterface.start();
 
                initPages();
                showPage(PageType.PAGE_PROJECTS);
@@ -506,7 +511,6 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
         */
        private void quit() {
                updateChecker.stop();
-               webOfTrustInterface.stop();
                System.exit(0);
        }
 
index 373703c..10178c8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - Version.java - Copyright © 2006–2012 David Roden
+ * jSite - Version.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 19ea78d..0257591 100644 (file)
@@ -1,5 +1,5 @@
 #
-# jSite - jSite.properties - Copyright © 2006–2012 David Roden
+# jSite - jSite.properties - Copyright © 2006–2014 David Roden
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,6 +45,7 @@ jsite.menu.language.de=Deutsch
 jsite.menu.language.fr=Fran\u00e7ais
 jsite.menu.language.it=Italiano
 jsite.menu.language.pl=Polski
+jsite.menu.language.fi=Suomi
 jsite.menu.nodes=Nodes
 jsite.menu.nodes.manage-nodes=Manage nodes
 jsite.menu.options=Options
index 7f82138..eb67bcb 100644 (file)
@@ -1,5 +1,5 @@
 #
-# jSite - jSite_de.properties - Copyright © 2006–2012 David Roden
+# jSite - jSite_de.properties - Copyright © 2006–2014 David Roden
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,6 +45,7 @@ jsite.menu.language.de=Deutsch
 jsite.menu.language.fr=Fran\u00e7ais
 jsite.menu.language.it=Italiano
 jsite.menu.language.pl=Polski
+jsite.menu.language.fi=Suomi
 jsite.menu.nodes=Nodes
 jsite.menu.nodes.manage-nodes=Nodes verwalten
 jsite.menu.options=Optionen
diff --git a/src/main/resources/de/todesbaum/jsite/i18n/jSite_fi.properties b/src/main/resources/de/todesbaum/jsite/i18n/jSite_fi.properties
new file mode 100644 (file)
index 0000000..394c1b2
--- /dev/null
@@ -0,0 +1,207 @@
+#
+# jSite - jSite_fi.properties - Copyright © 2006–2014 David Roden
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+# Finnish language file by Samuel_Mehmke <Samuel_Mehmke@tgi77g32udm5aq3agpfaiiz6zb63bcj5zgs2bxruu7mblfqzk6ma.freemail>
+
+# Attention, translators! Most of the strings here are used directly.
+# However, some of them are parsed by MessageFormat
+# (http://java.sun.com/j2se/1.5.0/docs/api/java/text/MessageFormat.html)
+# and thus have to adhere to some rules (check the URL above). This is the
+# case when a line contains placeholders like {0} or {0,number}! In these
+# lines single quotes (ASCII 39) needs to be escaped by entering them twice,
+# otherwise the placeholder will not be replaced!
+
+jsite.general.ok=OK
+jsite.general.cancel=Peruuta
+
+jsite.wizard.previous=Edellinen
+jsite.wizard.next=Seuraava
+jsite.wizard.quit=Lopeta
+
+jsite.quit.question=Haluatko todella lopettaa
+jsite.quit.question.title=Lopeta todella?
+jsite.quit.overwrite-configuration=<html><b>Ylikirjoita asetukset?</b><br><br>Asetustiedosto on jo olemassa:<br><code>{0}</code><br><br>Kirjoitetaanko sen yli?</html>
+jsite.quit.overwrite-configuration.title=Ylikirjoita asetukset?
+jsite.quit.config-not-saved=<html><b>Asetuksia ei tallennettu</b><br><br>Asetuksia ei voitu tallentaa.<br>Haluatko lopettaa kuitenkin?</html>
+
+jsite.menu.languages=Kielet
+jsite.menu.language.en=English
+jsite.menu.language.de=Deutsch
+jsite.menu.language.fr=Fran\u00e7ais
+jsite.menu.language.it=Italiano
+jsite.menu.language.pl=Polski
+jsite.menu.language.fi=Suomi
+jsite.menu.nodes=Solmut
+jsite.menu.nodes.manage-nodes=Hallitse solmuja
+jsite.menu.options=Asetukset
+jsite.menu.options.preferences=Asetukset
+jsite.menu.help=Ohje
+jsite.menu.help.check-for-updates=Tarkista Päivitykset
+jsite.menu.help.about=Tietoja
+
+jsite.about.message=<html><big><b>jSite {0}</b></big><br><br>Tekij\u00e4noikeus \u00a9 2006\u20132012 David Roden<br>Julkaistu lisenssill\u00e4 GNU General Public License</html>
+
+jsite.node-manager.heading=Solmumanageri
+jsite.node-manager.description=Hallitse solmujasi t\u00e4\u00e4ll\u00e4.
+jsite.node-manager.node-information=Solmun tiedot
+jsite.node-manager.add-node=Lis\u00e4\u00e4 Solmu
+jsite.node-manager.new-node=Uusi Solmu
+jsite.node-manager.delete-node=Poista Solmu
+jsite.node-manager.delete-node.warning=<html><b>Vahvista solmun poistaminen</b><br><br>Poistetaanko solmu todella?</html>
+jsite.node-manager.name=Nimi
+jsite.node-manager.hostname=Is\u00e4nt\u00e4nimi
+jsite.node-manager.port=Portti
+
+jsite.preferences.heading=Asetukset
+jsite.preferences.description=K\u00e4yt\u00e4 t\u00e4t\u00e4 sivua hallitaksesi globaaleja asetuksia.
+jsite.preferences.temp-directory=Hakemisto v\u00e4liaikaisille tiedostoille
+jsite.preferences.temp-directory.default=Oletus (j\u00e4rjestelm\u00e4n valitsema)
+jsite.preferences.temp-directory.custom=Mukautettu
+jsite.preferences.temp-directory.choose=Valitse
+jsite.preferences.temp-directory.choose.approve=Valitse
+jsite.preferences.config-directory=Asetustiedoston sijainti
+jsite.preferences.config-directory.jar=JAR-tiedoston vieress\u00e4
+jsite.preferences.config-directory.home=Kotihakemisto
+jsite.preferences.config-directory.custom=Mukautettu
+jsite.preferences.insert-options=Latausasetukset
+jsite.preferences.insert-options.use-early-encode=Luo lopullinen URI aikaisin
+jsite.preferences.insert-options.priority=Prioriteetti
+jsite.preferences.insert-options.manifest-putter=Manifestin Asettaja
+
+jsite.insert.heading=Projektin lataaminen
+jsite.insert.description=Ole hyv\u00e4 ja odota kun projektia ladataan.
+jsite.insert.project-information=Projektin tiedot
+jsite.insert.request-uri=Freesite
+jsite.insert.start-time=Aloitusaika
+jsite.insert.starting=Aloitetaan
+jsite.insert.done=Valmis.
+jsite.insert.done.title=Lataus valmis
+jsite.insert.insert-aborted=Lataus keskeytettiin.
+jsite.insert.insert-aborted.title=Lataus Keskeytetty
+jsite.insert.progress=Edistys
+jsite.insert.k-per-s=KB/s
+jsite.insert.insert-failed=<html><b>Lataus ep\u00e4onnistui</b><br><br>Projektin lataus ep\u00e4onnistui<br>joitain tiedostoja ei voitu ladata.</html>
+jsite.insert.insert-failed-with-cause=<html><b>Lataus ep\u00e4onnistui</b><br><br>Projektin lataus ep\u00e4onnistui.<br>Joitain tiedostoja ei voitu ladata.<br>Seuraava virhe tapahtui:<br><br><code>{0}</code></html>
+jsite.insert.insert-failed.title=Lataus ep\u00e4onnistui
+jsite.insert.inserted=<html><b>Projekti ladattu</b><br><br>Projektisi ladattiin onnistuneesti.</html>
+jsite.insert.okay-copy-uri=Kopioi URI leikep\u00f6yd\u00e4lle
+jsite.insert.reinserted-edition=<html><b>Editio ladattu uudelleen</b><br><br>Editio, jota olet juuri lataamassa,<br>on jo ladattu aikaisemmin.</html>
+jsite.insert.reinserted-edition.title=Editio Ladattu Uudelleen
+
+jsite.file-scanner.can-not-read-directory=Ei voitu lukea hakemistoa
+
+jsite.project.heading=Valitse Projekti
+jsite.project.description=Valitse projekti alla olevasta listasta, tai luo uusi projekti.
+jsite.project.action.browse=Selaa
+jsite.project.action.browse.choose=Valitse
+jsite.project.action.browse.tooltip=Selaa hakemisto
+jsite.project.action.add-project=Lis\u00e4\u00e4 projekti
+jsite.project.action.add-project.tooltip=Lis\u00e4\u00e4 uusi projekti
+jsite.project.new-project.name=Uusi Projekti
+jsite.project.action.delete-project=Poista projekti
+jsite.project.action.delete-project.tooltip=Poista projekti
+jsite.project.action.delete-project.confirm=<html><b>Vahvista poistaminen</b><br><br>Projekti \u201e{0}\u201c poistetaan!<br>Haluatko jatkaa?</html>
+jsite.project.action.clone-project=Kloonaa projekti
+jsite.project.action.clone-project.copy=Kopio {0}
+jsite.project.action.clone-project.tooltip=Kloonaa valittu projekti
+jsite.project.action.copy-uri=Kopioi URI Leikep\u00f6yd\u00e4lle
+jsite.project.action.copy-uri.tooltip=Kopioi projektin URI leikep\u00f6yd\u00e4lle
+jsite.project.action.manage-keys=Hallitse Avaimia
+jsite.project.action.manage-keys.tooltip=Hallitse t\u00e4m\u00e4n projektin avaimia
+jsite.project.action.reset-edition=Alusta Editio
+jsite.project.action.reset-edition.tooltip=Alustaa projektin editio-numeron
+jsite.project.project.information=Projektin tiedot
+jsite.project.project.name=Nimi
+jsite.project.project.description=Kuvaus
+jsite.project.project.local-path=Paikallinen polku
+jsite.project.project.address=Osoite
+jsite.project.project.path=Polku
+jsite.project.project.edition=Editio
+jsite.project.project.uri=URI
+jsite.project.keygen.io-error=<html><b>Solmuun ei saatu yhteytt\u00e4</b><br><br>Kommunikointi Freenet solmusi kanssa ep\u00e4onnistui<br>seuraavan viestin kanssa:<br><br><code>{0}</code><br><br>Ole hyv\u00e4 ja varmista, ett\u00e4 olet asettannut<br>oikean is\u00e4nt\u00e4nimen ja portin numeron<br>”Solmun Hallinta” sivulla.</html>
+jsite.project.warning.generate-new-key=<html><b>Luo uusi avain?</b><br><br>Jos luot uuden avaimen, sivustosi julkaistaan<br>kyseisell\u00e4 avaimella. Muiden k\u00e4ytt\u00e4jien<br>luottamus vanhaan avaimeen menetet\u00e4\u00e4n!<br>Editio my\u00f6s alustetaan.</html>
+jsite.project.warning.reset-edition=<html><b>Alusta editio?</b><br><br>Edition alustaminen voi johtaa latausvirheisiin<br>ja sekaannukseen, ellet ole muuttannut<br>projektin polkua tai avainta!</html>
+jsite.project.warning.use-clipboard-now=<html><b>URI kopioitu</b><br><br>Huomaa, ett\u00e4 jSite:n lopettaminen voi aiheuttaa<br>leikep\u00f6yd\u00e4n tyhjenemisen<br>K\u00e4yt\u00e4 URI:a v\u00e4litt\u00f6m\u00e4sti toisessa ikkunassa!</html>
+
+jsite.project-files.heading=Projektin Tiedostot
+jsite.project-files.description=<html>T\u00e4ll\u00e4 sivulla voit asettaa parametrej\u00e4 projektin tiedostoille, kuten<br>ulkoisesti luodut avaimet tai MIME-tyypit, jos automaattinen tunnistus ep\u00e4onnistui.</html>
+jsite.project-files.action.rescan=Skannaa uudelleen
+jsite.project-files.action.rescan.tooltip=Skannaa projektin hakemisto uusien tiedostojen varalta
+jsite.project-files.always-force-insert=Pakota aina lataaminen
+jsite.project-files.always-force-insert.tooltip=Ladataanko kaikki projektin tiedostot, vaikka ne eiv\u00e4t olisi muuttuneet
+jsite.project-files.ignore-hidden-files=Ohita piilotetut tiedostot
+jsite.project-files.ignore-hidden-files.tooltip=Piilotettuja tiedostoja ei ladata
+jsite.project-files.file-options=Tiedostoasetukset
+jsite.project-files.default=Oletustiedosto
+jsite.project-files.default.tooltip=Aseta t\u00e4m\u00e4 tiedosto projektin indeksiksi
+jsite.project-files.insert=Lataa
+jsite.project-files.insert.tooltip=Poista valinta, jos et halua ladata t\u00e4t\u00e4 tiedostoa
+jsite.project-files.force-insert=Pakota lataaminen
+jsite.project-files.force-insert.tooltip=Lataa tiedosto vaikka se ei olisi muuttunut
+jsite.project-files.insert-redirect=Uudelleenohjaa
+jsite.project-files.insert-redirect.tooltip=Haluatko asettaa uudelleenohjauksen t\u00e4lle tiedostolle
+jsite.project-files.custom-key=Mukautettu avain
+jsite.project-files.custom-key.tooltip=Ulkoisesti luotu avain t\u00e4lle tiedostolle
+jsite.project-files.rename=Nime\u00e4 uudelleen
+jsite.project-files.rename.tooltip=Nime\u00e4 tiedosto uudelleen ladatulla sivustolla
+jsite.project-files.mime-type=MIME-Tyyppi
+jsite.project-files.mime-type.tooltip=Valitse oikea MIME-tyyppi t\u00e4ss\u00e4, jos automaattinen tunnistus ep\u00e4onnistui
+jsite.project-files.container=S\u00e4ili\u00f6
+jsite.project-files.container.tooltip=Valitse s\u00e4ili\u00f6 t\u00e4lle tiedostolle
+jsite.project-files.scan-error=<html><b>Virhe tiedostoja skannatessa</b><br><br>Joko projektin hakemistoa ei ole olemassa,<br>tai jotkin tiedostot/hakemistot eiv\u00e4t ole k\u00e4ytett\u00e4viss\u00e4!<br>Ole hyv\u00e4 ja mene takaisin ja valitse oikea hakemisto!</html>
+jsite.project-files.insert-now=Lataa nyt
+jsite.project-files.invalid-default-file=Vain hakemiston juuressa oleva tiedosto voidaan valita oletustiedostoksi.
+jsite.project-files.scanning=Skannataan
+
+jsite.update-checker.found-version.title=Uusi versio l\u00f6ytyi
+jsite.update-checker.found-version.message=<html>Uusi versio l\u00f6ytyi.<br><br>Versio {0} (julkaistu {1,date})</html>
+jsite.update-checker.latest-version.title=Tarkista p\u00e4ivitykset
+jsite.update-checker.latest-version.newer.message=<html>K\u00e4yt\u00e4t versiota {0}, mutta uudempi<br>versio ({1}) l\u00f6ytyi!</html>
+jsite.update-checker.latest-version.older.message=<html>K\u00e4yt\u00e4t versiota {0}, mutta uusin<br>versio on {1}.</html>
+jsite.update-checker.latest-version.okay.message=<html>K\u00e4yt\u00e4t versiota {0},<br>joka on uusin versio.</html>
+
+jsite.key-dialog.title=Hallitse Projektin Avaimia
+jsite.key-dialog.button.ok.tooltip=Hyv\u00e4ksy muutokset
+jsite.key-dialog.button.cancel.tooltip=Hylk\u00e4\u00e4 muutokset
+jsite.key-dialog.button.copy-from-project=Kopioi Projektista
+jsite.key-dialog.button.copy-from-project.tooltip=Kopioi avaimet valitusta projektista
+jsite.key-dialog.button.copy-from-identity=Kopioi Identiteetilt\u00e4
+jsite.key-dialog.button.copy-from-identity.tooltip=Kopioi avaimet valitulta identiteetilt\u00e4
+jsite.key-dialog.button.generate=Luo avaimet uudelleen
+jsite.key-dialog.button.generate.tooltip=Luo uusi avainpari
+jsite.key-dialog.label.keys=<html><b>Avaimet</b></html>
+jsite.key-dialog.label.private-key=Yksityinen Avain
+jsite.key-dialog.label.public-key=Julkinen Avain
+jsite.key-dialog.label.copy-keys=<html><b>Kopioi Avaimet</b></html>
+jsite.key-dialog.label.project=Projekti
+jsite.key-dialog.label.identity=Identiteetti
+jsite.key-dialog.label.actions=<html><b>Toiminnot</b></html>
+
+jsite.warning.empty-index=<html><b>Ei oletustiedostoa</b><br><br>Et ole m\u00e4\u00e4ritellyt oletustiedostoa t\u00e4lle projektille.<br>Vaikka onkin mahdollista ladata projekti ilman oletustiedostoa,<br>sinun tulisi m\u00e4\u00e4ritell\u00e4 se selaamisen helpottamiseksi.</html>
+jsite.warning.index-not-html=<html><b>Oletustiedosto ei ole HTML:\u00e4\u00e4</b><br><br>Oletustiedostosi MIME-tyyppi ei ole ”text/html”!<br>Sivuston katsominen selaimella voi tuottaa<br>odottamattomie tuloksia.</html>
+jsite.warning.site-larger-than-2-mib=<html><b>Sivustosi on yli 2 MiB!</b><br><br>Sivustosi sis\u00e4lt\u00e4\u00e4 enemm\u00e4n kuin 2 megatavua.<br>Johtuen bugeista Freenetiss\u00e4, se ei luultavasti lataudu kunnolla.<br>Yrit\u00e4 pienent\u00e4\u00e4 sivuston kokoa, tai jatka omalla vastuullasi.</html>
+
+jsite.error.no-node-selected=<html><b>Solmua ei ole valittu</b><br><br>Ole hyv\u00e4 ja valitse solmu valikosta!</html>
+jsite.error.no-node-running=<html><b>Solmu ei ole k\u00e4ynniss\u00e4</b><br><br>Et voi ladata projektia jos solmusi ei ole k\u00e4ynniss\u00e4.<br>Ole hyv\u00e4 ja k\u00e4ynnist\u00e4 solmusi ja yrit\u00e4<br>sitten uudestaan.</html>
+jsite.error.no-local-path=<html><b>Ei paikallista polkua</b><br><br>Et m\u00e4\u00e4ritellyt paikallista polkua ladattaville tiedostoille.<br>Et voi jatkaa ilman polkua.</html>
+jsite.error.no-path=<html><b>Ei Freesite-polkua</b><br><br>Et m\u00e4\u00e4ritellyt freesite-polkua.<br>Et voi jatkaa ilman freesite-polkua.</html>
+jsite.error.index-missing=<html><b>Oletustiedostosi puuttuu</b><br><br>Oletustiedosto on m\u00e4\u00e4ritelty aikaisemmin,<br>mutta sit\u00e4 ei en\u00e4\u00e4 ole olemassa!<br>Ole hyv\u00e4 ja valitse uusi oletustiedosto.</html>
+jsite.error.index-not-inserted=<html><b>Oletustiedostoa ei ladattu</b><br><br>Valitsit, ett\u00e4 oletustiedostoa ei ladata!<br>Sinun täytyy joko ladata se tai valita toinen oletustiedosto.</html>
+jsite.error.no-custom-key=<html><b>Ei mukautettua avainta tiedostolle</b><br><br>P\u00e4\u00e4tit olla lataamatta <code>{0}</code>,<br>mutta et antanut avainta uudelleenohjaukseen!</html>
+jsite.error.no-files-to-insert=<html><b>Ei tiedostoja ladattavaksi</b><br><br>Et valinnut yht\u00e4\u00e4n tiedostoa ladattavaksi. Valitse<br>ainakin yksi tiedosto ladattavaksi!</html>
+jsite.error.duplicate-file=<html><b>Duplikaattitiedosto</b><br><br>Tiedosto <code>{0}</code> on ladattu kahdesti!<br>Tarkista tiedostojesi nimet ja uudelleenohjaukset!</html>
index 39beff1..eda11c6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# jSite - jSite_fr.properties - Copyright © 2006–2012 David Roden
+# jSite - jSite_fr.properties - Copyright © 2006–2014 David Roden
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,6 +45,7 @@ jsite.menu.language.de=Deutsch
 jsite.menu.language.fr=Fran\u00e7ais
 jsite.menu.language.it=Italiano
 jsite.menu.language.pl=Polski
+jsite.menu.language.fi=Suomi
 jsite.menu.nodes=Noeud
 jsite.menu.nodes.manage-nodes=G\u00e9rer les noeuds
 jsite.menu.options=Options
@@ -204,4 +205,4 @@ jsite.error.index-not-inserted=<html><b>Fichier par d\u00e9faut non ins\u00e9r\u
 jsite.error.no-custom-key=<html><b>Pas de clef existante sp\u00e9cifi\u00e9e pour ce fichier</b><br><br>Vous avez sp\u00e9cifier de ne pas ins\u00e9rer <code>{0}</code><br> mais n'avez pas sp\u00e9cifier de clef ou rediriger!</html>
 jsite.error.no-files-to-insert=<html><b>Aucun fichier \u00e0 ins\u00e9rer</b><br><br>Vous n'avez s\u00e9lectionn\u00e9 aucun fichier pour l'insertion !<br>Veuillez s\u00e9lectionner au moins un fichier \u00e0 ins\u00e9rer.</html>
 jsite.error.duplicate-file=<html><b>Fichier dupliqu\u00e9</b><br><br>Le fichier <code>{0}</code> est ins\u00e9r\u00e9 deux fois !<br>Veuillez v\u00e9rifier les noms de fichier et les redirections.</html>
-# to update: 144, 145, 180-183, 189-192, 196
\ No newline at end of file
+# to update: 145, 146, 181-184, 190-193, 197
index 454510b..4bb32b7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# jSite - jSite_pl.properties - Copyright © 2006–2012 David Roden
+# jSite - jSite_pl.properties - Copyright © 2006–2014 David Roden
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,6 +45,7 @@ jsite.menu.language.de=Deutsch
 jsite.menu.language.fr=Fran\u00e7ais
 jsite.menu.language.it=Italiano
 jsite.menu.language.pl=Polski
+jsite.menu.language.fi=Suomi
 jsite.menu.nodes=W\u0119z\u0142y
 jsite.menu.nodes.manage-nodes=Zarz\u0105dzaj w\u0119z\u0142ami
 jsite.menu.options=Opcje
diff --git a/src/main/resources/flag-fi.png b/src/main/resources/flag-fi.png
new file mode 100644 (file)
index 0000000..b3518c1
Binary files /dev/null and b/src/main/resources/flag-fi.png differ