aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedricnjanga2017-07-26 12:41:32 +0200
committercedricnjanga2017-07-26 12:51:18 +0200
commita7ca8eeac674263bf569ad0010cb4ebdd298ddc0 (patch)
tree76992a3138f9b2355522080da85ca6fa7dc0affa
parentd4df8c81179d0e396db562f1d7331ca6f3ed0a5a (diff)
downloadchouette-core-a7ca8eeac674263bf569ad0010cb4ebdd298ddc0.tar.bz2
Add some translations
-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
-rw-r--r--app/views/workbenches/_filters.html.slim16
-rw-r--r--app/views/workbenches/show.html.slim4
-rw-r--r--config/locales/actions.en.yml2
-rw-r--r--config/locales/actions.fr.yml2
-rw-r--r--config/locales/clean_ups.en.yml4
-rw-r--r--config/locales/clean_ups.fr.yml4
-rw-r--r--config/locales/en.yml2
-rw-r--r--config/locales/fr.yml2
-rw-r--r--config/locales/organisations.en.yml5
-rw-r--r--config/locales/organisations.fr.yml5
-rw-r--r--config/locales/referentials.en.yml11
-rw-r--r--config/locales/referentials.fr.yml9
-rw-r--r--config/locales/workbenches.en.yml4
-rw-r--r--config/locales/workbenches.fr.yml4
19 files changed, 73 insertions, 25 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'
diff --git a/app/views/workbenches/_filters.html.slim b/app/views/workbenches/_filters.html.slim
index d7ac79577..3fbcc6703 100644
--- a/app/views/workbenches/_filters.html.slim
+++ b/app/views/workbenches/_filters.html.slim
@@ -1,24 +1,24 @@
= search_form_for @q_for_form, url: workbench_path(@workbench.id), builder: SimpleForm::FormBuilder, class: 'form form-filter' do |f|
.ffg-row
.input-group.search_bar
- = f.search_field :name_cont, class: 'form-control', placeholder: 'Indiquez un nom de référentiel...'
+ = f.search_field :name_cont, class: 'form-control', placeholder: t('referentials.filters.name')
span.input-group-btn
button.btn.btn-default type='submit'
span.fa.fa-search
.ffg-row
.form-group
- = f.label 'Ligne', required: false, class: 'control-label'
- = f.input :associated_lines_id_eq, as: :select, collection: @workbench.lines.includes(:company).order(:name), input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Indiquez une ligne...' }, label: false, label_method: :display_name, wrapper_html: { class: 'select2ed'}
+ = f.label t('activerecord.models.line.one').upcase, required: false, class: 'control-label'
+ = f.input :associated_lines_id_eq, as: :select, collection: @workbench.lines.includes(:company).order(:name), input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': t('referentials.filters.line') }, label: false, label_method: :display_name, wrapper_html: { class: 'select2ed'}
.form-group.togglable
= f.label Referential.human_attribute_name(:status), required: false, class: 'control-label'
.form-group.checkbox_list
- = f.input :archived_at_not_null, label: ("<span>Conservé<span class='fa fa-archive'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
- = f.input :archived_at_null, label: ("<span>En préparation<span class='sb sb-lg sb-preparing'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
+ = f.input :archived_at_not_null, label: ("<span>#{t('activerecord.attributes.referential.archived_at')}<span class='fa fa-archive'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
+ = f.input :archived_at_null, label: ("<span>#{t('activerecord.attributes.referential.archived_at_null')}<span class='sb sb-lg sb-preparing'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
.form-group.togglable
- = f.label 'Organisation(s)', required: false, class: 'control-label'
+ = f.label t('activerecord.models.organisation.one'), required: false, class: 'control-label'
= f.input :organisation_name_eq_any, collection: Organisation.order('name').pluck(:name), as: :check_boxes, label: false, label_method: lambda{|w| ("<span>#{w}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.form-group.togglable
@@ -29,5 +29,5 @@
= p.input :end_lteq, as: :date, label: t('simple_form.to'), wrapper_html: { class: 'date smart_date filter_menu-item' }, default: @end_range, include_blank: @end_range ? false : true
.actions
- = link_to 'Effacer', @workbench, class: 'btn btn-link'
- = f.submit 'Filtrer', class: 'btn btn-default'
+ = link_to t('actions.filter'), @workbench, class: 'btn btn-link'
+ = f.submit t('actions.erase'), class: 'btn btn-default'
diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim
index a9ce2f704..6a41ca569 100644
--- a/app/views/workbenches/show.html.slim
+++ b/app/views/workbenches/show.html.slim
@@ -31,7 +31,7 @@
), \
TableBuilderHelper::Column.new( \
key: :status, \
- attribute: Proc.new {|w| w.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} \
+ attribute: Proc.new {|w| w.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} \
), \
TableBuilderHelper::Column.new( \
key: :organisation, \
@@ -43,7 +43,7 @@
), \
TableBuilderHelper::Column.new( \
key: :lines, \
- name: 'Nb lignes', \
+ name: t('activerecord.attributes.referential.number_of_lines'), \
attribute: Proc.new {|w| w.lines.count} \
), \
TableBuilderHelper::Column.new( \
diff --git a/config/locales/actions.en.yml b/config/locales/actions.en.yml
index f6979136a..36b76d01c 100644
--- a/config/locales/actions.en.yml
+++ b/config/locales/actions.en.yml
@@ -17,6 +17,8 @@ en:
combine: 'Combine'
actualize: 'Actualize'
import: 'Import'
+ filter: 'Filter'
+ erase: 'Erase'
or: "or"
cancel: "Cancel"
search_hint: "Type in a search term"
diff --git a/config/locales/actions.fr.yml b/config/locales/actions.fr.yml
index 86e72088a..f581142c7 100644
--- a/config/locales/actions.fr.yml
+++ b/config/locales/actions.fr.yml
@@ -17,6 +17,8 @@ fr:
combine: 'Combiner'
actualize: 'Actualiser'
import: 'Importer'
+ filter: 'Filtrer'
+ erase: 'Effacer'
or: "ou"
cancel: "Annuler"
search_hint: "Entrez un texte à rechercher"
diff --git a/config/locales/clean_ups.en.yml b/config/locales/clean_ups.en.yml
index fcfcfec7b..876694592 100644
--- a/config/locales/clean_ups.en.yml
+++ b/config/locales/clean_ups.en.yml
@@ -34,3 +34,7 @@ en:
presence: "A clean up must have a begin date"
end_date:
presence: "A clean up must have a end date"
+ simple_form:
+ labels:
+ clean_up:
+ title: "Clean Up the referential"
diff --git a/config/locales/clean_ups.fr.yml b/config/locales/clean_ups.fr.yml
index e2db82998..59d7c5dbc 100644
--- a/config/locales/clean_ups.fr.yml
+++ b/config/locales/clean_ups.fr.yml
@@ -33,3 +33,7 @@ fr:
presence: "Une purge doit avoir une date de début"
end_date:
presence: "Une purge doit avoir une date de fin"
+ simple_form:
+ labels:
+ clean_up:
+ title: "Purger le JDD"
diff --git a/config/locales/en.yml b/config/locales/en.yml
index b25f5fd7f..d8c87538f 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -55,4 +55,6 @@ en:
id_codif: 'Codifligne ID'
id_reflex: 'Reflex ID'
+ codif_data: 'Codifligne datas'
+ reflex_data: 'Reflex datas'
objectid: 'ID'
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 8ef183d91..4a40e40c3 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -55,4 +55,6 @@ fr:
id_codif: 'ID Codifligne'
id_reflex: 'ID Reflex'
+ codif_data: 'Données Codifligne'
+ reflex_data: 'Données Reflex'
objectid: 'ID'
diff --git a/config/locales/organisations.en.yml b/config/locales/organisations.en.yml
index 617e61ca2..a64920daf 100644
--- a/config/locales/organisations.en.yml
+++ b/config/locales/organisations.en.yml
@@ -10,6 +10,11 @@ en:
users: "Users"
rule_parameter_sets: "Rule parameter sets"
activerecord:
+ models:
+ organisation:
+ zero: "organization"
+ one: "organization"
+ other: "organizations"
attributes:
organisation:
name: "Name"
diff --git a/config/locales/organisations.fr.yml b/config/locales/organisations.fr.yml
index db7482fbc..50cb9f3be 100644
--- a/config/locales/organisations.fr.yml
+++ b/config/locales/organisations.fr.yml
@@ -10,6 +10,11 @@ fr:
users: "Utilisateurs"
rule_parameter_sets: "Jeux de paramètres"
activerecord:
+ models:
+ organisation:
+ zero: "organisation"
+ one: "organisation"
+ other: "organisations"
attributes:
organisation:
name: "Nom"
diff --git a/config/locales/referentials.en.yml b/config/locales/referentials.en.yml
index 5f39f03f4..e29df7cf4 100644
--- a/config/locales/referentials.en.yml
+++ b/config/locales/referentials.en.yml
@@ -2,6 +2,8 @@ en:
referentials:
filters:
name_or_number_or_objectid: 'Search by name, number or objectid'
+ name: 'Search by name'
+ line: 'Seach by associated lines'
search_no_results: 'No data space matching your query'
index:
title: 'Data spaces'
@@ -59,7 +61,6 @@ en:
upper_corner: "Top,Right corner for default bounding box"
lower_corner: "Bottom,Left corner for default bounding box"
resources: "Neptune Import File"
- validity_period: "Validity period"
no_validity_period: "undefined"
start_validity_period: "from"
end_validity_period: "to"
@@ -86,14 +87,16 @@ en:
data_format: "Favorite format for export"
timebands: "Time bands"
routing_constraint_zone: Routing constraint zone
- validity_period: "Validity period"
+ validity_period: "Inclusive validity period"
updated_at: "Updated"
published_at: "Integrated"
archived_at: "Archived"
+ archived_at_null: "Unarchived"
created_from: 'Created from'
updated_at: "Updated"
created_at: "Created"
organisation: 'Organisation'
+ number_of_lines: 'No. of lines'
formtastic:
titles:
referential:
@@ -112,6 +115,10 @@ en:
periods:
begin: 'Period beginning'
end: 'Period end'
+ actions:
+ add_period: 'Add a period'
+ placeholders:
+ select_lines: 'Selection of lignes'
notice:
referentials:
diff --git a/config/locales/referentials.fr.yml b/config/locales/referentials.fr.yml
index f69c26276..643295c0e 100644
--- a/config/locales/referentials.fr.yml
+++ b/config/locales/referentials.fr.yml
@@ -2,6 +2,8 @@ fr:
referentials:
filters:
name_or_number_or_objectid: 'Indiquez un nom de ligne, nom court ou objectid'
+ name: 'Indiquez un nom de référentiel...'
+ line: 'Indiquez une ligne...'
search_no_results: 'Aucun jeu de données ne correspond à votre recherche'
index:
title: 'Jeux de données'
@@ -59,7 +61,6 @@ fr:
upper_corner: "Point haut/droite de l'emprise par défaut"
lower_corner: "Point bas/gauche de l'emprise par défaut"
resources: "Import Neptune"
- validity_period: "Période de validité"
no_validity_period: "non définie"
start_validity_period: "du"
end_validity_period: "au"
@@ -91,8 +92,10 @@ fr:
created_at: "Créé le"
published_at: "Intégré le"
archived_at: "Conservé"
+ archived_at_null: "En préparation"
created_from: 'Créé à partir de'
organisation: 'Organisation'
+ number_of_lines: 'Nb lignes'
formtastic:
titles:
referential:
@@ -111,6 +114,10 @@ fr:
periods:
begin: 'Début de période'
end: 'Fin de période'
+ actions:
+ add_period: 'Ajouter une période'
+ placeholders:
+ select_lines: 'Sélection de lignes'
notice:
referentials:
deleted: "Les jeux de données on été supprimés"
diff --git a/config/locales/workbenches.en.yml b/config/locales/workbenches.en.yml
index 8525a4b9f..8a458e118 100644
--- a/config/locales/workbenches.en.yml
+++ b/config/locales/workbenches.en.yml
@@ -10,3 +10,7 @@ en:
calendars: "Calendars"
see: "See the list"
no_content: "No content yet."
+ referential_count:
+ zero: "Currently, there is no referential in your workbench"
+ one: "Currently, there is one referential in your workbench"
+ other: "Currently, there are #{count} referentials in your workbench"
diff --git a/config/locales/workbenches.fr.yml b/config/locales/workbenches.fr.yml
index 1cdc19a13..85c5259b8 100644
--- a/config/locales/workbenches.fr.yml
+++ b/config/locales/workbenches.fr.yml
@@ -10,3 +10,7 @@ fr:
calendars: "Calendriers"
see: "Voir la liste"
no_content: "Aucun contenu pour le moment"
+ referential_count:
+ zero: "Aucun jeu de données à l'heure actuelle"
+ one: "1 jeu de données à l'heure actuelle"
+ other: "#{count} jeux de données à l'heure actuelle"