BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bd86796d
Commit
bd86796d
authored
Apr 12, 2017
by
Ruben Davila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support to change language in profile form
parent
acc807cd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
profiles_controller.rb
app/controllers/profiles_controller.rb
+2
-1
show.html.haml
app/views/profiles/show.html.haml
+3
-0
i18n.rb
lib/gitlab/i18n.rb
+9
-0
No files found.
app/controllers/profiles_controller.rb
View file @
bd86796d
...
...
@@ -85,7 +85,8 @@ class ProfilesController < Profiles::ApplicationController
:twitter
,
:username
,
:website_url
,
:organization
:organization
,
:preferred_language
)
end
end
app/views/profiles/show.html.haml
View file @
bd86796d
...
...
@@ -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
...
...
lib/gitlab/i18n.rb
0 → 100644
View file @
bd86796d
module
Gitlab
module
I18n
AVAILABLE_LANGUAGES
=
[
[
_
(
'English'
),
'en'
],
[
_
(
'Spanish'
),
'es'
],
[
_
(
'Deutsch'
),
'de'
]
]
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment