Add support to change language in profile form
This commit is contained in:
parent
acc807cd30
commit
bd86796dd0
|
@ -85,7 +85,8 @@ class ProfilesController < Profiles::ApplicationController
|
||||||
:twitter,
|
:twitter,
|
||||||
:username,
|
:username,
|
||||||
:website_url,
|
:website_url,
|
||||||
:organization
|
:organization,
|
||||||
|
:preferred_language
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -72,6 +72,9 @@
|
||||||
= f.label :public_email, class: "label-light"
|
= f.label :public_email, class: "label-light"
|
||||||
= f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email), { include_blank: 'Do not show on profile' }, class: "select2"
|
= 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.
|
%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
|
.form-group
|
||||||
= f.label :skype, class: "label-light"
|
= f.label :skype, class: "label-light"
|
||||||
= f.text_field :skype, class: "form-control"
|
= f.text_field :skype, class: "form-control"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
module Gitlab
|
||||||
|
module I18n
|
||||||
|
AVAILABLE_LANGUAGES = [
|
||||||
|
[_('English'), 'en'],
|
||||||
|
[_('Spanish'), 'es'],
|
||||||
|
[_('Deutsch'), 'de']
|
||||||
|
]
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue