diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-01-28 04:03:52 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-01-28 04:44:36 +0000 |
commit | 0a8f03aa9936fe0d1a80080eaddc3fb323ffd719 (patch) | |
tree | 48903502b3a3ad41f4d54c2f231fff7ebaa0b2e5 | |
parent | c243b154abf5c29ba35fd2fab2ca3bc010fdc324 (diff) | |
download | gitlab-ce-0a8f03aa9936fe0d1a80080eaddc3fb323ffd719.tar.gz |
Externalize admin CI jobs stringsjobs-ext
-rw-r--r-- | app/views/admin/jobs/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/ci/builds/_build.html.haml | 26 | ||||
-rw-r--r-- | app/views/projects/jobs/_table.html.haml | 18 | ||||
-rw-r--r-- | app/views/shared/builds/_tabs.html.haml | 8 | ||||
-rw-r--r-- | changelogs/unreleased/jobs-ext.yml | 5 | ||||
-rw-r--r-- | locale/gitlab.pot | 39 |
6 files changed, 72 insertions, 28 deletions
diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index 4e3e2f7a475..01d4a9b6c4d 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -1,4 +1,4 @@ -- breadcrumb_title "Jobs" +- breadcrumb_title _('Jobs') - @no_container = true %div{ class: container_class } @@ -16,7 +16,7 @@ = s_('AdminArea|Stop all jobs') .row-content-block.second-block - #{(@scope || 'all').capitalize} jobs + = _("%{scope} jobs") % { scope: (@scope || 'all').capitalize } %ul.content-list.builds-content-list.admin-builds-table = render "projects/jobs/table", builds: @builds, admin: true diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 44e9cb84341..c8b66d2ad07 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -25,7 +25,7 @@ = job.tag? ? icon('tag') : sprite_icon('fork', css_class: 'sprite') = link_to job.ref, project_ref_path(job.project, job.ref), class: "ref-name" - else - .light none + .light= _('none') .icon-container.commit-icon = custom_icon("icon_commit") @@ -33,10 +33,10 @@ = link_to job.short_sha, project_commit_path(job.project, job.sha), class: "commit-sha" - if job.stuck? - = icon('warning', class: 'text-warning has-tooltip', title: 'Job is stuck. Check runners.') + = icon('warning', class: 'text-warning has-tooltip', title: _('Job is stuck. Check runners.')) - if retried - = icon('refresh', class: 'text-warning has-tooltip', title: 'Job was retried') + = icon('refresh', class: 'text-warning has-tooltip', title: _('Job was retried')) .label-container - if job.tags.any? @@ -44,23 +44,23 @@ %span.badge.badge-primary = tag - if job.try(:trigger_request) - %span.badge.badge-info triggered + %span.badge.badge-info= _('triggered') - if job.try(:allow_failure) - %span.badge.badge-danger allowed to fail + %span.badge.badge-danger= _('allowed to fail') - if job.schedulable? %span.badge.badge-info= s_('DelayedJobs|delayed') - elsif job.action? - %span.badge.badge-info manual + %span.badge.badge-info= _('manual') - if pipeline_link %td = link_to pipeline_path(pipeline) do %span.pipeline-id ##{pipeline.id} - %span by + %span= _('by') - if pipeline.user = user_avatar(user: pipeline.user, size: 20) - else - %span.monospace API + %span.monospace= _('API') - if admin %td @@ -70,7 +70,7 @@ - if job.try(:runner) = runner_link(job.runner) - else - .light none + .light= _('none') - if stage %td @@ -97,11 +97,11 @@ %td .float-right - if can?(current_user, :read_build, job) && job.artifacts? - = link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: 'Download artifacts', class: 'btn btn-build' do + = link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: _('Download artifacts'), class: 'btn btn-build' do = sprite_icon('download') - if can?(current_user, :update_build, job) - if job.active? - = link_to cancel_project_job_path(job.project, job, continue: { to: request.fullpath }), method: :post, title: 'Cancel', class: 'btn btn-build' do + = link_to cancel_project_job_path(job.project, job, continue: { to: request.fullpath }), method: :post, title: _('Cancel'), class: 'btn btn-build' do = icon('remove', class: 'cred') - elsif job.scheduled? .btn-group @@ -123,8 +123,8 @@ = sprite_icon('time-out') - elsif allow_retry - if job.playable? && !admin && can?(current_user, :update_build, job) - = link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: 'Play', class: 'btn btn-build' do + = link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Play'), class: 'btn btn-build' do = custom_icon('icon_play') - elsif job.retryable? - = link_to retry_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do + = link_to retry_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build' do = icon('repeat') diff --git a/app/views/projects/jobs/_table.html.haml b/app/views/projects/jobs/_table.html.haml index d124d3ebfc1..15d0bc54b1c 100644 --- a/app/views/projects/jobs/_table.html.haml +++ b/app/views/projects/jobs/_table.html.haml @@ -2,22 +2,22 @@ - if builds.blank? %div - .nothing-here-block No jobs to show + .nothing-here-block= _('No jobs to show') - else .table-holder %table.table.ci-table.builds-page %thead %tr - %th Status - %th Job - %th Pipeline + %th= _('Status') + %th= _('Job') + %th= _('Pipeline') - if admin - %th Project - %th Runner - %th Stage - %th Name + %th= _('Project') + %th= _('Runner') + %th= _('Stage') + %th= _('Name') %th - %th Coverage + %th= _('Coverage') %th = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, pipeline_link: true, stage: true, allow_retry: true, admin: admin } diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml index 5c74e71b644..1e9bb0a3322 100644 --- a/app/views/shared/builds/_tabs.html.haml +++ b/app/views/shared/builds/_tabs.html.haml @@ -1,24 +1,24 @@ %ul.nav-links.mobile-separator.nav.nav-tabs %li{ class: active_when(scope.nil?) }> = link_to build_path_proc.call(nil) do - All + = _('All') %span.badge.badge-pill.js-totalbuilds-count = limited_counter_with_delimiter(all_builds) %li{ class: active_when(scope == 'pending') }> = link_to build_path_proc.call('pending') do - Pending + = _('Pending') %span.badge.badge-pill = limited_counter_with_delimiter(all_builds.pending) %li{ class: active_when(scope == 'running') }> = link_to build_path_proc.call('running') do - Running + = _('Running') %span.badge.badge-pill = limited_counter_with_delimiter(all_builds.running) %li{ class: active_when(scope == 'finished') }> = link_to build_path_proc.call('finished') do - Finished + = _('Finished') %span.badge.badge-pill = limited_counter_with_delimiter(all_builds.finished) diff --git a/changelogs/unreleased/jobs-ext.yml b/changelogs/unreleased/jobs-ext.yml new file mode 100644 index 00000000000..078bf0c8b1e --- /dev/null +++ b/changelogs/unreleased/jobs-ext.yml @@ -0,0 +1,5 @@ +--- +title: Externalize admin CI jobs strings +merge_request: +author: +type: other diff --git a/locale/gitlab.pot b/locale/gitlab.pot index a72e921dcce..18179b73840 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -150,6 +150,9 @@ msgstr "" msgid "%{percent}%% complete" msgstr "" +msgid "%{scope} jobs" +msgstr "" + msgid "%{strong_start}%{branch_count}%{strong_end} Branch" msgid_plural "%{strong_start}%{branch_count}%{strong_end} Branches" msgstr[0] "" @@ -321,6 +324,9 @@ msgstr "" msgid "A user with write access to the source branch selected this option" msgstr "" +msgid "API" +msgstr "" + msgid "About GitLab" msgstr "" @@ -2210,6 +2216,9 @@ msgstr "" msgid "Could not retrieve the pipeline status. For troubleshooting steps, read the %{linkStart}documentation.%{linkEnd}" msgstr "" +msgid "Coverage" +msgstr "" + msgid "Create" msgstr "" @@ -2674,6 +2683,9 @@ msgstr "" msgid "Download" msgstr "" +msgid "Download artifacts" +msgstr "" + msgid "Download asset" msgstr "" @@ -3885,6 +3897,12 @@ msgstr "" msgid "Job has been erased" msgstr "" +msgid "Job is stuck. Check runners." +msgstr "" + +msgid "Job was retried" +msgstr "" + msgid "Jobs" msgstr "" @@ -4623,6 +4641,9 @@ msgstr "" msgid "No files found." msgstr "" +msgid "No jobs to show" +msgstr "" + msgid "No labels with such name or description" msgstr "" @@ -5970,6 +5991,9 @@ msgstr "" msgid "Run untagged jobs" msgstr "" +msgid "Runner" +msgstr "" + msgid "Runner cannot be assigned to other projects" msgstr "" @@ -8172,6 +8196,9 @@ msgstr "" msgid "ago" msgstr "" +msgid "allowed to fail" +msgstr "" + msgid "among other things" msgstr "" @@ -8184,6 +8211,9 @@ msgstr "" msgid "branch name" msgstr "" +msgid "by" +msgstr "" + msgid "command line instructions" msgstr "" @@ -8290,6 +8320,9 @@ msgstr "" msgid "latest version" msgstr "" +msgid "manual" +msgstr "" + msgid "merge request" msgid_plural "merge requests" msgstr[0] "" @@ -8496,6 +8529,9 @@ msgstr "" msgid "new merge request" msgstr "" +msgid "none" +msgstr "" + msgid "notification emails" msgstr "" @@ -8571,6 +8607,9 @@ msgstr "" msgid "this document" msgstr "" +msgid "triggered" +msgstr "" + msgid "updated" msgstr "" |