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

Fix i18n on deploy_token views

parent 46a6036c
...@@ -44,8 +44,8 @@ module Projects ...@@ -44,8 +44,8 @@ module Projects
def scope_descriptions def scope_descriptions
{ {
'read_repo' => s_('Allows read-only access to the repository'), 'read_repo' => s_('DeployTokens|Allows read-only access to the repository'),
'read_registry' => s_('Allows read-only access to the registry images') 'read_registry' => s_('DeployTokens|Allows read-only access to the registry images')
} }
end end
......
%p.profile-settings-content %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_for token, url: project_deploy_tokens_path(project), method: :post do |f|
= form_errors(token) = form_errors(token)
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
= render 'projects/deploy_tokens/scope_form', token: token, scope: scope, presenter: presenter = render 'projects/deploy_tokens/scope_form', token: token, scope: scope, presenter: presenter
.prepend-top-default .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 @@ ...@@ -2,17 +2,17 @@
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4= s_('Deploy Tokens') %h4= s_('DeployTokens|Deploy Tokens')
%button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } %button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' }
= expanded ? 'Collapse' : 'Expand' = expanded ? 'Collapse' : 'Expand'
%p %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 .settings-content
- if @deploy_tokens.temporal_token - if @deploy_tokens.temporal_token
= render 'projects/deploy_tokens/new_deploy_token', new_token: @deploy_tokens.temporal_token = render 'projects/deploy_tokens/new_deploy_token', new_token: @deploy_tokens.temporal_token
%h5.prepend-top-0 %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 = render 'projects/deploy_tokens/form', project: @project, token: @deploy_token, presenter: @deploy_tokens
%hr %hr
= render 'projects/deploy_tokens/table', project: @project, active_tokens: @deploy_tokens = render 'projects/deploy_tokens/table', project: @project, active_tokens: @deploy_tokens
.created-deploy-token-container .created-deploy-token-container
%h5.prepend-top-0 %h5.prepend-top-0
= s_('Your New Deploy Token') = s_('DeployTokens|Your New Deploy Token')
.form-group .form-group
= text_field_tag 'deploy-token', new_token, readonly: true, class: 'deploy-token-field form-control js-select-on-focus' = 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') = 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_("Make sure you save it - you won't be able to access it again.") %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 %hr
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
.modal-content .modal-content
.modal-header .modal-header
%h4.modal-title.pull-left %h4.modal-title.pull-left
Revoke = s_('DeployTokens|Revoke')
%b #{token.name}? %b #{token.name}?
%button.close{ 'aria-label' => 'Close', 'data-dismiss' => 'modal', type: 'button' } %button.close{ 'aria-label' => _('Close'), 'data-dismiss' => 'modal', type: 'button' }
%span{ 'aria-hidden' => 'true' } × %span{ 'aria-hidden' => 'true' } ×
.modal-body .modal-body
%p %p
= s_('You are about to revoke') = s_('DeployTokens|You are about to revoke')
%b #{token.name}. %b #{token.name}.
= s_('This action cannot be undone.') = s_('DeployTokens|This action cannot be undone.')
.modal-footer .modal-footer
%a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= s_('Cancel') %a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= _('Cancel')
= link_to "Revoke #{token.name}", revoke_project_deploy_token_path(project, token), method: :put, class: 'btn btn-danger' = 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? - if active_tokens.present?
.table-responsive.deploy-tokens .table-responsive.deploy-tokens
%table.table %table.table
%thead %thead
%tr %tr
%th Name %th= s_('DeployTokens|Name')
%th Created %th= s_('DeployTokens|Created')
%th Expires %th= s_('DeployTokens|Expires')
%th Scopes %th= s_('DeployTokens|Scopes')
%th %th
%tbody %tbody
- active_tokens.each do |token| - active_tokens.each do |token|
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
- else - else
%span.token-never-expires-label Never %span.token-never-expires-label Never
%td= token.scopes.present? ? token.scopes.join(", ") : "<no scopes selected>" %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 = render 'projects/deploy_tokens/revoke_modal', token: token, project: project
- else - else
.settings-message.text-center .settings-message.text-center
This project has no active Deploy Tokens. = s_('DeployTokens|This project has no active Deploy Tokens.')
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
%br %br
%p %p
- deploy_token = link_to(_('deploy token'), help_page_path('user/projects/deploy_tokens/index', anchor: 'read-container-registry-images'), target: '_blank') - 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 %br
%p %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 } = 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