summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorkolaente <konrad@kola-entertainments.de>2018-05-05 02:28:30 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2018-05-05 08:28:30 +0800
commit1fdf5606785e4a45da7b301b40229a4335a0473c (patch)
treef018a866607c1e84c8ea0f0d62af905ca8cee9a7 /templates
parent795dcc8ecf635aedeec848336c293189d3996605 (diff)
downloadgitea-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 'templates')
-rw-r--r--templates/user/settings/profile.tmpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index 091c2e2c53..4e6930e0f5 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -40,6 +40,20 @@
<input id="location" name="location" value="{{.SignedUser.Location}}">
</div>
+ <div class="field">
+ <label for="language">{{.i18n.Tr "settings.language"}}</label>
+ <div class="ui language selection dropdown" id="language">
+ <input name="language" type="hidden">
+ <i class="dropdown icon"></i>
+ <div class="text">{{range .AllLangs}}{{if eq $.SignedUser.Language .Lang}}{{.Name}}{{end}}{{end}}</div>
+ <div class="menu">
+ {{range .AllLangs}}
+ <div class="item{{if eq $.SignedUser.Language .Lang}} active selected{{end}}" data-value="{{.Lang}}">{{.Name}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+
<div class="field">
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
</div>