From b40042cb617b6ba89713613bcad4c9f3b1acc777 Mon Sep 17 00:00:00 2001
From: gaelle morin <gmorin.dev@gmail.com>
Date: Wed, 22 Apr 2020 20:07:24 +0200
Subject: [PATCH 1/2] feature: texts translated in French

---
 djangoldp_notification/templates/email.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/djangoldp_notification/templates/email.html b/djangoldp_notification/templates/email.html
index 0d236a9..7e1c8e0 100644
--- a/djangoldp_notification/templates/email.html
+++ b/djangoldp_notification/templates/email.html
@@ -11,7 +11,7 @@
             <p style='font-size:small;color:#777'>
                 --
                 <br>
-                Do not reply to this email directly, go to <a href='{{ on }}' target='_blank'>{{ on }}</a> instead.
+                Ne réponds pas directement à cet e-mail, à la place rends-toi sur <a href='{{ on }}' target='_blank'>{{ on }}</a>.
                 <br>
                 <a href='#'>Unsubscribe</a>
             </p>
-- 
GitLab


From 225d99aff11cac2d787cabb06c3e7d961d48b48b Mon Sep 17 00:00:00 2001
From: gaelle morin <gmorin.dev@gmail.com>
Date: Thu, 23 Apr 2020 18:19:42 +0200
Subject: [PATCH 2/2] update: models.py + unsubscribe button translated

---
 djangoldp_notification/models.py            | 12 ++++++------
 djangoldp_notification/templates/email.html |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/djangoldp_notification/models.py b/djangoldp_notification/models.py
index 61c5aac..d367096 100644
--- a/djangoldp_notification/models.py
+++ b/djangoldp_notification/models.py
@@ -82,7 +82,7 @@ def send_notification(sender, instance, created, **kwargs):
 
 
 def send_request(target, object_iri, instance, created):
-    unknown = _("Unknown author")
+    unknown = _("Auteur inconnu")
     author = getattr(getattr(instance, MODEL_MODIFICATION_USER_FIELD, unknown), "urlid", unknown)
     request_type = "creation" if created else "update"
 
@@ -117,7 +117,7 @@ def send_email_on_notification(sender, instance, created, **kwargs):
             else:
                 who = requests.get(instance.author).json()['name']
         except:
-            who = "Unknown Person"
+            who = "Personne inconnue"
 
         # get identifier for resource triggering notification, and store in where
         try:
@@ -126,12 +126,12 @@ def send_email_on_notification(sender, instance, created, **kwargs):
             else:
                 where = requests.get(instance.object).json()['name']
         except:
-            where = "Unknown place"
+            where = "Endroit inconnu"
 
         if who == where:
-            where = "has sent you a private message"
+            where = "t'a envoyé un message privé"
         else:
-            where = "mentioned you on " + where
+            where = "t'a mentionné sur " + where
 
         html_message = loader.render_to_string(
             'email.html',
@@ -144,7 +144,7 @@ def send_email_on_notification(sender, instance, created, **kwargs):
         )
 
         send_mail(
-            'Notification on ' + (settings.INSTANCE_DEFAULT_CLIENT or settings.JABBER_DEFAULT_HOST),
+            'Notification sur ' + (settings.INSTANCE_DEFAULT_CLIENT or settings.JABBER_DEFAULT_HOST),
             instance.summary,
             settings.EMAIL_HOST_USER or "noreply@" + settings.JABBER_DEFAULT_HOST,
             [instance.user.email],
diff --git a/djangoldp_notification/templates/email.html b/djangoldp_notification/templates/email.html
index 7e1c8e0..9aa2c2f 100644
--- a/djangoldp_notification/templates/email.html
+++ b/djangoldp_notification/templates/email.html
@@ -4,7 +4,7 @@
     </head>
     <body>
         <div>
-            <p style='font-style:italic;color:#777'><b>{{ author }}</b> {{ object }} from  on {{ on }}</p>
+            <p style='font-style:italic;color:#777'><b>{{ author }}</b> {{ object }} de {{ on }}</p>
             <p>{{ instance.summary }}</p>
         </div>
         <div style='margin-top:10px;'>
@@ -13,7 +13,7 @@
                 <br>
                 Ne réponds pas directement à cet e-mail, à la place rends-toi sur <a href='{{ on }}' target='_blank'>{{ on }}</a>.
                 <br>
-                <a href='#'>Unsubscribe</a>
+                <a href='#'>Se désinscrire</a>
             </p>
         </div>
     </body>
-- 
GitLab