diff options
author | kolaente <konrad@kola-entertainments.de> | 2018-05-05 02:28:30 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-05 08:28:30 +0800 |
commit | 1fdf5606785e4a45da7b301b40229a4335a0473c (patch) | |
tree | f018a866607c1e84c8ea0f0d62af905ca8cee9a7 /models/user.go | |
parent | 795dcc8ecf635aedeec848336c293189d3996605 (diff) | |
download | gitea-1fdf5606785e4a45da7b301b40229a4335a0473c.tar.gz gitea-1fdf5606785e4a45da7b301b40229a4335a0473c.zip |
Added user language setting (#3875)
* Added user language setting
* Added translation string for setting
* Fixed import order + typo
* improved checking if the user has a language saved in the db
* The current saved language is now set a default inside the dropdown
* fmt
* When a user signs in and doesn't have a language saved, the current browser language is saved
* updated gitea-sdk
* Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language
# Conflicts:
# models/migrations/migrations.go
# models/migrations/v62.go
* Made tests work again
* trigger CI
* trigger CI
* fmt
* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO
* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO
* When loggin in, only the language col gets updated instead of everything
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go index 2167e269b6..106d79ffcc 100644 --- a/models/user.go +++ b/models/user.go @@ -94,6 +94,7 @@ type User struct { Website string Rands string `xorm:"VARCHAR(10)"` Salt string `xorm:"VARCHAR(10)"` + Language string `xorm:"VARCHAR(5)"` CreatedUnix util.TimeStamp `xorm:"INDEX created"` UpdatedUnix util.TimeStamp `xorm:"INDEX updated"` @@ -185,6 +186,7 @@ func (u *User) APIFormat() *api.User { FullName: u.FullName, Email: u.getEmail(), AvatarURL: u.AvatarLink(), + Language: u.Language, } } |