Commit 1b348769 authored by Robert May's avatar Robert May

Merge branch 'tw-ui-text-group-deploy-tokens' into 'master'

TW OKR: Review UI text for group deploy tokens

See merge request gitlab-org/gitlab!66863
parents 93e5974e 71502706
%p.profile-settings-content %p.profile-settings-content
= s_("DeployTokens|Pick a name for your unique deploy token.") - group_deploy_tokens_help_link_url = help_page_path('user/project/deploy_tokens/index.md')
- group_deploy_tokens_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_deploy_tokens_help_link_url }
= s_('DeployTokens|Create a new deploy token for all projects in this group. %{link_start}What are deploy tokens?%{link_end}').html_safe % { link_start: group_deploy_tokens_help_link_start, link_end: '</a>'.html_safe }
= form_for token, url: create_deploy_token_path(group_or_project, anchor: 'js-deploy-tokens'), method: :post, remote: Feature.enabled?(:ajax_new_deploy_token, group_or_project) do |f| = form_for token, url: create_deploy_token_path(group_or_project, anchor: 'js-deploy-tokens'), method: :post, remote: Feature.enabled?(:ajax_new_deploy_token, group_or_project) do |f|
= form_errors(token) = form_errors(token)
...@@ -7,23 +9,26 @@ ...@@ -7,23 +9,26 @@
.form-group .form-group
= f.label :name, class: 'label-bold' = f.label :name, class: 'label-bold'
= f.text_field :name, class: 'form-control gl-form-input', data: { qa_selector: 'deploy_token_name_field' }, required: true = f.text_field :name, class: 'form-control gl-form-input', data: { qa_selector: 'deploy_token_name_field' }, required: true
.text-secondary= s_('DeployTokens|Enter a unique name for your deploy token.')
.form-group .form-group
= f.label :expires_at, _('Expires at (optional)'), class: 'label-bold' = f.label :expires_at, _('Expiration date (optional)'), class: 'label-bold'
= f.text_field :expires_at, class: 'datepicker form-control', data: { qa_selector: 'deploy_token_expires_at_field' }, value: f.object.expires_at = f.text_field :expires_at, class: 'datepicker form-control', data: { qa_selector: 'deploy_token_expires_at_field' }, value: f.object.expires_at
.text-secondary= s_('DeployTokens|Unless you enter a date, the token does not expire.') .text-secondary= s_('DeployTokens|Enter an expiration date for your token. Defaults to never expire.')
.form-group .form-group
= f.label :username, _('Username (optional)'), class: 'label-bold' = f.label :username, _('Username (optional)'), class: 'label-bold'
= f.text_field :username, class: 'form-control' = f.text_field :username, class: 'form-control'
.text-secondary= s_('DeployTokens|Unless you specify a username, it is set to "gitlab+deploy-token-{n}".') .text-secondary
= html_escape(s_('DeployTokens|Enter a username for your token. Defaults to %{code_start}gitlab+deploy-token-{n}%{code_end}.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }
.form-group .form-group
= f.label :scopes, _('Scopes [Select 1 or more]'), class: 'label-bold' = f.label :scopes, _('Scopes (select at least one)'), class: 'label-bold'
%fieldset.form-group.form-check %fieldset.form-group.form-check
= f.check_box :read_repository, class: 'form-check-input', data: { qa_selector: 'deploy_token_read_repository_checkbox' } = f.check_box :read_repository, class: 'form-check-input', data: { qa_selector: 'deploy_token_read_repository_checkbox' }
= f.label :read_repository, 'read_repository', class: 'label-bold form-check-label' = f.label :read_repository, 'read_repository', class: 'label-bold form-check-label'
.text-secondary= s_('DeployTokens|Allows read-only access to the repository.') .text-secondary
= s_('DeployTokens|Allows read-only access to the repository.')
- if container_registry_enabled?(group_or_project) - if container_registry_enabled?(group_or_project)
%fieldset.form-group.form-check %fieldset.form-group.form-check
...@@ -34,18 +39,18 @@ ...@@ -34,18 +39,18 @@
%fieldset.form-group.form-check %fieldset.form-group.form-check
= f.check_box :write_registry, class: 'form-check-input' = f.check_box :write_registry, class: 'form-check-input'
= f.label :write_registry, 'write_registry', class: 'label-bold form-check-label' = f.label :write_registry, 'write_registry', class: 'label-bold form-check-label'
.text-secondary= s_('DeployTokens|Allows write access to registry images.') .text-secondary= s_('DeployTokens|Allows read and write access to registry images.')
- if packages_registry_enabled?(group_or_project) - if packages_registry_enabled?(group_or_project)
%fieldset.form-group.form-check %fieldset.form-group.form-check
= f.check_box :read_package_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_read_package_registry_checkbox' } = f.check_box :read_package_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_read_package_registry_checkbox' }
= f.label :read_package_registry, 'read_package_registry', class: 'label-bold form-check-label' = f.label :read_package_registry, 'read_package_registry', class: 'label-bold form-check-label'
.text-secondary= s_('DeployTokens|Allows read access to the package registry.') .text-secondary= s_('DeployTokens|Allows read-only access to the package registry.')
%fieldset.form-group.form-check %fieldset.form-group.form-check
= f.check_box :write_package_registry, class: 'form-check-input' = f.check_box :write_package_registry, class: 'form-check-input'
= f.label :write_package_registry, 'write_package_registry', class: 'label-bold form-check-label' = f.label :write_package_registry, 'write_package_registry', class: 'label-bold form-check-label'
.text-secondary= s_('DeployTokens|Allows write access to the package registry.') .text-secondary= s_('DeployTokens|Allows read and write access to the package registry.')
.gl-mt-3 .gl-mt-3
= f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-confirm', data: { qa_selector: 'create_deploy_token_button' } = f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-confirm', data: { qa_selector: 'create_deploy_token_button' }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- if @new_deploy_token.persisted? - if @new_deploy_token.persisted?
= render 'shared/deploy_tokens/new_deploy_token', deploy_token: @new_deploy_token = render 'shared/deploy_tokens/new_deploy_token', deploy_token: @new_deploy_token
%h5.gl-mt-0 %h5.gl-mt-0
= s_('DeployTokens|Add a deploy token') = s_('DeployTokens|New deploy token')
= render 'shared/deploy_tokens/form', group_or_project: group_or_project, token: @new_deploy_token, presenter: @deploy_tokens = render 'shared/deploy_tokens/form', group_or_project: group_or_project, token: @new_deploy_token, presenter: @deploy_tokens
%hr %hr
= render 'shared/deploy_tokens/table', group_or_project: group_or_project, active_tokens: @deploy_tokens = render 'shared/deploy_tokens/table', group_or_project: group_or_project, active_tokens: @deploy_tokens
......
...@@ -10918,22 +10918,19 @@ msgstr "" ...@@ -10918,22 +10918,19 @@ msgstr ""
msgid "DeployTokens|Active Deploy Tokens (%{active_tokens})" msgid "DeployTokens|Active Deploy Tokens (%{active_tokens})"
msgstr "" msgstr ""
msgid "DeployTokens|Add a deploy token" msgid "DeployTokens|Allows read and write access to registry images."
msgstr "" msgstr ""
msgid "DeployTokens|Allows read access to the package registry." msgid "DeployTokens|Allows read and write access to the package registry."
msgstr "" msgstr ""
msgid "DeployTokens|Allows read-only access to registry images." msgid "DeployTokens|Allows read-only access to registry images."
msgstr "" msgstr ""
msgid "DeployTokens|Allows read-only access to the repository." msgid "DeployTokens|Allows read-only access to the package registry."
msgstr ""
msgid "DeployTokens|Allows write access to registry images."
msgstr "" msgstr ""
msgid "DeployTokens|Allows write access to the package registry." msgid "DeployTokens|Allows read-only access to the repository."
msgstr "" msgstr ""
msgid "DeployTokens|Copy deploy token" msgid "DeployTokens|Copy deploy token"
...@@ -10942,6 +10939,9 @@ msgstr "" ...@@ -10942,6 +10939,9 @@ msgstr ""
msgid "DeployTokens|Copy username" msgid "DeployTokens|Copy username"
msgstr "" msgstr ""
msgid "DeployTokens|Create a new deploy token for all projects in this group. %{link_start}What are deploy tokens?%{link_end}"
msgstr ""
msgid "DeployTokens|Create deploy token" msgid "DeployTokens|Create deploy token"
msgstr "" msgstr ""
...@@ -10954,6 +10954,15 @@ msgstr "" ...@@ -10954,6 +10954,15 @@ msgstr ""
msgid "DeployTokens|Deploy tokens allow access to packages, your repository, and registry images." msgid "DeployTokens|Deploy tokens allow access to packages, your repository, and registry images."
msgstr "" msgstr ""
msgid "DeployTokens|Enter a unique name for your deploy token."
msgstr ""
msgid "DeployTokens|Enter a username for your token. Defaults to %{code_start}gitlab+deploy-token-{n}%{code_end}."
msgstr ""
msgid "DeployTokens|Enter an expiration date for your token. Defaults to never expire."
msgstr ""
msgid "DeployTokens|Expires" msgid "DeployTokens|Expires"
msgstr "" msgstr ""
...@@ -10963,7 +10972,7 @@ msgstr "" ...@@ -10963,7 +10972,7 @@ msgstr ""
msgid "DeployTokens|Name" msgid "DeployTokens|Name"
msgstr "" msgstr ""
msgid "DeployTokens|Pick a name for your unique deploy token." msgid "DeployTokens|New deploy token"
msgstr "" msgstr ""
msgid "DeployTokens|Revoke" msgid "DeployTokens|Revoke"
...@@ -10984,12 +10993,6 @@ msgstr "" ...@@ -10984,12 +10993,6 @@ msgstr ""
msgid "DeployTokens|This username supports access. %{link_start}What kind of access?%{link_end}" msgid "DeployTokens|This username supports access. %{link_start}What kind of access?%{link_end}"
msgstr "" msgstr ""
msgid "DeployTokens|Unless you enter a date, the token does not expire."
msgstr ""
msgid "DeployTokens|Unless you specify a username, it is set to \"gitlab+deploy-token-{n}\"."
msgstr ""
msgid "DeployTokens|Use this token as a password. Save it. This password can %{i_start}not%{i_end} be recovered." msgid "DeployTokens|Use this token as a password. Save it. This password can %{i_start}not%{i_end} be recovered."
msgstr "" msgstr ""
...@@ -13333,6 +13336,9 @@ msgstr "" ...@@ -13333,6 +13336,9 @@ msgstr ""
msgid "Expiration date" msgid "Expiration date"
msgstr "" msgstr ""
msgid "Expiration date (optional)"
msgstr ""
msgid "Expired" msgid "Expired"
msgstr "" msgstr ""
...@@ -13345,9 +13351,6 @@ msgstr "" ...@@ -13345,9 +13351,6 @@ msgstr ""
msgid "Expires" msgid "Expires"
msgstr "" msgstr ""
msgid "Expires at (optional)"
msgstr ""
msgid "Expires in %{expires_at}" msgid "Expires in %{expires_at}"
msgstr "" msgstr ""
...@@ -28658,7 +28661,7 @@ msgstr "" ...@@ -28658,7 +28661,7 @@ msgstr ""
msgid "Scopes" msgid "Scopes"
msgstr "" msgstr ""
msgid "Scopes [Select 1 or more]" msgid "Scopes (select at least one)"
msgstr "" msgstr ""
msgid "Scopes can't be blank" msgid "Scopes can't be blank"
......
...@@ -19,9 +19,9 @@ RSpec.describe 'shared/deploy_tokens/_form.html.haml' do ...@@ -19,9 +19,9 @@ RSpec.describe 'shared/deploy_tokens/_form.html.haml' do
render 'shared/deploy_tokens/form', token: token, group_or_project: subject render 'shared/deploy_tokens/form', token: token, group_or_project: subject
if shows_package_registry_permissions if shows_package_registry_permissions
expect(rendered).to have_content('Allows read access to the package registry') expect(rendered).to have_content('Allows read-only access to the package registry.')
else else
expect(rendered).not_to have_content('Allows read access to the package registry') expect(rendered).not_to have_content('Allows read-only access to the package registry.')
end end
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