aboutsummaryrefslogtreecommitdiff
path: root/internal/route/home.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/home.go')
-rw-r--r--internal/route/home.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/route/home.go b/internal/route/home.go
index 86a659d0..7338c9e8 100644
--- a/internal/route/home.go
+++ b/internal/route/home.go
@@ -5,7 +5,12 @@
package route
import (
+ "fmt"
+ "net/http"
+
+ "github.com/go-macaron/i18n"
"github.com/unknwon/paginater"
+ "gopkg.in/macaron.v1"
"gogs.io/gogs/internal/conf"
"gogs.io/gogs/internal/context"
@@ -157,7 +162,7 @@ func ExploreOrganizations(c *context.Context) {
})
}
-func NotFound(c *context.Context) {
- c.Data["Title"] = "Page Not Found"
- c.NotFound()
+func NotFound(c *macaron.Context, l i18n.Locale) {
+ c.Data["Title"] = l.Tr("status.page_not_found")
+ c.HTML(http.StatusNotFound, fmt.Sprintf("status/%d", http.StatusNotFound))
}