diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-02 18:57:44 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-07 05:20:16 +0300 |
commit | 726f5bbf04b92357a11af34044a0720092797a71 (patch) | |
tree | c79f6f8a20eea9369954f16483fd9a6311f3021e /app | |
parent | 46a6036cf976d1a92dc1e7ff4994414bd43bfc78 (diff) |
Fix i18n on deploy_token views
Diffstat (limited to 'app')
7 files changed, 25 insertions, 25 deletions
diff --git a/app/presenters/projects/settings/deploy_tokens_presenter.rb b/app/presenters/projects/settings/deploy_tokens_presenter.rb index c212a1766b2..e2aca2d273a 100644 --- a/app/presenters/projects/settings/deploy_tokens_presenter.rb +++ b/app/presenters/projects/settings/deploy_tokens_presenter.rb @@ -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 diff --git a/app/views/projects/deploy_tokens/_form.html.haml b/app/views/projects/deploy_tokens/_form.html.haml index 28514a74f25..001afcf1944 100644 --- a/app/views/projects/deploy_tokens/_form.html.haml +++ b/app/views/projects/deploy_tokens/_form.html.haml @@ -1,5 +1,5 @@ %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' diff --git a/app/views/projects/deploy_tokens/_index.html.haml b/app/views/projects/deploy_tokens/_index.html.haml index 8e527dce306..2ef9d1fb4a4 100644 --- a/app/views/projects/deploy_tokens/_index.html.haml +++ b/app/views/projects/deploy_tokens/_index.html.haml @@ -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 diff --git a/app/views/projects/deploy_tokens/_new_deploy_token.html.haml b/app/views/projects/deploy_tokens/_new_deploy_token.html.haml index 31b3f0e7d18..a701817ddab 100644 --- a/app/views/projects/deploy_tokens/_new_deploy_token.html.haml +++ b/app/views/projects/deploy_tokens/_new_deploy_token.html.haml @@ -1,9 +1,9 @@ .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 diff --git a/app/views/projects/deploy_tokens/_revoke_modal.html.haml b/app/views/projects/deploy_tokens/_revoke_modal.html.haml index 6e043a72b60..085964fe22e 100644 --- a/app/views/projects/deploy_tokens/_revoke_modal.html.haml +++ b/app/views/projects/deploy_tokens/_revoke_modal.html.haml @@ -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' diff --git a/app/views/projects/deploy_tokens/_table.html.haml b/app/views/projects/deploy_tokens/_table.html.haml index 5ea9e86020f..7ef135df0f6 100644 --- a/app/views/projects/deploy_tokens/_table.html.haml +++ b/app/views/projects/deploy_tokens/_table.html.haml @@ -1,14 +1,14 @@ -%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.') diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index b4457ea63ee..2c80f7c3fa3 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -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’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 } |