From 523efed5e21281cca8e25456be032f9ef820684b Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Fri, 1 Jun 2018 06:11:02 -0700 Subject: Refs #6955 Add some new translations --- app/decorators/route_decorator.rb | 2 +- app/views/line_footnotes/_footnote_fields.html.slim | 6 +++--- config/locales/footnotes.en.yml | 7 ++++--- config/locales/footnotes.fr.yml | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/decorators/route_decorator.rb b/app/decorators/route_decorator.rb index 801e139b0..ef4674649 100644 --- a/app/decorators/route_decorator.rb +++ b/app/decorators/route_decorator.rb @@ -90,7 +90,7 @@ class RouteDecorator < AF83::Decorator end instance_decorator.destroy_action_link do |l| - l.data confirm: t('routes.actions.destroy_confirm') + l.data {{ confirm: h.t('routes.actions.destroy_confirm') }} end end end diff --git a/app/views/line_footnotes/_footnote_fields.html.slim b/app/views/line_footnotes/_footnote_fields.html.slim index 28fcde5ab..acb772b00 100644 --- a/app/views/line_footnotes/_footnote_fields.html.slim +++ b/app/views/line_footnotes/_footnote_fields.html.slim @@ -1,10 +1,10 @@ .nested-fields.col-lg-4.col-md-4.col-sm-6.col-xs-12 .panel.panel-default .panel-body - = f.input :code, label: 'Titre' - = f.input :label, label: 'Texte' + = f.input :code, label: Chouette::Footnote.tmf(:code) + = f.input :label, label: Chouette::Footnote.tmf(:label) .text-right - = link_to_remove_association f, class: 'btn btn-outline-danger', data: { confirm: 'Etes-vous sûr(e) ?' }, title: t('actions.delete') do + = link_to_remove_association f, class: 'btn btn-outline-danger', data: { confirm: t('are_you_sure') }, title: t('actions.delete') do span.fa.fa-trash / span = t('actions.delete') diff --git a/config/locales/footnotes.en.yml b/config/locales/footnotes.en.yml index 5b86f0806..c0e29bdc2 100644 --- a/config/locales/footnotes.en.yml +++ b/config/locales/footnotes.en.yml @@ -15,6 +15,7 @@ en: other: "notes" attributes: footnote: - code: "number" - checksum: checksum - label: "line text" + code: "Number" + checksum: Checksum + label: "Line text" + diff --git a/config/locales/footnotes.fr.yml b/config/locales/footnotes.fr.yml index 5169cfc11..2cf81d5b6 100644 --- a/config/locales/footnotes.fr.yml +++ b/config/locales/footnotes.fr.yml @@ -15,6 +15,6 @@ fr: other: "notes" attributes: footnote: - code: "titre" + code: "Titre" checksum: Signature métier - label: "texte" + label: "Texte" -- cgit v1.2.3 From 4d47a57a5dcfbcbf69b0525fc10bf91e71b8eba4 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Fri, 1 Jun 2018 07:18:41 -0700 Subject: Refs #6955 Small update on some decorators to fix data-confirm display bug --- app/decorators/compliance_control_decorator.rb | 2 +- app/decorators/compliance_control_set_decorator.rb | 4 ++-- app/decorators/purchase_window_decorator.rb | 2 +- app/decorators/referential_network_decorator.rb | 3 +-- app/decorators/routing_constraint_zone_decorator.rb | 2 +- app/decorators/stop_area_decorator.rb | 6 +++--- app/views/line_footnotes/_footnote_fields.html.slim | 2 +- config/locales/compliance_control_sets.en.yml | 2 +- config/locales/footnotes.en.yml | 1 + config/locales/footnotes.fr.yml | 1 + 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/decorators/compliance_control_decorator.rb b/app/decorators/compliance_control_decorator.rb index 7cdb4a890..70cfa9ea0 100644 --- a/app/decorators/compliance_control_decorator.rb +++ b/app/decorators/compliance_control_decorator.rb @@ -17,7 +17,7 @@ class ComplianceControlDecorator < AF83::Decorator instance_decorator.edit_action_link instance_decorator.destroy_action_link do |l| - l.data confirm: t('compliance_controls.actions.destroy_confirm') + l.data {{ confirm: h.t('compliance_controls.actions.destroy_confirm') }} end end diff --git a/app/decorators/compliance_control_set_decorator.rb b/app/decorators/compliance_control_set_decorator.rb index ad38c492c..38f3e212e 100644 --- a/app/decorators/compliance_control_set_decorator.rb +++ b/app/decorators/compliance_control_set_decorator.rb @@ -18,9 +18,9 @@ class ComplianceControlSetDecorator < AF83::Decorator end instance_decorator.destroy_action_link do |l| - l.content h.destroy_link_content + l.content { h.destroy_link_content } l.href { h.compliance_control_set_path(object.id) } - l.data confirm: t('compliance_control_sets.actions.destroy_confirm') + l.data {{ confirm: h.t('compliance_control_sets.actions.destroy_confirm') }} end end end diff --git a/app/decorators/purchase_window_decorator.rb b/app/decorators/purchase_window_decorator.rb index 8e6ca9d36..c73aaf3dd 100644 --- a/app/decorators/purchase_window_decorator.rb +++ b/app/decorators/purchase_window_decorator.rb @@ -15,7 +15,7 @@ class PurchaseWindowDecorator < AF83::Decorator instance_decorator.edit_action_link instance_decorator.destroy_action_link do |l| - l.data confirm: t('purchase_windows.actions.destroy_confirm') + l.data {{ confirm: h.t('purchase_windows.actions.destroy_confirm') }} end end diff --git a/app/decorators/referential_network_decorator.rb b/app/decorators/referential_network_decorator.rb index f8c656e7c..637f51531 100644 --- a/app/decorators/referential_network_decorator.rb +++ b/app/decorators/referential_network_decorator.rb @@ -20,8 +20,7 @@ class ReferentialNetworkDecorator < AF83::Decorator end instance_decorator.destroy_action_link do |l| - l.content { h.destroy_link_content('networks.actions.destroy') } - l.data confirm: t('networks.actions.destroy_confirm') + l.data {{ confirm: h.t('networks.actions.destroy_confirm') }} end end end diff --git a/app/decorators/routing_constraint_zone_decorator.rb b/app/decorators/routing_constraint_zone_decorator.rb index 3ff286cc1..201964dc3 100644 --- a/app/decorators/routing_constraint_zone_decorator.rb +++ b/app/decorators/routing_constraint_zone_decorator.rb @@ -21,7 +21,7 @@ class RoutingConstraintZoneDecorator < AF83::Decorator instance_decorator.edit_action_link instance_decorator.destroy_action_link do |l| - l.data confirm: t('routing_constraint_zones.actions.destroy_confirm') + l.data {{ confirm: h.t('routing_constraint_zones.actions.destroy_confirm') }} end end end diff --git a/app/decorators/stop_area_decorator.rb b/app/decorators/stop_area_decorator.rb index c7f10b13b..b25f2d261 100644 --- a/app/decorators/stop_area_decorator.rb +++ b/app/decorators/stop_area_decorator.rb @@ -23,7 +23,7 @@ class StopAreaDecorator < AF83::Decorator ) end l.method :put - l.data confirm: t('stop_areas.actions.deactivate_confirm') + l.data {{ confirm: h.t('stop_areas.actions.deactivate_confirm') }} l.add_class 'delete-action' end @@ -36,13 +36,13 @@ class StopAreaDecorator < AF83::Decorator ) end l.method :put - l.data confirm: t('stop_areas.actions.activate_confirm') + l.data {{ confirm: h.t('stop_areas.actions.activate_confirm') }} l.add_class 'delete-action' end instance_decorator.destroy_action_link do |l| l.content { h.destroy_link_content('stop_areas.actions.destroy') } - l.data confirm: t('stop_areas.actions.destroy_confirm') + l.data {{ confirm: h.t('stop_areas.actions.destroy_confirm') }} end end diff --git a/app/views/line_footnotes/_footnote_fields.html.slim b/app/views/line_footnotes/_footnote_fields.html.slim index acb772b00..d69b29a2b 100644 --- a/app/views/line_footnotes/_footnote_fields.html.slim +++ b/app/views/line_footnotes/_footnote_fields.html.slim @@ -5,6 +5,6 @@ = f.input :label, label: Chouette::Footnote.tmf(:label) .text-right - = link_to_remove_association f, class: 'btn btn-outline-danger', data: { confirm: t('are_you_sure') }, title: t('actions.delete') do + = link_to_remove_association f, class: 'btn btn-outline-danger', data: { confirm: t('footnotes.actions.destroy_confirm') }, title: t('actions.delete') do span.fa.fa-trash / span = t('actions.delete') diff --git a/config/locales/compliance_control_sets.en.yml b/config/locales/compliance_control_sets.en.yml index c69689390..6fc735bfb 100644 --- a/config/locales/compliance_control_sets.en.yml +++ b/config/locales/compliance_control_sets.en.yml @@ -23,7 +23,7 @@ en: destroy: Destroy add_compliance_control: Compliance Control add_compliance_control_block: Compliance Control Block - destroy_confirm: Are you sure ? + destroy_confirm: Are you sure you want to destroy this compliance control set ? loaded: Load the control filters: name: 'Enter name ...' diff --git a/config/locales/footnotes.en.yml b/config/locales/footnotes.en.yml index c0e29bdc2..09ffb86b1 100644 --- a/config/locales/footnotes.en.yml +++ b/config/locales/footnotes.en.yml @@ -5,6 +5,7 @@ en: footnotes: actions: add_footnote: "add footnote" + destroy_confirm: Are you sure you want to delete this footnote ? index: title: "Footnotes" activerecord: diff --git a/config/locales/footnotes.fr.yml b/config/locales/footnotes.fr.yml index 2cf81d5b6..fa7325570 100644 --- a/config/locales/footnotes.fr.yml +++ b/config/locales/footnotes.fr.yml @@ -5,6 +5,7 @@ fr: footnotes: actions: add_footnote: "Ajouter une note" + destroy_confirm: Etes vous sûr de supprimer cette note ? index: title: "Notes" activerecord: -- cgit v1.2.3