summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/profiles_controller.rb3
-rw-r--r--app/views/profiles/show.html.haml3
-rw-r--r--lib/gitlab/i18n.rb9
3 files changed, 14 insertions, 1 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 987b95e89b9..57e23cea00e 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -85,7 +85,8 @@ class ProfilesController < Profiles::ApplicationController
:twitter,
:username,
:website_url,
- :organization
+ :organization,
+ :preferred_language
)
end
end
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index c74b3249a13..dc71a04cbf0 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -73,6 +73,9 @@
= f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email), { include_blank: 'Do not show on profile' }, class: "select2"
%span.help-block This email will be displayed on your public profile.
.form-group
+ = f.label :preferred_language, class: "label-light"
+ = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES, {}, class: "select2"
+ .form-group
= f.label :skype, class: "label-light"
= f.text_field :skype, class: "form-control"
.form-group
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
new file mode 100644
index 00000000000..8c578aa0b46
--- /dev/null
+++ b/lib/gitlab/i18n.rb
@@ -0,0 +1,9 @@
+module Gitlab
+ module I18n
+ AVAILABLE_LANGUAGES = [
+ [_('English'), 'en'],
+ [_('Spanish'), 'es'],
+ [_('Deutsch'), 'de']
+ ]
+ end
+end