From 2d5caa20cbd74649c4f57da509238a03f9c6ba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Charignon?= Date: Tue, 8 Dec 2020 11:30:09 +0100 Subject: [PATCH] ajoute les traductions pour le dashboard --- app/views/admin/dashboard/_actualite.html.arb | 2 +- app/views/admin/dashboard/_evaluations.html.arb | 5 ++--- config/locales/views/dashboard.yml | 4 ++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/admin/dashboard/_actualite.html.arb b/app/views/admin/dashboard/_actualite.html.arb index 4fac97c04..745c0e845 100644 --- a/app/views/admin/dashboard/_actualite.html.arb +++ b/app/views/admin/dashboard/_actualite.html.arb @@ -6,5 +6,5 @@ div class: 'actualite' do span class: 'date' do l actualite.created_at, format: :point end - text_node link_to 'Lire', [:admin, actualite], class: 'action' + text_node link_to t('.action'), [:admin, actualite], class: 'action' end diff --git a/app/views/admin/dashboard/_evaluations.html.arb b/app/views/admin/dashboard/_evaluations.html.arb index abf46d949..a42b27a1a 100644 --- a/app/views/admin/dashboard/_evaluations.html.arb +++ b/app/views/admin/dashboard/_evaluations.html.arb @@ -9,11 +9,10 @@ div class: 'evaluations' do text_node evaluation.nom end span class: 'date' do - text_node ' il y a ' - text_node time_ago_in_words(evaluation.created_at) + text_node t('.date', date: time_ago_in_words(evaluation.created_at)) end span class: 'action' do - link_to 'Voir', admin_campagne_evaluation_path(evaluation.campagne, evaluation) + link_to t('.action'), admin_campagne_evaluation_path(evaluation.campagne, evaluation) end end end diff --git a/config/locales/views/dashboard.yml b/config/locales/views/dashboard.yml index 2c46484e8..9055c5440 100644 --- a/config/locales/views/dashboard.yml +++ b/config/locales/views/dashboard.yml @@ -6,8 +6,12 @@ fr: titre: Statistiques actualites: titre: Les actualités sur eva + actualite: + action: Lire evaluations: titre: Vos dernières évaluations + action: Voir + date: "il y a %{date}" formulaire_contact: contacts: titre: Vos coordonnées