From 594f599d7b831f6c3ad8f478e0ce52495315b669 Mon Sep 17 00:00:00 2001 From: Jan Stockfisch Date: Tue, 9 Jul 2019 12:43:40 +0200 Subject: [PATCH] [!!!][TASK] Streamline felogin locallang keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Resolves: #88706 Releases: master Change-Id: Ic32c33947c18adc9d4547c8ab7582e40c8474a69 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61241 Tested-by: TYPO3com Tested-by: Jörg Bösche Tested-by: Henning Liebe Tested-by: Tobi Kretschmann Tested-by: Benni Mack Reviewed-by: Steffen Frese Reviewed-by: Jörg Bösche Reviewed-by: Henning Liebe Reviewed-by: Tobi Kretschmann Reviewed-by: Benni Mack --- ...g-88706-StreamlineFeloginLocallangKeys.rst | 63 +++++++++++++++++++ .../Controller/FrontendLoginController.php | 18 +++--- .../Resources/Private/Language/locallang.xlf | 56 ++++++++--------- 3 files changed, 100 insertions(+), 37 deletions(-) create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Breaking-88706-StreamlineFeloginLocallangKeys.rst diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-88706-StreamlineFeloginLocallangKeys.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-88706-StreamlineFeloginLocallangKeys.rst new file mode 100644 index 000000000000..b9cb964ddc20 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-88706-StreamlineFeloginLocallangKeys.rst @@ -0,0 +1,63 @@ +.. include:: ../../Includes.txt + +==================================================== +Breaking: #88706 - Streamline felogin locallang keys +==================================================== + +See :issue:`88706` + +Description +=========== + +Remove `ll_` prefixes from translation keys in :file:`ext:felogin/Resources/private/Language/locallang.xlf` so that they share the same identifiers with the flexform settings. + + +Impact +====== + +Breaks installations that override ext:felogin language keys that are prefixed with `ll_`. + + +Affected Installations +====================== + +Only installations that override one of the following keys via TypoScript are affected. + +Keys: + +- `ll_welcome_header` +- `ll_welcome_message` +- `ll_logout_header` +- `ll_logout_message` +- `ll_error_header` +- `ll_error_message` +- `ll_success_header` +- `ll_success_message` +- `ll_status_header` +- `ll_status_message` +- `ll_change_password_header` +- `ll_change_password_message` +- `ll_change_password_nolinkprefix_message` +- `ll_change_password_notvalid_message` +- `ll_change_password_notequal_message` +- `ll_change_password_tooshort_message` +- `ll_change_password_done_message` +- `ll_forgot_header` +- `ll_forgot_email_password` +- `ll_forgot_email_nopassword` +- `ll_forgot_validate_reset_password` +- `ll_forgot_message` +- `ll_forgot_message_emailSent` +- `ll_forgot_reset_message` +- `ll_forgot_reset_message_emailSent` +- `ll_forgot_reset_message_error` +- `ll_forgot_header_backToLogin` +- `ll_enter_your_data` + + +Migration +========= + +Remove the corresponding `ll_` from the key. + +.. index:: Frontend, NotScanned, ext:felogin diff --git a/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php b/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php index 490ae8332532..bd3a8f1c94db 100644 --- a/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php +++ b/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php @@ -266,14 +266,14 @@ class FrontendLoginController extends AbstractPlugin // Generate an email with the hashed link $error = $this->generateAndSendHash($row); } elseif ($this->conf['exposeNonexistentUserInForgotPasswordDialog']) { - $error = $this->pi_getLL('ll_forgot_reset_message_error'); + $error = $this->pi_getLL('forgot_reset_message_error'); } // Generate message if ($error) { $markerArray['###STATUS_MESSAGE###'] = $this->cObj->stdWrap($error, $this->conf['forgotErrorMessage_stdWrap.']); } else { $markerArray['###STATUS_MESSAGE###'] = $this->cObj->stdWrap( - $this->pi_getLL('ll_forgot_reset_message_emailSent'), + $this->pi_getLL('forgot_reset_message_emailSent'), $this->conf['forgotResetMessageEmailSentMessage_stdWrap.'] ); } @@ -287,7 +287,7 @@ class FrontendLoginController extends AbstractPlugin $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('forgot_reset_message', $this->conf['forgotMessage_stdWrap.']); $markerArray['###BACKLINK_LOGIN###'] = ''; } - $markerArray['###BACKLINK_LOGIN###'] = $this->getPageLink(htmlspecialchars($this->pi_getLL('ll_forgot_header_backToLogin')), []); + $markerArray['###BACKLINK_LOGIN###'] = $this->getPageLink(htmlspecialchars($this->pi_getLL('forgot_header_backToLogin')), []); $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('forgot_header', $this->conf['forgotHeader_stdWrap.']); $markerArray['###LEGEND###'] = htmlspecialchars($this->pi_getLL('legend', $this->pi_getLL('reset_password'))); $markerArray['###ACTION_URI###'] = $this->getPageLink('', [$this->prefixId . '[forgot]' => 1], true); @@ -295,7 +295,7 @@ class FrontendLoginController extends AbstractPlugin $markerArray['###FORGOT_PASSWORD_ENTEREMAIL###'] = htmlspecialchars($this->pi_getLL('forgot_password_enterEmail')); $markerArray['###FORGOT_EMAIL###'] = $this->prefixId . '[forgot_email]'; $markerArray['###SEND_PASSWORD###'] = htmlspecialchars($this->pi_getLL('reset_password')); - $markerArray['###DATA_LABEL###'] = htmlspecialchars($this->pi_getLL('ll_enter_your_data')); + $markerArray['###DATA_LABEL###'] = htmlspecialchars($this->pi_getLL('enter_your_data')); $markerArray = array_merge($markerArray, $this->getUserFieldMarkers()); // Generate hash $hash = md5($this->generatePassword(3)); @@ -417,7 +417,7 @@ class FrontendLoginController extends AbstractPlugin $done = true; $subpartArray['###CHANGEPASSWORD_FORM###'] = ''; $markerArray['###BACKLINK_LOGIN###'] = $this->getPageLink( - htmlspecialchars($this->pi_getLL('ll_forgot_header_backToLogin')), + htmlspecialchars($this->pi_getLL('forgot_header_backToLogin')), [$this->prefixId . '[redirectReferrer]' => 'off'] ); } @@ -499,9 +499,9 @@ class FrontendLoginController extends AbstractPlugin $link = $this->frontendController->baseUrlWrap($link); } else { // No prefix is set, return the error - return $this->pi_getLL('ll_change_password_nolinkprefix_message'); + return $this->pi_getLL('change_password_nolinkprefix_message'); } - $msg = sprintf($this->pi_getLL('ll_forgot_validate_reset_password'), $user['username'], $link, $validEndString); + $msg = sprintf($this->pi_getLL('forgot_validate_reset_password'), $user['username'], $link, $validEndString); // Add hook for extra processing of mail message $params = [ 'message' => &$msg, @@ -652,7 +652,7 @@ class FrontendLoginController extends AbstractPlugin $markerArray = array_merge($markerArray, $this->getUserFieldMarkers()); if ($this->conf['showForgotPasswordLink']) { $linkpartArray['###FORGOT_PASSWORD_LINK###'] = explode('|', $this->getPageLink('|', [$this->prefixId . '[forgot]' => 1])); - $markerArray['###FORGOT_PASSWORD###'] = htmlspecialchars($this->pi_getLL('ll_forgot_header')); + $markerArray['###FORGOT_PASSWORD###'] = htmlspecialchars($this->pi_getLL('forgot_header')); } else { $subpartArray['###FORGOTP_VALID###'] = ''; } @@ -996,7 +996,7 @@ class FrontendLoginController extends AbstractPlugin */ protected function getDisplayText($label, $stdWrapArray = []) { - $text = $this->flexFormValue($label, 's_messages') ? $this->cObj->stdWrap($this->flexFormValue($label, 's_messages'), $stdWrapArray) : $this->cObj->stdWrap($this->pi_getLL('ll_' . $label), $stdWrapArray); + $text = $this->flexFormValue($label, 's_messages') ? $this->cObj->stdWrap($this->flexFormValue($label, 's_messages'), $stdWrapArray) : $this->cObj->stdWrap($this->pi_getLL($label), $stdWrapArray); $replace = $this->getUserFieldMarkers(); return strtr($text, $replace); } diff --git a/typo3/sysext/felogin/Resources/Private/Language/locallang.xlf b/typo3/sysext/felogin/Resources/Private/Language/locallang.xlf index 92b9b494030a..6c419fc279f0 100644 --- a/typo3/sysext/felogin/Resources/Private/Language/locallang.xlf +++ b/typo3/sysext/felogin/Resources/Private/Language/locallang.xlf @@ -3,36 +3,36 @@
- + User login - + Enter your username and password here in order to log in on the website - + You have logged out. - + You just logged out from your user session on this website. You can login again or as another user by the form below. - + Login failure - + An error occurred during login. Most likely you didn't enter the username or password correctly. Be certain that you enter them precisely as they are, including upper/lower case. Another possibility is that cookies might be disabled in your web browser. - + Login successful - + You are now logged in as '###USER###' - + Current status - + This is your current status @@ -59,25 +59,25 @@ Another possibility is that cookies might be disabled in your web browser. Reset Password - + Change your password - + Please enter your new password twice. Password needs a minimum length of %s chars. - + Error: there is no prefix for the link. Please set one of the following in your typoscript template: plugin.tx_felogin_pi1.feloginBaseURL = http://yourdomain/, config.baseURL = http://yourdomain/, config.absRefPrefix = / - + The link you clicked is not valid. Please repeat the forgot password procedure. - + The passwords are not equal, please enter your new password twice. Password needs a minimum length of %s chars. - + The password length is too short. Please enter your new password twice. Password needs a minimum length of %s chars. - + Your password has been saved. You can now login with your new password. @@ -92,23 +92,23 @@ Another possibility is that cookies might be disabled in your web browser. Your email - + Forgot your password? - + Your password Hi %s Your username is "%s" Your password is "%s" - + Your password Hi %s We couldn't find a username for this email address and so cannot send the password to you. Probably you misspelled the email address (upper/lower case makes a difference) or maybe you even didn't register yet? - + Your new password Dear %s, @@ -117,25 +117,25 @@ This email was sent in response to your request to reset your password. Please c For security reasons, this link is only active until %s. If you do not visit the link before then, you will need to repeat the password reset steps. - + Please enter the email address by which you registered your user account. Then press "Send password" and your password will immediately be emailed to you. Make sure to spell your email address correctly. - + Your password has now been sent to the email address %s - + Please enter your username or email address. Instructions for resetting the password will be immediately emailed to you. - + An email has been sent to the address stored in your account and contains a link to reset your password. If you do not receive an email, your account or email address was not found. - + Your account or email address does not exist. - + Return to login form - + Username or email address -- 2.20.1