Commit 11b5b6a0 authored by Amy Qualls's avatar Amy Qualls Committed by Enrique Alcántara

Refine messages about inability to push code

parent a749065a
import { s__ } from '~/locale'; import { s__ } from '~/locale';
export const MSG_CANNOT_PUSH_CODE_SHOULD_FORK = s__( export const MSG_CANNOT_PUSH_CODE_SHOULD_FORK = s__(
'WebIDE|You need permission to edit files directly in this project. Fork this project to make your changes and submit a merge request.', 'WebIDE|You can’t edit files directly in this project. Fork this project and submit a merge request with your changes.',
); );
export const MSG_CANNOT_PUSH_CODE_GO_TO_FORK = s__( export const MSG_CANNOT_PUSH_CODE_GO_TO_FORK = s__(
'WebIDE|You need permission to edit files directly in this project. Go to your fork to make changes and submit a merge request.', 'WebIDE|You can’t edit files directly in this project. Go to your fork and submit a merge request with your changes.',
); );
export const MSG_CANNOT_PUSH_CODE = s__( export const MSG_CANNOT_PUSH_CODE = s__(
...@@ -13,7 +13,7 @@ export const MSG_CANNOT_PUSH_CODE = s__( ...@@ -13,7 +13,7 @@ export const MSG_CANNOT_PUSH_CODE = s__(
); );
export const MSG_CANNOT_PUSH_UNSIGNED = s__( export const MSG_CANNOT_PUSH_UNSIGNED = s__(
'WebIDE|This project does not accept unsigned commits. You will not be able to commit your changes through the Web IDE.', 'WebIDE|This project does not accept unsigned commits. You can’t commit changes through the Web IDE.',
); );
export const MSG_CANNOT_PUSH_UNSIGNED_SHORT = s__( export const MSG_CANNOT_PUSH_UNSIGNED_SHORT = s__(
......
- message_base = s_("ForkSuggestion|You can’t %{edit_start}edit%{edit_end} files directly in this project. Fork this project and submit a merge request with your changes.").html_safe
- message = message_base.html_safe % { edit_start: '<span class="js-file-fork-suggestion-section-action">'.html_safe, edit_end: '</span>'.html_safe }
.js-file-fork-suggestion-section.file-fork-suggestion.hidden .js-file-fork-suggestion-section.file-fork-suggestion.hidden
%span.file-fork-suggestion-note %span.file-fork-suggestion-note= message
You're not allowed to = link_to s_('ForkSuggestion|Fork'), nil, method: :post, class: 'js-fork-suggestion-button gl-button btn btn-grouped btn-confirm-secondary'
%span.js-file-fork-suggestion-section-action
edit
files in this project directly. Please fork this project,
make your changes there, and submit a merge request.
= link_to 'Fork', nil, method: :post, class: 'js-fork-suggestion-button gl-button btn btn-grouped btn-confirm-secondary'
%button.js-cancel-fork-suggestion-button.gl-button.btn.btn-grouped{ type: 'button' } %button.js-cancel-fork-suggestion-button.gl-button.btn.btn-grouped{ type: 'button' }
Cancel = s_('ForkSuggestion|Cancel')
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
%span{ "aria-hidden": true } &times; %span{ "aria-hidden": true } &times;
.modal-body.p-3 .modal-body.p-3
%p= _("You're not allowed to %{tag_start}edit%{tag_end} files in this project directly. Please fork this project, make your changes there, and submit a merge request.") % { tag_start: '', tag_end: ''} %p= _("You can’t %{tag_start}edit%{tag_end} files directly in this project. Fork this project and submit a merge request with your changes.") % { tag_start: '', tag_end: ''}
.modal-footer .modal-footer
= link_to _('Cancel'), '#', class: "btn gl-button btn-default", "data-dismiss" => "modal" = link_to _('Cancel'), '#', class: "btn gl-button btn-default", "data-dismiss" => "modal"
= link_to _('Fork project'), fork_path, class: 'btn gl-button btn-confirm', data: { qa_selector: 'fork_project_button' }, method: :post = link_to _('Fork project'), fork_path, class: 'btn gl-button btn-confirm', data: { qa_selector: 'fork_project_button' }, method: :post
---
title: Update messages when user cannot directly push code to project
merge_request: 61071
author:
type: other
...@@ -14265,6 +14265,15 @@ msgstr "" ...@@ -14265,6 +14265,15 @@ msgstr ""
msgid "ForkProject|Want to house several dependent projects under the same namespace?" msgid "ForkProject|Want to house several dependent projects under the same namespace?"
msgstr "" msgstr ""
msgid "ForkSuggestion|Cancel"
msgstr ""
msgid "ForkSuggestion|Fork"
msgstr ""
msgid "ForkSuggestion|You can’t %{edit_start}edit%{edit_end} files directly in this project. Fork this project and submit a merge request with your changes."
msgstr ""
msgid "ForkedFromProjectPath|Forked from" msgid "ForkedFromProjectPath|Forked from"
msgstr "" msgstr ""
...@@ -36069,16 +36078,16 @@ msgstr "" ...@@ -36069,16 +36078,16 @@ msgstr ""
msgid "WebIDE|This project does not accept unsigned commits." msgid "WebIDE|This project does not accept unsigned commits."
msgstr "" msgstr ""
msgid "WebIDE|This project does not accept unsigned commits. You will not be able to commit your changes through the Web IDE." msgid "WebIDE|This project does not accept unsigned commits. You can’t commit changes through the Web IDE."
msgstr "" msgstr ""
msgid "WebIDE|You need permission to edit files directly in this project." msgid "WebIDE|You can’t edit files directly in this project. Fork this project and submit a merge request with your changes."
msgstr "" msgstr ""
msgid "WebIDE|You need permission to edit files directly in this project. Fork this project to make your changes and submit a merge request." msgid "WebIDE|You can’t edit files directly in this project. Go to your fork and submit a merge request with your changes."
msgstr "" msgstr ""
msgid "WebIDE|You need permission to edit files directly in this project. Go to your fork to make changes and submit a merge request." msgid "WebIDE|You need permission to edit files directly in this project."
msgstr "" msgstr ""
msgid "WebexTeamsService|Send notifications about project events to Webex Teams." msgid "WebexTeamsService|Send notifications about project events to Webex Teams."
...@@ -36893,6 +36902,9 @@ msgstr "" ...@@ -36893,6 +36902,9 @@ msgstr ""
msgid "You cannot write to this read-only GitLab instance." msgid "You cannot write to this read-only GitLab instance."
msgstr "" msgstr ""
msgid "You can’t %{tag_start}edit%{tag_end} files directly in this project. Fork this project and submit a merge request with your changes."
msgstr ""
msgid "You could not create a new trigger." msgid "You could not create a new trigger."
msgstr "" msgstr ""
......
...@@ -131,8 +131,8 @@ RSpec.describe 'Projects > Files > User edits files', :js do ...@@ -131,8 +131,8 @@ RSpec.describe 'Projects > Files > User edits files', :js do
expect(page).to have_selector(:link_or_button, 'Fork') expect(page).to have_selector(:link_or_button, 'Fork')
expect(page).to have_selector(:link_or_button, 'Cancel') expect(page).to have_selector(:link_or_button, 'Cancel')
expect(page).to have_content( expect(page).to have_content(
"You're not allowed to edit files in this project directly. "\ "You can’t edit files directly in this project. "\
"Please fork this project, make your changes there, and submit a merge request." "Fork this project and submit a merge request with your changes."
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment