[tor-commits] [check/master] Remove unnecessary lang template.

arlo at torproject.org arlo at torproject.org
Mon Nov 18 06:48:01 UTC 2013


commit 3da1997c3ad8c0096acc1b72716a1f3e18f3424f
Author: Arlo Breault <arlolra at gmail.com>
Date:   Sun Nov 17 21:33:59 2013 -0800

    Remove unnecessary lang template.
---
 handlers.go       |    2 +-
 public/base.html  |    2 +-
 public/bulk.html  |    1 -
 public/index.html |    1 -
 4 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/handlers.go b/handlers.go
index 08fc64b..eee6948 100644
--- a/handlers.go
+++ b/handlers.go
@@ -94,7 +94,7 @@ func BulkHandler(Layout *template.Template, Exits *Exits, domain *gettext.Domain
 
 		ip := q.Get("ip")
 		if net.ParseIP(ip) == nil {
-			WriteHTMLBuf(w, r, Layout, domain, "bulk.html", Page{})
+			WriteHTMLBuf(w, r, Layout, domain, "bulk.html", Page{Lang: "en"})
 			return
 		}
 
diff --git a/public/base.html b/public/base.html
index 4da6674..62b7a4c 100644
--- a/public/base.html
+++ b/public/base.html
@@ -1,5 +1,5 @@
 <!doctype html>
-<html lang="{{ template "lang" . }}">
+<html lang="{{ .Lang }}">
 <head>
   <meta charset="utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/public/bulk.html b/public/bulk.html
index 4d3e793..2460f81 100644
--- a/public/bulk.html
+++ b/public/bulk.html
@@ -1,5 +1,4 @@
 {{ template "base.html" . }}
-{{ define "lang" }}en{{ end }}
 {{ define "title" }}Bulk Tor Exit Exporter{{ end }}
 {{ define "head" }}{{ end }}
 {{ define "body" }}
diff --git a/public/index.html b/public/index.html
index 1c1047a..cd18d2b 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1,5 +1,4 @@
 {{ template "base.html" . }}
-{{ define "lang" }}{{ .Lang }}{{ end }}
 {{ define "title" }}{{ GetText .Lang "Are you using Tor?" }}{{ end }}
 {{ define "head" }}
 <form action="/" method="get" id="lang">





More information about the tor-commits mailing list