summaryrefslogtreecommitdiffstats
path: root/modules/auth/auth.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-08 19:47:56 +0800
committerUnknwon <u@gogs.io>2015-07-08 19:47:56 +0800
commit5cf37323396fa08e8f93baa6f19ad3b1a6371324 (patch)
tree5b65039ae359f52bbc8b0e4abf1924c4c187d9c5 /modules/auth/auth.go
parent5dd3dd71a0529590a209c0e58e0a962b83515ae8 (diff)
downloadgitea-5cf37323396fa08e8f93baa6f19ad3b1a6371324.tar.gz
gitea-5cf37323396fa08e8f93baa6f19ad3b1a6371324.zip
UI: install - new version
Diffstat (limited to 'modules/auth/auth.go')
-rw-r--r--modules/auth/auth.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/auth/auth.go b/modules/auth/auth.go
index 5b24591a6f..edcb13069e 100644
--- a/modules/auth/auth.go
+++ b/modules/auth/auth.go
@@ -208,7 +208,14 @@ func validate(errs binding.Errors, data map[string]interface{}, f Form, l macaro
if errs[0].FieldNames[0] == field.Name {
data["Err_"+field.Name] = true
- trName := l.Tr("form." + field.Name)
+
+ trName := field.Tag.Get("locale")
+ if len(trName) == 0 {
+ trName = l.Tr("form." + field.Name)
+ } else {
+ trName = l.Tr(trName)
+ }
+
switch errs[0].Classification {
case binding.ERR_REQUIRED:
data["ErrorMsg"] = trName + l.Tr("form.require_error")