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 /integrations | |
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 'integrations')
-rw-r--r-- | integrations/user_test.go | 14 | ||||
-rw-r--r-- | integrations/xss_test.go | 1 |
2 files changed, 9 insertions, 6 deletions
diff --git a/integrations/user_test.go b/integrations/user_test.go index 0b59663a4f..7ff986d546 100644 --- a/integrations/user_test.go +++ b/integrations/user_test.go @@ -27,9 +27,10 @@ func TestRenameUsername(t *testing.T) { session := loginUser(t, "user2") req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ - "_csrf": GetCSRF(t, session, "/user/settings"), - "name": "newUsername", - "email": "user2@example.com", + "_csrf": GetCSRF(t, session, "/user/settings"), + "name": "newUsername", + "email": "user2@example.com", + "language": "en-us", }) session.MakeRequest(t, req, http.StatusFound) @@ -81,9 +82,10 @@ func TestRenameReservedUsername(t *testing.T) { for _, reservedUsername := range reservedUsernames { t.Logf("Testing username %s", reservedUsername) req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ - "_csrf": GetCSRF(t, session, "/user/settings"), - "name": reservedUsername, - "email": "user2@example.com", + "_csrf": GetCSRF(t, session, "/user/settings"), + "name": reservedUsername, + "email": "user2@example.com", + "language": "en-us", }) resp := session.MakeRequest(t, req, http.StatusFound) diff --git a/integrations/xss_test.go b/integrations/xss_test.go index d71c680d6f..d93d0ec036 100644 --- a/integrations/xss_test.go +++ b/integrations/xss_test.go @@ -24,6 +24,7 @@ func TestXSSUserFullName(t *testing.T) { "name": user.Name, "full_name": fullName, "email": user.Email, + "language": "en-us", }) session.MakeRequest(t, req, http.StatusFound) |