diff --git a/Slackware/i2p-base/doinst.sh b/Slackware/i2p-base/doinst.sh index 087ee112c..cc2277f36 100644 --- a/Slackware/i2p-base/doinst.sh +++ b/Slackware/i2p-base/doinst.sh @@ -1,43 +1,155 @@ #!/bin/sh +# +# +# Now in the future we only need to look for '#I2P' and '#/I2P' +# for modifications to rc.local and rc.local_shutdown. +# I was a moron for not doing it this way in the first place :-) -- Sponge +# +# + touch /etc/rc.d/rc.local touch /etc/rc.d/rc.local_shutdown -I2PRCA=`grep -c /etc/rc.d/rc.local -e i2p` -I2PRCB=`grep -c /etc/rc.d/rc.local_shutdown -e i2p` - echo +echo -n "Check 1: /etc/rc.d/rc.local " +I2PRCA=`grep -c /etc/rc.d/rc.local -e '/etc/rc.d/rc.i2p'` if [ $I2PRCA -eq 0 ] ; then + echo '#I2P' >> /etc/rc.d/rc.local + echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local echo "fi" >> /etc/rc.d/rc.local - echo "/etc/rc.d/rc.local modified." + echo '#/I2P' >> /etc/rc.d/rc.local + echo "modified." else - echo "/etc/rc.d/rc.local looks OK" + echo -n "looks OK so far," + # Fix old installs, or where people have modified. + + echo -n " Check 1A: " + I2PRCC=`grep -c /etc/rc.d/rc.local -e 'i2p-\*\.tmp'` + + if [ $I2PRCC -eq 0 ] ; then + DATA=$(cat /etc/rc.d/rc.local | sed -re 's/if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/#I2P\n\( cd \/tmp ; rm -Rf i2p-*.tmp \)\nif \[ -x \/etc\/rc.d\/rc.i2p \] ; then/') + echo "${DATA}" > /etc/rc.d/rc.local + echo -n "additional modifications applied," + else + echo -n "looks OK so far," + fi + + echo -n " Check 1B: " + I2PRCE=`grep -c /etc/rc.d/rc.local -e 'i2p-\*\.tmp'` + if [ $I2PRCE -eq 0 ] ; then + DATATOP=$(cat /etc/rc.d/rc.local | sed -n '0,/i2p-\*\.tmp/p' | sed '$d' ) + DATABOT=$(cat /etc/rc.d/rc.local | sed -n '/i2p-\*\.tmp/,$p' | sed -n '/^fi/,$p' | sed "1d") + echo "${DATATOP}" > /etc/rc.d/rc.local + echo '#I2P' >> /etc/rc.d/rc.local + echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local + echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local + echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local + echo "fi" >> /etc/rc.d/rc.local + echo '#/I2P' >> /etc/rc.d/rc.local + echo "${DATABOT}" >> /etc/rc.d/rc.local + + echo -n "additional modifications applied," + else + echo -n "looks ok so far," + fi + echo -n " Check 1C: " + I2PRCF=`grep -c /etc/rc.d/rc.local -e '#/I2P'` + if [ $I2PRCF -eq 0 ] ; then + DATATOP=$(cat /etc/rc.d/rc.local | sed -n '0,/^#I2P/p' | sed '$d' ) + DATABOT=$(cat /etc/rc.d/rc.local | sed -n '/^#I2P/,$p' | sed -n '/^fi/,$p' | sed "1d") + echo "${DATATOP}" > /etc/rc.d/rc.local + echo '#I2P' >> /etc/rc.d/rc.local + echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local + echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local + echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local + echo "fi" >> /etc/rc.d/rc.local + echo '#/I2P' >> /etc/rc.d/rc.local + echo "${DATABOT}" >> /etc/rc.d/rc.local + + echo -n "additional modifications applied," + else + echo -n "looks ok so far," + fi + echo " Done." fi +echo -n "Check 2: /etc/rc.d/rc.local_shutdown " +I2PRCB=`grep -c /etc/rc.d/rc.local_shutdown -e '/etc/rc.d/rc.i2p'` if [ $I2PRCB -eq 0 ] ; then + echo "#I2P" >> /etc/rc.d/rc.local_shutdown echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown echo "fi" >> /etc/rc.d/rc.local_shutdown - echo "/etc/rc.d/rc.local_shutdown modified." + echo "#/I2P" >> /etc/rc.d/rc.local_shutdown + echo "modified." else - echo "/etc/rc.d/rc.local_shutdown looks OK" + echo -n "looks OK so far," + # Fix old installs + + echo -n " Check 1A: " + I2PRCG=`grep -c /etc/rc.d/rc.local_shutdown -e '#I2P'` + if [ $I2PRCG -eq 0 ] ; then + DATATOP=$(cat /etc/rc.d/rc.local_shutdown | sed -n '0,/^if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/p' | sed '$d' ) + DATABOT=$(cat /etc/rc.d/rc.local_shutdown | sed -n '/^if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/,$p' | sed -n '/^fi/,$p' | sed "1d") + echo "${DATATOP}" > /etc/rc.d/rc.local_shutdown + echo '#I2P' >> /etc/rc.d/rc.local_shutdown + echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown + echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown + echo "fi" >> /etc/rc.d/rc.local_shutdown + echo "#/I2P" >> /etc/rc.d/rc.local_shutdown + echo "${DATABOT}" >> /etc/rc.d/rc.local_shutdown + echo -n "additional modifications applied," + else + echo -n "looks OK so far," + fi + echo -n " Check 1B: " + I2PRCH=`grep -c /etc/rc.d/rc.local_shutdown -e '#/I2P'` + if [ $I2PRCH -eq 0 ] ; then + DATATOP=$(cat /etc/rc.d/rc.local_shutdown | sed -n '0,/^#I2P/p' | sed '$d' ) + DATABOT=$(cat /etc/rc.d/rc.local_shutdown | sed -n '/^#I2P/,$p' | sed -n '/^fi/,$p' | sed "1d") + echo "${DATATOP}" > /etc/rc.d/rc.local_shutdown + echo '#I2P' >> /etc/rc.d/rc.local_shutdown + echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown + echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown + echo "fi" >> /etc/rc.d/rc.local_shutdown + echo "#/I2P" >> /etc/rc.d/rc.local_shutdown + echo "${DATABOT}" >> /etc/rc.d/rc.local_shutdown + echo -n "additional modifications applied," + else + echo -n "looks OK so far," + fi + echo " Done." fi if [ -f /etc/rc.d/rc.i2p ] ; then if [ -x /etc/rc.d/rc.i2p ] ; then chmod +x /etc/rc.d/rc.i2p.new fi - echo + # Hopefully get admin's attention. + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -e "\007" ; sleep 0.3 echo "It apears that you already have /etc/rc.d/rc.i2p" - echo "You may wish to replace it with /etc/rc.d/rc.i2p.new" - echo + echo "You should replace it with /etc/rc.d/rc.i2p.new as soon as possible" + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -ne "\007" ; sleep 0.3 + echo -e "\007" ; sleep 0.3 else mv /etc/rc.d/rc.i2p.new /etc/rc.d/rc.i2p echo echo "Installation finished. The i2p start/stop script has been" - echo "installed on /etc/rc.d directory. You should chmod +x" + echo "installed in /etc/rc.d . You should chmod +x" echo '/etc/rc.d/rc.i2p to start it on boot.' echo fi diff --git a/Slackware/i2p-base/i2p-base.SlackBuild b/Slackware/i2p-base/i2p-base.SlackBuild index 7101fb950..2d35eacb8 100644 --- a/Slackware/i2p-base/i2p-base.SlackBuild +++ b/Slackware/i2p-base/i2p-base.SlackBuild @@ -1,46 +1,57 @@ #!/bin/sh -# Heavily based on the Slackware 12.1 SlackBuild -# Slackware build script for i2p - +# +# Heavily based on the Slackware 12.2 SlackBuild +# Slackware build script for I2P +# # PLEASE READ THIS: -# Probably you will never have to update i2p packages with upgradepkg, -# just because i2p have an auto-update function. -# How to start i2p: -# After installpkg command, doinst.sh will execute a postinstallation script -# needed by i2p. After that you have to chmod +x /etc/rc.d/rc.i2p and start -# i2p service with /etc/rc.d/rc.i2p start. +# How to start I2P: +# After installpkg command, doinst.sh will execute a post-installation script +# needed by I2P. After that you have to chmod +x /etc/rc.d/rc.i2p and start +# I2P service with /etc/rc.d/rc.i2p start. +# # Now tell your browser to user this proxy: localhost on port 4444 and open # this page: http://localhost:7657/index.jsp -# Here you can configure i2p, watch network status and navigate anonimously. +# +# Here you can configure I2P, watch network status and navigate anonimously. # It's suggested to subscribe to various dns host, like i2host.i2p # For any additional information, visit i2host.i2p and forum.i2p +# CWD=$(pwd) TMP=/tmp PKG=/$TMP/package-base-i2p -rm -rf $PKG -mkdir -p $PKG -# put here installation dir, without first and last / -# es: usr/local NAME=i2p-base -VERSION=0.0.1 +VERSION=0.0.2 BUILD=1sponge ARCH=noarch INSTALL_DIR=opt + +# Less than slackware 13? +SLKPLT=$(cat /etc/slackware-version | sed -re "s/(Slackware )([0-9]*)(.*)/\2/") +if [ $SLKPLT -lt 13 ] ; then + EXT=tgz +else + EXT=txz +fi + +rm -rf $PKG +mkdir -p $PKG cd $PKG chown -R root:root . mkdir -p $PKG/etc/rc.d mkdir -p $PKG/install -sed "s|directory|/$INSTALL_DIR/i2p/i2prouter|g" $CWD/rc.i2p_def > $PKG/etc/rc.d/rc.i2p.new +sed "s|directory|/$INSTALL_DIR/i2p/i2prouter|g" "$CWD/rc.i2p_def" > $PKG/etc/rc.d/rc.i2p.new chmod 644 $PKG/etc/rc.d/rc.i2p.new -sed "s|directory|/$INSTALL_DIR/i2p/|g" $CWD/doinst.sh > $PKG/install/doinst.sh -cat $CWD/slack-desc > $PKG/install/slack-desc +cat "$CWD/doinst.sh" > $PKG/install/doinst.sh +cat "$CWD/slack-desc" > $PKG/install/slack-desc cd $PKG # -# Not really that important to exec this. -#requiredbuilder -v -y -s $CWD $PKG +# Not really that important to exec this +# as there aren't any deps we don't know. # -cat $CWD/slack-required > $PKG/install/slack-required -makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.tgz +# requiredbuilder -v -y -s $CWD $PKG +# +cat "$CWD/slack-required" > $PKG/install/slack-required +makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.$EXT diff --git a/Slackware/i2p-base/rc.i2p_def b/Slackware/i2p-base/rc.i2p_def index 268968042..8e059c23d 100644 --- a/Slackware/i2p-base/rc.i2p_def +++ b/Slackware/i2p-base/rc.i2p_def @@ -9,6 +9,22 @@ i2p_stop() { /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory stop )" } +i2p_restart() { + /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory restart)" +} + +i2p_status() { + /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory status )" +} + +i2p_console() { + /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory console )" +} + +i2p_dump() { + /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory dump )" +} + case "$1" in 'start') i2p_start @@ -17,11 +33,19 @@ case "$1" in i2p_stop ;; 'restart') - i2p_stop - i2p_start + i2p_restart + ;; +'status') + i2p_status + ;; +'console') + i2p_console + ;; +'dump') + i2p_dump ;; *) - echo "usage $0 start|stop|restart" + echo "usage $0 start|stop|restart|status|console|dump" ;; esac diff --git a/Slackware/i2p/i2p.SlackBuild b/Slackware/i2p/i2p.SlackBuild index a8ecf3be2..fc95ce379 100755 --- a/Slackware/i2p/i2p.SlackBuild +++ b/Slackware/i2p/i2p.SlackBuild @@ -1,28 +1,35 @@ #!/bin/sh -# Heavily based on the Slackware 12.1 SlackBuild -# Slackware build script for i2p - +# +# Heavily based on the Slackware 12.2 SlackBuild +# Slackware build script for I2P +# # PLEASE READ THIS: -# Probably you will never have to update i2p packages with upgradepkg, -# just because i2p have an auto-update function. -# How to start i2p: -# After installpkg command, doinst.sh will execute a postinstallation script -# needed by i2p. After that you have to chmod +x /etc/rc.d/rc.i2p and start -# i2p service with /etc/rc.d/rc.i2p start. -# Now tell your browser to user this proxy: localhost on port 4444 and open -# this page: http://localhost:7657/index.jsp -# Here you can configure i2p, watch network status and navigate anonimously. -# It's suggested to subscribe to various dns host, like i2host.i2p -# For any additional information, visit i2host.i2p and forum.i2p +# Probably you will never have to update I2P packages with upgradepkg, +# just because I2P has an auto-update function. +# Really you should not ever use any "upgrade" method. +# +# The correct way to upgrade is to: +# 1: install the upgrade +# 2: remove the old package +# +# It is a terrible shame that upgradepkg doesn't do this, infact, +# it would actually be the correct way for *any* package! +# +# BUILD=1sponge - -# put here installation dir, without first and last / -# eg: usr/local INSTALL_DIR=opt NAME=i2p ARCH=noarch +# Less than slackware 13? +SLKPLT=$(cat /etc/slackware-version | sed -re "s/(Slackware )([0-9]*)(.*)/\2/") +if [ $SLKPLT -lt 13 ] ; then + EXT=tgz +else + EXT=txz +fi + # # This mess is here due to the totally moronic way i2p does versioning. @@ -117,7 +124,7 @@ cd $PKG # requiredbuilder fucks up REALLY bad, and thinks java is perl?! # It also did not catch the shell requirements! BOOOOOOOOOOO! HISSSSSSSS! # -#requiredbuilder -v -y -s $CWD $PKG +# requiredbuilder -v -y -s $CWD $PKG # cat $CWD/slack-required > $PKG/install/slack-required -makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.tgz +makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.$EXT diff --git a/android/README.txt b/android/README.txt index e8886a579..eeb48885b 100644 --- a/android/README.txt +++ b/android/README.txt @@ -1,9 +1,13 @@ -These instructions are for the 1.5 SDK. +These instructions are for the 1.5 Android SDK. The build file is not compatible with the 1.1 SDK any more. +1.6 and 2.0 SDKs are untested. #Unzip the android SDK in ../../ #So then the android tools will be in ../../android-sdk-linux_x86-1.5_r2/tools/ +# create a file local.properties with the following line: +# sdk-location=/path/to/your/android-sdk-linux_x86-1.5_r2 + #then build the android apk file: ant debug diff --git a/apps/addressbook/java/src/addressbook/AddressBook.java b/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java similarity index 98% rename from apps/addressbook/java/src/addressbook/AddressBook.java rename to apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java index 2694cae78..6249cadaa 100644 --- a/apps/addressbook/java/src/addressbook/AddressBook.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; import java.io.File; import java.io.IOException; @@ -193,7 +193,8 @@ public class AddressBook { (! host.endsWith(".router.i2p")) && (! host.endsWith(".console.i2p")) && - ((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AAAA")) || + // null cert ends with AAAA but other zero-length certs would be AA + ((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AA")) || (dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) && dest.replaceAll("[a-zA-Z0-9~-]", "").length() == 0 ; diff --git a/apps/addressbook/java/src/addressbook/ConfigParser.java b/apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java similarity index 99% rename from apps/addressbook/java/src/addressbook/ConfigParser.java rename to apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java index 7fbb214f0..be74de990 100644 --- a/apps/addressbook/java/src/addressbook/ConfigParser.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; import java.io.BufferedReader; import java.io.BufferedWriter; diff --git a/apps/addressbook/java/src/addressbook/Daemon.java b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java similarity index 99% rename from apps/addressbook/java/src/addressbook/Daemon.java rename to apps/addressbook/java/src/net/i2p/addressbook/Daemon.java index a8a9a2da6..34b550df6 100644 --- a/apps/addressbook/java/src/addressbook/Daemon.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; import java.io.File; import java.util.HashMap; diff --git a/apps/addressbook/java/src/addressbook/DaemonThread.java b/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java similarity index 98% rename from apps/addressbook/java/src/addressbook/DaemonThread.java rename to apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java index fb869d807..b5afaaa2f 100644 --- a/apps/addressbook/java/src/addressbook/DaemonThread.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; /** * A thread that waits five minutes, then runs the addressbook daemon. diff --git a/apps/addressbook/java/src/addressbook/Log.java b/apps/addressbook/java/src/net/i2p/addressbook/Log.java similarity index 98% rename from apps/addressbook/java/src/addressbook/Log.java rename to apps/addressbook/java/src/net/i2p/addressbook/Log.java index f608b20e2..a1ba1a2fc 100644 --- a/apps/addressbook/java/src/addressbook/Log.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/Log.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; import java.io.BufferedWriter; import java.io.File; diff --git a/apps/addressbook/java/src/addressbook/Servlet.java b/apps/addressbook/java/src/net/i2p/addressbook/Servlet.java similarity index 98% rename from apps/addressbook/java/src/addressbook/Servlet.java rename to apps/addressbook/java/src/net/i2p/addressbook/Servlet.java index 34af69c1c..8f26788e4 100644 --- a/apps/addressbook/java/src/addressbook/Servlet.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/Servlet.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; import javax.servlet.GenericServlet; import javax.servlet.ServletConfig; diff --git a/apps/addressbook/java/src/addressbook/Subscription.java b/apps/addressbook/java/src/net/i2p/addressbook/Subscription.java similarity index 99% rename from apps/addressbook/java/src/addressbook/Subscription.java rename to apps/addressbook/java/src/net/i2p/addressbook/Subscription.java index 1847535a9..a97635b12 100644 --- a/apps/addressbook/java/src/addressbook/Subscription.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/Subscription.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; /** * A subscription to a remote address book. diff --git a/apps/addressbook/java/src/addressbook/SubscriptionIterator.java b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java similarity index 98% rename from apps/addressbook/java/src/addressbook/SubscriptionIterator.java rename to apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java index 2c3e13b73..b033181e0 100644 --- a/apps/addressbook/java/src/addressbook/SubscriptionIterator.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; import java.util.Iterator; import java.util.List; diff --git a/apps/addressbook/java/src/addressbook/SubscriptionList.java b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionList.java similarity index 99% rename from apps/addressbook/java/src/addressbook/SubscriptionList.java rename to apps/addressbook/java/src/net/i2p/addressbook/SubscriptionList.java index 77597eef6..ac5d3236d 100644 --- a/apps/addressbook/java/src/addressbook/SubscriptionList.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionList.java @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package addressbook; +package net.i2p.addressbook; import java.io.File; import java.io.IOException; diff --git a/apps/addressbook/web.xml b/apps/addressbook/web.xml index 22d0d7d23..0c3548c68 100644 --- a/apps/addressbook/web.xml +++ b/apps/addressbook/web.xml @@ -6,11 +6,11 @@ addressbook - addressbook.Servlet + net.i2p.addressbook.Servlet home ./addressbook 1 - \ No newline at end of file + diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java index ba5597e59..2b517da86 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java @@ -236,10 +236,21 @@ public class PeerCoordinator implements PeerListener { synchronized(peers) { - return !halted && peers.size() < _util.getMaxConnections(); + return !halted && peers.size() < getMaxConnections(); } } + /** reduce max if huge pieces to keep from ooming */ + private int getMaxConnections() { + int size = metainfo.getPieceLength(0); + int max = _util.getMaxConnections(); + if (size <= 1024*1024) + return max; + if (size <= 2*1024*1024) + return (max + 1) / 2; + return (max + 3) / 4; + } + public boolean halted() { return halted; } public void halt() @@ -294,7 +305,7 @@ public class PeerCoordinator implements PeerListener peer.disconnect(false); // Don't deregister this connection/peer. } // This is already checked in addPeer() but we could have gone over the limit since then - else if (peers.size() >= _util.getMaxConnections()) + else if (peers.size() >= getMaxConnections()) { if (_log.shouldLog(Log.WARN)) _log.warn("Already at MAX_CONNECTIONS in connected() with peer: " + peer); @@ -350,7 +361,7 @@ public class PeerCoordinator implements PeerListener peersize = peers.size(); // This isn't a strict limit, as we may have several pending connections; // thus there is an additional check in connected() - need_more = (!peer.isConnected()) && peersize < _util.getMaxConnections(); + need_more = (!peer.isConnected()) && peersize < getMaxConnections(); // Check if we already have this peer before we build the connection Peer old = peerIDInList(peer.getPeerID(), peers); need_more = need_more && ((old == null) || (old.getInactiveTime() > 8*60*1000)); @@ -378,7 +389,7 @@ public class PeerCoordinator implements PeerListener if (peer.isConnected()) _log.info("Add peer already connected: " + peer); else - _log.info("Connections: " + peersize + "/" + _util.getMaxConnections() + _log.info("Connections: " + peersize + "/" + getMaxConnections() + " not accepting extra peer: " + peer); } return false; diff --git a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java index f9470356b..2ad0107d6 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java +++ b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java @@ -20,6 +20,7 @@ import net.i2p.data.Base64; import net.i2p.data.DataHelper; import net.i2p.util.I2PAppThread; import net.i2p.util.Log; +import net.i2p.util.OrderedProperties; /** * Manage multiple snarks @@ -126,7 +127,7 @@ public class SnarkManager implements Snark.CompleteListener { /** null to set initial defaults */ public void loadConfig(String filename) { if (_config == null) - _config = new Properties(); + _config = new OrderedProperties(); if (filename != null) { File cfg = new File(filename); if (!cfg.isAbsolute()) @@ -552,11 +553,15 @@ public class SnarkManager implements Snark.CompleteListener { List files = info.getFiles(); if ( (files != null) && (files.size() > MAX_FILES_PER_TORRENT) ) { return "Too many files in " + info.getName() + " (" + files.size() + "), deleting it!"; + } else if ( (files == null) && (info.getName().endsWith(".torrent")) ) { + return "Torrent file " + info.getName() + " cannot end in '.torrent', deleting it!"; } else if (info.getPieces() <= 0) { return "No pieces in " + info.getName() + "? deleting it!"; + } else if (info.getPieces() > Storage.MAX_PIECES) { + return "Too many pieces in " + info.getName() + ", limit is " + Storage.MAX_PIECES + ", deleting it!"; } else if (info.getPieceLength(0) > Storage.MAX_PIECE_SIZE) { return "Pieces are too large in " + info.getName() + " (" + DataHelper.formatSize(info.getPieceLength(0)) + - "B), deleting it."; + "B, limit is " + DataHelper.formatSize(Storage.MAX_PIECE_SIZE) + "B), deleting it."; } else if (info.getTotalLength() > Storage.MAX_TOTAL_SIZE) { System.out.println("torrent info: " + info.toString()); List lengths = info.getLengths(); @@ -710,7 +715,6 @@ public class SnarkManager implements Snark.CompleteListener { "POSTMAN", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/" ,"WELTERDE", "http://tracker.welterde.i2p/a=http://tracker.welterde.i2p/stats?mode=top5" , "CRSTRACK", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/" - , "ThePirateBay", "http://tracker.thepiratebay.i2p/announce=http://thepiratebay.i2p/" }; /** comma delimited list of name=announceURL=baseURL for the trackers to be displayed */ diff --git a/apps/i2psnark/java/src/org/klomp/snark/Storage.java b/apps/i2psnark/java/src/org/klomp/snark/Storage.java index 85a470f44..cf3fcdc4b 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Storage.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Storage.java @@ -57,7 +57,8 @@ public class Storage /** The default piece size. */ private static final int MIN_PIECE_SIZE = 256*1024; - public static final int MAX_PIECE_SIZE = 1024*1024; + /** note that we start reducing max number of peer connections above 1MB */ + public static final int MAX_PIECE_SIZE = 2*1024*1024; /** The maximum number of pieces in a torrent. */ public static final int MAX_PIECES = 10*1024; public static final long MAX_TOTAL_SIZE = MAX_PIECE_SIZE * (long) MAX_PIECES; diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java index 01fc3df97..a4ac23b43 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java @@ -505,7 +505,6 @@ public class I2PSnarkServlet extends HttpServlet { // temporarily hardcoded for postman* and anonymity, requires bytemonsoon patch for lookup by info_hash String announce = snark.meta.getAnnounce(); if (announce.startsWith("http://YRgrgTLG") || announce.startsWith("http://8EoJZIKr") || - announce.startsWith("http://4svjpPox") || announce.startsWith("http://tracker.thepiratebay.i2p/") || announce.startsWith("http://lnQ6yoBT") || announce.startsWith("http://tracker2.postman.i2p/")) { Map trackers = _manager.getTrackers(); for (Iterator iter = trackers.entrySet().iterator(); iter.hasNext(); ) { @@ -513,8 +512,7 @@ public class I2PSnarkServlet extends HttpServlet { String name = (String)entry.getKey(); String baseURL = (String)entry.getValue(); if (!(baseURL.startsWith(announce) || // vvv hack for non-b64 announce in list vvv - (announce.startsWith("http://lnQ6yoBT") && baseURL.startsWith("http://tracker2.postman.i2p/")) || - (announce.startsWith("http://4svjpPox") && baseURL.startsWith("http://thepiratebay.i2p/")))) + (announce.startsWith("http://lnQ6yoBT") && baseURL.startsWith("http://tracker2.postman.i2p/")))) continue; int e = baseURL.indexOf('='); if (e < 0) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 1916b415a..b729b659b 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -3,8 +3,10 @@ */ package net.i2p.i2ptunnel; +import java.io.ByteArrayOutputStream; import java.io.BufferedReader; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -15,6 +17,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Properties; import java.util.StringTokenizer; @@ -55,6 +58,10 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable private HashMap addressHelpers = new HashMap(); + /** + * These are backups if the xxx.ht error page is missing. + */ + private final static byte[] ERR_REQUEST_DENIED = ("HTTP/1.1 403 Access Denied\r\n"+ "Content-Type: text/html; charset=iso-8859-1\r\n"+ @@ -77,6 +84,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable "Could not find the following Destination:

") .getBytes(); +/***** private final static byte[] ERR_TIMEOUT = ("HTTP/1.1 504 Gateway Timeout\r\n"+ "Content-Type: text/html; charset=iso-8859-1\r\n"+ @@ -88,6 +96,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable "destination may have issues. Could not get a response from "+ "the following Destination:

") .getBytes(); +*****/ private final static byte[] ERR_NO_OUTPROXY = ("HTTP/1.1 503 Service Unavailable\r\n"+ @@ -108,11 +117,11 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable "The addresshelper link you followed specifies a different destination key "+ "than a host entry in your host database. "+ "Someone could be trying to impersonate another eepsite, "+ - "or people have given two eepsites identical names.

"+ + "or people have given two eepsites identical names.

"+ "You can resolve the conflict by considering which key you trust, "+ "and either discarding the addresshelper link, "+ "discarding the host entry from your host database, "+ - "or naming one of them differently.

") + "or naming one of them differently.

") .getBytes(); private final static byte[] ERR_BAD_PROTOCOL = @@ -376,22 +385,16 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable // Did addresshelper key conflict? if (ahelperConflict) { - String str; - byte[] header; - str = FileUtil.readTextFile((new File(_errorDir, "ahelper-conflict-header.ht")).getAbsolutePath(), 100, true); - if (str != null) header = str.getBytes(); - else header = ERR_AHELPER_CONFLICT; if (out != null) { + // Fixme untranslated long alias = I2PAppContext.getGlobalContext().random().nextLong(); String trustedURL = protocol + uriPath + urlEncoding; String conflictURL = protocol + alias + ".i2p/?" + initialFragments; + byte[] header = getErrorPage("ahelper-conflict", ERR_AHELPER_CONFLICT); out.write(header); - out.write(("To visit the destination in your host database, click here. To visit the conflicting addresshelper link by temporarily giving it a random alias, click here.

").getBytes()); - out.write("

I2P HTTP Proxy Server
Generated on: ".getBytes()); - out.write(new Date().toString().getBytes()); - out.write("

\n".getBytes()); - out.flush(); + out.write(("To visit the destination in your host database, click here. To visit the conflicting addresshelper link by temporarily giving it a random alias, click here.

").getBytes()); + writeFooter(out); } s.close(); return; @@ -408,11 +411,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable line = method + " " + request.substring(pos); } else if (host.toLowerCase().equals("localhost") || host.equals("127.0.0.1")) { if (out != null) { - out.write(ERR_LOCALHOST); - out.write("

Generated on: ".getBytes()); - out.write(new Date().toString().getBytes()); - out.write("\n".getBytes()); - out.flush(); + out.write(getErrorPage("localhost", ERR_LOCALHOST)); + writeFooter(out); } s.close(); return; @@ -430,11 +430,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable _log.warn(getPrefix(requestId) + "Host wants to be outproxied, but we dont have any!"); l.log("No HTTP outproxy found for the request."); if (out != null) { - out.write(ERR_NO_OUTPROXY); - out.write("

Generated on: ".getBytes()); - out.write(new Date().toString().getBytes()); - out.write("\n".getBytes()); - out.flush(); + out.write(getErrorPage("noproxy", ERR_NO_OUTPROXY)); + writeFooter(out); } s.close(); return; @@ -449,11 +446,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable if (pos < 0) { l.log("Invalid request url [" + request + "]"); if (out != null) { - out.write(ERR_REQUEST_DENIED); - out.write("

Generated on: ".getBytes()); - out.write(new Date().toString().getBytes()); - out.write("\n".getBytes()); - out.flush(); + out.write(getErrorPage("denied", ERR_REQUEST_DENIED)); + writeFooter(out); } s.close(); return; @@ -540,13 +534,10 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable l.log("No HTTP method found in the request."); if (out != null) { if ("http://".equalsIgnoreCase(protocol)) - out.write(ERR_REQUEST_DENIED); + out.write(getErrorPage("denied", ERR_REQUEST_DENIED)); else - out.write(ERR_BAD_PROTOCOL); - out.write("

Generated on: ".getBytes()); - out.write(new Date().toString().getBytes()); - out.write("\n".getBytes()); - out.flush(); + out.write(getErrorPage("protocol", ERR_BAD_PROTOCOL)); + writeFooter(out); } s.close(); return; @@ -568,23 +559,18 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable //l.log("Could not resolve " + destination + "."); if (_log.shouldLog(Log.WARN)) _log.warn("Unable to resolve " + destination + " (proxy? " + usingWWWProxy + ", request: " + targetRequest); - String str; byte[] header; boolean showAddrHelper = false; if (usingWWWProxy) - str = FileUtil.readTextFile((new File(_errorDir, "dnfp-header.ht")).getAbsolutePath(), 100, true); + header = getErrorPage("dnfp", ERR_DESTINATION_UNKNOWN); else if(ahelper != 0) - str = FileUtil.readTextFile((new File(_errorDir, "dnfb-header.ht")).getAbsolutePath(), 100, true); + header = getErrorPage("dnfb", ERR_DESTINATION_UNKNOWN); else if (destination.length() == 60 && destination.endsWith(".b32.i2p")) - str = FileUtil.readTextFile((new File(_errorDir, "dnf-header.ht")).getAbsolutePath(), 100, true); + header = getErrorPage("dnf", ERR_DESTINATION_UNKNOWN); else { - str = FileUtil.readTextFile((new File(_errorDir, "dnfh-header.ht")).getAbsolutePath(), 100, true); + header = getErrorPage("dnfh", ERR_DESTINATION_UNKNOWN); showAddrHelper = true; } - if (str != null) - header = str.getBytes(); - else - header = ERR_DESTINATION_UNKNOWN; writeErrorMessage(header, out, targetRequest, usingWWWProxy, destination, showAddrHelper); s.close(); return; @@ -658,6 +644,64 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable } } + /** + * foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht, + * or the backup byte array on fail. + * + * .ht files must be UTF-8 encoded and use \r\n terminators so the + * HTTP headers are conformant. + * We can't use FileUtil.readFile() because it strips \r + * + * @return non-null + */ + private byte[] getErrorPage(String base, byte[] backup) { + return getErrorPage(getTunnel().getContext(), base, backup); + } + + private static byte[] getErrorPage(I2PAppContext ctx, String base, byte[] backup) { + File errorDir = new File(ctx.getBaseDir(), "docs"); + String lang = ctx.getProperty("routerconsole.lang", Locale.getDefault().getLanguage()); + if (lang != null && lang.length() > 0 && !lang.equals("en")) { + File file = new File(errorDir, base + "-header_" + lang + ".ht"); + try { + return readFile(file); + } catch (IOException ioe) { + // try the english version now + } + } + File file = new File(errorDir, base + "-header.ht"); + try { + return readFile(file); + } catch (IOException ioe) { + return backup; + } + } + + private static byte[] readFile(File file) throws IOException { + FileInputStream fis = null; + byte[] buf = new byte[512]; + ByteArrayOutputStream baos = new ByteArrayOutputStream(2048); + try { + int len = 0; + fis = new FileInputStream(file); + while ((len = fis.read(buf)) > 0) { + baos.write(buf, 0, len); + } + return baos.toByteArray(); + } finally { + try { if (fis != null) fis.close(); } catch (IOException foo) {} + } + // we won't ever get here + } + + private static void writeFooter(OutputStream out) throws IOException { + // the css is hiding this div for now, but we'll keep it here anyway + out.write("

I2P HTTP Proxy Server
Generated on: ".getBytes()); + out.write(new Date().toString().getBytes()); + out.write("

\n".getBytes()); + out.flush(); + } + private static class OnTimeout implements Runnable { private Socket _socket; private OutputStream _out; @@ -705,9 +749,10 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable out.write("\">http://".getBytes()); out.write(uri.getBytes()); out.write("".getBytes()); - if (usingWWWProxy) out.write(("
WWW proxy: " + wwwProxy).getBytes()); + if (usingWWWProxy) out.write(("
WWW proxy: " + wwwProxy).getBytes()); if (showAddrHelper) { - out.write("

Click a link below to look for an address helper by using a \"jump\" service:
".getBytes()); + // Fixme untranslated + out.write("

Click a link below to look for an address helper by using a \"jump\" service:
".getBytes()); for (int i = 0; i < jumpServers.length; i++) { // Skip jump servers we don't know String jumphost = jumpServers[i].substring(7); // "http://" @@ -719,7 +764,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable continue; } - out.write("
".getBytes()); @@ -729,10 +774,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable } } } - out.write("

I2P HTTP Proxy Server
Generated on: ".getBytes()); - out.write(new Date().toString().getBytes()); - out.write("

\n".getBytes()); - out.flush(); + out.write("".getBytes()); + writeFooter(out); } } @@ -744,16 +787,11 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable // _log.warn(getPrefix(requestId) + "Error sending to " + wwwProxy + " (proxy? " + usingWWWProxy + ", request: " + targetRequest, ex); if (out != null) { try { - String str; byte[] header; if (usingWWWProxy) - str = FileUtil.readTextFile((new File(_errorDir, "dnfp-header.ht")).getAbsolutePath(), 100, true); + header = getErrorPage(I2PAppContext.getGlobalContext(), "dnfp", ERR_DESTINATION_UNKNOWN); else - str = FileUtil.readTextFile((new File(_errorDir, "dnf-header.ht")).getAbsolutePath(), 100, true); - if (str != null) - header = str.getBytes(); - else - header = ERR_DESTINATION_UNKNOWN; + header = getErrorPage(I2PAppContext.getGlobalContext(), "dnf", ERR_DESTINATION_UNKNOWN); writeErrorMessage(header, out, targetRequest, usingWWWProxy, wwwProxy, false); } catch (IOException ioe) { // static diff --git a/apps/routerconsole/java/bmsg.sh b/apps/routerconsole/java/bmsg.sh new file mode 100644 index 000000000..b9d294b32 --- /dev/null +++ b/apps/routerconsole/java/bmsg.sh @@ -0,0 +1,17 @@ +# +# Update messages_xx.po and messages_xx.class files, +# from both java and jsp sources. +# Requires installed programs xgettext, msgfmt, msgmerge, and find. +# zzz - public domain +# + +## launching sh.exe with -login parameter will open a shell with the current path always pointing to \bin\ +## need to cd into our orignal path - where we call sh.exe from. + +cd $CALLFROM +## echo $PWD + +## except this everything is the same with bundle-message.sh +## walking - public domain :-D + +source bundle-messages.sh $PARAS \ No newline at end of file diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index 61d1ddc85..e5b602129 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -89,10 +89,28 @@ + + + + + + + + + + + + + + + + + + basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, *.jsi, web-fragment.xml"> @@ -101,7 +119,36 @@ + + diff --git a/apps/routerconsole/java/bundle-messages.bat b/apps/routerconsole/java/bundle-messages.bat new file mode 100644 index 000000000..90feca972 --- /dev/null +++ b/apps/routerconsole/java/bundle-messages.bat @@ -0,0 +1,26 @@ +@echo off +set Callfrom=%cd% +set Paras=%1 + +rem before calling make sure you have msys and mingw 's "bin" path +rem in your current searching path +rem type "set path" to check +if not exist ..\locale\*.only goto updateALL + +rem put a messages_xx.only(eg messages_zh.only) into locale folder +rem this script will only touch the po file(eg zh) you specified, leaving other po files untact. + +for %%i in (..\locale\*.only) do set PO=%%~ni +echo [Notice] Yu choose to Ony update the choosen file: %PO%.po +for %%i in (..\locale\*.po) do if not %%~ni==%PO% ren %%i %%~ni.po- + +call sh --login %cd%\bmsg.sh + +for %%i in (..\locale\*.po-) do if not %%~ni==%PO% ren %%i %%~ni.po +goto end + +:updateALL +call sh --login %cd%\bmsg.sh + +:end +echo End of Message Bundling \ No newline at end of file diff --git a/apps/routerconsole/java/bundle-messages.sh b/apps/routerconsole/java/bundle-messages.sh index 3b80c80e9..33db27572 100755 --- a/apps/routerconsole/java/bundle-messages.sh +++ b/apps/routerconsole/java/bundle-messages.sh @@ -2,65 +2,112 @@ # Update messages_xx.po and messages_xx.class files, # from both java and jsp sources. # Requires installed programs xgettext, msgfmt, msgmerge, and find. +# +# usage: +# bundle-messages.sh (generates the resource bundle from the .po file) +# bundle-messages.sh -p (updates the .po file from the source tags, then generates the resource bundle) +# # zzz - public domain # CLASS=net.i2p.router.web.messages TMPFILE=build/javafiles.txt export TZ=UTC +if [ "$1" = "-p" ] +then + POUPDATE=1 +fi + +# +# generate strings/Countries.java from ../../../installer/resources/countries.txt +# +CFILE=../../../installer/resources/countries.txt +# add ../java/ so the refs will work in the po file +JFILE=../java/build/Countries.java +if [ $CFILE -nt $JFILE -o ! -s $JFILE ] +then + mkdir -p build + echo '// Automatically generated pseudo-java for xgettext - do not edit' > $JFILE + echo '// Translators may wish to translate a few of these, do not bother to translate all of them!!' >> $JFILE + sed 's/..,\(..*\)/_("\1");/' $CFILE >> $JFILE +fi + +# list specific files in router/ here, so we don't scan the whole tree +ROUTERFILES="\ + ../../../router/java/src/net/i2p/router/RouterThrottleImpl.java \ + ../../../router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java \ + ../../../router/java/src/net/i2p/router/transport/TransportManager.java \ + ../../../router/java/src/net/i2p/router/transport/GetBidsJob.java \ + ../../../router/java/src/net/i2p/router/Blocklist.java \ + ../../../router/java/src/net/i2p/router/transport/ntcp/EstablishState.java" + +# add ../java/ so the refs will work in the po file +JPATHS="../java/src ../jsp/WEB-INF ../java/strings $JFILE $ROUTERFILES" for i in ../locale/messages_*.po do # get language LG=${i#../locale/messages_} LG=${LG%.po} - # make list of java files newer than the .po file - find src ../jsp/WEB-INF -name *.java -newer $i > $TMPFILE - if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a ! -s $TMPFILE ] + if [ "$POUPDATE" = "1" ] + then + # make list of java files newer than the .po file + find $JPATHS -name *.java -newer $i > $TMPFILE + fi + + if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a \ + build/obj/net/i2p/router/web/messages_$LG.class -nt $i -a \ + ! -s $TMPFILE ] then continue fi - echo "Generating ${CLASS}_$LG ResourceBundle..." + if [ "$POUPDATE" = "1" ] + then + echo "Updating the $i file from the tags..." + # extract strings from java and jsp files, and update messages.po files + # translate calls must be one of the forms: + # _("foo") + # _x("foo") + # intl._("foo") + # intl.title("foo") + # handler._("foo") + # formhandler._("foo") + # net.i2p.router.web.Messages.getString("foo") + # In a jsp, you must use a helper or handler that has the context set. + # To start a new translation, copy the header from an old translation to the new .po file, + # then ant distclean updater. + find $JPATHS -name *.java > $TMPFILE + xgettext -f $TMPFILE -F -L java --from-code=UTF-8 \ + --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \ + --keyword=handler._ --keyword=formhandler._ \ + --keyword=net.i2p.router.web.Messages.getString \ + -o ${i}t + if [ $? -ne 0 ] + then + echo 'Warning - xgettext failed, not updating translations' + rm -f ${i}t + break + fi + msgmerge -U --backup=none $i ${i}t + if [ $? -ne 0 ] + then + echo 'Warning - msgmerge failed, not updating translations' + rm -f ${i}t + break + fi + rm -f ${i}t + # so we don't do this again + touch $i + fi - # extract strings from java and jsp files, and update messages.po files - # translate calls must be one of the forms: - # _("foo") - # _x("foo") - # cssHelper._("foo") - # cssHelper.title("foo") - # handler._("foo") - # formhandler._("foo") - # In a jsp, you must use a helper or handler that has the context set. - # To start a new translation, copy the header from an old translation to the new .po file, - # then ant distclean updater. - find src ../jsp/WEB-INF -name *.java > $TMPFILE - xgettext -f $TMPFILE -F -L java \ - --keyword=_ --keyword=_x --keyword=cssHelper._ --keyword=cssHelper.title \ - --keyword=handler._ --keyword=formhandler._ \ - -o ${i}t - if [ $? -ne 0 ] - then - echo 'Warning - xgettext failed, not updating translations' - rm -f ${i}t - break - fi - msgmerge -U --backup=none $i ${i}t - if [ $? -ne 0 ] - then - echo 'Warning - msgmerge failed, not updating translations' - rm -f ${i}t - break - fi - rm -f ${i}t - # so we don't do this again - touch $i + echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj msgfmt --java -r $CLASS -l $LG -d build/obj $i if [ $? -ne 0 ] then - echo 'Warning - xgettext failed, not updating translations' + echo 'Warning - msgfmt failed, not updating translations' break fi done diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java index 230e9ec0e..aed909dc7 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java @@ -13,7 +13,7 @@ import java.util.Iterator; * */ public class ConfigAdvancedHandler extends FormHandler { - private boolean _forceRestart; + //private boolean _forceRestart; private boolean _shouldSave; private String _config; @@ -27,7 +27,7 @@ public class ConfigAdvancedHandler extends FormHandler { } public void setShouldsave(String moo) { _shouldSave = true; } - public void setRestart(String moo) { _forceRestart = true; } + //public void setRestart(String moo) { _forceRestart = true; } public void setConfig(String val) { _config = val; @@ -54,7 +54,7 @@ public class ConfigAdvancedHandler extends FormHandler { unsetKeys.remove(key); } } catch (IOException ioe) { - addFormError("Error updating the configuration (IOERROR) - please see the error logs"); + addFormError(_("Error updating the configuration - please see the error logs")); return; } @@ -66,15 +66,15 @@ public class ConfigAdvancedHandler extends FormHandler { boolean saved = _context.router().saveConfig(); if (saved) - addFormNotice("Configuration saved successfully"); + addFormNotice(_("Configuration saved successfully")); else - addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs"); + addFormNotice(_("Error saving the configuration (applied but not saved) - please see the error logs")); - if (_forceRestart) { - addFormNotice("Performing a soft restart"); - _context.router().restart(); - addFormNotice("Soft restart complete"); - } + //if (_forceRestart) { + // addFormNotice("Performing a soft restart"); + // _context.router().restart(); + // addFormNotice("Soft restart complete"); + //} } } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java index d2f4d8e64..4d490907a 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java @@ -29,11 +29,16 @@ public class ConfigClientsHandler extends FormHandler { @Override protected void processForm() { - if (_action.startsWith("Save Client")) { + if (_action.equals(_("Save Client Configuration"))) { saveClientChanges(); - } else if (_action.startsWith("Save WebApp")) { + return; + } + if (_action.equals(_("Save WebApp Configuration"))) { saveWebAppChanges(); - } else if (_action.startsWith("Start ")) { + return; + } + // value + if (_action.startsWith("Start ")) { String app = _action.substring(6); int appnum = -1; try { @@ -43,10 +48,14 @@ public class ConfigClientsHandler extends FormHandler { startClient(appnum); else startWebApp(app); - } else if (_action.toLowerCase().startsWith("start ") && + return; + } + // label (IE) + String xStart = _("Start"); + if (_action.toLowerCase().startsWith(xStart + " ") && _action.toLowerCase().endsWith("")) { // IE sucks - String app = _action.substring(23, _action.length() - 7); + String app = _action.substring(xStart.length() + 18, _action.length() - 7); int appnum = -1; try { appnum = Integer.parseInt(app); @@ -56,7 +65,7 @@ public class ConfigClientsHandler extends FormHandler { else startWebApp(app); } else { - addFormError("Unsupported " + _action + "."); + addFormError(_("Unsupported") + ' ' + _action + '.'); } } @@ -67,22 +76,22 @@ public class ConfigClientsHandler extends FormHandler { for (int cur = 0; cur < clients.size(); cur++) { ClientAppConfig ca = (ClientAppConfig) clients.get(cur); Object val = _settings.get(cur + ".enabled"); - if (! "webConsole".equals(ca.clientName)) + if (! ("webConsole".equals(ca.clientName) || "Web console".equals(ca.clientName))) ca.disabled = val == null; } ClientAppConfig.writeClientAppConfig(_context, clients); - addFormNotice("Client configuration saved successfully - restart required to take effect."); + addFormNotice(_("Client configuration saved successfully - restart required to take effect.")); } private void startClient(int i) { List clients = ClientAppConfig.getClientApps(_context); if (i >= clients.size()) { - addFormError("Bad client index."); + addFormError(_("Bad client index.")); return; } ClientAppConfig ca = (ClientAppConfig) clients.get(i); LoadClientAppsJob.runClient(ca.className, ca.clientName, LoadClientAppsJob.parseArgs(ca.args), configClient_log); - addFormNotice("Client " + ca.clientName + " started."); + addFormNotice(_("Client") + ' ' + _(ca.clientName) + ' ' + _("started") + '.'); } private void saveWebAppChanges() { @@ -99,7 +108,7 @@ public class ConfigClientsHandler extends FormHandler { props.setProperty(name, "" + (val != null)); } RouterConsoleRunner.storeWebAppProperties(props); - addFormNotice("WebApp configuration saved successfully - restart required to take effect."); + addFormNotice(_("WebApp configuration saved successfully - restart required to take effect.")); } // Big hack for the moment, not using properties for directory and port @@ -117,14 +126,14 @@ public class ConfigClientsHandler extends FormHandler { path = new File(path, app + ".war"); s.addWebApplication("/"+ app, path.getAbsolutePath()).start(); // no passwords... initialize(wac); - addFormNotice("WebApp
" + app + " started."); + addFormNotice(_("WebApp") + " " + _(app) + " " + _("started") + '.'); } catch (Exception ioe) { - addFormError("Failed to start " + app + " " + ioe + "."); + addFormError(_("Failed to start") + ' ' + _(app) + " " + ioe + '.'); } return; } } } - addFormError("Failed to find server."); + addFormError(_("Failed to find server.")); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java index af71883eb..90738b15b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java @@ -14,12 +14,13 @@ public class ConfigClientsHelper extends HelperBase { public String getForm1() { StringBuilder buf = new StringBuilder(1024); buf.append("\n"); - buf.append("\n"); + buf.append("\n"); List clients = ClientAppConfig.getClientApps(_context); for (int cur = 0; cur < clients.size(); cur++) { ClientAppConfig ca = (ClientAppConfig) clients.get(cur); - renderForm(buf, ""+cur, ca.clientName, false, !ca.disabled, "webConsole".equals(ca.clientName), + renderForm(buf, ""+cur, ca.clientName, false, !ca.disabled, + "webConsole".equals(ca.clientName) || "Web console".equals(ca.clientName), ca.className + ((ca.args != null) ? " " + ca.args : "")); } @@ -30,7 +31,7 @@ public class ConfigClientsHelper extends HelperBase { public String getForm2() { StringBuilder buf = new StringBuilder(1024); buf.append("
ClientRun at Startup?Start NowClass and arguments
" + _("Client") + "" + _("Run at Startup?") + "" + _("Start Now") + "" + _("Class and arguments") + "
\n"); - buf.append("\n"); + buf.append("\n"); Properties props = RouterConsoleRunner.webAppProperties(); Set keys = new TreeSet(props.keySet()); for (Iterator iter = keys.iterator(); iter.hasNext(); ) { @@ -51,9 +52,9 @@ public class ConfigClientsHelper extends HelperBase { String link = "/"; if (! RouterConsoleRunner.ROUTERCONSOLE.equals(name)) link += name + "/"; - buf.append("").append(name).append(""); + buf.append("").append(_(name)).append(""); } else { - buf.append(name); + buf.append(_(name)); } buf.append("\n"); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java index cb54c77ff..38f7d4b41 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java @@ -15,12 +15,12 @@ public class ConfigKeyringHandler extends FormHandler { @Override protected void processForm() { if (_action == null) return; - boolean adding = _action.startsWith("Add"); - if (adding || _action.startsWith("Delete")) { + boolean adding = _action.equals(_("Add key")); + if (adding || _action.equals(_("Delete key"))) { if (_peer == null) - addFormError("You must enter a destination"); + addFormError(_("You must enter a destination")); if (_key == null && adding) - addFormError("You must enter a key"); + addFormError(_("You must enter a key")); if (_peer == null || (_key == null && adding)) return; Hash h = ConvertToHash.getHash(_peer); @@ -31,22 +31,22 @@ public class ConfigKeyringHandler extends FormHandler { } catch (DataFormatException dfe) {} if (h != null && h.getData() != null && sk.getData() != null) { _context.keyRing().put(h, sk); - addFormNotice("Key for " + h.toBase64() + " added to keyring"); + addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("added to keyring")); } else { - addFormError("Invalid destination or key"); + addFormError(_("Invalid destination or key")); } } else { // Delete if (h != null && h.getData() != null) { if (_context.keyRing().remove(h) != null) - addFormNotice("Key for " + h.toBase64() + " removed from keyring"); + addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("removed from keyring")); else - addFormNotice("Key for " + h.toBase64() + " not found in keyring"); + addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("not found in keyring")); } else { - addFormError("Invalid destination"); + addFormError(_("Invalid destination")); } } } else { - addFormError("Unsupported"); + addFormError(_("Unsupported")); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java index e1e7907b0..63a5a799b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java @@ -36,7 +36,7 @@ public class ConfigLoggingHelper extends HelperBase { sortedLogs.add(prefix); } - buf.append("

- -
- NOTE: Some changes may require a restart to take effect. + " /> + " />
+ <%=intl._("NOTE")%>: <%=intl._("Some changes may require a restart to take effect.")%>
diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index 81efcd76b..974673b31 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -2,21 +2,22 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - config clients -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("config clients")%> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %> " /> -

I2P Client Configuration

+

<%=intl._("I2P Client Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> " /> @@ -29,29 +30,23 @@ button span.hide{ if (prev != null) System.setProperty("net.i2p.router.web.ConfigClientsHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.ConfigClientsHandler.nonce", new java.util.Random().nextLong()+""); %> " /> -

Client Configuration

- The Java clients listed below are started by the router and run in the same JVM. +

<%=intl._("Client Configuration")%>

+ <%=intl._("The Java clients listed below are started by the router and run in the same JVM.")%>

-

To change other client options, edit the file -<%=net.i2p.router.startup.ClientAppConfig.configFile(net.i2p.I2PAppContext.getGlobalContext()).getAbsolutePath()%>. -All changes require restart to take effect. +

<%=intl._("To change other client options, edit the file")%> + <%=net.i2p.router.startup.ClientAppConfig.configFile(net.i2p.I2PAppContext.getGlobalContext()).getAbsolutePath()%>. + <%=intl._("All changes require restart to take effect.")%>


- -

WebApp Configuration

- The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. - They are usually web applications accessible through the router console. - They may be complete applications (e.g. i2psnark), - front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), - or have no web interface at all (e.g. addressbook). + " /> +

<%=intl._("WebApp Configuration")%>

+ <%=intl._("The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console. They may be complete applications (e.g. i2psnark),front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), or have no web interface at all (e.g. addressbook).")%>

- A web app may also be disabled by removing the .war file from the webapps directory; - however the .war file and web app will reappear when you update your router to a newer version, - so disabling the web app here is the preferred method. + <%=intl._("A web app may also be disabled by removing the .war file from the webapps directory; however the .war file and web app will reappear when you update your router to a newer version, so disabling the web app here is the preferred method.")%>

- All changes require restart to take effect. + <%=intl._("All changes require restart to take effect.")%>


- + " />
diff --git a/apps/routerconsole/jsp/configkeyring.jsp b/apps/routerconsole/jsp/configkeyring.jsp index 0c054a7d2..038b2c778 100644 --- a/apps/routerconsole/jsp/configkeyring.jsp +++ b/apps/routerconsole/jsp/configkeyring.jsp @@ -2,14 +2,15 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - config keyring -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("config keyring")%> -<%@include file="summary.jsp" %> -

I2P Keyring Configuration

+<%@include file="summary.jsi" %> +

<%=intl._("I2P Keyring Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> @@ -17,32 +18,30 @@ " /> -

Keyring

- The router keyring is used to decrypt encrypted leaseSets. - The keyring may contain keys for local or remote encrypted destinations. +

<%=intl._("Keyring")%>

+ <%=intl._("The router keyring is used to decrypt encrypted leaseSets.")%> + <%=intl._("The keyring may contain keys for local or remote encrypted destinations.")%>

-
-
<% String prev = System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigKeyringHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.ConfigKeyringHandler.nonce", new java.util.Random().nextLong()+""); %> " /> -

Manual Keyring Addition

- Enter keys for encrypted remote destinations here. - Keys for local destinations must be entered on the I2PTunnel page. -

+

<%=intl._("Manual Keyring Addition")%>

+ <%=intl._("Enter keys for encrypted remote destinations here.")%> + <%=intl._("Keys for local destinations must be entered on the")%> <%=intl._("I2PTunnel page")%>. +

-
WebAppRun at Startup?Start NowDescription
" + _("WebApp") + "" + _("Run at Startup?") + "" + _("Start Now") + "" + _("Description") + "
"); if (!enabled) { - buf.append(""); + buf.append(""); } buf.append("").append(desc).append("
- +

Dest. name, hash, or full key:
+ - + - -
<%=intl._("Dest. name, hash, or full key")%>:
Encryption Key:<%=intl._("Encryption Key")%>:
-
+ " /> + " /> " /> +

diff --git a/apps/routerconsole/jsp/configlogging.jsp b/apps/routerconsole/jsp/configlogging.jsp index b4a08ee19..c2f3a7ba5 100644 --- a/apps/routerconsole/jsp/configlogging.jsp +++ b/apps/routerconsole/jsp/configlogging.jsp @@ -3,16 +3,16 @@ -I2P Router Console - config logging -<%@include file="css.jsp" %> +<%@include file="css.jsi" %> +<%=intl.title("config logging")%> " /> -<%@include file="summary.jsp" %> -

I2P Logging Configuration

+<%@include file="summary.jsi" %> +

<%=intl._("I2P Logging Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> @@ -25,29 +25,29 @@ System.setProperty("net.i2p.router.web.ConfigLoggingHandler.nonce", new java.util.Random().nextLong()+""); %> " /> -

Configure I2P Logging Options

+

<%=intl._("Configure I2P Logging Options")%>

- + - +
<%=intl._("(the symbol '@' will be replaced during log rotation)")%> + - +
<%=intl._("(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)")%> + + - +
<%=intl._("('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)")%> + + - - - + + +
Logging filename:
<%=intl._("Logging filename")%>: " /> -
(the symbol '@' will be replaced during log rotation)
Log record format:
<%=intl._("Log record format")%>: " /> -
(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, - 'm' = message)
Log date format:
<%=intl._("Log date format")%>: " /> -
('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' - = second, 'SSS' = millisecond)
Max log file size:
<%=intl._("Max log file size")%>: " />
Default log level:
(DEBUG and INFO are not recommended defaults, - as they will drastically slow down your router)
Log level overrides:
<%=intl._("Default log level")%>:
<%=intl._("(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)")%> +
<%=intl._("Log level overrides")%>:

- - + " /> + " />
diff --git a/apps/routerconsole/jsp/confignav.jsp b/apps/routerconsole/jsp/confignav.jsi similarity index 100% rename from apps/routerconsole/jsp/confignav.jsp rename to apps/routerconsole/jsp/confignav.jsi diff --git a/apps/routerconsole/jsp/configpeer.jsp b/apps/routerconsole/jsp/configpeer.jsp index b58d86fe1..8b61f274d 100644 --- a/apps/routerconsole/jsp/configpeer.jsp +++ b/apps/routerconsole/jsp/configpeer.jsp @@ -2,14 +2,15 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - config peers -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("config peers")%> -<%@include file="summary.jsp" %> -

I2P Peer Configuration

+<%@include file="summary.jsi" %> +

<%=intl._("I2P Peer Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> @@ -31,50 +32,41 @@ if (prev != null) System.setProperty("net.i2p.router.web.ConfigPeerHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.ConfigPeerHandler.nonce", new java.util.Random().nextLong()+""); %> " /> -

-

Manual Peer Controls

-
Router Hash: -
-

Manually Ban / Unban a Peer

- Banning will prevent the participation of this peer in tunnels you create. -
+

<%=intl._("Manual Peer Controls")%>

+

<%=intl._("Router Hash")%>: +

+

<%=intl._("Manually Ban / Unban a Peer")%>

+

<%=intl._("Banning will prevent the participation of this peer in tunnels you create.")%>

- - + " /> + " /> <% if (! "".equals(peer)) { %> <% } %>
-

Adjust Profile Bonuses

- Bonuses may be positive or negative, and affect the peer's inclusion in Fast - and High Capacity tiers. Fast peers are used for client tunnels, and High - Capacity peers are used for some exploratory tunnels. Current bonuses are - displayed on the profiles page. -

+

<%=intl._("Adjust Profile Bonuses")%>

+

<%=intl._("Bonuses may be positive or negative, and affect the peer's inclusion in Fast and High Capacity tiers. Fast peers are used for client tunnels, and High Capacity peers are used for some exploratory tunnels. Current bonuses are displayed on the")%> <%=intl._("profiles page")%>.

<% long speed = 0; long capacity = 0; if (! "".equals(peer)) { // get existing bonus values? } %> -
-
Speed: +

<%=intl._("Speed")%>: - Capacity: + <%=intl._("Capacity")%>: -

-

+ " />

- +

<%=intl._("Banned Peers")%>

" /> -
-
+

<%=intl._("Banned IPs")%>

-
+
diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp index 45b5e435f..e76e03623 100644 --- a/apps/routerconsole/jsp/configservice.jsp +++ b/apps/routerconsole/jsp/configservice.jsp @@ -2,14 +2,15 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - config service -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("config service")%> -<%@include file="summary.jsp" %> -

I2P Service Configuration

+<%@include file="summary.jsi" %> +

<%=intl._("I2P Service Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> @@ -20,65 +21,59 @@ <% String prev = System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigServiceHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.ConfigServiceHandler.nonce", new java.util.Random().nextLong()+""); %> - " /> -

Shutdown the router

-

Graceful shutdown lets the router satisfy the agreements it has already made - before shutting down, but may take a few minutes. If you need to kill the - router immediately, that option is available as well.

+ " > +

<%=intl._("Shutdown the router")%>

+

<%=intl._("Graceful shutdown lets the router satisfy the agreements it has already made before shutting down, but may take a few minutes.")%> + <%=intl._("If you need to kill the router immediately, that option is available as well.")%>


- - - + " > + " > + " >
<% if (System.getProperty("wrapper.version") != null) { %> -

If you want the router to restart itself after shutting down, you can choose one of - the following. This is useful in some situations - for example, if you changed - some settings that client applications only read at startup, such as the routerconsole password - or the interface it listens on. A graceful restart will take a few minutes (but your peers - will appreciate your patience), while a hard restart does so immediately. After tearing down - the router, it will wait 1 minute before starting back up again.

+

<%=intl._("If you want the router to restart itself after shutting down, you can choose one of the following.")%> + <%=intl._("This is useful in some situations")%> - + <%=intl._("for example, if you changed some settings that client applications only read at startup, such as the routerconsole password or the interface it listens on.")%> + <%=intl._("A graceful restart will take a few minutes (but your peers will appreciate your patience), while a hard restart does so immediately.")%> + <%=intl._("After tearing down the router, it will wait 1 minute before starting back up again.")%>


- - + " > + " > <% } %>
<% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %> -

Systray integration

-

On the windows platform, there is a small application to sit in the system - tray, allowing you to view the router's status (later on, I2P client applications - will be able to integrate their own functionality into the system tray as well). - If you are on windows, you can either enable or disable that icon here.

+

<%=intl._("Systray integration")%>

+

<%=intl._("On the windows platform, there is a small application to sit in the system tray, allowing you to view the router's status")%> + <%=intl._("(later on, I2P client applications will be able to integrate their own functionality into the system tray as well).")%> + <%=intl._("If you are on windows, you can either enable or disable that icon here.")%>


- - -

Run on startup

-

You can control whether I2P is run on startup or not by selecting one of the - following options - I2P will install (or remove) a service accordingly. You can - also run the install_i2p_service_winnt.bat (or - uninstall_i2p_service_winnt.bat) from the command line, if you prefer.

+ " > + " > +

<%=intl._("Run on startup")%>

+

<%=intl._("You can control whether I2P is run on startup or not by selecting one of the following options")%> - + <%=intl._("I2P will install (or remove) a service accordingly.")%> + <%=intl._("If you prefer the command line, you can also run the ")%> install_i2p_service_winnt.bat (<%=intl._("or")%> + uninstall_i2p_service_winnt.bat).


- -
-

Note: If you are running I2P as service right now, removing it will shut - down your router immediately. You may want to consider shutting down gracefully, as - above, then running uninstall_i2p_service_winnt.bat.

+ " > +" > +

<%=intl._("Note")%>: <%=intl._("If you are running I2P as service right now, removing it will shut down your router immediately.")%> + <%=intl._("You may want to consider shutting down gracefully, as above, then running uninstall_i2p_service_winnt.bat.")%>

<% } %> <% if (System.getProperty("wrapper.version") != null) { %> -

Debugging

-

At times, it may be helpful to debug I2P by getting a thread dump. To do so, - please select the following option and review the thread dumped to +

<%=intl._("Debugging")%>

+

At times, it may be helpful to debug I2P by getting a thread dump. + To do so, please select the following option and review the thread dumped to wrapper.log.


- + " > <% } %>
-

Launch browser on router startup?

-

I2P's main configuration interface is this web console, so for your convenience - I2P can launch a web browser pointing at - http://127.0.0.1:7657/index.jsp whenever - the router starts up.

+

<%=intl._("Launch browser on router startup?")%>

+

<%=intl._("I2P's main configuration interface is this web console, so for your convenience I2P can launch a web browser on startup pointing at")%> + http://127.0.0.1:7657/index.jsp .


- - + " > + " >
diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp index 122d035c3..1c1158407 100644 --- a/apps/routerconsole/jsp/configstats.jsp +++ b/apps/routerconsole/jsp/configstats.jsp @@ -2,8 +2,9 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - config stats -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("config stats")%> -<%@include file="summary.jsp" %> -

I2P Stats Configuration

+<%@include file="summary.jsi" %> +

<%=intl._("I2P Stats Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> " /> @@ -70,25 +71,25 @@ function toggleAll(category) System.setProperty("net.i2p.router.web.ConfigStatsHandler.nonce", new java.util.Random().nextLong()+""); %> " /> -

Configure I2P Stat Collection

- Enable full stats? +

<%=intl._("Configure I2P Stat Collection")%>

+

<%=intl._("Enable full stats?")%> checked="true" <% } %>/> - (change requires restart to take effect)
- Stat file:
- Filter: (toggle all)
+ (<%=intl._("change requires restart to take effect")%>)
+ <%=intl._("Stat file")%>:
+<%=intl._("Filter")%>: (<%=intl._("toggle all")%>)

- +

<% while (statshelper.hasMoreStats()) { while (statshelper.groupRequired()) { %> - - + + <% } // end iterating over required groups for the current stat %> @@ -105,7 +106,7 @@ function toggleAll(category) } // end iterating over all stats %> - - -
<%=statshelper.getCurrentGroupName()%> - (toggle all) + (<%=intl._("toggle all")%>)
LogGraph<%=intl._("Log")%><%=intl._("Graph")%>
Advanced filter: + <%=intl._("Advanced filter")%>:
+ " />" /> +

diff --git a/apps/routerconsole/jsp/configtunnels.jsp b/apps/routerconsole/jsp/configtunnels.jsp index f9185a01a..269f2186e 100644 --- a/apps/routerconsole/jsp/configtunnels.jsp +++ b/apps/routerconsole/jsp/configtunnels.jsp @@ -2,17 +2,18 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - config tunnels -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("config tunnels")%> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %> " /> -

I2P Tunnel Configuration

+

<%=intl._("I2P Tunnel Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> " /> " /> @@ -20,23 +21,23 @@ " /> -

- NOTE: The default settings work for most people. - There is a fundamental tradeoff between anonymity and performance. - Tunnels longer than 3 hops (for example 2 hops + 0-2 hops, 3 hops + 0-1 hops, 3 hops + 0-2 hops), - or a high quantity + backup quantity, may severely reduce performance or reliability. - High CPU and/or high outbound bandwidth usage may result. - Change these settings with care, and adjust them if you have problems. -

-
+

+ <%=intl._("NOTE")%>: + <%=intl._("The default settings work for most people.")%> + <%=intl._("There is a fundamental tradeoff between anonymity and performance.")%> + <%=intl._("Tunnels longer than 3 hops (for example 2 hops + 0-2 hops, 3 hops + 0-1 hops, 3 hops + 0-2 hops), or a high quantity + backup quantity, may severely reduce performance or reliability.")%> + <%=intl._("High CPU and/or high outbound bandwidth usage may result.")%> + <%=intl._("Change these settings with care, and adjust them if you have problems.")%> +

+ <% String prev = System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce", new java.util.Random().nextLong()+""); %> " /> - Note - Exploratory tunnel setting changes are stored in the router.config file.
- Client tunnel changes are temporary and are not saved.
- To make permanent client tunnel changes see the i2ptunnel page.
-
-
+ <%=intl._("Note")%>: <%=intl._("Exploratory tunnel setting changes are stored in the router.config file.")%> + <%=intl._("Client tunnel changes are temporary and are not saved.")%> +<%=intl._("To make permanent client tunnel changes see the")%> <%=intl._("i2ptunnel page")%>. +
" /> " />
+

diff --git a/apps/routerconsole/jsp/configui.jsp b/apps/routerconsole/jsp/configui.jsp index 1bf276237..7484880ce 100644 --- a/apps/routerconsole/jsp/configui.jsp +++ b/apps/routerconsole/jsp/configui.jsp @@ -3,11 +3,11 @@ -<%@include file="css.jsp" %> -<%=cssHelper.title("config UI")%> +<%@include file="css.jsi" %> +<%=intl.title("config UI")%> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %> " /> @@ -15,13 +15,13 @@

<%=uihelper._("I2P UI Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> " /> -

<%=uihelper._("Router Console Theme")%>

+

<%=uihelper._("Router Console Theme")%>

<% String prev = System.getProperty("net.i2p.router.web.ConfigUIHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigUIHandler.noncePrev", prev); @@ -42,6 +42,6 @@ <%=uihelper._("Please contribute to the router console translation project! Contact the developers on IRC #i2p to help.")%>
- +" > " >
diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index e7562de9f..efc138b82 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -3,14 +3,14 @@ -<%@include file="css.jsp" %> -<%=cssHelper.title("config update")%> +<%@include file="css.jsi" %> +<%=intl.title("config update")%> -<%@include file="summary.jsp" %> -

I2P Update Configuration

+<%@include file="summary.jsi" %> +

<%=intl._("I2P Update Configuration")%>

- <%@include file="confignav.jsp" %> + <%@include file="confignav.jsi" %> @@ -26,35 +26,35 @@ if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %> " /> -

Check for I2P and news updates

+

<%=intl._("Check for I2P and news updates")%>

- - + - + - - + - + - + - + - + - + - +
News & I2P Updates: <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> Update In Progress
<% } else { %> +
<%=intl._("News & I2P Updates")%>: <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <%=intl._("Update In Progress")%>
<% } else { %> " /> <% } %>

News URL:
<%=intl._("News URL")%>: ">
Refresh frequency: +
<%=intl._("Refresh frequency")%>:
<%=formhandler._("Update policy")%>:
Update through the eepProxy?
<%=intl._("Update through the eepProxy?")%>
eepProxy host:
<%=intl._("eepProxy host")%>: " />
eepProxy port:
<%=intl._("eepProxy port")%>: " />
Update URLs:
<%=intl._("Update URLs")%>:
Trusted keys:
<%=intl._("Trusted keys")%>:
Update with unsigned development builds?
<%=intl._("Update with unsigned development builds?")%>
Unsigned Build URL:
<%=intl._("Unsigned Build URL")%>: ">
- - + " /> + " />
diff --git a/apps/routerconsole/jsp/css.jsp b/apps/routerconsole/jsp/css.jsi similarity index 67% rename from apps/routerconsole/jsp/css.jsp rename to apps/routerconsole/jsp/css.jsi index 62aceaa93..613b32a67 100644 --- a/apps/routerconsole/jsp/css.jsp +++ b/apps/routerconsole/jsp/css.jsi @@ -23,17 +23,17 @@ %> - -" /> + +" /> <% - cssHelper.setLang(request.getParameter("lang")); + intl.setLang(request.getParameter("lang")); %> -console.css" rel="stylesheet" type="text/css"> +console.css" rel="stylesheet" type="text/css"> <% // make the fonts bigger for chinese - if (cssHelper.getLang().equals("zh")) { + if (intl.getLang().equals("zh")) { %> -console_big.css" rel="stylesheet" type="text/css"> +console_big.css" rel="stylesheet" type="text/css"> <% } %> diff --git a/apps/routerconsole/jsp/debug.jsp b/apps/routerconsole/jsp/debug.jsp index ed68d66fb..9f6aae574 100644 --- a/apps/routerconsole/jsp/debug.jsp +++ b/apps/routerconsole/jsp/debug.jsp @@ -1,10 +1,15 @@ <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> +<% + /* + * Do not tag this file for translation. + */ +%> I2P Router Console - Debug -<%@include file="css.jsp" %> +<%@include file="css.jsi" %> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %>

Router SKM

<% diff --git a/apps/routerconsole/jsp/error.jsp b/apps/routerconsole/jsp/error.jsp index f865e85d8..7bcfc3318 100644 --- a/apps/routerconsole/jsp/error.jsp +++ b/apps/routerconsole/jsp/error.jsp @@ -12,17 +12,13 @@ } // If it can't find the iframe or viewtheme.jsp I wonder if the whole thing blows up... %> -I2P Router Console - Page Not Found -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("Page Not Found")%> -<% -if (System.getProperty("router.consoleNonce") == null) { - System.setProperty("router.consoleNonce", new java.util.Random().nextLong() + ""); -} -%> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %>

<%=ERROR_CODE%> <%=ERROR_MESSAGE%>

-Sorry! You appear to be requesting a non-existent Router Console page or resource.
-Error 404: <%=ERROR_URI%> not found. +<%=intl._("Sorry! You appear to be requesting a non-existent Router Console page or resource.")%>
+<%=intl._("Error 404")%>: <%=ERROR_URI%> <%=intl._("not found")%>.
diff --git a/apps/routerconsole/jsp/flags.jsp b/apps/routerconsole/jsp/flags.jsp index 00ce370fb..c736e8b46 100644 --- a/apps/routerconsole/jsp/flags.jsp +++ b/apps/routerconsole/jsp/flags.jsp @@ -3,6 +3,8 @@ * USE CAUTION WHEN EDITING * Trailing whitespace OR NEWLINE on the last line will cause * IllegalStateExceptions !!! + * + * Do not tag this file for translation. */ /** diff --git a/apps/routerconsole/jsp/graphs.jsp b/apps/routerconsole/jsp/graphs.jsp index 2a30675d9..d472d5457 100644 --- a/apps/routerconsole/jsp/graphs.jsp +++ b/apps/routerconsole/jsp/graphs.jsp @@ -2,12 +2,13 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - graphs -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("graphs")%> -<%@include file="summary.jsp" %> -

I2P Performance Graphs

+<%@include file="summary.jsi" %> +

<%=intl._("I2P Performance Graphs")%>

diff --git a/apps/routerconsole/jsp/help.jsp b/apps/routerconsole/jsp/help.jsp index 0ae11a95a..50c430f02 100644 --- a/apps/routerconsole/jsp/help.jsp +++ b/apps/routerconsole/jsp/help.jsp @@ -1,28 +1,32 @@ <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> - +<% + /* + * Do not tag this file for translation - copy it to help_xx.jsp and translate inline. + */ +%> I2P Router Console - help -<%@include file="css.jsp" %> +<%@include file="css.jsi" %> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %>

I2P Router Help & Support

-
+

If you'd like to help improve or translate the documentation, or help with other aspects of the project, please see the documentation for volunteers. -

Further assistance is available here:

+

Further assistance is available here:


-You may also try the I2P forum -or IRC.
+
  • Deutsch FAQ. +
    You may also try the I2P forum +or IRC.

    -

    Summary Bar Information

    +

    Summary Bar Information

    Many of the stats on the summary bar may be configured to be graphed for further analysis. -

    General

      +

      General

      • Ident: The first four characters (24 bits) of your 44-character (256-bit) Base64 router hash. The full hash is shown on your router info page. @@ -75,7 +79,7 @@ The local applications connecting through your router. These may be clients started through I2PTunnel or external programs connecting through SAM, BOB, or directly to I2CP.
  • Tunnels in/out

    -The actual tunnels are shown on the the tunnels page.

    • Exploratory: Tunnels built by your router and used for communication with the floodfill peers, building new tunnels, and testing existing tunnels.
      @@ -91,7 +95,7 @@ You may also limit the total number by setting router.maxParticipatingTunnel the advanced configuration page. [Enable graphing].

    Congestion

    -Some basic indications of router overload:

      +Some basic indications of router overload:
    • Job lag: How long jobs are waiting before execution. The job queue is listed on the jobs page. Unfortunately, there are several other job queues in the router that may be congested, @@ -129,9 +133,8 @@ or reject all requests for a number of reasons, to control the bandwidth and CPU demands and maintain capacity for local clients.
    -

    Legal stuff

    -The I2P router (router.jar) and SDK (i2p.jar) are almost entirely public domain, with -a few notable exceptions:

      +

      Legal stuff

      The I2P router (router.jar) and SDK (i2p.jar) are almost entirely public domain, with +a few notable exceptions:

      • ElGamal and DSA code, under the BSD license, written by TheCrypto
      • SHA256 and HMAC-SHA256, under the MIT license, written by the Legion of the Bouncycastle
      • AES code, under the Cryptix (MIT) license, written by the Cryptix team
      • diff --git a/apps/routerconsole/jsp/index.jsp b/apps/routerconsole/jsp/index.jsp index d2ce8ffc2..9cc79ca49 100644 --- a/apps/routerconsole/jsp/index.jsp +++ b/apps/routerconsole/jsp/index.jsp @@ -3,8 +3,8 @@ -<%@include file="css.jsp" %> -I2P Router Console - home +<%@include file="css.jsi" %> +<%=intl.title("home")%> <% if (System.getProperty("router.consoleNonce") == null) { @@ -12,7 +12,7 @@ if (System.getProperty("router.consoleNonce") == null) { } %> -<%@include file="summary.jsp" %>

        I2P Router Console

        +<%@include file="summary.jsi" %>

        <%=intl._("I2P Router Console")%>

        <% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); %> diff --git a/apps/routerconsole/jsp/jobs.jsp b/apps/routerconsole/jsp/jobs.jsp index d75207c84..ef84c8f8c 100644 --- a/apps/routerconsole/jsp/jobs.jsp +++ b/apps/routerconsole/jsp/jobs.jsp @@ -2,13 +2,14 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - job queue -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("job queue")%> -<%@include file="summary.jsp" %>

        I2P Router Job Queue

        +<%@include file="summary.jsi" %>

        <%=intl._("I2P Router Job Queue")%>

        " /> -
        +
        diff --git a/apps/routerconsole/jsp/logs.jsp b/apps/routerconsole/jsp/logs.jsp index 3cca63d2d..5af8b6afd 100644 --- a/apps/routerconsole/jsp/logs.jsp +++ b/apps/routerconsole/jsp/logs.jsp @@ -2,27 +2,28 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - logs -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("logs")%> -<%@include file="summary.jsp" %> -

        I2P Router Logs

        +<%@include file="summary.jsi" %> +

        <%=intl._("I2P Router Logs")%>

        -

        Version:

        - Please include this information in bug reports. +

        <%=intl._("I2P Version & Running Environment")%>

        + <%=intl._("Please include this information in bug reports")%>:

        -I2P
        -<%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%>
        -<%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%>
        -CPU <%=net.i2p.util.NativeBigInteger.cpuModel()%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)
        -jbigi <%=net.i2p.util.NativeBigInteger.loadStatus()%>
        -Encoding <%=System.getProperty("file.encoding")%>


        +I2P version:
        +Java version: <%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%>
        +Platform: <%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%>
        +Processor: <%=net.i2p.util.NativeBigInteger.cpuModel()%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)
        +Jbigi: <%=net.i2p.util.NativeBigInteger.loadStatus()%>
        +Encoding: <%=System.getProperty("file.encoding")%>

        " /> -

        Critical logs:

        -
        -

        Router logs (configure):

        -
        -

        Service (Wrapper) logs:

        +

        Critical Logs

        + +

        Router Logs [configure]

        + +

        Service (Wrapper) Logs

        -
        +

    diff --git a/apps/routerconsole/jsp/netdb.jsp b/apps/routerconsole/jsp/netdb.jsp index 83136b113..9cbac25e7 100644 --- a/apps/routerconsole/jsp/netdb.jsp +++ b/apps/routerconsole/jsp/netdb.jsp @@ -3,11 +3,11 @@ -I2P Router Console - network database summary -<%@include file="css.jsp" %> +<%@include file="css.jsi" %> +<%=intl.title("network database summary")%> -<%@include file="summary.jsp" %> -

    I2P Network Database Summary

    +<%@include file="summary.jsi" %> +

    <%=intl._("I2P Network Database Summary")%>

    diff --git a/apps/routerconsole/jsp/oldconsole.jsp b/apps/routerconsole/jsp/oldconsole.jsp index 803d4b637..701d70f7d 100644 --- a/apps/routerconsole/jsp/oldconsole.jsp +++ b/apps/routerconsole/jsp/oldconsole.jsp @@ -1,11 +1,15 @@ <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> - +<% + /* + * Do not tag this file for translation. + */ +%> I2P Router Console - internals -<%@include file="css.jsp" %> +<%@include file="css.jsi" %> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %> " /> diff --git a/apps/routerconsole/jsp/peers.jsp b/apps/routerconsole/jsp/peers.jsp index 19b1d6767..14a919d62 100644 --- a/apps/routerconsole/jsp/peers.jsp +++ b/apps/routerconsole/jsp/peers.jsp @@ -2,11 +2,12 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - peer connections -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("peer connections")%> -<%@include file="summary.jsp" %> -

    I2P Network Peers

    +<%@include file="summary.jsi" %> +

    <%=intl._("I2P Network Peers")%>

    " /> diff --git a/apps/routerconsole/jsp/profiles.jsp b/apps/routerconsole/jsp/profiles.jsp index 6eae2642f..69100e349 100644 --- a/apps/routerconsole/jsp/profiles.jsp +++ b/apps/routerconsole/jsp/profiles.jsp @@ -2,16 +2,17 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - peer profiles -<%@include file="css.jsp" %> -<%@include file="summary.jsp" %> -

    I2P Network Peer Profiles

    + +<%@include file="css.jsi" %> +<%=intl.title("peer profiles")%> +<%@include file="summary.jsi" %> +

    <%=intl._("I2P Network Peer Profiles")%>

    " /> + " /> -
    - +

    <%=intl._("Banned Peers")%>

    -
    +
    diff --git a/apps/routerconsole/jsp/oldstats.jsp b/apps/routerconsole/jsp/stats.jsp similarity index 74% rename from apps/routerconsole/jsp/oldstats.jsp rename to apps/routerconsole/jsp/stats.jsp index 39f6c73d8..d140d7c2c 100644 --- a/apps/routerconsole/jsp/oldstats.jsp +++ b/apps/routerconsole/jsp/stats.jsp @@ -2,14 +2,15 @@ <%@page pageEncoding="UTF-8"%> -I2P Router Console - statistics -<%@include file="css.jsp" %> + +<%@include file="css.jsi" %> +<%=intl.title("statistics")%> -<%@include file="summary.jsp" %> +<%@include file="summary.jsi" %> " /> -

    I2P Router Statistics

    +

    <%=intl._("I2P Router Statistics")%>

    -
    +
    diff --git a/apps/routerconsole/jsp/summary.jsp b/apps/routerconsole/jsp/summary.jsi similarity index 52% rename from apps/routerconsole/jsp/summary.jsp rename to apps/routerconsole/jsp/summary.jsi index c7672d4f3..10b71ae2c 100644 --- a/apps/routerconsole/jsp/summary.jsp +++ b/apps/routerconsole/jsp/summary.jsi @@ -14,7 +14,7 @@ out.print("