aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context/context.go')
-rw-r--r--modules/context/context.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/context/context.go b/modules/context/context.go
index 5876e23cc4..1eff1459a1 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -628,7 +628,9 @@ func (ctx *Context) Value(key interface{}) interface{} {
if key == git.RepositoryContextKey && ctx.Repo != nil {
return ctx.Repo.GitRepo
}
-
+ if key == translation.ContextKey && ctx.Locale != nil {
+ return ctx.Locale
+ }
return ctx.Req.Context().Value(key)
}