Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
412f6291
Commit
412f6291
authored
Nov 26, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Externalize strings from `/app/views/snippets`
parent
b55aeca2
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
55 additions
and
28 deletions
+55
-28
app/views/snippets/_actions.html.haml
app/views/snippets/_actions.html.haml
+13
-13
app/views/snippets/_snippets.html.haml
app/views/snippets/_snippets.html.haml
+1
-1
app/views/snippets/_snippets_scope_menu.html.haml
app/views/snippets/_snippets_scope_menu.html.haml
+4
-4
app/views/snippets/edit.html.haml
app/views/snippets/edit.html.haml
+3
-2
app/views/snippets/index.html.haml
app/views/snippets/index.html.haml
+3
-3
app/views/snippets/new.html.haml
app/views/snippets/new.html.haml
+1
-1
app/views/snippets/notes/_actions.html.haml
app/views/snippets/notes/_actions.html.haml
+2
-2
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+2
-2
changelogs/unreleased/gt-externalize-app-views-snippets.yml
changelogs/unreleased/gt-externalize-app-views-snippets.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+21
-0
No files found.
app/views/snippets/_actions.html.haml
View file @
412f6291
...
@@ -3,31 +3,31 @@
...
@@ -3,31 +3,31 @@
.d-none.d-sm-block
.d-none.d-sm-block
-
if
can?
(
current_user
,
:update_personal_snippet
,
@snippet
)
-
if
can?
(
current_user
,
:update_personal_snippet
,
@snippet
)
=
link_to
edit_snippet_path
(
@snippet
),
class:
"btn btn-grouped"
do
=
link_to
edit_snippet_path
(
@snippet
),
class:
"btn btn-grouped"
do
Edit
=
_
(
"Edit"
)
-
if
can?
(
current_user
,
:admin_personal_snippet
,
@snippet
)
-
if
can?
(
current_user
,
:admin_personal_snippet
,
@snippet
)
=
link_to
snippet_path
(
@snippet
),
method: :delete
,
data:
{
confirm:
"Are you sure?"
},
class:
"btn btn-grouped btn-inverted btn-remove"
,
title:
'Delete Snippet'
do
=
link_to
snippet_path
(
@snippet
),
method: :delete
,
data:
{
confirm:
_
(
"Are you sure?"
)
},
class:
"btn btn-grouped btn-inverted btn-remove"
,
title:
_
(
'Delete Snippet'
)
do
Delete
=
_
(
"Delete"
)
=
link_to
new_snippet_path
,
class:
"btn btn-grouped btn-inverted btn-
success"
,
title:
"New snippet"
do
=
link_to
new_snippet_path
,
class:
"btn btn-grouped btn-inverted btn-
create"
,
title:
_
(
"New snippet"
)
do
New snippet
=
_
(
"New snippet"
)
-
if
@snippet
.
submittable_as_spam_by?
(
current_user
)
-
if
@snippet
.
submittable_as_spam_by?
(
current_user
)
=
link_to
'Submit as spam'
,
mark_as_spam_snippet_path
(
@snippet
),
method: :post
,
class:
'btn btn-grouped btn-spam'
,
title:
'Submit as spam'
=
link_to
_
(
'Submit as spam'
),
mark_as_spam_snippet_path
(
@snippet
),
method: :post
,
class:
'btn btn-grouped btn-spam'
,
title:
_
(
'Submit as spam'
)
.d-block.d-sm-none.dropdown
.d-block.d-sm-none.dropdown
%button
.btn.btn-default.btn-block.append-bottom-0.prepend-top-5
{
data:
{
toggle:
"dropdown"
}
}
%button
.btn.btn-default.btn-block.append-bottom-0.prepend-top-5
{
data:
{
toggle:
"dropdown"
}
}
Options
=
_
(
"Options"
)
=
icon
(
'caret-down'
)
=
icon
(
'caret-down'
)
.dropdown-menu.dropdown-menu-full-width
.dropdown-menu.dropdown-menu-full-width
%ul
%ul
%li
%li
=
link_to
new_snippet_path
,
title:
"New snippet"
do
=
link_to
new_snippet_path
,
title:
_
(
"New snippet"
)
do
New snippet
=
_
(
"New snippet"
)
-
if
can?
(
current_user
,
:admin_personal_snippet
,
@snippet
)
-
if
can?
(
current_user
,
:admin_personal_snippet
,
@snippet
)
%li
%li
=
link_to
snippet_path
(
@snippet
),
method: :delete
,
data:
{
confirm:
"Are you sure?"
},
title:
'Delete Snippet'
do
=
link_to
snippet_path
(
@snippet
),
method: :delete
,
data:
{
confirm:
_
(
"Are you sure?"
)
},
title:
_
(
'Delete Snippet'
)
do
Delete
=
_
(
"Delete"
)
-
if
can?
(
current_user
,
:update_personal_snippet
,
@snippet
)
-
if
can?
(
current_user
,
:update_personal_snippet
,
@snippet
)
%li
%li
=
link_to
edit_snippet_path
(
@snippet
)
do
=
link_to
edit_snippet_path
(
@snippet
)
do
Edit
=
_
(
"Edit"
)
-
if
@snippet
.
submittable_as_spam_by?
(
current_user
)
-
if
@snippet
.
submittable_as_spam_by?
(
current_user
)
%li
%li
=
link_to
'Submit as spam'
,
mark_as_spam_snippet_path
(
@snippet
),
method: :post
=
link_to
_
(
'Submit as spam'
)
,
mark_as_spam_snippet_path
(
@snippet
),
method: :post
app/views/snippets/_snippets.html.haml
View file @
412f6291
...
@@ -5,6 +5,6 @@
...
@@ -5,6 +5,6 @@
=
render
partial:
'shared/snippets/snippet'
,
collection:
@snippets
,
locals:
{
link_project:
link_project
}
=
render
partial:
'shared/snippets/snippet'
,
collection:
@snippets
,
locals:
{
link_project:
link_project
}
-
if
@snippets
.
empty?
-
if
@snippets
.
empty?
%li
%li
.nothing-here-block
Nothing here.
.nothing-here-block
=
_
(
"Nothing here."
)
=
paginate
@snippets
,
theme:
'gitlab'
=
paginate
@snippets
,
theme:
'gitlab'
app/views/snippets/_snippets_scope_menu.html.haml
View file @
412f6291
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
.nav-links.snippet-scope-menu.mobile-separator.nav.nav-tabs
.nav-links.snippet-scope-menu.mobile-separator.nav.nav-tabs
%li
{
class:
active_when
(
params
[
:scope
].
nil?
)
}
%li
{
class:
active_when
(
params
[
:scope
].
nil?
)
}
=
link_to
subject_snippets_path
(
subject
)
do
=
link_to
subject_snippets_path
(
subject
)
do
All
=
_
(
"All"
)
%span
.badge.badge-pill
%span
.badge.badge-pill
-
if
include_private
-
if
include_private
=
subject
.
snippets
.
count
=
subject
.
snippets
.
count
...
@@ -14,18 +14,18 @@
...
@@ -14,18 +14,18 @@
-
if
include_private
-
if
include_private
%li
{
class:
active_when
(
params
[
:scope
]
==
"are_private"
)
}
%li
{
class:
active_when
(
params
[
:scope
]
==
"are_private"
)
}
=
link_to
subject_snippets_path
(
subject
,
scope:
'are_private'
)
do
=
link_to
subject_snippets_path
(
subject
,
scope:
'are_private'
)
do
Private
=
_
(
"Private"
)
%span
.badge.badge-pill
%span
.badge.badge-pill
=
subject
.
snippets
.
are_private
.
count
=
subject
.
snippets
.
are_private
.
count
%li
{
class:
active_when
(
params
[
:scope
]
==
"are_internal"
)
}
%li
{
class:
active_when
(
params
[
:scope
]
==
"are_internal"
)
}
=
link_to
subject_snippets_path
(
subject
,
scope:
'are_internal'
)
do
=
link_to
subject_snippets_path
(
subject
,
scope:
'are_internal'
)
do
Internal
=
_
(
"Internal"
)
%span
.badge.badge-pill
%span
.badge.badge-pill
=
subject
.
snippets
.
are_internal
.
count
=
subject
.
snippets
.
are_internal
.
count
%li
{
class:
active_when
(
params
[
:scope
]
==
"are_public"
)
}
%li
{
class:
active_when
(
params
[
:scope
]
==
"are_public"
)
}
=
link_to
subject_snippets_path
(
subject
,
scope:
'are_public'
)
do
=
link_to
subject_snippets_path
(
subject
,
scope:
'are_public'
)
do
Public
=
_
(
"Public"
)
%span
.badge.badge-pill
%span
.badge.badge-pill
=
subject
.
snippets
.
are_public
.
count
=
subject
.
snippets
.
are_public
.
count
app/views/snippets/edit.html.haml
View file @
412f6291
-
page_title
"Edit"
,
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
-
page_title
_
(
"Edit"
),
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
_
(
"Snippets"
)
%h3
.page-title
%h3
.page-title
Edit Snippet
=
_
(
"Edit Snippet"
)
%hr
%hr
=
render
'shared/snippets/form'
,
url:
snippet_path
(
@snippet
)
=
render
'shared/snippets/form'
,
url:
snippet_path
(
@snippet
)
app/views/snippets/index.html.haml
View file @
412f6291
-
page_title
"By
#{
@user
.
name
}
"
,
"Snippets"
-
page_title
_
(
"By %{user_name}"
)
%
{
user_name:
@user
.
name
},
_
(
"Snippets"
)
%ol
.breadcrumb
%ol
.breadcrumb
%li
.breadcrumb-item
%li
.breadcrumb-item
=
link_to
snippets_path
do
=
link_to
snippets_path
do
Snippets
=
_
(
"Snippets"
)
%li
.breadcrumb-item
%li
.breadcrumb-item
=
@user
.
name
=
@user
.
name
.float-right.d-none.d-sm-block
.float-right.d-none.d-sm-block
=
link_to
user_path
(
@user
)
do
=
link_to
user_path
(
@user
)
do
#{
@user
.
name
}
profile page
=
_
(
"%{user_name} profile page"
)
%
{
user_name:
@user
.
name
}
=
render
'snippets'
=
render
'snippets'
app/views/snippets/new.html.haml
View file @
412f6291
-
@hide_top_links
=
true
-
@hide_top_links
=
true
-
@hide_breadcrumbs
=
true
-
@hide_breadcrumbs
=
true
-
page_title
"New Snippet"
-
page_title
_
(
"New Snippet"
)
.page-title-holder
.page-title-holder
%h1
.page-title
=
_
(
'New Snippet'
)
%h1
.page-title
=
_
(
'New Snippet'
)
...
...
app/views/snippets/notes/_actions.html.haml
View file @
412f6291
-
if
current_user
-
if
current_user
-
if
note
.
emoji_awardable?
-
if
note
.
emoji_awardable?
.note-actions-item
.note-actions-item
=
link_to
'#'
,
title:
'Add reaction'
,
class:
"note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip"
,
data:
{
position:
'right'
}
do
=
link_to
'#'
,
title:
_
(
'Add reaction'
)
,
class:
"note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip"
,
data:
{
position:
'right'
}
do
=
icon
(
'spinner spin'
)
=
icon
(
'spinner spin'
)
%span
{
class:
'link-highlight award-control-icon-neutral'
}=
custom_icon
(
'emoji_slightly_smiling_face'
)
%span
{
class:
'link-highlight award-control-icon-neutral'
}=
custom_icon
(
'emoji_slightly_smiling_face'
)
%span
{
class:
'link-highlight award-control-icon-positive'
}=
custom_icon
(
'emoji_smiley'
)
%span
{
class:
'link-highlight award-control-icon-positive'
}=
custom_icon
(
'emoji_smiley'
)
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
-
if
note_editable
-
if
note_editable
.note-actions-item
.note-actions-item
=
button_tag
title:
'Edit comment'
,
class:
'note-action-button js-note-edit has-tooltip btn btn-transparent'
,
data:
{
container:
'body'
}
do
=
button_tag
title:
_
(
'Edit comment'
)
,
class:
'note-action-button js-note-edit has-tooltip btn btn-transparent'
,
data:
{
container:
'body'
}
do
%span
.link-highlight
%span
.link-highlight
=
custom_icon
(
'icon_pencil'
)
=
custom_icon
(
'icon_pencil'
)
...
...
app/views/snippets/show.html.haml
View file @
412f6291
-
@hide_top_links
=
true
-
@hide_top_links
=
true
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
add_to_breadcrumbs
"Snippets"
,
dashboard_snippets_path
-
add_to_breadcrumbs
_
(
"Snippets"
)
,
dashboard_snippets_path
-
breadcrumb_title
@snippet
.
to_reference
-
breadcrumb_title
@snippet
.
to_reference
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
_
(
"Snippets"
)
=
render
'shared/snippets/header'
=
render
'shared/snippets/header'
...
...
changelogs/unreleased/gt-externalize-app-views-snippets.yml
0 → 100644
View file @
412f6291
---
title
:
Externalize strings from `/app/views/snippets`
merge_request
:
23351
author
:
Tao Wang
type
:
other
locale/gitlab.pot
View file @
412f6291
...
@@ -158,6 +158,9 @@ msgstr ""
...
@@ -158,6 +158,9 @@ msgstr ""
msgid "%{usage_ping_link_start}Learn more%{usage_ping_link_end} about what information is shared with GitLab Inc."
msgid "%{usage_ping_link_start}Learn more%{usage_ping_link_end} about what information is shared with GitLab Inc."
msgstr ""
msgstr ""
msgid "%{user_name} profile page"
msgstr ""
msgid "+ %{count} more"
msgid "+ %{count} more"
msgstr ""
msgstr ""
...
@@ -1082,6 +1085,9 @@ msgstr ""
...
@@ -1082,6 +1085,9 @@ msgstr ""
msgid "Business metrics (Custom)"
msgid "Business metrics (Custom)"
msgstr ""
msgstr ""
msgid "By %{user_name}"
msgstr ""
msgid "ByAuthor|by"
msgid "ByAuthor|by"
msgstr ""
msgstr ""
...
@@ -2558,6 +2564,9 @@ msgstr ""
...
@@ -2558,6 +2564,9 @@ msgstr ""
msgid "Edit application"
msgid "Edit application"
msgstr ""
msgstr ""
msgid "Edit comment"
msgstr ""
msgid "Edit environment"
msgid "Edit environment"
msgstr ""
msgstr ""
...
@@ -3496,6 +3505,9 @@ msgstr ""
...
@@ -3496,6 +3505,9 @@ msgstr ""
msgid "Interested parties can even contribute by pushing commits if they want to."
msgid "Interested parties can even contribute by pushing commits if they want to."
msgstr ""
msgstr ""
msgid "Internal"
msgstr ""
msgid "Internal - The group and any internal projects can be viewed by any logged in user."
msgid "Internal - The group and any internal projects can be viewed by any logged in user."
msgstr ""
msgstr ""
...
@@ -4321,6 +4333,9 @@ msgstr ""
...
@@ -4321,6 +4333,9 @@ msgstr ""
msgid "Notes|Show history only"
msgid "Notes|Show history only"
msgstr ""
msgstr ""
msgid "Nothing here."
msgstr ""
msgid "Notification events"
msgid "Notification events"
msgstr ""
msgstr ""
...
@@ -4779,6 +4794,9 @@ msgstr ""
...
@@ -4779,6 +4794,9 @@ msgstr ""
msgid "Prioritized label"
msgid "Prioritized label"
msgstr ""
msgstr ""
msgid "Private"
msgstr ""
msgid "Private - Project access must be granted explicitly to each user."
msgid "Private - Project access must be granted explicitly to each user."
msgstr ""
msgstr ""
...
@@ -5205,6 +5223,9 @@ msgstr ""
...
@@ -5205,6 +5223,9 @@ msgstr ""
msgid "Provider"
msgid "Provider"
msgstr ""
msgstr ""
msgid "Public"
msgstr ""
msgid "Public - The group and any public projects can be viewed without any authentication."
msgid "Public - The group and any public projects can be viewed without any authentication."
msgstr ""
msgstr ""
...
...
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