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 d64512510..edacfaa41 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ContentHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ContentHelper.java @@ -1,5 +1,8 @@ package net.i2p.router.web; +import java.io.File; +import java.util.Locale; + import net.i2p.router.RouterContext; import net.i2p.util.FileUtil; @@ -7,6 +10,7 @@ public class ContentHelper { private String _page; private int _maxLines; private boolean _startAtBeginning; + private String _lang; private RouterContext _context; /** * Configure this bean to query a particular router context @@ -28,6 +32,7 @@ public class ContentHelper { public void setStartAtBeginning(String moo) { _startAtBeginning = Boolean.valueOf(""+moo).booleanValue(); } + public void setLang(String l) { _lang = l; } public void setMaxLines(String lines) { if (lines != null) { @@ -41,14 +46,14 @@ public class ContentHelper { } } public String getContent() { - String str = FileUtil.readTextFile(_page, _maxLines, _startAtBeginning); + String str = FileUtil.readTextFile(filename(), _maxLines, _startAtBeginning); if (str == null) return ""; else return str; } public String getTextContent() { - String str = FileUtil.readTextFile(_page, _maxLines, _startAtBeginning); + String str = FileUtil.readTextFile(filename(), _maxLines, _startAtBeginning); if (str == null) return ""; else { @@ -66,4 +71,27 @@ public class ContentHelper { return sb.append("").toString(); } } + + /** + * Convert file.ext to file_lang.ext if it exists. + * Get lang from either the cgi lang param or from the default locale. + */ + private String filename() { + int lastdot = _page.lastIndexOf('.'); + if (lastdot <= 0) + return _page; + String lang = _lang; + if (lang == null || lang.length() <= 0) { + lang = Locale.getDefault().getLanguage(); + if (lang == null || lang.length() <= 0) + return _page; + } + if (lang.equals("en")) + return _page; + String newname = _page.substring(0, lastdot) + '_' + lang + _page.substring(lastdot); + File newfile = new File(newname); + if (newfile.exists()) + return newname; + return _page; + } } diff --git a/apps/routerconsole/jsp/index.jsp b/apps/routerconsole/jsp/index.jsp index 6305b9cfe..bac6ecf0d 100644 --- a/apps/routerconsole/jsp/index.jsp +++ b/apps/routerconsole/jsp/index.jsp @@ -31,6 +31,7 @@ if (System.getProperty("router.consoleNonce") == null) { + " /> diff --git a/build.xml b/build.xml index e97b01a48..a93de7a60 100644 --- a/build.xml +++ b/build.xml @@ -268,6 +268,7 @@ + @@ -345,6 +346,9 @@ + + + diff --git a/history.txt b/history.txt index bfb6b6d67..667dc945b 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,11 @@ +2008-10-14 zzz + * index.jsp: Add multilanguage support for readme.html; + add readme_de.html (thanks devzero!) + * configupdate.jsp, configadvanced.jsp: + Disable word wrap in textareas + * install*.txt: Update for 1.5 + * summary.jsp: Remove failing peer count + 2008-10-10 zzz * Profiles: Reduce reject penalty in capacity calculation to avoid a congestion collapse diff --git a/readme.html b/readme.html index 848c603ab..df77382e9 100644 --- a/readme.html +++ b/readme.html @@ -1,3 +1,4 @@ +

English | Deutsch

If you've just started I2P, the Active: numbers on the left should start to grow over the next few minutes and you'll see a "shared clients" local destination listed on the left (if not, see below). Once those show up, diff --git a/readme_de.html b/readme_de.html new file mode 100644 index 000000000..ef04713e7 --- /dev/null +++ b/readme_de.html @@ -0,0 +1,72 @@ +

English | Deutsch

+

Wenn Du gerade I2P gestartet hast, sollten die "Active:" Zahlen links in den nächsten paar Minuten anwachsen und Du siehst dann dort ein "shared clients" lokales Ziel gelistet (falls nicht, siehe Unten). Sobald das erscheint, kannst Du:

+
    +
  • "Eepsites" besuchen - In I2P sind anonym gehostete Websites - + Stelle Deinen Browser so ein, über den HTTP proxy: localhost port 4444 zu surfen, dann besuche eine Eepsite - + + Es gibt viel mehr Eepsites - folge einfach den Links die du findest, + bookmarke Deine Favoriten und besuche sie oft!
  • +
  • Im Internet surfen - Es gibt einen HTTP "outproxy" in I2P in Deinem + HTTP proxy auf Port 4444 - Konfiguriere Deine Browser's Proxy Einstellung + darauf (siehe Oben) und besuche jede normale URL - Deine Anfrage wird + durch das I2P Netzwerk geroutet.
  • +
  • Daten austauschen - Es gibt eine Portierung des + Snark BitTorrent + Clients.
  • +
  • Anonyme Email - Postman hat ein Email System aufgebaut, das + kompatibel mit normalen Email-Clients (POP3 / SMTP) ist, welches erlaubt, + Email innerhalb von I2P sowie Email von und zum normalen Internet zu + schicken! Hole Dir Dein Emailkonto auf hq.postman.i2p. + Im Verbund dazu haben wir susimail, ein + Internet-Browser basierter, anonymer pop3/smtp Client, fertig eingerichtet + für Postman's Email Service.
  • +
  • Anonymer Chat - Starte Deinen Lieblings IRC Client und verbinde ihn + mit dem Server localhost Port 6668. Das richtet Dich auf auf einen + von zwei anonym gehosteten IRC Servern, aber weder Du noch die wissen wer + der Andere ist.
  • +
  • Anonymer Blog - Probiere Syndie aus
  • +
  • und Vieles mehr
  • +
+ +

Willst Du Deine eigene Epsite?

+ +

Wir bringen Software mit, damit Du Deine eigene Eepsite laufen lassen kannst + - Eine +Jetty Instanz horcht auf +http://localhost:7658/. Platziere einfach + Deine Dateien in das eepsite/docroot/ Verzeichnis (oder jedes + standart JSP/Servlet .war unter eepsite/webapps, + oder CGI Scripte unter eepsite/cgi-bin) und schon sind sie + verfügbar. Nach dem Start des Eepsite tunnels + der darauf zeigt ist Deine Eepsite für Andere verfügbar. + Detailierte Instruktionen zum Start Deiner eigenen Eepsite sind auf + Deine temporäre Eepsite. +

+ +

Troubleshooting

+ +

Sei geduldig - Am Anfang des ersten Starts kann I2P lange brauchen, da es + dann Verbindungen sucht. Falls nach 30 Minuten Deine + "Active: connected/recent" Zahl noch immer weniger als 10 Verbindungen + aufzeigt, solltest Du Port 8887 auf Deiner Firewall öffnen um + für bessere Verbindung zu sorgen. + Wenn Du gar keine Eepsites bekommst (auch nicht + www.i2p2.i2p), stelle sicher, dass Dein + Internet Browser auf den Proxy localhost Port 4444 eingestellt ist. + Vielleicht möchtest Du auch die Informationen lesen, die auf der + I2P website sind, Nachrichten lesen und + ins I2P discussion forum posten, oder + chatten auf #i2p or #i2p-chat beim IRC auf + irc.freenode.net, irc.postman.i2p + oder irc.freshcoffee.i2p (die verbunden sind).

+ +

Übrigens, diese Seite kannst Du ändern indem Du "docs/readme_de.html" editierst

diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 19b0794b5..02d26488b 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -17,7 +17,7 @@ import net.i2p.CoreVersion; public class RouterVersion { public final static String ID = "$Revision: 1.548 $ $Date: 2008-06-07 23:00:00 $"; public final static String VERSION = "0.6.4"; - public final static long BUILD = 4; + public final static long BUILD = 5; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID);