aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/form/settings.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-09-21 18:53:29 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-09-21 22:23:23 -0700
commitbeb7a0cfcb6a5a76d680707a4c458eee51d87c07 (patch)
treef6e23ffbffcdd58f8438e2d2711acb4fa86bb83b /ui/form/settings.go
parentf244df62936eea307a5fc3f27fb9968527d402ac (diff)
Use unique translation IDs instead of English text as key
Diffstat (limited to 'ui/form/settings.go')
-rw-r--r--ui/form/settings.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/form/settings.go b/ui/form/settings.go
index 86f2d15..97c8f6e 100644
--- a/ui/form/settings.go
+++ b/ui/form/settings.go
@@ -40,16 +40,16 @@ func (s *SettingsForm) Merge(user *model.User) *model.User {
// Validate makes sure the form values are valid.
func (s *SettingsForm) Validate() error {
if s.Username == "" || s.Theme == "" || s.Language == "" || s.Timezone == "" || s.EntryDirection == "" {
- return errors.NewLocalizedError("The username, theme, language and timezone fields are mandatory.")
+ return errors.NewLocalizedError("error.settings_mandatory_fields")
}
if s.Password != "" {
if s.Password != s.Confirmation {
- return errors.NewLocalizedError("Passwords are not the same.")
+ return errors.NewLocalizedError("error.different_passwords")
}
if len(s.Password) < 6 {
- return errors.NewLocalizedError("You must use at least 6 characters")
+ return errors.NewLocalizedError("error.password_min_length")
}
}