Commit 726f5bbf authored by Mayra Cabrera's avatar Mayra Cabrera

Fix i18n on deploy_token views

parent 46a6036c
......@@ -44,8 +44,8 @@ module Projects
def scope_descriptions
{
'read_repo' => s_('Allows read-only access to the repository'),
'read_registry' => s_('Allows read-only access to the registry images')
'read_repo' => s_('DeployTokens|Allows read-only access to the repository'),
'read_registry' => s_('DeployTokens|Allows read-only access to the registry images')
}
end
......
%p.profile-settings-content
= s_("Pick a name for the application, and we'll give you a unique deploy token.")
= s_("DeployTokens|Pick a name for the application, and we'll give you a unique deploy token.")
= form_for token, url: project_deploy_tokens_path(project), method: :post do |f|
= form_errors(token)
......@@ -18,4 +18,4 @@
= render 'projects/deploy_tokens/scope_form', token: token, scope: scope, presenter: presenter
.prepend-top-default
= f.submit s_('Create deploy token'), class: 'btn btn-success'
= f.submit s_('DeployTokens|Create deploy token'), class: 'btn btn-success'
......@@ -2,17 +2,17 @@
%section.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4= s_('Deploy Tokens')
%h4= s_('DeployTokens|Deploy Tokens')
%button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
= s_('Deploy tokens allow read-only access to your repository and registry images.')
= s_('DeployTokens|Deploy tokens allow read-only access to your repository and registry images.')
.settings-content
- if @deploy_tokens.temporal_token
= render 'projects/deploy_tokens/new_deploy_token', new_token: @deploy_tokens.temporal_token
%h5.prepend-top-0
= s_('Add a deploy token')
= s_('DeployTokens|Add a deploy token')
= render 'projects/deploy_tokens/form', project: @project, token: @deploy_token, presenter: @deploy_tokens
%hr
= render 'projects/deploy_tokens/table', project: @project, active_tokens: @deploy_tokens
.created-deploy-token-container
%h5.prepend-top-0
= s_('Your New Deploy Token')
= s_('DeployTokens|Your New Deploy Token')
.form-group
= text_field_tag 'deploy-token', new_token, readonly: true, class: 'deploy-token-field form-control js-select-on-focus'
= clipboard_button(text: new_token, title: s_('Copy deploy token to clipboard'), placement: 'left')
%span.deploy-token-help-block.prepend-top-5.text-danger= s_("Make sure you save it - you won't be able to access it again.")
= clipboard_button(text: new_token, title: s_('DeployTokens|Copy deploy token to clipboard'), placement: 'left')
%span.deploy-token-help-block.prepend-top-5.text-danger= s_("DeployTokens|Make sure you save it - you won't be able to access it again.")
%hr
......@@ -3,15 +3,15 @@
.modal-content
.modal-header
%h4.modal-title.pull-left
Revoke
= s_('DeployTokens|Revoke')
%b #{token.name}?
%button.close{ 'aria-label' => 'Close', 'data-dismiss' => 'modal', type: 'button' }
%span{ 'aria-hidden' => 'true' } ×
%button.close{ 'aria-label' => _('Close'), 'data-dismiss' => 'modal', type: 'button' }
%span{ 'aria-hidden' => 'true' } ×
.modal-body
%p
= s_('You are about to revoke')
= s_('DeployTokens|You are about to revoke')
%b #{token.name}.
= s_('This action cannot be undone.')
= s_('DeployTokens|This action cannot be undone.')
.modal-footer
%a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= s_('Cancel')
= link_to "Revoke #{token.name}", revoke_project_deploy_token_path(project, token), method: :put, class: 'btn btn-danger'
%a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= _('Cancel')
= link_to s_('DeployTokens|Revoke %{name}') % { name: token.name }, revoke_project_deploy_token_path(project, token), method: :put, class: 'btn btn-danger'
%h5 Active Deploy Tokens (#{active_tokens.length})
%h5= s_("DeployTokens|Active Deploy Tokens (%{active_tokens})") % { active_tokens: active_tokens.length }
- if active_tokens.present?
.table-responsive.deploy-tokens
%table.table
%thead
%tr
%th Name
%th Created
%th Expires
%th Scopes
%th= s_('DeployTokens|Name')
%th= s_('DeployTokens|Created')
%th= s_('DeployTokens|Expires')
%th= s_('DeployTokens|Scopes')
%th
%tbody
- active_tokens.each do |token|
......@@ -22,8 +22,8 @@
- else
%span.token-never-expires-label Never
%td= token.scopes.present? ? token.scopes.join(", ") : "<no scopes selected>"
%td= link_to "Revoke", "#", class: "btn btn-danger pull-right", data: { toggle: "modal", target: "#revoke-modal-#{token.id}"}
%td= link_to s_('DeployTokens|Revoke'), "#", class: "btn btn-danger pull-right", data: { toggle: "modal", target: "#revoke-modal-#{token.id}"}
= render 'projects/deploy_tokens/revoke_modal', token: token, project: project
- else
.settings-message.text-center
This project has no active Deploy Tokens.
= s_('DeployTokens|This project has no active Deploy Tokens.')
......@@ -30,7 +30,7 @@
%br
%p
- deploy_token = link_to(_('deploy token'), help_page_path('user/projects/deploy_tokens/index', anchor: 'read-container-registry-images'), target: '_blank')
= s_('Container-Registry|You can also %{deploy_token} for read-only access to the registry images.').html_safe % { deploy_token: deploy_token }
= s_('ContainerRegistry|You can also %{deploy_token} for read-only access to the registry images.').html_safe % { deploy_token: deploy_token }
%br
%p
= s_('ContainerRegistry|Once you log in, you&rsquo;re free to create and upload a container image using the common %{build} and %{push} commands').html_safe % { build: "<code>build</code>".html_safe, push: "<code>push</code>".html_safe }
......
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