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
83224950
Commit
83224950
authored
Jan 23, 2019
by
Constance Okoghenun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated i18n for discussion note commit SHA
Ensured that sentence order is preserved when translating
parent
993616a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
app/assets/javascripts/notes/components/noteable_note.vue
app/assets/javascripts/notes/components/noteable_note.vue
+18
-6
locale/gitlab.pot
locale/gitlab.pot
+1
-4
No files found.
app/assets/javascripts/notes/components/noteable_note.vue
View file @
83224950
...
...
@@ -80,12 +80,27 @@ export default {
isTarget
()
{
return
this
.
targetNoteHash
===
this
.
noteAnchorId
;
},
truncatedHash
()
{
actionText
()
{
if
(
!
this
.
commit
)
{
return
''
;
}
return
sprintf
(
s__
(
'
MergeRequests|%{commitSha}
'
),
{
commitSha
:
truncateSha
(
this
.
commit
.
id
)
});
// We need to do this to ensure we have the currect sentence order
// when translating this as the sentence order may change from one
// language to the next. See:
// https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24427#note_133713771
const
{
id
,
url
}
=
this
.
commit
;
const
linkStart
=
`<a class="commit-sha monospace" href="
${
escape
(
url
)}
">`
;
const
linkEnd
=
'
</a>
'
;
return
sprintf
(
s__
(
'
MergeRequests|commented on commit %{linkStart}%{commitId}%{linkEnd}
'
),
{
commitId
:
truncateSha
(
id
),
linkStart
,
linkEnd
,
},
false
,
);
},
},
...
...
@@ -215,10 +230,7 @@ export default {
<div
class=
"timeline-content"
>
<div
class=
"note-header"
>
<note-header
v-once
:author=
"author"
:created-at=
"note.created_at"
:note-id=
"note.id"
>
<span
v-if=
"commit"
>
{{
s__
(
'
MergeRequests|commented on commit
'
)
}}
<a
class=
"commit-sha monospace"
:href=
"commit.url"
>
{{
truncatedHash
}}
</a>
</span>
<span
v-if=
"commit"
v-html=
"actionText"
></span>
<span
v-else
class=
"d-none d-sm-inline"
>
·
</span>
</note-header>
<note-actions
...
...
locale/gitlab.pot
View file @
83224950
...
...
@@ -4279,9 +4279,6 @@ msgstr ""
msgid "Merge requests are a place to propose changes you've made to a project and discuss those changes with others"
msgstr ""
msgid "MergeRequests|%{commitSha}"
msgstr ""
msgid "MergeRequests|Resolve this discussion in a new issue"
msgstr ""
...
...
@@ -4297,7 +4294,7 @@ msgstr ""
msgid "MergeRequests|View replaced file @ %{commitId}"
msgstr ""
msgid "MergeRequests|commented on commit "
msgid "MergeRequests|commented on commit
%{linkStart}%{commitId}%{linkEnd}
"
msgstr ""
msgid "MergeRequests|started a discussion"
...
...
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