From 6c7715a6c3a67381320885b9ef1acb145a8db878 Mon Sep 17 00:00:00 2001
From: Michael Schams <typo3@2020.schams.net>
Date: Fri, 20 Mar 2020 15:52:41 +1100
Subject: [PATCH] [TASK] Optimize wording for reset backend password
 functionality

This change updates the email texts and subject lines for HTML and plain
text mails, as well as some labels in the backend.

Resolves: #90670
Releases: master
Change-Id: I1ac121097d784bcdf365f1e31c2ce37f53c73617
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63771
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 .../Language/locallang_reset_password.xlf        | 12 ++++++------
 .../Email/PasswordReset/ClosingParagraph.html    |  6 ++++++
 .../Email/PasswordReset/ClosingParagraph.txt     |  2 ++
 .../PasswordReset/AmbiguousResetRequested.html   | 14 ++++++--------
 .../PasswordReset/AmbiguousResetRequested.txt    | 12 ++++--------
 .../Email/PasswordReset/ResetRequested.html      | 16 ++++++++--------
 .../Email/PasswordReset/ResetRequested.txt       | 11 +++--------
 .../Resources/Private/Language/locallang.xlf     |  2 +-
 8 files changed, 36 insertions(+), 39 deletions(-)
 create mode 100644 typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.html
 create mode 100644 typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.txt

diff --git a/typo3/sysext/backend/Resources/Private/Language/locallang_reset_password.xlf b/typo3/sysext/backend/Resources/Private/Language/locallang_reset_password.xlf
index 1c362981a070..0a1b138ee99a 100644
--- a/typo3/sysext/backend/Resources/Private/Language/locallang_reset_password.xlf
+++ b/typo3/sysext/backend/Resources/Private/Language/locallang_reset_password.xlf
@@ -7,10 +7,10 @@
 				<source>Reset Your Password</source>
 			</trans-unit>
 			<trans-unit id="instructions.email" resname="instructions.email">
-				<source>To reset your password, enter the email address you use to sign in to TYPO3 Backend.</source>
+				<source>To reset your password, enter the email address stored in the backend user account.</source>
 			</trans-unit>
 			<trans-unit id="instructions.password" resname="instructions.password">
-				<source>To reset your password, enter a new password with at least 8 characters, so you use to sign in to TYPO3 Backend.</source>
+				<source>To reset your password, enter a new password with at least 8 characters.</source>
 			</trans-unit>
 			<trans-unit id="note.other_providers" resname="note.other_providers">
 				<source>Note: If you're using a centralized user management system such as LDAP, OAuth or Active Directory, you might not receive an email.</source>
@@ -19,13 +19,13 @@
 				<source>Check your inbox!</source>
 			</trans-unit>
 			<trans-unit id="email_sent.message" resname="email_sent.message">
-				<source><![CDATA[We've sent an email to "%s" if we found the email in this TYPO3 installation. Please check your inbox and possibly a spam folder.]]></source>
+				<source><![CDATA[If a backend user with the email address "%s" exists, an email has been sent to this address. Please check your inbox and spam folder.]]></source>
 			</trans-unit>
 			<trans-unit id="reset_success.headline" resname="reset_success.headline">
 				<source>You've successfully reset your password!</source>
 			</trans-unit>
 			<trans-unit id="reset_success.message" resname="reset_success.message">
-				<source><![CDATA[You can now log in to the TYPO3 Backend with your new credentials <a href="%s">here</a>.]]></source>
+				<source><![CDATA[You can now log in to the TYPO3 backend with your new credentials <a href="%s">here</a>.]]></source>
 			</trans-unit>
 			<trans-unit id="input.password" resname="input.password">
 				<source>Enter your new password</source>
@@ -49,10 +49,10 @@
 				<source>The entered email address is invalid. Please try again.</source>
 			</trans-unit>
 			<trans-unit id="error.token_expired" resname="error.token_expired">
-				<source>Your link is invalid or has expired.</source>
+				<source>The password reset link is invalid or has expired.</source>
 			</trans-unit>
 			<trans-unit id="error.password" resname="error.password">
-				<source>The entered password is invalid or the passwords do not match. Please try again.</source>
+				<source>The password you entered is invalid or the passwords do not match. Please try again.</source>
 			</trans-unit>
 		</body>
 	</file>
diff --git a/typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.html b/typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.html
new file mode 100644
index 000000000000..2f09f3fe1cab
--- /dev/null
+++ b/typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.html
@@ -0,0 +1,6 @@
+<p>
+    <f:if condition="{normalizedParams.remoteAddress}">
+        This password reset request originated from the IP address <strong>{normalizedParams.remoteAddress}</strong>.
+    </f:if>
+    If you have not requested a password reset and have concerns about this email, please let your administrator know.
+</p>
diff --git a/typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.txt b/typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.txt
new file mode 100644
index 000000000000..07f72a92b936
--- /dev/null
+++ b/typo3/sysext/backend/Resources/Private/Partials/Email/PasswordReset/ClosingParagraph.txt
@@ -0,0 +1,2 @@
+<f:if condition="{normalizedParams.remoteAddress}">This password reset request originated from the IP address "{normalizedParams.remoteAddress}".</f:if>
+If you have not requested a password reset and have concerns about this email, please let your administrator know.
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.html b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.html
index ca7ee8f76ba0..2063cfb71dca 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.html
@@ -1,12 +1,10 @@
 <f:layout name="SystemEmail" />
 <f:section name="Subject">Password reset requested at "{typo3.sitename}"</f:section>
-<f:section name="Title">Your email was used to trigger a password reset</f:section>
+<f:section name="Title">Your email address was used to trigger a password reset</f:section>
 <f:section name="Main">
-    <h4>Your email address is used multiple times</h4>
-    <p>It seems like your email address "{email}" is used for multiple Backend accounts in this TYPO3 installation.</p>
-    <p>We cannot reset your account for this reason. Reach out to your TYPO3 administrator to change this.</p>
-    <f:if condition="{normalizedParams.remoteAddress}">
-        <p>The email was requested by IP address <strong>{normalizedParams.remoteAddress}</strong>.</p>
-    </f:if>
-    <p>If you did not initiate a password reset, reach out to your administrator.</p>
+    <p>
+        Unfortunately, we are unable to reset your password because your email address "{email}" is used for multiple backend user accounts at the TYPO3 instance "{typo3.sitename}".
+        Please ask your administrator to generate a new password for you.
+    </p>
+    <f:render partial="Email/PasswordReset/ClosingParagraph" arguments="{normalizedParams: normalizedParams}" />
 </f:section>
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.txt b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.txt
index d30173fd679a..c8a04abee575 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.txt
+++ b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/AmbiguousResetRequested.txt
@@ -1,13 +1,9 @@
 <f:layout name="SystemEmail" />
 <f:section name="Subject">Password reset requested at "{typo3.sitename}"</f:section>
-<f:section name="Title">Your email "{email}" was used to trigger a password reset.</f:section>
+<f:section name="Title">Your email address was used to trigger a password reset</f:section>
 <f:section name="Main">
-However, it seems like your email address "{email}" is used for multiple Backend accounts in this TYPO3 installation.
+Unfortunately, we are unable to reset your password because your email address "{email}" is used for multiple backend user accounts at the TYPO3 instance "{typo3.sitename}".
+Please ask your administrator to generate a new password for you.
 
-We cannot reset your account for this reason. Reach out to your TYPO3 administrator to change this.
-<f:if condition="{normalizedParams.remoteAddress}">
-The email was requested by IP address "{normalizedParams.remoteAddress}".
-</f:if>
-
-If you did not initiate a password reset, reach out to your administrator.
+<f:render partial="Email/PasswordReset/ClosingParagraph" arguments="{normalizedParams: normalizedParams}" />
 </f:section>
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.html b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.html
index 1a6e01b5f55e..52f522863d43 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.html
@@ -1,12 +1,12 @@
 <f:layout name="SystemEmail" />
 <f:section name="Subject">Password reset requested at "{typo3.sitename}"</f:section>
-<f:section name="Title">Your email was used to trigger a password reset</f:section>
+<f:section name="Title">Your email address was used to trigger a password reset</f:section>
 <f:section name="Main">
-    <h4>Click on the link below to reset your password</h4>
-    <p><a href="{resetLink}">Reset your password now</a></p>
-    <p>The link is valid for 2 hours.</p>
-    <f:if condition="{normalizedParams.remoteAddress}">
-        <p>The email was requested by IP address <strong>{normalizedParams.remoteAddress}</strong>.</p>
-    </f:if>
-    <p>If you did not initiate a password reset, reach out to your administrator.</p>
+    <p>
+        Follow the link below to reset your backend user password at &quot;{typo3.sitename}&quot; (this link expires in 2 hours).
+    </p>
+    <p>
+        <a href="{resetLink}">Reset password</a>
+    </p>
+    <f:render partial="Email/PasswordReset/ClosingParagraph" arguments="{normalizedParams: normalizedParams}" />
 </f:section>
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.txt b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.txt
index 53016b44cdfd..98d4e0e3a2ed 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.txt
+++ b/typo3/sysext/backend/Resources/Private/Templates/Email/PasswordReset/ResetRequested.txt
@@ -1,15 +1,10 @@
 <f:layout name="SystemEmail" />
 <f:section name="Subject">Password reset requested at "{typo3.sitename}"</f:section>
-<f:section name="Title">Your email was used to trigger a password reset</f:section>
+<f:section name="Title">Your email address was used to trigger a password reset</f:section>
 <f:section name="Main">
+Follow the link below to reset your backend user password at "{typo3.sitename}" (this link expires in 2 hours).
 
-Click on the link below to reset your password:
 {resetLink}
 
-Please note: The link is valid for 2 hours.
-<f:if condition="{normalizedParams.remoteAddress}">
-The email was requested by IP address "{normalizedParams.remoteAddress}".
-</f:if>
-
-If you did not initiate a password reset, reach out to your administrator.
+<f:render partial="Email/PasswordReset/ClosingParagraph" arguments="{normalizedParams: normalizedParams}" />
 </f:section>
diff --git a/typo3/sysext/beuser/Resources/Private/Language/locallang.xlf b/typo3/sysext/beuser/Resources/Private/Language/locallang.xlf
index 85365797d0e9..c2ec956b4a93 100644
--- a/typo3/sysext/beuser/Resources/Private/Language/locallang.xlf
+++ b/typo3/sysext/beuser/Resources/Private/Language/locallang.xlf
@@ -241,7 +241,7 @@
 				<source>Reset Password</source>
 			</trans-unit>
 			<trans-unit id="resetPassword.confirmation.text" resname="resetPassword.confirmation.text">
-				<source>Are you sure to reset the password for %s?</source>
+				<source>Are you sure you want to reset the password for %s?</source>
 			</trans-unit>
 		</body>
 	</file>
-- 
GitLab