From f646a96953704500cd2fd2fda2614fb283249bb2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?=
Date: Wed, 13 Jun 2018 19:56:21 +0200
Subject: [PATCH] Localization of notification mail templates
---
.../_check_comment_vendor.fr.html.erb | 13 ++++++++++
.../_check_comment_vendor.fr.text.erb | 11 +++++++++
.../_footer_expires_soon.fr.html.erb | 11 +++++++++
.../_footer_expires_soon.fr.text.erb | 8 +++++++
.../_footer_recurrent_failures.fr.html.erb | 10 ++++++++
.../_footer_recurrent_failures.fr.text.erb | 8 +++++++
.../domain_expires_soon.fr.html.erb | 12 ++++++++++
.../domain_expires_soon.fr.text.erb | 9 +++++++
.../domain_recurrent_failures.en.text.erb | 14 +----------
.../domain_recurrent_failures.fr.html.erb | 24 +++++++++++++++++++
.../domain_recurrent_failures.fr.text.erb | 13 ++++++++++
11 files changed, 120 insertions(+), 13 deletions(-)
create mode 100644 app/views/notifications_mailer/_check_comment_vendor.fr.html.erb
create mode 100644 app/views/notifications_mailer/_check_comment_vendor.fr.text.erb
create mode 100644 app/views/notifications_mailer/_footer_expires_soon.fr.html.erb
create mode 100644 app/views/notifications_mailer/_footer_expires_soon.fr.text.erb
create mode 100644 app/views/notifications_mailer/_footer_recurrent_failures.fr.html.erb
create mode 100644 app/views/notifications_mailer/_footer_recurrent_failures.fr.text.erb
create mode 100644 app/views/notifications_mailer/domain_expires_soon.fr.html.erb
create mode 100644 app/views/notifications_mailer/domain_expires_soon.fr.text.erb
create mode 100644 app/views/notifications_mailer/domain_recurrent_failures.fr.html.erb
create mode 100644 app/views/notifications_mailer/domain_recurrent_failures.fr.text.erb
diff --git a/app/views/notifications_mailer/_check_comment_vendor.fr.html.erb b/app/views/notifications_mailer/_check_comment_vendor.fr.html.erb
new file mode 100644
index 0000000..c2d7576
--- /dev/null
+++ b/app/views/notifications_mailer/_check_comment_vendor.fr.html.erb
@@ -0,0 +1,13 @@
+<%- if @check.comment.present? -%>
+
+ Vous avez saisi le commentaire suivant pour ce domaine :
+
+
+ <%= @check.comment -%>
+
+
+<%- end -%>
+
+<%- if @check.vendor.present? -%>
+Fournisseur : <%= @check.vendor %>
+<% end %>
diff --git a/app/views/notifications_mailer/_check_comment_vendor.fr.text.erb b/app/views/notifications_mailer/_check_comment_vendor.fr.text.erb
new file mode 100644
index 0000000..b52e291
--- /dev/null
+++ b/app/views/notifications_mailer/_check_comment_vendor.fr.text.erb
@@ -0,0 +1,11 @@
+<%- if @check.comment.present? -%>
+Vous avez saisi le commentaire suivant pour ce domaine :
+
+ <%= @check.comment -%>
+<%- end -%>
+
+
+
+<%- if @check.vendor.present? -%>
+Fournisseur : <%= @check.vendor %>
+<% end %>
diff --git a/app/views/notifications_mailer/_footer_expires_soon.fr.html.erb b/app/views/notifications_mailer/_footer_expires_soon.fr.html.erb
new file mode 100644
index 0000000..d6f13b9
--- /dev/null
+++ b/app/views/notifications_mailer/_footer_expires_soon.fr.html.erb
@@ -0,0 +1,11 @@
+
+
+--
+
+
+ Vous avez reçu ce courriel à <%= pluralize(delay, "jour", "jours") %> avant la date d'expiration.
+ Vous pouvez gérer les notifications pour cette vérification à ce adresse :
+ <%= link_to nil, edit_check_url(check) %>
+
+
+L'équipe Chexpire
diff --git a/app/views/notifications_mailer/_footer_expires_soon.fr.text.erb b/app/views/notifications_mailer/_footer_expires_soon.fr.text.erb
new file mode 100644
index 0000000..35d29f2
--- /dev/null
+++ b/app/views/notifications_mailer/_footer_expires_soon.fr.text.erb
@@ -0,0 +1,8 @@
+--
+
+Vous avez reçu ce courriel à <%= pluralize(delay, "jour", "jours") %> avant
+la date d'expiration.
+Vous pouvez gérer les notifications pour cette vérification à ce adresse :
+<%= edit_check_url(check) %>
+
+L'équipe Chexpire
diff --git a/app/views/notifications_mailer/_footer_recurrent_failures.fr.html.erb b/app/views/notifications_mailer/_footer_recurrent_failures.fr.html.erb
new file mode 100644
index 0000000..8d68f9d
--- /dev/null
+++ b/app/views/notifications_mailer/_footer_recurrent_failures.fr.html.erb
@@ -0,0 +1,10 @@
+
+
+--
+
+Vous avez reçu ce courriel à <%= pluralize(delay, "jour", "jours") %> avant la dernière date d'expiration connue.
+Vous pouvez gérer les notifications pour cette vérification à ce adresse :
+<%= link_to nil, edit_check_url(check) %>
+
+
+L'équipe Chexpire
diff --git a/app/views/notifications_mailer/_footer_recurrent_failures.fr.text.erb b/app/views/notifications_mailer/_footer_recurrent_failures.fr.text.erb
new file mode 100644
index 0000000..ca48eea
--- /dev/null
+++ b/app/views/notifications_mailer/_footer_recurrent_failures.fr.text.erb
@@ -0,0 +1,8 @@
+--
+
+Vous avez reçu ce courriel à <%= pluralize(delay, "jour", "jours") %>
+avant la dernière date d'expiration connue.
+Vous pouvez gérer les notifications pour cette vérification à ce adresse :
+<%= edit_check_url(check) %>
+
+L'équipe Chexpire
diff --git a/app/views/notifications_mailer/domain_expires_soon.fr.html.erb b/app/views/notifications_mailer/domain_expires_soon.fr.html.erb
new file mode 100644
index 0000000..365f986
--- /dev/null
+++ b/app/views/notifications_mailer/domain_expires_soon.fr.html.erb
@@ -0,0 +1,12 @@
+
+ Salut,
+
+
+ le domaine <%= @check.domain %> va expirer le
+ <%= format_utc(@check.domain_expires_at) %>.
+
+
+
+<%= render "check_comment_vendor" %>
+
+<%= render "footer_expires_soon", delay: @notification.delay, check: @check %>
diff --git a/app/views/notifications_mailer/domain_expires_soon.fr.text.erb b/app/views/notifications_mailer/domain_expires_soon.fr.text.erb
new file mode 100644
index 0000000..7d11568
--- /dev/null
+++ b/app/views/notifications_mailer/domain_expires_soon.fr.text.erb
@@ -0,0 +1,9 @@
+Salut,
+
+le domaine <%= @check.domain %> va expirer le <%= format_utc(@check.domain_expires_at) %>.
+
+
+<%= render "check_comment_vendor" %>
+
+
+<%= render "footer_expires_soon", delay: @notification.delay, check: @check %>
diff --git a/app/views/notifications_mailer/domain_recurrent_failures.en.text.erb b/app/views/notifications_mailer/domain_recurrent_failures.en.text.erb
index 2f2927f..18c3381 100644
--- a/app/views/notifications_mailer/domain_recurrent_failures.en.text.erb
+++ b/app/views/notifications_mailer/domain_recurrent_failures.en.text.erb
@@ -11,18 +11,6 @@ or delete the check by following this link:
<%= edit_check_url(@check) %>
-
-<%- if @check.comment.present? -%>
-You wrote the following comment with this domain:
-
- <%= @check.comment -%>
-<%- end -%>
-
-
-
-<%- if @check.vendor.present? -%>
-Vendor: <%= @check.vendor %>
-<% end %>
-
+<%= render "check_comment_vendor" %>
<%= render "footer_recurrent_failures", delay: @notification.delay, check: @check %>
diff --git a/app/views/notifications_mailer/domain_recurrent_failures.fr.html.erb b/app/views/notifications_mailer/domain_recurrent_failures.fr.html.erb
new file mode 100644
index 0000000..94e15ba
--- /dev/null
+++ b/app/views/notifications_mailer/domain_recurrent_failures.fr.html.erb
@@ -0,0 +1,24 @@
+
+ Salut,
+
+
+
+ Nous avons rencontré de multiples erreurs pendant l'exécution des vérifications du domaine <%= @check.domain %>.
+ Nous ne pouvons plus interroger la base Whois pour vérifier la date d'expiration.
+
+
+
+ La dernière date d'expiration connue est le <%= format_utc(@check.domain_expires_at) %>.
+
+ Notre dernière vérification réussie a eu lieu le <%= format_utc(@check.last_success_at) %>.
+
+
+
+Si vous avez supprimé le domaine ou ne l'avez pas renouvellé, merci de désactiver la vérification associée, avec ce lien :
+<%= link_to nil, edit_check_url(@check) %>
+
+
+<%= render "check_comment_vendor" %>
+
+
+<%= render "footer_recurrent_failures", delay: @notification.delay, check: @check %>
diff --git a/app/views/notifications_mailer/domain_recurrent_failures.fr.text.erb b/app/views/notifications_mailer/domain_recurrent_failures.fr.text.erb
new file mode 100644
index 0000000..64b76c5
--- /dev/null
+++ b/app/views/notifications_mailer/domain_recurrent_failures.fr.text.erb
@@ -0,0 +1,13 @@
+Salut,
+
+Nous avons rencontré de multiples erreurs pendant l'exécution des vérifications
+du domaine <%= @check.domain %>.
+Nous ne pouvons plus interroger la base Whois pour vérifier la date d'expiration.
+
+Si vous avez supprimé le domaine ou ne l'avez pas renouvellé,
+merci de désactiver la vérification associée, avec ce lien :
+<%= edit_check_url(@check) %>
+
+<%= render "check_comment_vendor" %>
+
+<%= render "footer_recurrent_failures", delay: @notification.delay, check: @check %>