From ae86a65dba661499a392125cce205025a013c59c Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Mon, 19 Nov 2018 22:53:14 +0200 Subject: [PATCH] Externalize strings from `/app/views/project/runners` --- app/views/projects/runners/_index.html.haml | 2 +- .../runners/_shared_runners.html.haml | 10 ++++----- .../runners/_specific_runners.html.haml | 4 ++-- app/views/projects/runners/edit.html.haml | 2 +- ...-externalize-app-views-project-runners.yml | 5 +++++ locale/gitlab.pot | 21 +++++++++++++++++++ 6 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 changelogs/unreleased/gt-externalize-app-views-project-runners.yml diff --git a/app/views/projects/runners/_index.html.haml b/app/views/projects/runners/_index.html.haml index 022687b831f..ae4fee1e14c 100644 --- a/app/views/projects/runners/_index.html.haml +++ b/app/views/projects/runners/_index.html.haml @@ -2,7 +2,7 @@ %hr -%p.lead To start serving your jobs you can either add specific Runners to your project or use shared Runners +%p.lead= _('To start serving your jobs you can either add specific Runners to your project or use shared Runners') .row .col-sm-6 = render 'projects/runners/specific_runners' diff --git a/app/views/projects/runners/_shared_runners.html.haml b/app/views/projects/runners/_shared_runners.html.haml index 20a5ef039f8..dc3fb43526a 100644 --- a/app/views/projects/runners/_shared_runners.html.haml +++ b/app/views/projects/runners/_shared_runners.html.haml @@ -5,21 +5,19 @@ - if Gitlab::CurrentSettings.shared_runners_text.present? = markdown_field(Gitlab::CurrentSettings.current_application_settings, :shared_runners_text) - else - GitLab Shared Runners execute code of different projects on the same Runner - unless you configure GitLab Runner Autoscale with MaxBuilds 1 (which it is - on GitLab.com). + = _('GitLab Shared Runners execute code of different projects on the same Runner unless you configure GitLab Runner Autoscale with MaxBuilds 1 (which it is on GitLab.com).') %hr - if @project.shared_runners_enabled? = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-close', method: :post do - Disable shared Runners + = _('Disable shared Runners') - else = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-success', method: :post do - Enable shared Runners + = _('Enable shared Runners')   for this project - if @shared_runners_count.zero? = _('This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area.') - else - %h4.underlined-title Available shared Runners : #{@shared_runners_count} + %h4.underlined-title #{_('Available shared Runners :')} #{@shared_runners_count} %ul.bordered-list.available-shared-runners = render partial: 'projects/runners/runner', collection: @shared_runners, as: :runner diff --git a/app/views/projects/runners/_specific_runners.html.haml b/app/views/projects/runners/_specific_runners.html.haml index ec503cd8bef..dc56a515d4c 100644 --- a/app/views/projects/runners/_specific_runners.html.haml +++ b/app/views/projects/runners/_specific_runners.html.haml @@ -31,12 +31,12 @@ reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path } - if @project_runners.any? - %h4.underlined-title Runners activated for this project + %h4.underlined-title= _('Runners activated for this project') %ul.bordered-list.activated-specific-runners = render partial: 'projects/runners/runner', collection: @project_runners, as: :runner - if @assignable_runners.any? - %h4.underlined-title Available specific runners + %h4.underlined-title= _('Available specific runners') %ul.bordered-list.available-specific-runners = render partial: 'projects/runners/runner', collection: @assignable_runners, as: :runner = paginate @assignable_runners, theme: "gitlab", :params => { :anchor => '#js-runners-settings' } diff --git a/app/views/projects/runners/edit.html.haml b/app/views/projects/runners/edit.html.haml index d59f9c19862..b9d8e154913 100644 --- a/app/views/projects/runners/edit.html.haml +++ b/app/views/projects/runners/edit.html.haml @@ -1,4 +1,4 @@ -- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", 'Runners' +- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners') %h4 Runner ##{@runner.id} diff --git a/changelogs/unreleased/gt-externalize-app-views-project-runners.yml b/changelogs/unreleased/gt-externalize-app-views-project-runners.yml new file mode 100644 index 00000000000..d7d591e2175 --- /dev/null +++ b/changelogs/unreleased/gt-externalize-app-views-project-runners.yml @@ -0,0 +1,5 @@ +--- +title: Externalize strings from `/app/views/project/runners` +merge_request: 23208 +author: Tao Wang +type: other diff --git a/locale/gitlab.pot b/locale/gitlab.pot index ff4fd0c8aec..a406e86d431 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -810,6 +810,12 @@ msgstr "" msgid "Available group Runners : %{runners}." msgstr "" +msgid "Available shared Runners :" +msgstr "" + +msgid "Available specific runners" +msgstr "" + msgid "Avatar will be removed. Are you sure?" msgstr "" @@ -2450,6 +2456,9 @@ msgstr "" msgid "Disable group Runners" msgstr "" +msgid "Disable shared Runners" +msgstr "" + msgid "Discard" msgstr "" @@ -2591,6 +2600,9 @@ msgstr "" msgid "Enable reCAPTCHA or Akismet and set IP limits." msgstr "" +msgid "Enable shared Runners" +msgstr "" + msgid "Enable the Performance Bar for a given group." msgstr "" @@ -3050,6 +3062,9 @@ msgstr "" msgid "GitLab Import" msgstr "" +msgid "GitLab Shared Runners execute code of different projects on the same Runner unless you configure GitLab Runner Autoscale with MaxBuilds 1 (which it is on GitLab.com)." +msgstr "" + msgid "GitLab User" msgstr "" @@ -5470,6 +5485,9 @@ msgstr "" msgid "Runners API" msgstr "" +msgid "Runners activated for this project" +msgstr "" + msgid "Runners can be placed on separate users, servers, and even on your local machine." msgstr "" @@ -6717,6 +6735,9 @@ msgstr "" msgid "To start serving your jobs you can add Runners to your group" msgstr "" +msgid "To start serving your jobs you can either add specific Runners to your project or use shared Runners" +msgstr "" + msgid "To this GitLab instance" msgstr ""