Skip to content

Commit e7df959

Browse files
committed
Merge branch 'copy-changes-for-abuse-clarity' into 'master'
Copy changes for abuse clarity Closes #51589 See merge request gitlab-org/gitlab-ce!22148
2 parents 4a5d04f + 28840d3 commit e7df959

File tree

7 files changed

+39
-16
lines changed

7 files changed

+39
-16
lines changed

app/assets/javascripts/notes/components/note_actions.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export default {
248248
<ul class="dropdown-menu more-actions-dropdown dropdown-open-left">
249249
<li v-if="canReportAsAbuse">
250250
<a :href="reportAbusePath">
251-
Report as abuse
251+
{{ __('Report abuse to GitLab') }}
252252
</a>
253253
</li>
254254
<li v-if="noteUrl">
@@ -257,7 +257,7 @@ export default {
257257
type="button"
258258
class="btn-default btn-transparent js-btn-copy-note-link"
259259
>
260-
Copy link
260+
{{ __('Copy link') }}
261261
</button>
262262
</li>
263263
<li v-if="canEdit">
@@ -266,7 +266,7 @@ export default {
266266
type="button"
267267
@click.prevent="onDelete">
268268
<span class="text-danger">
269-
Delete comment
269+
{{ __('Delete comment') }}
270270
</span>
271271
</button>
272272
</li>

app/views/abuse_reports/new.html.haml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
- page_title "Report abuse"
2-
%h3.page-title Report abuse
3-
%p Please use this form to report users who create spam issues, comments or behave inappropriately.
1+
- page_title _("Report abuse to GitLab")
2+
%h3.page-title
3+
= _('Report abuse to GitLab')
4+
%p
5+
= _('Please use this form to report users to GitLab who create spam issues, comments or behave inappropriately.')
6+
%p
7+
= _("A member of GitLab's abuse team will review your report as soon as possible.")
48
%hr
59
= form_for @abuse_report, html: { class: 'js-quick-submit js-requires-input'} do |f|
610
= form_errors(@abuse_report)
@@ -16,7 +20,7 @@
1620
.col-sm-10
1721
= f.text_area :message, class: "form-control", rows: 2, required: true, value: sanitize(@ref_url)
1822
.form-text.text-muted
19-
Explain the problem with this user. If appropriate, provide a link to the relevant issue or comment.
23+
= _('Explain the problem. If appropriate, provide a link to the relevant issue or comment.')
2024

2125
.form-actions
2226
= f.submit "Send report", class: "btn btn-success"

app/views/projects/notes/_more_actions_dropdown.html.haml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
- unless is_current_user
1212
%li
1313
= link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do
14-
Report as abuse
14+
= _('Report abuse to GitLab')
1515
- if note_editable
1616
%li
1717
= link_to note_url(note), method: :delete, data: { confirm: 'Are you sure you want to delete this comment?' }, remote: true, class: 'js-note-delete' do
18-
%span.text-danger Delete comment
18+
%span.text-danger
19+
= _('Delete comment')

locale/gitlab.pot

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ msgstr ""
264264
msgid "A deleted user"
265265
msgstr ""
266266

267+
msgid "A member of GitLab's abuse team will review your report as soon as possible."
268+
msgstr ""
269+
267270
msgid "A new branch will be created in your fork and a new merge request will be started."
268271
msgstr ""
269272

@@ -1980,6 +1983,9 @@ msgstr ""
19801983
msgid "Copy file path to clipboard"
19811984
msgstr ""
19821985

1986+
msgid "Copy link"
1987+
msgstr ""
1988+
19831989
msgid "Copy reference to clipboard"
19841990
msgstr ""
19851991

@@ -2199,6 +2205,9 @@ msgstr ""
21992205
msgid "Delete Snippet"
22002206
msgstr ""
22012207

2208+
msgid "Delete comment"
2209+
msgstr ""
2210+
22022211
msgid "Delete list"
22032212
msgstr ""
22042213

@@ -2735,6 +2744,9 @@ msgstr ""
27352744
msgid "Expiration date"
27362745
msgstr ""
27372746

2747+
msgid "Explain the problem. If appropriate, provide a link to the relevant issue or comment."
2748+
msgstr ""
2749+
27382750
msgid "Explore"
27392751
msgstr ""
27402752

@@ -4599,6 +4611,9 @@ msgstr ""
45994611
msgid "Please try again"
46004612
msgstr ""
46014613

4614+
msgid "Please use this form to report users to GitLab who create spam issues, comments or behave inappropriately."
4615+
msgstr ""
4616+
46024617
msgid "Please wait while we import the repository for you. Refresh at will."
46034618
msgstr ""
46044619

@@ -5168,6 +5183,9 @@ msgstr ""
51685183
msgid "Reply to this email directly or %{view_it_on_gitlab}."
51695184
msgstr ""
51705185

5186+
msgid "Report abuse to GitLab"
5187+
msgstr ""
5188+
51715189
msgid "Reporting"
51725190
msgstr ""
51735191

spec/javascripts/notes/components/note_actions_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('issue_note_actions component', () => {
5555
expect(vm.$el.querySelector('.js-note-edit')).toBeDefined();
5656
});
5757

58-
it('should be possible to report as abuse', () => {
58+
it('should be possible to report abuse to GitLab', () => {
5959
expect(vm.$el.querySelector(`a[href="${props.reportAbusePath}"]`)).toBeDefined();
6060
});
6161

spec/support/features/reportable_note_shared_examples.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
dropdown = comment.find(more_actions_selector)
2121
open_dropdown(dropdown)
2222

23-
expect(dropdown).to have_link('Report as abuse', href: abuse_report_path)
23+
expect(dropdown).to have_link('Report abuse to GitLab', href: abuse_report_path)
2424

2525
if type == 'issue' || type == 'merge_request'
2626
expect(dropdown).to have_button('Delete comment')
@@ -33,7 +33,7 @@
3333
dropdown = comment.find(more_actions_selector)
3434
open_dropdown(dropdown)
3535

36-
dropdown.click_link('Report as abuse')
36+
dropdown.click_link('Report abuse to GitLab')
3737

3838
expect(find('#user_name')['value']).to match(note.author.username)
3939
expect(find('#abuse_report_message')['value']).to match(noteable_note_url(note))

spec/views/projects/notes/_more_actions_dropdown.html.haml_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
assign(:project, project)
1313
end
1414

15-
it 'shows Report as abuse button if not editable and not current users comment' do
15+
it 'shows Report abuse to GitLab button if not editable and not current users comment' do
1616
render 'projects/notes/more_actions_dropdown', current_user: not_author_user, note_editable: false, note: note
1717

18-
expect(rendered).to have_link('Report as abuse')
18+
expect(rendered).to have_link('Report abuse to GitLab')
1919
end
2020

2121
it 'does not show the More actions button if not editable and current users comment' do
@@ -24,10 +24,10 @@
2424
expect(rendered).not_to have_selector('.dropdown.more-actions')
2525
end
2626

27-
it 'shows Report as abuse and Delete buttons if editable and not current users comment' do
27+
it 'shows Report abuse to GitLab and Delete buttons if editable and not current users comment' do
2828
render 'projects/notes/more_actions_dropdown', current_user: not_author_user, note_editable: true, note: note
2929

30-
expect(rendered).to have_link('Report as abuse')
30+
expect(rendered).to have_link('Report abuse to GitLab')
3131
expect(rendered).to have_link('Delete comment')
3232
end
3333

0 commit comments

Comments
 (0)