Changeset 85c998e


Ignore:
Timestamp:
Nov 3, 2013 3:04:37 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9007db1
Parents:
8296f822
Message:

HTTP proxy: Fix addressbook name on redirect page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/localServer/LocalHTTPServer.java

    r8296f822 r85c998e  
    184184    /** @since 0.8.7 */
    185185    private static void writeRedirectPage(OutputStream out, boolean success, String host, String book, String url) throws IOException {
     186        String tbook;
     187        if ("hosts.txt".equals(book))
     188            tbook = _("router");
     189        else if ("userhosts.txt".equals(book))
     190            tbook = _("master");
     191        else if ("privatehosts.txt".equals(book))
     192            tbook = _("private");
     193        else
     194            tbook = book;
    186195        out.write(("HTTP/1.1 200 OK\r\n"+
    187196                  "Content-Type: text/html; charset=UTF-8\r\n"+
     
    200209                  "<h3>" +
    201210                  (success ?
    202                            _("Saved {0} to the {1} addressbook, redirecting now.", host, book) :
    203                            _("Failed to save {0} to the {1} addressbook, redirecting now.", host, book)) +
     211                           _("Saved {0} to the {1} addressbook, redirecting now.", host, tbook) :
     212                           _("Failed to save {0} to the {1} addressbook, redirecting now.", host, tbook)) +
    204213                  "</h3>\n<p><a href=\"" + url + "\">" +
    205214                  _("Click here if you are not redirected automatically.") +
Note: See TracChangeset for help on using the changeset viewer.