diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-07 16:53:38 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-07 16:53:38 +0300 |
commit | 0c57782c8e568f360837c0633d8e98fc2ccec396 (patch) | |
tree | e0a61ed0ad689d295d72addac66c324c77eed4d8 /app | |
parent | 131ca31b23863226e57e0e3dd2ea78f91573f631 (diff) |
Add internalization
Diffstat (limited to 'app')
-rw-r--r-- | app/views/groups/runners/_group_runners.html.haml | 15 | ||||
-rw-r--r-- | app/views/groups/runners/_index.html.haml | 3 | ||||
-rw-r--r-- | app/views/groups/runners/_runner.html.haml | 8 | ||||
-rw-r--r-- | app/views/groups/settings/ci_cd/show.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/runners/_group_runners.html.haml | 29 | ||||
-rw-r--r-- | app/views/projects/runners/_runner.html.haml | 12 | ||||
-rw-r--r-- | app/views/shared/runners/_runner_description.html.haml | 12 |
7 files changed, 53 insertions, 42 deletions
diff --git a/app/views/groups/runners/_group_runners.html.haml b/app/views/groups/runners/_group_runners.html.haml index f0e8735b54e..1f9b43e8727 100644 --- a/app/views/groups/runners/_group_runners.html.haml +++ b/app/views/groups/runners/_group_runners.html.haml @@ -1,8 +1,11 @@ -%h3 Group Runners +- link = link_to 'Runners API', help_page_path('api/runners.md') + +%h3 + = _('Group Runners') .bs-callout.bs-callout-warning - GitLab Group Runners can execute code for all the projects in this group. - They can be managed using the #{link_to 'Runners API', help_page_path('api/runners.md')}. + = _('GitLab Group Runners can execute code for all the projects in this group.') + = _('They can be managed using the %{link}.').html_safe % { link: link } -# Proper policies should be implemented per -# https://gitlab.com/gitlab-org/gitlab-ce/issues/45894 @@ -11,9 +14,11 @@ locals: { registration_token: @group.runners_token, type: 'group' } - if @group.runners.empty? - %h4.underlined-title This group does not provide any group Runners yet. + %h4.underlined-title + = _('This group does not provide any group Runners yet.') - else - %h4.underlined-title Available group Runners : #{@group.runners.count} + %h4.underlined-title + = _('Available group Runners : %{runners}.').html_safe % { runners: @group.runners.count } %ul.bordered-list = render partial: 'groups/runners/runner', collection: @group.runners, as: :runner diff --git a/app/views/groups/runners/_index.html.haml b/app/views/groups/runners/_index.html.haml index 54700915448..0cf9011b471 100644 --- a/app/views/groups/runners/_index.html.haml +++ b/app/views/groups/runners/_index.html.haml @@ -2,7 +2,8 @@ %hr -%p.lead To start serving your jobs you can add Runners to your group +%p.lead + = _('To start serving your jobs you can add Runners to your group') .row .col-sm-6 = render 'groups/runners/group_runners' diff --git a/app/views/groups/runners/_runner.html.haml b/app/views/groups/runners/_runner.html.haml index b01c18f63a2..76650a961d6 100644 --- a/app/views/groups/runners/_runner.html.haml +++ b/app/views/groups/runners/_runner.html.haml @@ -6,14 +6,14 @@ %small.edit-runner = link_to edit_group_runner_path(@group, runner) do - %i.fa.fa-edit.btn + = icon('edit') .pull-right - if runner.active? - = link_to 'Pause', pause_group_runner_path(@group, runner), method: :post, class: 'btn btn-sm btn-danger', data: { confirm: "Are you sure?" } + = link_to _('Pause'), pause_group_runner_path(@group, runner), method: :post, class: 'btn btn-sm btn-danger', data: { confirm: _("Are you sure?") } - else - = link_to 'Resume', resume_group_runner_path(@group, runner), method: :post, class: 'btn btn-success btn-sm' - = link_to 'Remove Runner', group_runner_path(@group, runner), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm' + = link_to _('Resume'), resume_group_runner_path(@group, runner), method: :post, class: 'btn btn-success btn-sm' + = link_to _('Remove Runner'), group_runner_path(@group, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' .pull-right %small.light \##{runner.id} diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index 43f1f786190..082e1b7befa 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -3,25 +3,25 @@ - expanded = Rails.env.test? -%section.settings.no-animate{ class: ('expanded' if expanded) } +%section.settings#secret-variables.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 = _('Secret variables') = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'secret-variables'), target: '_blank', rel: 'noopener noreferrer' - %button.btn.js-settings-toggle - = expanded ? 'Collapse' : 'Expand' + %button.btn.btn-default.js-settings-toggle{ type: "button" } + = expanded ? _('Collapse') : _('Expand') %p.append-bottom-0 = render "ci/variables/content" .settings-content = render 'ci/variables/index', save_endpoint: group_variables_path -%section.settings.no-animate{ class: ('expanded' if expanded) } +%section.settings#runners-settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 - Runners settings - %button.btn.js-settings-toggle - = expanded ? 'Collapse' : 'Expand' + = _('Runners settings') + %button.btn.btn-default.js-settings-toggle{ type: "button" } + = expanded ? _('Collapse') : _('Expand') %p - Register and see your runners for this group. + = _('Register and see your runners for this group.') .settings-content = render 'groups/runners/index' diff --git a/app/views/projects/runners/_group_runners.html.haml b/app/views/projects/runners/_group_runners.html.haml index 04819a05e7c..6b98714319c 100644 --- a/app/views/projects/runners/_group_runners.html.haml +++ b/app/views/projects/runners/_group_runners.html.haml @@ -1,32 +1,37 @@ -%h3 Group Runners +- link = link_to 'Runners API', help_page_path('api/runners.md') + +%h3 + = _('Group Runners') .bs-callout.bs-callout-warning - GitLab Group Runners can execute code for all the projects in this group. - They can be managed using the #{link_to 'Runners API', help_page_path('api/runners.md')}. + = _('GitLab Group Runners can execute code for all the projects in this group.') + = _('They can be managed using the %{link}.').html_safe % { link: link } - if @project.group %hr - if @project.group_runners_enabled? = link_to toggle_group_runners_project_runners_path(@project), class: 'btn btn-close', method: :post do - Disable group Runners + = _('Disable group Runners') - else = link_to toggle_group_runners_project_runners_path(@project), class: 'btn btn-success', method: :post do - Enable group Runners - for this project + = _('Enable group Runners') + + = _('for this project') - if !@project.group - This project does not belong to a group and can therefore not make use of group Runners. + = _('This project does not belong to a group and can therefore not make use of group Runners.') - elsif @group_runners.empty? - This group does not provide any group Runners yet. + = _('This group does not provide any group Runners yet.') - if can?(current_user, :admin_pipeline, @project.group) - Group masters can register group runners in the - = link_to 'Group CI/CD settings', group_settings_ci_cd_path(@project.group) + - group_link = link_to 'Group CI/CD settings', group_settings_ci_cd_path(@project.group) + = _('Group masters can register group runners in the %{link}').html_safe % { link: group_link } - else - Ask your group master to setup a group Runner. + = _('Ask your group master to setup a group Runner.') - else - %h4.underlined-title Available group Runners : #{@group_runners.count} + %h4.underlined-title + = _('Available group Runners : %{runners}').html_safe % { runners: @group_runners.count } %ul.bordered-list = render partial: 'projects/runners/runner', collection: @group_runners, as: :runner diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml index 894e7d72ce0..69218f344f7 100644 --- a/app/views/projects/runners/_runner.html.haml +++ b/app/views/projects/runners/_runner.html.haml @@ -6,7 +6,7 @@ = link_to runner.short_sha, project_runner_path(@project, runner), class: 'commit-sha' - if runner.locked? - = icon('lock', class: 'has-tooltip', title: 'Locked to current projects') + = icon('lock', class: 'has-tooltip', title: _('Locked to current projects')) %small.edit-runner = link_to edit_project_runner_path(@project, runner) do @@ -18,18 +18,18 @@ .pull-right - if @project_runners.include?(runner) - if runner.active? - = link_to 'Pause', pause_project_runner_path(@project, runner), method: :post, class: 'btn btn-sm btn-danger', data: { confirm: "Are you sure?" } + = link_to _('Pause'), pause_project_runner_path(@project, runner), method: :post, class: 'btn btn-sm btn-danger', data: { confirm: _("Are you sure?") } - else - = link_to 'Resume', resume_project_runner_path(@project, runner), method: :post, class: 'btn btn-success btn-sm' + = link_to _('Resume'), resume_project_runner_path(@project, runner), method: :post, class: 'btn btn-success btn-sm' - if runner.belongs_to_one_project? - = link_to 'Remove Runner', project_runner_path(@project, runner), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm' + = link_to _('Remove Runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' - else - runner_project = @project.runner_projects.find_by(runner_id: runner) - = link_to 'Disable for this project', project_runner_project_path(@project, runner_project), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm' + = link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' - elsif !(runner.is_shared? || runner.group_type?) # We can simplify this to `runner.project_type?` when migrating #runner_type is complete = form_for [@project.namespace.becomes(Namespace), @project, @project.runner_projects.new] do |f| = f.hidden_field :runner_id, value: runner.id - = f.submit 'Enable for this project', class: 'btn btn-sm' + = f.submit _('Enable for this project'), class: 'btn btn-sm' .pull-right %small.light \##{runner.id} diff --git a/app/views/shared/runners/_runner_description.html.haml b/app/views/shared/runners/_runner_description.html.haml index 24d5f7fe761..1d59c2f7078 100644 --- a/app/views/shared/runners/_runner_description.html.haml +++ b/app/views/shared/runners/_runner_description.html.haml @@ -1,16 +1,16 @@ .light.prepend-top-default %p - A 'Runner' is a process which runs a job. - You can setup as many Runners as you need. + = _("A 'Runner' is a process which runs a job. You can setup as many Runners as you need.") %br - Runners can be placed on separate users, servers, and even on your local machine. + = _('Runners can be placed on separate users, servers, and even on your local machine.') - %p Each Runner can be in one of the following states: + %p + = _('Each Runner can be in one of the following states:') %div %ul %li %span.label.label-success active - \- Runner is active and can process any new jobs + = _('- Runner is active and can process any new jobs') %li %span.label.label-danger paused - \- Runner is paused and will not receive any new jobs + = _('- Runner is paused and will not receive any new jobs') |