Commit f5d2d237 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Update wording

parent 3d337936
...@@ -6,7 +6,8 @@ module PushRulesHelper ...@@ -6,7 +6,8 @@ module PushRulesHelper
end end
def commit_committer_check_description(push_rule) def commit_committer_check_description(push_rule)
message = s_("ProjectSettings|Only the committer of a commit can push changes to this repository.") message = s_("ProjectSettings|Users can only push commits to this repository "\
"that were committed with one of their own verified emails.")
push_rule_update_description(message, push_rule, :commit_committer_check) push_rule_update_description(message, push_rule, :commit_committer_check)
end end
......
...@@ -7,6 +7,6 @@ ...@@ -7,6 +7,6 @@
= form.check_box :commit_committer_check, class: "pull-left", disabled: !can_change_push_rule?(form.object, :commit_committer_check) = form.check_box :commit_committer_check, class: "pull-left", disabled: !can_change_push_rule?(form.object, :commit_committer_check)
.prepend-left-20 .prepend-left-20
= form.label :commit_committer_check, class: "label-light append-bottom-0" do = form.label :commit_committer_check, class: "label-light append-bottom-0" do
Author restriction = s_("PushRule|Committer restriction")
%p.light.append-bottom-0 %p.light.append-bottom-0
= commit_committer_check_description(push_rule) = commit_committer_check_description(push_rule)
...@@ -16,9 +16,8 @@ module Gitlab ...@@ -16,9 +16,8 @@ module Gitlab
delete_protected_tag: 'Protected tags cannot be deleted.', delete_protected_tag: 'Protected tags cannot be deleted.',
create_protected_tag: 'You are not allowed to create this tag as it is protected.', create_protected_tag: 'You are not allowed to create this tag as it is protected.',
push_rule_branch_name: "Branch name does not follow the pattern '%{branch_name_regex}'", push_rule_branch_name: "Branch name does not follow the pattern '%{branch_name_regex}'",
push_rule_committer_unknown: "Committer '%{committer_email}' unknown, do you need to add that email to your profile?", push_rule_committer_not_verified: "Comitter email '%{commiter_email}' is not verified.",
push_rule_committer_not_verified: "Committer email '%{committer_email}' not verified. Verify the email on your profile page.", push_rule_committer_not_allowed: "You cannot push commits for '%{committer_email}'. You can only push commits that were committed with one of your own verified emails."
push_rule_committer_not_allowed: "You cannot push commits for '%{committer_email}', you can only push your own commits."
}.freeze }.freeze
# protocol is currently used only in EE # protocol is currently used only in EE
...@@ -241,9 +240,9 @@ module Gitlab ...@@ -241,9 +240,9 @@ module Gitlab
def committer_check(commit, push_rule) def committer_check(commit, push_rule)
unless push_rule.committer_allowed?(commit.committer_email, user_access.user) unless push_rule.committer_allowed?(commit.committer_email, user_access.user)
if commit.committer.nil? committer_is_current_user = commit.committer == user_access.user
ERROR_MESSAGES[:push_rule_committer_unknown] % { committer_email: commit.committer_email }
elsif !commit.committer.verified_email?(commit.committer_email) if committer_is_current_user && !commit.committer.verified_email?(commit.committer_email)
ERROR_MESSAGES[:push_rule_committer_not_verified] % { committer_email: commit.committer_email } ERROR_MESSAGES[:push_rule_committer_not_verified] % { committer_email: commit.committer_email }
else else
ERROR_MESSAGES[:push_rule_committer_not_allowed] % { committer_email: commit.committer_email } ERROR_MESSAGES[:push_rule_committer_not_allowed] % { committer_email: commit.committer_email }
......
...@@ -8,8 +8,8 @@ msgid "" ...@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-22 16:40+0300\n" "POT-Creation-Date: 2017-11-02 14:42+0100\n"
"PO-Revision-Date: 2017-10-22 16:40+0300\n" "PO-Revision-Date: 2017-11-02 14:42+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
...@@ -36,6 +36,11 @@ msgstr[1] "" ...@@ -36,6 +36,11 @@ msgstr[1] ""
msgid "%{commit_author_link} committed %{commit_timeago}" msgid "%{commit_author_link} committed %{commit_timeago}"
msgstr "" msgstr ""
msgid "%{count} participant"
msgid_plural "%{count} participants"
msgstr[0] ""
msgstr[1] ""
msgid "%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead" msgid "%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead"
msgstr "" msgstr ""
...@@ -56,6 +61,12 @@ msgstr[1] "" ...@@ -56,6 +61,12 @@ msgstr[1] ""
msgid "(checkout the %{link} for information on how to install it)." msgid "(checkout the %{link} for information on how to install it)."
msgstr "" msgstr ""
msgid "+ %{moreCount} more"
msgstr ""
msgid "- show less"
msgstr ""
msgid "1 pipeline" msgid "1 pipeline"
msgid_plural "%d pipelines" msgid_plural "%d pipelines"
msgstr[0] "" msgstr[0] ""
...@@ -480,9 +491,6 @@ msgstr "" ...@@ -480,9 +491,6 @@ msgstr ""
msgid "ClusterIntegration|A %{link_to_container_project} must have been created under this account" msgid "ClusterIntegration|A %{link_to_container_project} must have been created under this account"
msgstr "" msgstr ""
msgid "ClusterIntegration|Advanced settings"
msgstr ""
msgid "ClusterIntegration|Cluster details" msgid "ClusterIntegration|Cluster details"
msgstr "" msgstr ""
...@@ -567,9 +575,6 @@ msgstr "" ...@@ -567,9 +575,6 @@ msgstr ""
msgid "ClusterIntegration|See and edit the details for your cluster" msgid "ClusterIntegration|See and edit the details for your cluster"
msgstr "" msgstr ""
msgid "ClusterIntegration|See and edit the details for your cluster"
msgstr ""
msgid "ClusterIntegration|See machine types" msgid "ClusterIntegration|See machine types"
msgstr "" msgstr ""
...@@ -620,6 +625,11 @@ msgid_plural "Commits" ...@@ -620,6 +625,11 @@ msgid_plural "Commits"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Commit %d file"
msgid_plural "Commit %d files"
msgstr[0] ""
msgstr[1] ""
msgid "Commit Message" msgid "Commit Message"
msgstr "" msgstr ""
...@@ -728,12 +738,21 @@ msgstr "" ...@@ -728,12 +738,21 @@ msgstr ""
msgid "Create empty bare repository" msgid "Create empty bare repository"
msgstr "" msgstr ""
msgid "Create file"
msgstr ""
msgid "Create merge request" msgid "Create merge request"
msgstr "" msgstr ""
msgid "Create new branch" msgid "Create new branch"
msgstr "" msgstr ""
msgid "Create new directory"
msgstr ""
msgid "Create new file"
msgstr ""
msgid "Create new..." msgid "Create new..."
msgstr "" msgstr ""
...@@ -904,6 +923,9 @@ msgstr "" ...@@ -904,6 +923,9 @@ msgstr ""
msgid "Failed to remove the pipeline schedule" msgid "Failed to remove the pipeline schedule"
msgstr "" msgstr ""
msgid "File name"
msgstr ""
msgid "Files" msgid "Files"
msgstr "" msgstr ""
...@@ -1343,6 +1365,12 @@ msgstr "" ...@@ -1343,6 +1365,12 @@ msgstr ""
msgid "Notifications" msgid "Notifications"
msgstr "" msgstr ""
msgid "Number of access attempts"
msgstr ""
msgid "Number of failures before backing off"
msgstr ""
msgid "OfSearchInADropdown|Filter" msgid "OfSearchInADropdown|Filter"
msgstr "" msgstr ""
...@@ -1598,6 +1626,9 @@ msgstr "" ...@@ -1598,6 +1626,9 @@ msgstr ""
msgid "ProjectSettings|This setting will be applied to all projects unless overridden by an admin." msgid "ProjectSettings|This setting will be applied to all projects unless overridden by an admin."
msgstr "" msgstr ""
msgid "ProjectSettings|Users can only push commits to this repository that were committed with one of their own verified emails."
msgstr ""
msgid "Projects" msgid "Projects"
msgstr "" msgstr ""
...@@ -1634,6 +1665,9 @@ msgstr "" ...@@ -1634,6 +1665,9 @@ msgstr ""
msgid "Push events" msgid "Push events"
msgstr "" msgstr ""
msgid "PushRule|Committer restriction"
msgstr ""
msgid "Read more" msgid "Read more"
msgstr "" msgstr ""
...@@ -1906,6 +1940,9 @@ msgstr "" ...@@ -1906,6 +1940,9 @@ msgstr ""
msgid "Subgroups" msgid "Subgroups"
msgstr "" msgstr ""
msgid "Subscribe"
msgstr ""
msgid "Switch branch/tag" msgid "Switch branch/tag"
msgstr "" msgstr ""
...@@ -1932,6 +1969,9 @@ msgstr "" ...@@ -1932,6 +1969,9 @@ msgstr ""
msgid "The Advanced Global Search in GitLab is a powerful search service that saves you time. Instead of creating duplicate code and wasting time, you can now search for code within other teams that can help your own project." msgid "The Advanced Global Search in GitLab is a powerful search service that saves you time. Instead of creating duplicate code and wasting time, you can now search for code within other teams that can help your own project."
msgstr "" msgstr ""
msgid "The circuitbreaker backoff threshold should be lower than the failure count threshold"
msgstr ""
msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request." msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
msgstr "" msgstr ""
...@@ -1944,6 +1984,12 @@ msgstr "" ...@@ -1944,6 +1984,12 @@ msgstr ""
msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage." msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
msgstr "" msgstr ""
msgid "The number of attempts GitLab will make to access a storage."
msgstr ""
msgid "The number of failures after which GitLab will start temporarily disabling access to a storage shard on a host"
msgstr ""
msgid "The number of failures of after which GitLab will completely prevent access to the storage. The number of failures can be reset in the admin interface: %{link_to_health_page} or using the %{api_documentation_link}." msgid "The number of failures of after which GitLab will completely prevent access to the storage. The number of failures can be reset in the admin interface: %{link_to_health_page} or using the %{api_documentation_link}."
msgstr "" msgstr ""
...@@ -2179,6 +2225,9 @@ msgstr "" ...@@ -2179,6 +2225,9 @@ msgstr ""
msgid "Unstar" msgid "Unstar"
msgstr "" msgstr ""
msgid "Unsubscribe"
msgstr ""
msgid "Upgrade your plan to activate Advanced Global Search." msgid "Upgrade your plan to activate Advanced Global Search."
msgstr "" msgstr ""
......
...@@ -9,7 +9,7 @@ describe "Admin::PushRules" do ...@@ -9,7 +9,7 @@ describe "Admin::PushRules" do
push_rules_with_titles = { push_rules_with_titles = {
reject_unsigned_commits: 'Reject unsigned commits', reject_unsigned_commits: 'Reject unsigned commits',
commit_committer_check: 'Author restriction' commit_committer_check: 'Committer restriction'
} }
push_rules_with_titles.each do |rule_attr, title| push_rules_with_titles.each do |rule_attr, title|
......
...@@ -12,7 +12,7 @@ feature 'Projects > Push Rules', :js do ...@@ -12,7 +12,7 @@ feature 'Projects > Push Rules', :js do
push_rules_with_titles = { push_rules_with_titles = {
reject_unsigned_commits: 'Reject unsigned commits', reject_unsigned_commits: 'Reject unsigned commits',
commit_committer_check: 'Author restriction' commit_committer_check: 'Committer restriction'
} }
push_rules_with_titles.each do |rule_attr, title| push_rules_with_titles.each do |rule_attr, title|
......
...@@ -7,7 +7,7 @@ describe PushRulesHelper do ...@@ -7,7 +7,7 @@ describe PushRulesHelper do
let(:project_owner) { push_rule.project.owner } let(:project_owner) { push_rule.project.owner }
let(:possible_help_texts) do let(:possible_help_texts) do
{ {
commit_committer_check_base_help: /Only the committer of a commit can push changes to this repository/, commit_committer_check_base_help: /Users can only push commits to this repository that were committed with one of their own verified emails/,
reject_unsigned_commits_base_help: /Only signed commits can be pushed to this repository/, reject_unsigned_commits_base_help: /Only signed commits can be pushed to this repository/,
default_admin_help: /This setting will be applied to all projects unless overridden by an admin/, default_admin_help: /This setting will be applied to all projects unless overridden by an admin/,
setting_can_be_overridden: /This setting is applied on the server level and can be overridden by an admin/, setting_can_be_overridden: /This setting is applied on the server level and can be overridden by an admin/,
......
...@@ -490,14 +490,14 @@ describe Gitlab::Checks::ChangeAccess do ...@@ -490,14 +490,14 @@ describe Gitlab::Checks::ChangeAccess do
expect { subject } expect { subject }
.to raise_error(Gitlab::GitAccess::UnauthorizedError, .to raise_error(Gitlab::GitAccess::UnauthorizedError,
"Committer email 'secondary_email@user.com' not verified. Verify the email on your profile page.") "Comitter email '%{commiter_email}' is not verified.")
end end
it 'raises an error when using an unknown email' do it 'raises an error when using an unknown email' do
allow_any_instance_of(Commit).to receive(:committer_email).and_return('some@mail.com') allow_any_instance_of(Commit).to receive(:committer_email).and_return('some@mail.com')
expect { subject } expect { subject }
.to raise_error(Gitlab::GitAccess::UnauthorizedError, .to raise_error(Gitlab::GitAccess::UnauthorizedError,
"Committer 'some@mail.com' unknown, do you need to add that email to your profile?") "You cannot push commits for 'some@mail.com'. You can only push commits that were committed with one of your own verified emails.")
end end
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