diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-07 16:46:10 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-08 10:38:55 +0300 |
commit | 68f58e1b44054efbf47880ebba5104870b069524 (patch) | |
tree | 1e682c3f86495d35273921735dc139803f8191d4 /app/views | |
parent | acdd1bf7c92b7e9cdbd579df8faca5ea7783489f (diff) |
Allow translation of Pipeline Schedules
Diffstat (limited to 'app/views')
7 files changed, 30 insertions, 30 deletions
diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml index bbed10039af..25ae4e0e18f 100644 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ b/app/views/projects/pipeline_schedules/_form.html.haml @@ -6,28 +6,28 @@ = form_errors(@schedule) .form-group .col-md-9 - = f.label :description, 'Description', class: 'label-light' - = f.text_field :description, class: 'form-control', required: true, autofocus: true, placeholder: 'Provide a short description for this pipeline' + = f.label :description, _('Description'), class: 'label-light' + = f.text_field :description, class: 'form-control', required: true, autofocus: true, placeholder: _('PipelineSchedules|Provide a short description for this pipeline') .form-group .col-md-9 - = f.label :cron, 'Interval Pattern', class: 'label-light' + = f.label :cron, _('Interval Pattern'), class: 'label-light' #interval-pattern-input{ data: { initial_interval: @schedule.cron } } .form-group .col-md-9 - = f.label :cron_timezone, 'Cron Timezone', class: 'label-light' - = dropdown_tag("Select a timezone", options: { toggle_class: 'btn js-timezone-dropdown', title: "Select a timezone", filter: true, placeholder: "Filter", data: { data: timezone_data } } ) + = f.label :cron_timezone, _('Cron Timezone'), class: 'label-light' + = dropdown_tag(_("Select a timezone"), options: { toggle_class: 'btn js-timezone-dropdown', title: _("Select a timezone"), filter: true, placeholder: _("Filter"), data: { data: timezone_data } } ) = f.text_field :cron_timezone, value: @schedule.cron_timezone, id: 'schedule_cron_timezone', class: 'hidden', name: 'schedule[cron_timezone]', required: true .form-group .col-md-9 - = f.label :ref, 'Target Branch', class: 'label-light' - = dropdown_tag("Select target branch", options: { toggle_class: 'btn js-target-branch-dropdown git-revision-dropdown-toggle', dropdown_class: 'git-revision-dropdown', title: "Select target branch", filter: true, placeholder: "Filter", data: { data: @project.repository.branch_names, default_branch: @project.default_branch } } ) + = f.label :ref, _('Target Branch'), class: 'label-light' + = dropdown_tag(_("Select target branch"), options: { toggle_class: 'btn js-target-branch-dropdown git-revision-dropdown-toggle', dropdown_class: 'git-revision-dropdown', title: _("Select target branch"), filter: true, placeholder: _("Filter"), data: { data: @project.repository.branch_names, default_branch: @project.default_branch } } ) = f.text_field :ref, value: @schedule.ref, id: 'schedule_ref', class: 'hidden', name: 'schedule[ref]', required: true .form-group .col-md-9 - = f.label :active, 'Activated', class: 'label-light' + = f.label :active, _('PipelineSchedules|Activated'), class: 'label-light' %div = f.check_box :active, required: false, value: @schedule.active? Active .footer-block.row-content-block - = f.submit 'Save pipeline schedule', class: 'btn btn-create', tabindex: 3 - = link_to 'Cancel', pipeline_schedules_path(@project), class: 'btn btn-cancel' + = f.submit _('Save pipeline schedule'), class: 'btn btn-create', tabindex: 3 + = link_to _('Cancel'), pipeline_schedules_path(@project), class: 'btn btn-cancel' diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index 7bde839e26f..2d3344a4aaf 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -13,12 +13,12 @@ = ci_icon_for_status(pipeline_schedule.last_pipeline.status) %span ##{pipeline_schedule.last_pipeline.id} - else - None + = _("PipelineSchedules|None") %td.next-run-cell - if pipeline_schedule.active? = time_ago_with_tooltip(pipeline_schedule.real_next_run) - else - Inactive + = _("PipelineSchedules|Inactive") %td - if pipeline_schedule.owner = image_tag avatar_icon(pipeline_schedule.owner, 20), class: "avatar s20" @@ -27,11 +27,11 @@ %td .pull-right.btn-group - if can?(current_user, :update_pipeline_schedule, @project) && !pipeline_schedule.owned_by?(current_user) - = link_to take_ownership_pipeline_schedule_path(pipeline_schedule), method: :post, title: 'Take Ownership', class: 'btn' do - Take ownership + = link_to take_ownership_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('PipelineSchedules|Take ownership'), class: 'btn' do + = s_('PipelineSchedules|Take ownership') - if can?(current_user, :update_pipeline_schedule, pipeline_schedule) - = link_to edit_pipeline_schedule_path(pipeline_schedule), title: 'Edit', class: 'btn' do + = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn' do = icon('pencil') - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) - = link_to pipeline_schedule_path(pipeline_schedule), title: 'Delete', method: :delete, class: 'btn btn-remove', data: { confirm: "Are you sure you want to cancel this pipeline?" } do + = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn btn-remove', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do = icon('trash') diff --git a/app/views/projects/pipeline_schedules/_table.html.haml b/app/views/projects/pipeline_schedules/_table.html.haml index 25c7604eb24..d0c7ea77263 100644 --- a/app/views/projects/pipeline_schedules/_table.html.haml +++ b/app/views/projects/pipeline_schedules/_table.html.haml @@ -2,11 +2,11 @@ %table.table.ci-table %thead %tr - %th Description - %th Target - %th Last Pipeline - %th Next Run - %th Owner + %th= _("Description") + %th= s_("PipelineSchedules|Target") + %th= _("Last Pipeline") + %th= s_("PipelineSchedules|Next Run") + %th= _("Owner") %th = render partial: "pipeline_schedule", collection: @schedules diff --git a/app/views/projects/pipeline_schedules/_tabs.html.haml b/app/views/projects/pipeline_schedules/_tabs.html.haml index 2a1fb16876a..7fcb624a9dd 100644 --- a/app/views/projects/pipeline_schedules/_tabs.html.haml +++ b/app/views/projects/pipeline_schedules/_tabs.html.haml @@ -1,18 +1,18 @@ %ul.nav-links %li{ class: active_when(scope.nil?) }> = link_to schedule_path_proc.call(nil) do - All + = s_("PipelineSchedules|All") %span.badge.js-totalbuilds-count = number_with_delimiter(all_schedules.count(:id)) %li{ class: active_when(scope == 'active') }> = link_to schedule_path_proc.call('active') do - Active + = s_("PipelineSchedules|Active") %span.badge = number_with_delimiter(all_schedules.active.count(:id)) %li{ class: active_when(scope == 'inactive') }> = link_to schedule_path_proc.call('inactive') do - Inactive + = s_("PipelineSchedules|Inactive") %span.badge = number_with_delimiter(all_schedules.inactive.count(:id)) diff --git a/app/views/projects/pipeline_schedules/edit.html.haml b/app/views/projects/pipeline_schedules/edit.html.haml index e16fe0b7a98..9b2a7b5821d 100644 --- a/app/views/projects/pipeline_schedules/edit.html.haml +++ b/app/views/projects/pipeline_schedules/edit.html.haml @@ -1,7 +1,7 @@ -- page_title "Edit", @schedule.description, "Pipeline Schedule" +- page_title _("Edit"), @schedule.description, _("Pipeline Schedule") %h3.page-title - Edit Pipeline Schedule #{@schedule.id} + = _("Edit Pipeline Schedule %{id}") % { id: @schedule.id } %hr = render "form" diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 6751efaaf2f..4a96ee652d2 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -3,7 +3,7 @@ = webpack_bundle_tag 'schedules_index' - @no_container = true -- page_title "Pipeline Schedules" +- page_title _("Pipeline Schedules") = render "projects/pipelines/head" %div{ class: container_class } @@ -21,4 +21,4 @@ = render partial: "table" - else .light-well - .nothing-here-block No schedules + .nothing-here-block= _("No schedules") diff --git a/app/views/projects/pipeline_schedules/new.html.haml b/app/views/projects/pipeline_schedules/new.html.haml index b89e170ad3c..87390d4dd02 100644 --- a/app/views/projects/pipeline_schedules/new.html.haml +++ b/app/views/projects/pipeline_schedules/new.html.haml @@ -1,7 +1,7 @@ -- page_title "New Pipeline Schedule" +- page_title _("New Pipeline Schedule") %h3.page-title - Schedule a new pipeline + = _("Schedule a new pipeline") %hr = render "form" |