aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/referentials
diff options
context:
space:
mode:
authorcedricnjanga2017-07-26 12:41:32 +0200
committercedricnjanga2017-07-26 12:51:18 +0200
commita7ca8eeac674263bf569ad0010cb4ebdd298ddc0 (patch)
tree76992a3138f9b2355522080da85ca6fa7dc0affa /app/views/referentials
parentd4df8c81179d0e396db562f1d7331ca6f3ed0a5a (diff)
downloadchouette-core-a7ca8eeac674263bf569ad0010cb4ebdd298ddc0.tar.bz2
Add some translations
Diffstat (limited to 'app/views/referentials')
-rw-r--r--app/views/referentials/_filters.html.slim4
-rw-r--r--app/views/referentials/_form.html.slim4
-rw-r--r--app/views/referentials/_period_fields.html.slim2
-rw-r--r--app/views/referentials/index.html.slim6
-rw-r--r--app/views/referentials/show.html.slim8
5 files changed, 12 insertions, 12 deletions
diff --git a/app/views/referentials/_filters.html.slim b/app/views/referentials/_filters.html.slim
index 9302ccaa8..1cc6bb410 100644
--- a/app/views/referentials/_filters.html.slim
+++ b/app/views/referentials/_filters.html.slim
@@ -20,5 +20,5 @@
= f.input :company_id_eq_any, collection: LineReferential.first.companies.order('name').pluck(:id), as: :check_boxes, label: false, label_method: lambda{|l| ("<span>#{LineReferential.first.companies.find(l).name}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.actions
- = link_to 'Effacer', @workbench, class: 'btn btn-link'
- = f.submit 'Filtrer', class: 'btn btn-default'
+ = link_to t('actions.erase'), @workbench, class: 'btn btn-link'
+ = f.submit t('actions.filter'), class: 'btn btn-default'
diff --git a/app/views/referentials/_form.html.slim b/app/views/referentials/_form.html.slim
index 31d71bcdc..a9e308699 100644
--- a/app/views/referentials/_form.html.slim
+++ b/app/views/referentials/_form.html.slim
@@ -42,11 +42,11 @@
= render 'period_fields', f: period_form
.links.nested-linker
- = link_to_add_association 'Ajouter une période', subform, :periods, class: 'btn btn-outline-primary'
+ = link_to_add_association t('simple_form.labels.referential.actions.add_period'), subform, :periods, class: 'btn btn-outline-primary'
.separator
- = subform.input :lines, as: :select, collection: @referential.workbench.lines.includes(:company).order(:name), selected: subform.object.line_ids, label_method: :display_name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Sélection de lignes', 'multiple': 'multiple', style: 'width: 100%' }
+ = subform.input :lines, as: :select, collection: @referential.workbench.lines.includes(:company).order(:name), selected: subform.object.line_ids, label_method: :display_name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': t('simple_form.labels.referential.placeholders.select_lines'), 'multiple': 'multiple', style: 'width: 100%' }
.hidden = form.input :workbench_id, as: :hidden
diff --git a/app/views/referentials/_period_fields.html.slim b/app/views/referentials/_period_fields.html.slim
index 95e204554..4d2372f7b 100644
--- a/app/views/referentials/_period_fields.html.slim
+++ b/app/views/referentials/_period_fields.html.slim
@@ -12,4 +12,4 @@
div
= f.input :end, as: :date, label: false, wrapper_html: { class: 'date smart_date' }
div
- = link_to_remove_association '', f, class: 'fa fa-trash', data: { confirm: 'Etes-vous sûr(e) ?' }, title: t('actions.delete')
+ = link_to_remove_association '', f, class: 'fa fa-trash', data: { confirm: t('are_you_sure')}, title: t('actions.delete')
diff --git a/app/views/referentials/index.html.slim b/app/views/referentials/index.html.slim
index 8943d419c..8bb66da21 100644
--- a/app/views/referentials/index.html.slim
+++ b/app/views/referentials/index.html.slim
@@ -1,7 +1,7 @@
/ FIXME #827
- current_organisation.workbenches.each do |workbench|
h2 = link_to workbench.name, workbench
- p = "#{workbench.referentials.count} jeu(x) de données à l'heure actuelle"
+ p = t('workbenches.referential_count', count: workbench.referentials.count)
/ FIXME #823
- if false
@@ -11,8 +11,8 @@
- content_for :sidebar do
ul.actions
- li = link_to 'Données Reflex', stop_area_referential_path(1)
- li = link_to 'Données CodifLigne', line_referential_path(1)
+ li = link_to t('reflex_data'), stop_area_referential_path(1)
+ li = link_to t('codif_data'), line_referential_path(1)
li = link_to t('calendars.standard_calendars'), calendars_path
- if false
li = link_to t('referentials.actions.new'), new_referential_path, class: 'add'
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim
index 425f8014a..49c152789 100644
--- a/app/views/referentials/show.html.slim
+++ b/app/views/referentials/show.html.slim
@@ -24,7 +24,7 @@
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
- { 'Statut' => @referential.archived? ? "<div class='td-block'><span class='fa fa-archive'></span><span>Conservé</span></div>".html_safe : "<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>En préparation</span></div>".html_safe,
+ { t('activerecord.attributes.referential.status') => @referential.archived? ? "<div class='td-block'><span class='fa fa-archive'></span><span>#{t('activerecord.attributes.referential.archived_at')}</span></div>".html_safe : "<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>#{t('activerecord.attributes.referential.archived_at_null')}</span></div>".html_safe,
@referential.human_attribute_name(:validity_period) => (@referential.validity_period.present? ? t('validity_range', debut: l(@referential.try(:validity_period).try(:begin), format: :short), end: l(@referential.try(:validity_period).try(:end), format: :short)) : '-'),
@referential.human_attribute_name(:organisation) => @referential.organisation.name,
@referential.human_attribute_name(:published_at) => '-' }
@@ -41,7 +41,7 @@
= table_builder_2 @reflines,
[ \
TableBuilderHelper::Column.new( \
- name: 'ID Codifligne', \
+ name: t('id_codif'), \
attribute: Proc.new { |n| n.objectid.local_id }, \
sortable: false \
), \
@@ -85,7 +85,7 @@
= modalbox 'purgeModal' do
= simple_form_for [@referential, CleanUp.new] do |f|
.modal-header
- h4.modal-title Purger le JDD
+ h4.modal-title #{t('simple_form.labels.clean_up.title')}
.modal-body
.container-fluid
.row
@@ -100,6 +100,6 @@
= f.input :end_date, as: :date, label: t('titles.clean_up.end_date'), wrapper_html: { class: 'date cleanup_end_date_wrapper smart_date', id: "end_date" }
.modal-footer
- button.btn.btn-link type='button' data-dismiss='modal' Annuler
+ button.btn.btn-link type='button' data-dismiss='modal' #{t('cancel')}
- unless policy(@referential).archived?
= f.button :submit, t('actions.clean_up') , class: 'btn btn-primary'