diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index ae73734cd564f674899d42c9f141ad82ccfe4d72..22eadd52ad086224cb6e8b34ad41eca4a4702b92 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -92,6 +92,11 @@ <!-- jar again to get the latest messages_*.class files --> <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class" update="true" /> </target> + + <target name="jarWithJavadoc" depends="jar"> + <jar destfile="build/routerconsole.war" basedir="../../../build/" includes="javadoc/**/*" update="true" /> + </target> + <target name="poupdate" depends="build"> <ant target="war" /> <!-- Update the messages_*.po files. diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ContentHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ContentHelper.java index 0a1cbdc347e1390a03ce1504ca0ec71067066ff6..f9fe7377c8af70802227bfef3d9a77f690f239f4 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ContentHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ContentHelper.java @@ -6,13 +6,11 @@ import java.util.Locale; import net.i2p.util.FileUtil; public class ContentHelper extends HelperBase { - private String _page; + protected String _page; private int _maxLines; private boolean _startAtBeginning; private String _lang; - public ContentHelper() {} - /** * Caution, use absolute paths only, do not assume files are in CWD */ diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..26377d28f11c2a97aeb9dad2e7fa226423666014 --- /dev/null +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java @@ -0,0 +1,20 @@ +package net.i2p.router.web; + +import java.io.File; + +/** + * If news file does not exist, use file from the initialNews directory + * in $I2P + * + * @since 0.8.2 + */ +public class NewsHelper extends ContentHelper { + + @Override + public String getContent() { + File news = new File(_page); + if (!news.exists()) + _page = (new File(_context.getBaseDir(), "docs/initialNews/initialNews.xml")).getAbsolutePath(); + return super.getContent(); + } +} diff --git a/apps/routerconsole/jsp/index.jsp b/apps/routerconsole/jsp/index.jsp index 9cc79ca49d5d36b1f770a4550199f7860f85feaa..6f29573e65bf1edc8486ee6e4c3ea19534fe17f8 100644 --- a/apps/routerconsole/jsp/index.jsp +++ b/apps/routerconsole/jsp/index.jsp @@ -14,7 +14,8 @@ if (System.getProperty("router.consoleNonce") == null) { <%@include file="summary.jsi" %><h1><%=intl._("I2P Router Console")%></h1> <div class="news" id="news"> - <jsp:useBean class="net.i2p.router.web.ContentHelper" id="newshelper" scope="request" /> + <jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" /> + <jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); %> <jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" /> <jsp:setProperty name="newshelper" property="maxLines" value="300" /> diff --git a/build.xml b/build.xml index 44011705d0a202d5adb04d7e3dca3287af708e34..4ad94029725aa69e9d0bcc49dad2cfa16b87c0af 100644 --- a/build.xml +++ b/build.xml @@ -413,8 +413,6 @@ <copy file="history.txt" todir="pkg-temp/" overwrite="true" /> <mkdir dir="pkg-temp/scripts" /> <copy file="apps/proxyscript/i2pProxy.pac" todir="pkg-temp/scripts/" /> - <!-- overwrite the news put in by the updater --> - <copy file="installer/resources/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" /> <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" /> <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" /> <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" /> @@ -476,8 +474,12 @@ <delete dir="pkg-temp" /> </target> - <!-- readme and proxy error page files, GeoIP files, and flag icons --> - <target name="prepConsoleDocs" depends="prepConsoleDocUpdates, prepgeoupdate" /> + <!-- readme and proxy error page files, initialNews.xml files, GeoIP files, and flag icons --> + <target name="prepConsoleDocs" depends="prepConsoleDocUpdates, prepgeoupdate" > + <copy todir="pkg-temp/docs/" > + <fileset dir="installer/resources/initialNews/" /> + </copy> + </target> <!-- readme and proxy error page files --> <target name="prepConsoleDocUpdates"> @@ -766,7 +768,6 @@ <exec executable="ls" failonerror="true"> <arg value="-l" /> <arg value="history.txt" /> - <arg value="installer/resources/initialNews.xml" /> <arg value="installer/install.xml" /> <arg value="installer/resources/news.xml" /> <arg value="core/java/src/net/i2p/CoreVersion.java" /> diff --git a/history.txt b/history.txt index e283f8c0ecf15bb2a6c4e8c9a07142070aa5da6a..bdb01855d77b76d0086754781f18272cb447bd97 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,12 @@ +2010-11-27 zzz + * Console: Split initialNews.xml into a file for each language + don't copy to config dir at install. + * i2psnark: Clean up and enhance the PeerCoordinator's partial piece handling, + in preparation for more improvements + * LogManager: When not in router context, delay creating log file until required + * NetDb: Lower RouterInfo expiration time again + * Router: Prevent NCDFE after unzipping update file + 2010-11-25 dr|z3d * Console themes: Classic and Dark theme refresh. * Fix langbox overflow issue in all themes. diff --git a/installer/resources/initialNews.xml b/installer/resources/initialNews.xml deleted file mode 100644 index 15fc5088b1ba05a10aac32e49194e222296077e8..0000000000000000000000000000000000000000 --- a/installer/resources/initialNews.xml +++ /dev/null @@ -1,127 +0,0 @@ -<!-- -<i2p.news date="$Date: 2010-11-15 00:00:00 $"> -<i2p.release version="0.8.1" date="2010/11/15" minVersion="0.6"/> ---> -<div lang="en"> -<h4><ul><li>Congratulations on getting I2P installed!</li></ul></h4> -<p> -<b>Welcome to I2P!</b> -Please <b>have patience</b> as I2P boots up and finds peers. -</p> -<p> -While you are waiting, please <b>adjust your bandwidth settings</b> on the -<a href="config.jsp">configuration page</a>. -</p> -<p> -Once you have a "shared clients" destination listed on the left, -please <b>check out</b> our -<a href="http://www.i2p2.i2p/faq.html">FAQ</a>. -</p> -<p> -Point your IRC client to <b>localhost:6668</b> and say hi to us on -<a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> or <a href="irc://127.0.0.1:6668/i2p">#i2p</a>. -</p> -</div> - -<div lang="de"> -<h4><ul><li>Wir gratulieren zur erfolgreichen Installation von I2P!</li></ul></h4> -<p> -<b>Willkommen im I2P!</b> -Hab noch <b>etwas Geduld</b>, während I2P startet und weitere I2P-Router findet. -</p> -<p> -Passe bitte in der Zwischenzeit <b>deine Einstellungen zur Bandbreite</b> auf der -<a href="config.jsp">Einstellungsseite</a> an! -</p> -<p> -Sobald auf der linken Seite eine Verbindung namens "versch. Klienten" aufgelistet ist, kannst Du unsere <a href="http://www.i2p2.i2p/faq_de.html">FAQ</a> besuchen. -</p> -<p> -Verbinde deinen IRC-Klienten mit dem Server auf <b>localhost:6668</b> und schau bei uns im Kanal -<a href="irc://127.0.0.1:6668/i2p-de">#i2p-de</a>, <a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> oder <a href="irc://127.0.0.1:6668/i2p">#i2p</a> vorbei! -</p> -<p> -Wir wünschen Dir viel Freude an unserem Netz und hoffen, Deine Erwartungen zu erfüllen. -</p> -</div> - -<div lang="es"> -<h4><ul><li>¡Felicidades!, has instalado el enrutador I2P con éxito.</li></ul></h4> -<p> -<b>¡Bienvenido a I2P!</b><br> -¡Ten todavía <b>paciencia</b> mientras I2P esté arrancando y encontrando otros enrutadores I2P! -</p> -<p> -Este es el momento ideal para adaptar tu <b>configuración de ancho de banda</b> en la -<a href="config.jsp">página de configuración</a>. -</p> -<p> -En cuanto veas a la izquierda una conexión llamada "shared clients", puedes visitar nuestros <a href="http://www.i2p2.i2p/faq.html">FAQ</a>. -</p> -<p> -¡Conécta tu cliente IRC con el servidor <b>localhost:6668</b> y ven a saludarnos en los canales -<a href="irc://127.0.0.1:6668/i2p-es">#i2p-es</a>, <a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> o <a href="irc://127.0.0.1:6668/i2p">#i2p</a>! -</p> -<p> -Esperemos que tengas una buena experiencia con y en I2P. -</p> -</div> - -<div lang="br"> -<h4><ul><li>Parabéns, você instalou o roteador I2P com êxito!</li></ul></h4> -<p> -<b>Bem-vindo ao I2P!</b><br> -Seja <b>paciente</b> enquanto I2P ainda está iniciando-se e enquanto continuam sendo encontrados outros roteadores I2P! -</p> -<p> -Este é o momento ideal para personalizar a <b>configuração de largura de banda</b> na -<a href="config.jsp">página de configuração</a>. -</p> -<p> -Quando você vê uma conexão no lado esquerdo chamada "shared clients", você pode visitar os nossos <a href="http://www.i2p2.i2p/faq.html">FAQ</a>. -</p> -<p> -Conecte seu cliente de IRC para o servidor <b>localhost:6668</b> e vem para nos cumprimentar aos canais -<a href="irc://127.0.0.1:6668/i2p-br">#i2p-br</a>, <a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> ou <a href="irc://127.0.0.1:6668/i2p">#i2p</a>! -</p> -<p> -Esperamos que você tenha uma boa experiência e I2P. -</p> -</div> - -<div lang="nl"> -<h4><ul><li>Gefeliciteerd met de installatie van I2P!</li></ul></h4> -<p> -<b>Welkom bij I2P!</b> -Heb <b>wat geduld</b> terwijl I2P opstart en peers zoekt. -</p> -<p> -Terwijl je wacht, <b>pas je bandbreedte instellingen aan</b> op de -<a href="config.jsp">configuratie pagina</a>. -</p> -<p> -Wanneer je een "gedeelde clients" destination in de linker lijst hebt, -<b>lees dan aub</b> onze <a href="http://www.i2p2.i2p/faq.html">FAQ</a>. -</p> -<p> -Verbind je IRC client met <b>localhost:6668</b> en zeg Hallo in -<a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> of <a href="irc://127.0.0.1:6668/i2p">#i2p</a>. -</p> -</div> - -<div lang="ru"> -<h4><ul><li>ПоздравлÑем Ñ ÑƒÑпешным завершением уÑтановки I2P!</li></ul></h4> -<p> -<b>Добро пожаловать в I2P!</b> Ðемного терпениÑ! I2P-маршрутизатору потребуетÑÑ Ð¿Ð°Ñ€Ð° минут Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка модулей и первого Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ðº Ñети I2P. -</p> -<p> -Пока Ð’Ñ‹ ждете, Ñамое Ð²Ñ€ÐµÐ¼Ñ Ð·Ð°Ð¹Ñ‚Ð¸ в <a href="config.jsp">Ñетевые наÑтройки</a> и <b>выÑтавить ограничение ÑкороÑти</b> в ÑоответÑтвии Ñо ÑкороÑтью Вашего Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ðº интернету. -</p> -<p> -Как только в панели Ñлева в разделе «Локальные туннели» поÑвитÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ «коллективные клиенты» — I2P готов к работе. Подключайте Ваш IRC-клиент к Ñерверу <b>localhost:6668</b> и заходите Ñказать нам привет на канал -<a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> и <a href="irc://127.0.0.1:6668/i2p">#i2p</a>. -</p> -<p> -<b>Ðе забудьте заглÑнуть</b> в наш <a href="http://www.i2p2.i2p/faq_ru.html">FAQ</a>. -</p> -</div> diff --git a/installer/resources/initialNews/initialNews.xml b/installer/resources/initialNews/initialNews.xml new file mode 100644 index 0000000000000000000000000000000000000000..d69d6c644a6a6f1cedd43b2eab61bf82b9cd6dfb --- /dev/null +++ b/installer/resources/initialNews/initialNews.xml @@ -0,0 +1,20 @@ +<div lang="en"> +<h4><ul><li>Congratulations on getting I2P installed!</li></ul></h4> +<p> +<b>Welcome to I2P!</b> +Please <b>have patience</b> as I2P boots up and finds peers. +</p> +<p> +While you are waiting, please <b>adjust your bandwidth settings</b> on the +<a href="config.jsp">configuration page</a>. +</p> +<p> +Once you have a "shared clients" destination listed on the left, +please <b>check out</b> our +<a href="http://www.i2p2.i2p/faq.html">FAQ</a>. +</p> +<p> +Point your IRC client to <b>localhost:6668</b> and say hi to us on +<a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> or <a href="irc://127.0.0.1:6668/i2p">#i2p</a>. +</p> +</div> diff --git a/installer/resources/initialNews/initialNews_br.xml b/installer/resources/initialNews/initialNews_br.xml new file mode 100644 index 0000000000000000000000000000000000000000..d3e1df50cacae0bfc1f1d7df0279be125fc57f70 --- /dev/null +++ b/installer/resources/initialNews/initialNews_br.xml @@ -0,0 +1,21 @@ +<div lang="br"> +<h4><ul><li>Parabéns, você instalou o roteador I2P com êxito!</li></ul></h4> +<p> +<b>Bem-vindo ao I2P!</b><br> +Seja <b>paciente</b> enquanto I2P ainda está iniciando-se e enquanto continuam sendo encontrados outros roteadores I2P! +</p> +<p> +Este é o momento ideal para personalizar a <b>configuração de largura de banda</b> na +<a href="config.jsp">página de configuração</a>. +</p> +<p> +Quando você vê uma conexão no lado esquerdo chamada "shared clients", você pode visitar os nossos <a href="http://www.i2p2.i2p/faq.html">FAQ</a>. +</p> +<p> +Conecte seu cliente de IRC para o servidor <b>localhost:6668</b> e vem para nos cumprimentar aos canais +<a href="irc://127.0.0.1:6668/i2p-br">#i2p-br</a>, <a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> ou <a href="irc://127.0.0.1:6668/i2p">#i2p</a>! +</p> +<p> +Esperamos que você tenha uma boa experiência e I2P. +</p> +</div> diff --git a/installer/resources/initialNews/initialNews_de.xml b/installer/resources/initialNews/initialNews_de.xml new file mode 100644 index 0000000000000000000000000000000000000000..38b037fc50a465d6f8e61961c2605a83665a2ea2 --- /dev/null +++ b/installer/resources/initialNews/initialNews_de.xml @@ -0,0 +1,21 @@ +<div lang="de"> +<h4><ul><li>Wir gratulieren zur erfolgreichen Installation von I2P!</li></ul></h4> +<p> +<b>Willkommen im I2P!</b> +Hab noch <b>etwas Geduld</b>, während I2P startet und weitere I2P-Router findet. +</p> +<p> +Passe bitte in der Zwischenzeit <b>deine Einstellungen zur Bandbreite</b> auf der +<a href="config.jsp">Einstellungsseite</a> an! +</p> +<p> +Sobald auf der linken Seite eine Verbindung namens "versch. Klienten" aufgelistet ist, kannst Du unsere <a href="http://www.i2p2.i2p/faq_de.html">FAQ</a> besuchen. +</p> +<p> +Verbinde deinen IRC-Klienten mit dem Server auf <b>localhost:6668</b> und schau bei uns im Kanal +<a href="irc://127.0.0.1:6668/i2p-de">#i2p-de</a>, <a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> oder <a href="irc://127.0.0.1:6668/i2p">#i2p</a> vorbei! +</p> +<p> +Wir wünschen Dir viel Freude an unserem Netz und hoffen, Deine Erwartungen zu erfüllen. +</p> +</div> diff --git a/installer/resources/initialNews/initialNews_es.xml b/installer/resources/initialNews/initialNews_es.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca5e4918781a71ad4ec30a44ef7aabcdec6e8d2 --- /dev/null +++ b/installer/resources/initialNews/initialNews_es.xml @@ -0,0 +1,21 @@ +<div lang="es"> +<h4><ul><li>¡Felicidades!, has instalado el enrutador I2P con éxito.</li></ul></h4> +<p> +<b>¡Bienvenido a I2P!</b><br> +¡Ten todavía <b>paciencia</b> mientras I2P esté arrancando y encontrando otros enrutadores I2P! +</p> +<p> +Este es el momento ideal para adaptar tu <b>configuración de ancho de banda</b> en la +<a href="config.jsp">página de configuración</a>. +</p> +<p> +En cuanto veas a la izquierda una conexión llamada "shared clients", puedes visitar nuestros <a href="http://www.i2p2.i2p/faq.html">FAQ</a>. +</p> +<p> +¡Conécta tu cliente IRC con el servidor <b>localhost:6668</b> y ven a saludarnos en los canales +<a href="irc://127.0.0.1:6668/i2p-es">#i2p-es</a>, <a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> o <a href="irc://127.0.0.1:6668/i2p">#i2p</a>! +</p> +<p> +Esperemos que tengas una buena experiencia con y en I2P. +</p> +</div> diff --git a/installer/resources/initialNews/initialNews_nl.xml b/installer/resources/initialNews/initialNews_nl.xml new file mode 100644 index 0000000000000000000000000000000000000000..a968236d580570ebd10838b7c61a5e145b2dc44b --- /dev/null +++ b/installer/resources/initialNews/initialNews_nl.xml @@ -0,0 +1,19 @@ +<div lang="nl"> +<h4><ul><li>Gefeliciteerd met de installatie van I2P!</li></ul></h4> +<p> +<b>Welkom bij I2P!</b> +Heb <b>wat geduld</b> terwijl I2P opstart en peers zoekt. +</p> +<p> +Terwijl je wacht, <b>pas je bandbreedte instellingen aan</b> op de +<a href="config.jsp">configuratie pagina</a>. +</p> +<p> +Wanneer je een "gedeelde clients" destination in de linker lijst hebt, +<b>lees dan aub</b> onze <a href="http://www.i2p2.i2p/faq.html">FAQ</a>. +</p> +<p> +Verbind je IRC client met <b>localhost:6668</b> en zeg Hallo in +<a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> of <a href="irc://127.0.0.1:6668/i2p">#i2p</a>. +</p> +</div> diff --git a/installer/resources/initialNews/initialNews_ru.xml b/installer/resources/initialNews/initialNews_ru.xml new file mode 100644 index 0000000000000000000000000000000000000000..93eb2fd7a87a67f36f0d77e3d44ceae412f7b74e --- /dev/null +++ b/installer/resources/initialNews/initialNews_ru.xml @@ -0,0 +1,16 @@ +<div lang="ru"> +<h4><ul><li>ПоздравлÑем Ñ ÑƒÑпешным завершением уÑтановки I2P!</li></ul></h4> +<p> +<b>Добро пожаловать в I2P!</b> Ðемного терпениÑ! I2P-маршрутизатору потребуетÑÑ Ð¿Ð°Ñ€Ð° минут Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка модулей и первого Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ðº Ñети I2P. +</p> +<p> +Пока Ð’Ñ‹ ждете, Ñамое Ð²Ñ€ÐµÐ¼Ñ Ð·Ð°Ð¹Ñ‚Ð¸ в <a href="config.jsp">Ñетевые наÑтройки</a> и <b>выÑтавить ограничение ÑкороÑти</b> в ÑоответÑтвии Ñо ÑкороÑтью Вашего Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ðº интернету. +</p> +<p> +Как только в панели Ñлева в разделе «Локальные туннели» поÑвитÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ «коллективные клиенты» — I2P готов к работе. Подключайте Ваш IRC-клиент к Ñерверу <b>localhost:6668</b> и заходите Ñказать нам привет на канал +<a href="irc://127.0.0.1:6668/i2p-help">#i2p-help</a> и <a href="irc://127.0.0.1:6668/i2p">#i2p</a>. +</p> +<p> +<b>Ðе забудьте заглÑнуть</b> в наш <a href="http://www.i2p2.i2p/faq_ru.html">FAQ</a>. +</p> +</div> diff --git a/router/java/src/net/i2p/router/startup/WorkingDir.java b/router/java/src/net/i2p/router/startup/WorkingDir.java index fd8efee3cfc3be817878b7ce778a6ae8e47f1e3c..4fc466d270cd25ebe650fc11cb6e6febe05a603f 100644 --- a/router/java/src/net/i2p/router/startup/WorkingDir.java +++ b/router/java/src/net/i2p/router/startup/WorkingDir.java @@ -149,7 +149,8 @@ public class WorkingDir { // this one must be after MIGRATE_BASE success &= migrateJettyXml(oldDirf, dirf); success &= migrateClientsConfig(oldDirf, dirf); - success &= copy(new File(oldDirf, "docs/news.xml"), new SecureDirectory(dirf, "docs")); + // for later news.xml updates (we don't copy initialNews.xml over anymore) + success &= (new SecureDirectory(dirf, "docs")) .mkdir(); // Report success or failure if (success) {