Finish all the i18n things of code.

This commit is contained in:
zicla
2019-05-06 02:18:08 +08:00
parent e37b248c8c
commit 54c5905a58
38 changed files with 504 additions and 720 deletions

View File

@ -272,8 +272,8 @@ func (this *InstallController) CreateAdmin(writer http.ResponseWriter, request *
adminPassword := request.FormValue("adminPassword")
//validate admin's username
if m, _ := regexp.MatchString(`^[0-9a-zA-Z_]+$`, adminUsername); !m {
panic(result.BadRequest(`admin's username cannot oly be alphabet, number or '_'`))
if m, _ := regexp.MatchString(USERNAME_PATTERN, adminUsername); !m {
panic(result.BadRequestI18n(request, i18n.UsernameError))
}
if len(adminPassword) < 6 {