♻️(email) use full name instead of email

If the full name is available,
we will use it to identify the user in the email
instead of the email address.
This commit is contained in:
Anthony LC
2024-10-15 15:53:18 +02:00
committed by Anthony LC
parent 97d00b678f
commit 24630791d8
12 changed files with 275 additions and 185 deletions

View File

@@ -13,6 +13,7 @@ and this project adheres to
- ♻️(frontend) More multi theme friendly #325 - ♻️(frontend) More multi theme friendly #325
- ♻️ Bootstrap frontend #257 - ♻️ Bootstrap frontend #257
- ♻️ Add username in email #314
## Fixed ## Fixed

View File

@@ -576,8 +576,12 @@ class DocumentAccessViewSet(
"""Add a new access to the document and send an email to the new added user.""" """Add a new access to the document and send an email to the new added user."""
access = serializer.save() access = serializer.save()
language = self.request.headers.get("Content-Language", "en-us") language = self.request.headers.get("Content-Language", "en-us")
access.document.email_invitation( access.document.email_invitation(
language, access.user.email, access.role, self.request.user.email language,
access.user.email,
access.role,
self.request.user,
) )
@@ -778,6 +782,7 @@ class InvitationViewset(
invitation = serializer.save() invitation = serializer.save()
language = self.request.headers.get("Content-Language", "en-us") language = self.request.headers.get("Content-Language", "en-us")
invitation.document.email_invitation( invitation.document.email_invitation(
language, invitation.email, invitation.role, self.request.user.email language, invitation.email, invitation.role, self.request.user
) )

View File

@@ -520,15 +520,18 @@ class Document(BaseModel):
"versions_retrieve": can_get_versions, "versions_retrieve": can_get_versions,
} }
def email_invitation(self, language, email, role, username_sender): def email_invitation(self, language, email, role, sender):
"""Send email invitation.""" """Send email invitation."""
sender_name = sender.full_name or sender.email
domain = Site.objects.get_current().domain domain = Site.objects.get_current().domain
try: try:
with override(language): with override(language):
title = _("%(username)s shared a document with you: %(document)s") % { title = _(
"username": username_sender, "%(sender_name)s shared a document with you: %(document)s"
) % {
"sender_name": sender_name,
"document": self.title, "document": self.title,
} }
template_vars = { template_vars = {
@@ -536,7 +539,10 @@ class Document(BaseModel):
"domain": domain, "domain": domain,
"document": self, "document": self,
"link": f"{domain}/docs/{self.id}/", "link": f"{domain}/docs/{self.id}/",
"username": username_sender, "sender_name": sender_name,
"sender_name_email": f"{sender.full_name} ({sender.email})"
if sender.full_name
else sender.email,
"role": RoleChoices(role).label.lower(), "role": RoleChoices(role).label.lower(),
} }
msg_html = render_to_string("mail/html/invitation.html", template_vars) msg_html = render_to_string("mail/html/invitation.html", template_vars)

View File

@@ -171,7 +171,10 @@ def test_api_document_accesses_create_authenticated_administrator(via, mock_user
email = mail.outbox[0] email = mail.outbox[0]
assert email.to == [other_user["email"]] assert email.to == [other_user["email"]]
email_content = " ".join(email.body.split()) email_content = " ".join(email.body.split())
assert f"{user.email} shared a document with you: {document.title}" in email_content assert (
f"{user.full_name} shared a document with you: {document.title}"
in email_content
)
assert "docs/" + str(document.id) + "/" in email_content assert "docs/" + str(document.id) + "/" in email_content
@@ -225,5 +228,8 @@ def test_api_document_accesses_create_authenticated_owner(via, mock_user_teams):
email = mail.outbox[0] email = mail.outbox[0]
assert email.to == [other_user["email"]] assert email.to == [other_user["email"]]
email_content = " ".join(email.body.split()) email_content = " ".join(email.body.split())
assert f"{user.email} shared a document with you: {document.title}" in email_content assert (
f"{user.full_name} shared a document with you: {document.title}"
in email_content
)
assert "docs/" + str(document.id) + "/" in email_content assert "docs/" + str(document.id) + "/" in email_content

View File

@@ -119,7 +119,7 @@ def test_api_document_invitations__create__privileged_members(
assert email.to == ["guest@example.com"] assert email.to == ["guest@example.com"]
email_content = " ".join(email.body.split()) email_content = " ".join(email.body.split())
assert ( assert (
f"{user.email} shared a document with you: {document.title}" f"{user.full_name} shared a document with you: {document.title}"
in email_content in email_content
) )
else: else:
@@ -162,7 +162,7 @@ def test_api_document_invitations__create__email_from_content_language():
email_content = " ".join(email.body.split()) email_content = " ".join(email.body.split())
assert ( assert (
f"{user.email} a partagé un document avec vous: {document.title}" f"{user.full_name} a partagé un document avec vous: {document.title}"
in email_content in email_content
) )
@@ -201,8 +201,52 @@ def test_api_document_invitations__create__email_from_content_language_not_suppo
assert email.to == ["guest@example.com"] assert email.to == ["guest@example.com"]
email_content = " ".join(email.body.split())
assert (
f"{user.full_name} shared a document with you: {document.title}"
in email_content
)
def test_api_document_invitations__create__email__full_name_empty():
"""
If the full name of the user is empty, it will display the email address.
"""
user = factories.UserFactory(full_name="")
document = factories.DocumentFactory()
factories.UserDocumentAccessFactory(document=document, user=user, role="owner")
invitation_values = {
"email": "guest@example.com",
"role": "reader",
}
assert len(mail.outbox) == 0
client = APIClient()
client.force_login(user)
response = client.post(
f"/api/v1.0/documents/{document.id}/invitations/",
invitation_values,
format="json",
headers={"Content-Language": "not-supported"},
)
assert response.status_code == status.HTTP_201_CREATED
assert response.json()["email"] == "guest@example.com"
assert models.Invitation.objects.count() == 1
assert len(mail.outbox) == 1
email = mail.outbox[0]
assert email.to == ["guest@example.com"]
email_content = " ".join(email.body.split()) email_content = " ".join(email.body.split())
assert f"{user.email} shared a document with you: {document.title}" in email_content assert f"{user.email} shared a document with you: {document.title}" in email_content
assert (
f'{user.email} invited you with the role "reader" on the '
f"following document : {document.title}" in email_content
)
def test_api_document_invitations__create__issuer_and_document_override(): def test_api_document_invitations__create__issuer_and_document_override():

View File

@@ -363,8 +363,9 @@ def test_models_documents__email_invitation__success():
# pylint: disable-next=no-member # pylint: disable-next=no-member
assert len(mail.outbox) == 0 assert len(mail.outbox) == 0
sender = factories.UserFactory(full_name="Test Sender", email="sender@example.com")
document.email_invitation( document.email_invitation(
"en", "guest@example.com", models.RoleChoices.EDITOR, "sender@example.com" "en", "guest@example.com", models.RoleChoices.EDITOR, sender
) )
# pylint: disable-next=no-member # pylint: disable-next=no-member
@@ -377,8 +378,8 @@ def test_models_documents__email_invitation__success():
email_content = " ".join(email.body.split()) email_content = " ".join(email.body.split())
assert ( assert (
f"sender@example.com invited you as an editor on the following document : {document.title}" f'Test Sender (sender@example.com) invited you with the role "editor" '
in email_content f"on the following document : {document.title}" in email_content
) )
assert f"docs/{document.id}/" in email_content assert f"docs/{document.id}/" in email_content
@@ -392,8 +393,14 @@ def test_models_documents__email_invitation__success_fr():
# pylint: disable-next=no-member # pylint: disable-next=no-member
assert len(mail.outbox) == 0 assert len(mail.outbox) == 0
sender = factories.UserFactory(
full_name="Test Sender2", email="sender2@example.com"
)
document.email_invitation( document.email_invitation(
"fr-fr", "guest2@example.com", models.RoleChoices.OWNER, "sender2@example.com" "fr-fr",
"guest2@example.com",
models.RoleChoices.OWNER,
sender,
) )
# pylint: disable-next=no-member # pylint: disable-next=no-member
@@ -406,7 +413,7 @@ def test_models_documents__email_invitation__success_fr():
email_content = " ".join(email.body.split()) email_content = " ".join(email.body.split())
assert ( assert (
f"sender2@example.com vous a invité en tant que propriétaire " f'Test Sender2 (sender2@example.com) vous a invité avec le rôle "propriétaire" '
f"sur le document suivant : {document.title}" in email_content f"sur le document suivant : {document.title}" in email_content
) )
assert f"docs/{document.id}/" in email_content assert f"docs/{document.id}/" in email_content
@@ -424,8 +431,12 @@ def test_models_documents__email_invitation__failed(mock_logger, _mock_send_mail
# pylint: disable-next=no-member # pylint: disable-next=no-member
assert len(mail.outbox) == 0 assert len(mail.outbox) == 0
sender = factories.UserFactory()
document.email_invitation( document.email_invitation(
"en", "guest3@example.com", models.RoleChoices.ADMIN, "sender3@example.com" "en",
"guest3@example.com",
models.RoleChoices.ADMIN,
sender,
) )
# No email has been sent # No email has been sent

View File

@@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: lasuite-people\n" "Project-Id-Version: lasuite-people\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-25 10:15+0000\n" "POT-Creation-Date: 2024-10-15 07:19+0000\n"
"PO-Revision-Date: 2024-09-25 10:17\n" "PO-Revision-Date: 2024-10-15 07:23\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: English\n" "Language-Team: English\n"
"Language: en_US\n" "Language: en_US\n"
@@ -17,15 +17,15 @@ msgstr ""
"X-Crowdin-File: backend-impress.pot\n" "X-Crowdin-File: backend-impress.pot\n"
"X-Crowdin-File-ID: 8\n" "X-Crowdin-File-ID: 8\n"
#: core/admin.py:32 #: core/admin.py:33
msgid "Personal info" msgid "Personal info"
msgstr "" msgstr ""
#: core/admin.py:34 #: core/admin.py:46
msgid "Permissions" msgid "Permissions"
msgstr "" msgstr ""
#: core/admin.py:46 #: core/admin.py:58
msgid "Important dates" msgid "Important dates"
msgstr "" msgstr ""
@@ -41,7 +41,7 @@ msgstr ""
msgid "Format" msgid "Format"
msgstr "" msgstr ""
#: core/authentication/backends.py:56 #: core/authentication/backends.py:57
msgid "Invalid response format or token verification failed" msgid "Invalid response format or token verification failed"
msgstr "" msgstr ""
@@ -49,10 +49,6 @@ msgstr ""
msgid "User info contained no recognizable user identification" msgid "User info contained no recognizable user identification"
msgstr "" msgstr ""
#: core/authentication/backends.py:101
msgid "Claims contained no recognizable user identification"
msgstr ""
#: core/models.py:62 core/models.py:69 #: core/models.py:62 core/models.py:69
msgid "Reader" msgid "Reader"
msgstr "" msgstr ""
@@ -117,223 +113,236 @@ msgstr ""
msgid "Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_ characters only." msgid "Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_ characters only."
msgstr "" msgstr ""
#: core/models.py:148 #: core/models.py:149
msgid "full name"
msgstr ""
#: core/models.py:150
msgid "short name"
msgstr ""
#: core/models.py:152
msgid "identity email address" msgid "identity email address"
msgstr "" msgstr ""
#: core/models.py:153 #: core/models.py:157
msgid "admin email address" msgid "admin email address"
msgstr "" msgstr ""
#: core/models.py:160 #: core/models.py:164
msgid "language" msgid "language"
msgstr "" msgstr ""
#: core/models.py:161 #: core/models.py:165
msgid "The language in which the user wants to see the interface." msgid "The language in which the user wants to see the interface."
msgstr "" msgstr ""
#: core/models.py:167 #: core/models.py:171
msgid "The timezone in which the user wants to see times." msgid "The timezone in which the user wants to see times."
msgstr "" msgstr ""
#: core/models.py:170 #: core/models.py:174
msgid "device" msgid "device"
msgstr "" msgstr ""
#: core/models.py:172 #: core/models.py:176
msgid "Whether the user is a device or a real user." msgid "Whether the user is a device or a real user."
msgstr "" msgstr ""
#: core/models.py:175 #: core/models.py:179
msgid "staff status" msgid "staff status"
msgstr "" msgstr ""
#: core/models.py:177 #: core/models.py:181
msgid "Whether the user can log into this admin site." msgid "Whether the user can log into this admin site."
msgstr "" msgstr ""
#: core/models.py:180 #: core/models.py:184
msgid "active" msgid "active"
msgstr "" msgstr ""
#: core/models.py:183 #: core/models.py:187
msgid "Whether this user should be treated as active. Unselect this instead of deleting accounts." msgid "Whether this user should be treated as active. Unselect this instead of deleting accounts."
msgstr "" msgstr ""
#: core/models.py:195 #: core/models.py:199
msgid "user" msgid "user"
msgstr "" msgstr ""
#: core/models.py:196 #: core/models.py:200
msgid "users" msgid "users"
msgstr "" msgstr ""
#: core/models.py:328 core/models.py:644 #: core/models.py:332 core/models.py:638
msgid "title" msgid "title"
msgstr "" msgstr ""
#: core/models.py:343 #: core/models.py:347
msgid "Document" msgid "Document"
msgstr "" msgstr ""
#: core/models.py:344 #: core/models.py:348
msgid "Documents" msgid "Documents"
msgstr "" msgstr ""
#: core/models.py:347 #: core/models.py:351
msgid "Untitled Document" msgid "Untitled Document"
msgstr "" msgstr ""
#: core/models.py:537 #: core/models.py:530
#, python-format #, python-format
msgid "%(username)s shared a document with you: %(document)s" msgid "%(sender_name)s shared a document with you: %(document)s"
msgstr "" msgstr ""
#: core/models.py:580 #: core/models.py:574
msgid "Document/user link trace" msgid "Document/user link trace"
msgstr "" msgstr ""
#: core/models.py:581 #: core/models.py:575
msgid "Document/user link traces" msgid "Document/user link traces"
msgstr "" msgstr ""
#: core/models.py:587 #: core/models.py:581
msgid "A link trace already exists for this document/user." msgid "A link trace already exists for this document/user."
msgstr "" msgstr ""
#: core/models.py:608 #: core/models.py:602
msgid "Document/user relation" msgid "Document/user relation"
msgstr "" msgstr ""
#: core/models.py:609 #: core/models.py:603
msgid "Document/user relations" msgid "Document/user relations"
msgstr "" msgstr ""
#: core/models.py:615 #: core/models.py:609
msgid "This user is already in this document." msgid "This user is already in this document."
msgstr "" msgstr ""
#: core/models.py:621 #: core/models.py:615
msgid "This team is already in this document." msgid "This team is already in this document."
msgstr "" msgstr ""
#: core/models.py:627 core/models.py:816 #: core/models.py:621 core/models.py:810
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "" msgstr ""
#: core/models.py:645 #: core/models.py:639
msgid "description" msgid "description"
msgstr "" msgstr ""
#: core/models.py:646 #: core/models.py:640
msgid "code" msgid "code"
msgstr "" msgstr ""
#: core/models.py:647 #: core/models.py:641
msgid "css" msgid "css"
msgstr "" msgstr ""
#: core/models.py:649 #: core/models.py:643
msgid "public" msgid "public"
msgstr "" msgstr ""
#: core/models.py:651 #: core/models.py:645
msgid "Whether this template is public for anyone to use." msgid "Whether this template is public for anyone to use."
msgstr "" msgstr ""
#: core/models.py:657 #: core/models.py:651
msgid "Template" msgid "Template"
msgstr "" msgstr ""
#: core/models.py:658 #: core/models.py:652
msgid "Templates" msgid "Templates"
msgstr "" msgstr ""
#: core/models.py:797 #: core/models.py:791
msgid "Template/user relation" msgid "Template/user relation"
msgstr "" msgstr ""
#: core/models.py:798 #: core/models.py:792
msgid "Template/user relations" msgid "Template/user relations"
msgstr "" msgstr ""
#: core/models.py:804 #: core/models.py:798
msgid "This user is already in this template." msgid "This user is already in this template."
msgstr "" msgstr ""
#: core/models.py:810 #: core/models.py:804
msgid "This team is already in this template." msgid "This team is already in this template."
msgstr "" msgstr ""
#: core/models.py:833 #: core/models.py:827
msgid "email address" msgid "email address"
msgstr "" msgstr ""
#: core/models.py:850 #: core/models.py:844
msgid "Document invitation" msgid "Document invitation"
msgstr "" msgstr ""
#: core/models.py:851 #: core/models.py:845
msgid "Document invitations" msgid "Document invitations"
msgstr "" msgstr ""
#: core/models.py:868 #: core/models.py:862
msgid "This email is already associated to a registered user." msgid "This email is already associated to a registered user."
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:160 #: core/templates/mail/html/hello.html:159 core/templates/mail/text/hello.txt:3
#: core/templates/mail/html/invitation2.html:160 msgid "Company logo"
msgstr ""
#: core/templates/mail/html/hello.html:188 core/templates/mail/text/hello.txt:5
#, python-format
msgid "Hello %(name)s"
msgstr ""
#: core/templates/mail/html/hello.html:188 core/templates/mail/text/hello.txt:5
msgid "Hello"
msgstr ""
#: core/templates/mail/html/hello.html:189 core/templates/mail/text/hello.txt:6
msgid "Thank you very much for your visit!"
msgstr ""
#: core/templates/mail/html/hello.html:221
#, python-format
msgid "This mail has been sent to %(email)s by <a href=\"%(href)s\">%(name)s</a>"
msgstr ""
#: core/templates/mail/html/invitation.html:159
#: core/templates/mail/text/invitation.txt:3 #: core/templates/mail/text/invitation.txt:3
#: core/templates/mail/text/invitation2.txt:3
msgid "La Suite Numérique" msgid "La Suite Numérique"
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:190 #: core/templates/mail/html/invitation.html:189
#: core/templates/mail/text/invitation.txt:6 #: core/templates/mail/text/invitation.txt:6
#, python-format #, python-format
msgid " %(username)s shared a document with you ! " msgid " %(sender_name)s shared a document with you ! "
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:197 #: core/templates/mail/html/invitation.html:196
#: core/templates/mail/text/invitation.txt:8 #: core/templates/mail/text/invitation.txt:8
#, python-format #, python-format
msgid " %(username)s invited you as an %(role)s on the following document : " msgid " %(sender_name_email)s invited you with the role \"%(role)s\" on the following document : "
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:206 #: core/templates/mail/html/invitation.html:205
#: core/templates/mail/html/invitation2.html:211
#: core/templates/mail/text/invitation.txt:10 #: core/templates/mail/text/invitation.txt:10
#: core/templates/mail/text/invitation2.txt:11
msgid "Open" msgid "Open"
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:223 #: core/templates/mail/html/invitation.html:222
#: core/templates/mail/text/invitation.txt:14 #: core/templates/mail/text/invitation.txt:14
msgid " Docs, your new essential tool for organizing, sharing and collaborate on your documents as a team. " msgid " Docs, your new essential tool for organizing, sharing and collaborating on your documents as a team. "
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:230 #: core/templates/mail/html/invitation.html:229
#: core/templates/mail/html/invitation2.html:235
#: core/templates/mail/text/invitation.txt:16 #: core/templates/mail/text/invitation.txt:16
#: core/templates/mail/text/invitation2.txt:17
msgid "Brought to you by La Suite Numérique" msgid "Brought to you by La Suite Numérique"
msgstr "" msgstr ""
#: core/templates/mail/html/invitation2.html:190 #: core/templates/mail/text/hello.txt:8
#, python-format #, python-format
msgid "%(username)s shared a document with you" msgid "This mail has been sent to %(email)s by %(name)s [%(href)s]"
msgstr ""
#: core/templates/mail/html/invitation2.html:197
#: core/templates/mail/text/invitation2.txt:8
#, python-format
msgid "%(username)s invited you as an %(role)s on the following document :"
msgstr ""
#: core/templates/mail/html/invitation2.html:228
#: core/templates/mail/text/invitation2.txt:15
msgid "Docs, your new essential tool for organizing, sharing and collaborate on your document as a team."
msgstr "" msgstr ""
#: impress/settings.py:176 #: impress/settings.py:176

View File

@@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: lasuite-people\n" "Project-Id-Version: lasuite-people\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-25 10:15+0000\n" "POT-Creation-Date: 2024-10-15 07:19+0000\n"
"PO-Revision-Date: 2024-09-25 10:21\n" "PO-Revision-Date: 2024-10-15 07:23\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: French\n" "Language-Team: French\n"
"Language: fr_FR\n" "Language: fr_FR\n"
@@ -17,15 +17,15 @@ msgstr ""
"X-Crowdin-File: backend-impress.pot\n" "X-Crowdin-File: backend-impress.pot\n"
"X-Crowdin-File-ID: 8\n" "X-Crowdin-File-ID: 8\n"
#: core/admin.py:32 #: core/admin.py:33
msgid "Personal info" msgid "Personal info"
msgstr "Infos Personnelles" msgstr "Infos Personnelles"
#: core/admin.py:34 #: core/admin.py:46
msgid "Permissions" msgid "Permissions"
msgstr "Permissions" msgstr "Permissions"
#: core/admin.py:46 #: core/admin.py:58
msgid "Important dates" msgid "Important dates"
msgstr "Dates importantes" msgstr "Dates importantes"
@@ -41,7 +41,7 @@ msgstr ""
msgid "Format" msgid "Format"
msgstr "" msgstr ""
#: core/authentication/backends.py:56 #: core/authentication/backends.py:57
msgid "Invalid response format or token verification failed" msgid "Invalid response format or token verification failed"
msgstr "" msgstr ""
@@ -49,10 +49,6 @@ msgstr ""
msgid "User info contained no recognizable user identification" msgid "User info contained no recognizable user identification"
msgstr "" msgstr ""
#: core/authentication/backends.py:101
msgid "Claims contained no recognizable user identification"
msgstr ""
#: core/models.py:62 core/models.py:69 #: core/models.py:62 core/models.py:69
msgid "Reader" msgid "Reader"
msgstr "Lecteur" msgstr "Lecteur"
@@ -117,224 +113,237 @@ msgstr ""
msgid "Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_ characters only." msgid "Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_ characters only."
msgstr "" msgstr ""
#: core/models.py:148 #: core/models.py:149
msgid "full name"
msgstr ""
#: core/models.py:150
msgid "short name"
msgstr ""
#: core/models.py:152
msgid "identity email address" msgid "identity email address"
msgstr "" msgstr ""
#: core/models.py:153 #: core/models.py:157
msgid "admin email address" msgid "admin email address"
msgstr "" msgstr ""
#: core/models.py:160 #: core/models.py:164
msgid "language" msgid "language"
msgstr "" msgstr ""
#: core/models.py:161 #: core/models.py:165
msgid "The language in which the user wants to see the interface." msgid "The language in which the user wants to see the interface."
msgstr "" msgstr ""
#: core/models.py:167 #: core/models.py:171
msgid "The timezone in which the user wants to see times." msgid "The timezone in which the user wants to see times."
msgstr "" msgstr ""
#: core/models.py:170 #: core/models.py:174
msgid "device" msgid "device"
msgstr "" msgstr ""
#: core/models.py:172 #: core/models.py:176
msgid "Whether the user is a device or a real user." msgid "Whether the user is a device or a real user."
msgstr "" msgstr ""
#: core/models.py:175 #: core/models.py:179
msgid "staff status" msgid "staff status"
msgstr "" msgstr ""
#: core/models.py:177 #: core/models.py:181
msgid "Whether the user can log into this admin site." msgid "Whether the user can log into this admin site."
msgstr "" msgstr ""
#: core/models.py:180 #: core/models.py:184
msgid "active" msgid "active"
msgstr "" msgstr ""
#: core/models.py:183 #: core/models.py:187
msgid "Whether this user should be treated as active. Unselect this instead of deleting accounts." msgid "Whether this user should be treated as active. Unselect this instead of deleting accounts."
msgstr "" msgstr ""
#: core/models.py:195 #: core/models.py:199
msgid "user" msgid "user"
msgstr "" msgstr ""
#: core/models.py:196 #: core/models.py:200
msgid "users" msgid "users"
msgstr "" msgstr ""
#: core/models.py:328 core/models.py:644 #: core/models.py:332 core/models.py:638
msgid "title" msgid "title"
msgstr "" msgstr ""
#: core/models.py:343 #: core/models.py:347
msgid "Document" msgid "Document"
msgstr "" msgstr ""
#: core/models.py:344 #: core/models.py:348
msgid "Documents" msgid "Documents"
msgstr "" msgstr ""
#: core/models.py:347 #: core/models.py:351
msgid "Untitled Document" msgid "Untitled Document"
msgstr "" msgstr ""
#: core/models.py:537 #: core/models.py:530
#, python-format #, python-format
msgid "%(username)s shared a document with you: %(document)s" msgid "%(sender_name)s shared a document with you: %(document)s"
msgstr "%(username)s a partagé un document avec vous: %(document)s" msgstr "%(sender_name)s a partagé un document avec vous: %(document)s"
#: core/models.py:580 #: core/models.py:574
msgid "Document/user link trace" msgid "Document/user link trace"
msgstr "" msgstr ""
#: core/models.py:581 #: core/models.py:575
msgid "Document/user link traces" msgid "Document/user link traces"
msgstr "" msgstr ""
#: core/models.py:587 #: core/models.py:581
msgid "A link trace already exists for this document/user." msgid "A link trace already exists for this document/user."
msgstr "" msgstr ""
#: core/models.py:608 #: core/models.py:602
msgid "Document/user relation" msgid "Document/user relation"
msgstr "" msgstr ""
#: core/models.py:609 #: core/models.py:603
msgid "Document/user relations" msgid "Document/user relations"
msgstr "" msgstr ""
#: core/models.py:615 #: core/models.py:609
msgid "This user is already in this document." msgid "This user is already in this document."
msgstr "" msgstr ""
#: core/models.py:621 #: core/models.py:615
msgid "This team is already in this document." msgid "This team is already in this document."
msgstr "" msgstr ""
#: core/models.py:627 core/models.py:816 #: core/models.py:621 core/models.py:810
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "" msgstr ""
#: core/models.py:645 #: core/models.py:639
msgid "description" msgid "description"
msgstr "" msgstr ""
#: core/models.py:646 #: core/models.py:640
msgid "code" msgid "code"
msgstr "" msgstr ""
#: core/models.py:647 #: core/models.py:641
msgid "css" msgid "css"
msgstr "" msgstr ""
#: core/models.py:649 #: core/models.py:643
msgid "public" msgid "public"
msgstr "" msgstr ""
#: core/models.py:651 #: core/models.py:645
msgid "Whether this template is public for anyone to use." msgid "Whether this template is public for anyone to use."
msgstr "" msgstr ""
#: core/models.py:657 #: core/models.py:651
msgid "Template" msgid "Template"
msgstr "" msgstr ""
#: core/models.py:658 #: core/models.py:652
msgid "Templates" msgid "Templates"
msgstr "" msgstr ""
#: core/models.py:797 #: core/models.py:791
msgid "Template/user relation" msgid "Template/user relation"
msgstr "" msgstr ""
#: core/models.py:798 #: core/models.py:792
msgid "Template/user relations" msgid "Template/user relations"
msgstr "" msgstr ""
#: core/models.py:804 #: core/models.py:798
msgid "This user is already in this template." msgid "This user is already in this template."
msgstr "" msgstr ""
#: core/models.py:810 #: core/models.py:804
msgid "This team is already in this template." msgid "This team is already in this template."
msgstr "" msgstr ""
#: core/models.py:833 #: core/models.py:827
msgid "email address" msgid "email address"
msgstr "" msgstr ""
#: core/models.py:850 #: core/models.py:844
msgid "Document invitation" msgid "Document invitation"
msgstr "" msgstr ""
#: core/models.py:851 #: core/models.py:845
msgid "Document invitations" msgid "Document invitations"
msgstr "" msgstr ""
#: core/models.py:868 #: core/models.py:862
msgid "This email is already associated to a registered user." msgid "This email is already associated to a registered user."
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:160 #: core/templates/mail/html/hello.html:159 core/templates/mail/text/hello.txt:3
#: core/templates/mail/html/invitation2.html:160 msgid "Company logo"
msgstr ""
#: core/templates/mail/html/hello.html:188 core/templates/mail/text/hello.txt:5
#, python-format
msgid "Hello %(name)s"
msgstr ""
#: core/templates/mail/html/hello.html:188 core/templates/mail/text/hello.txt:5
msgid "Hello"
msgstr ""
#: core/templates/mail/html/hello.html:189 core/templates/mail/text/hello.txt:6
msgid "Thank you very much for your visit!"
msgstr ""
#: core/templates/mail/html/hello.html:221
#, python-format
msgid "This mail has been sent to %(email)s by <a href=\"%(href)s\">%(name)s</a>"
msgstr ""
#: core/templates/mail/html/invitation.html:159
#: core/templates/mail/text/invitation.txt:3 #: core/templates/mail/text/invitation.txt:3
#: core/templates/mail/text/invitation2.txt:3
msgid "La Suite Numérique" msgid "La Suite Numérique"
msgstr "" msgstr ""
#: core/templates/mail/html/invitation.html:190 #: core/templates/mail/html/invitation.html:189
#: core/templates/mail/text/invitation.txt:6 #: core/templates/mail/text/invitation.txt:6
#, python-format #, python-format
msgid " %(username)s shared a document with you ! " msgid " %(sender_name)s shared a document with you ! "
msgstr " %(username)s a partagé un document avec vous ! " msgstr " %(sender_name)s a partagé un document avec vous ! "
#: core/templates/mail/html/invitation.html:197 #: core/templates/mail/html/invitation.html:196
#: core/templates/mail/text/invitation.txt:8 #: core/templates/mail/text/invitation.txt:8
#, python-format #, python-format
msgid " %(username)s invited you as an %(role)s on the following document : " msgid " %(sender_name_email)s invited you with the role \"%(role)s\" on the following document : "
msgstr " %(username)s vous a invité en tant que %(role)s sur le document suivant : " msgstr " %(sender_name_email)s vous a invité avec le rôle \"%(role)s\" sur le document suivant : "
#: core/templates/mail/html/invitation.html:206 #: core/templates/mail/html/invitation.html:205
#: core/templates/mail/html/invitation2.html:211
#: core/templates/mail/text/invitation.txt:10 #: core/templates/mail/text/invitation.txt:10
#: core/templates/mail/text/invitation2.txt:11
msgid "Open" msgid "Open"
msgstr "Ouvrir" msgstr "Ouvrir"
#: core/templates/mail/html/invitation.html:223 #: core/templates/mail/html/invitation.html:222
#: core/templates/mail/text/invitation.txt:14 #: core/templates/mail/text/invitation.txt:14
msgid " Docs, your new essential tool for organizing, sharing and collaborate on your documents as a team. " msgid " Docs, your new essential tool for organizing, sharing and collaborating on your documents as a team. "
msgstr " Docs, votre nouvel outil incontournable pour organiser, partager et collaborer sur vos documents en équipe. " msgstr " Docs, votre nouvel outil incontournable pour organiser, partager et collaborer sur vos documents en équipe. "
#: core/templates/mail/html/invitation.html:230 #: core/templates/mail/html/invitation.html:229
#: core/templates/mail/html/invitation2.html:235
#: core/templates/mail/text/invitation.txt:16 #: core/templates/mail/text/invitation.txt:16
#: core/templates/mail/text/invitation2.txt:17
msgid "Brought to you by La Suite Numérique" msgid "Brought to you by La Suite Numérique"
msgstr "Proposé par La Suite Numérique" msgstr "Proposé par La Suite Numérique"
#: core/templates/mail/html/invitation2.html:190 #: core/templates/mail/text/hello.txt:8
#, python-format #, python-format
msgid "%(username)s shared a document with you" msgid "This mail has been sent to %(email)s by %(name)s [%(href)s]"
msgstr "%(username)s a partagé un document avec vous" msgstr ""
#: core/templates/mail/html/invitation2.html:197
#: core/templates/mail/text/invitation2.txt:8
#, python-format
msgid "%(username)s invited you as an %(role)s on the following document :"
msgstr "%(username)s vous a invité en tant que %(role)s sur le document suivant :"
#: core/templates/mail/html/invitation2.html:228
#: core/templates/mail/text/invitation2.txt:15
msgid "Docs, your new essential tool for organizing, sharing and collaborate on your document as a team."
msgstr "Docs, votre nouvel outil essentiel pour organiser, partager et collaborer sur votre document en équipe."
#: impress/settings.py:176 #: impress/settings.py:176
msgid "English" msgid "English"

View File

@@ -24,14 +24,14 @@
<mj-text align="center"> <mj-text align="center">
<h1> <h1>
{% blocktrans %} {% blocktrans %}
{{username}} shared a document with you ! {{sender_name}} shared a document with you !
{% endblocktrans %} {% endblocktrans %}
</h1> </h1>
</mj-text> </mj-text>
<!-- Main Message --> <!-- Main Message -->
<mj-text> <mj-text>
{% blocktrans %} {% blocktrans %}
{{username}} invited you as an {{role}} on the following document : {{sender_name_email}} invited you with the role "{{role}}" on the following document :
{% endblocktrans %} {% endblocktrans %}
<a href="{{link}}">{{document.title}}</a> <a href="{{link}}">{{document.title}}</a>
</mj-text> </mj-text>
@@ -52,7 +52,7 @@
/> />
<mj-text> <mj-text>
{% blocktrans %} {% blocktrans %}
Docs, your new essential tool for organizing, sharing and collaborate on your documents as a team. Docs, your new essential tool for organizing, sharing and collaborating on your documents as a team.
{% endblocktrans %} {% endblocktrans %}
</mj-text> </mj-text>
<!-- Signature --> <!-- Signature -->

View File

@@ -32,8 +32,7 @@
/* Global styles */ /* Global styles */
h1 { h1 {
color: #161616; color: #161616;
font-size: 1.5rem; font-size: 1.4rem;
line-height: 1em;
font-weight: 700; font-weight: 700;
} }