Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Simplify error messages #1591

Closed
jgerman-bot opened this issue Feb 3, 2021 · 0 comments · Fixed by #1593
Closed

[4.0] Simplify error messages #1591

jgerman-bot opened this issue Feb 3, 2021 · 0 comments · Fixed by #1593

Comments

@jgerman-bot
Copy link

New language relevant PR in upstream repo: joomla/joomla-cms#32268 Here are the upstream changes:

Click to expand the diff!
diff --git a/components/com_users/src/Model/ProfileModel.php b/components/com_users/src/Model/ProfileModel.php
index 1b484522b3b2..74f134cbc9d0 100644
--- a/components/com_users/src/Model/ProfileModel.php
+++ b/components/com_users/src/Model/ProfileModel.php
@@ -386,7 +386,7 @@ public function save($data)
 		// Bind the data.
 		if (!$user->bind($data))
 		{
-			$this->setError(Text::sprintf('COM_USERS_PROFILE_BIND_FAILED', $user->getError()));
+			$this->setError($user->getError());
 
 			return false;
 		}
diff --git a/components/com_users/src/Model/RegistrationModel.php b/components/com_users/src/Model/RegistrationModel.php
index 5c117ae667e5..9eb1397e2bec 100644
--- a/components/com_users/src/Model/RegistrationModel.php
+++ b/components/com_users/src/Model/RegistrationModel.php
@@ -481,7 +481,7 @@ public function register($temp)
 		// Bind the data.
 		if (!$user->bind($data))
 		{
-			$this->setError(Text::sprintf('COM_USERS_REGISTRATION_BIND_FAILED', $user->getError()));
+			$this->setError($user->getError());
 
 			return false;
 		}
diff --git a/language/en-GB/com_users.ini b/language/en-GB/com_users.ini
index 3e99628be9ea..0e6d7f33ce33 100644
--- a/language/en-GB/com_users.ini
+++ b/language/en-GB/com_users.ini
@@ -43,7 +43,6 @@ COM_USERS_MAIL_SEND_FAILURE_BODY="An error was encountered when sending the user
 COM_USERS_MAIL_SEND_FAILURE_SUBJECT="Error sending email"
 COM_USERS_OR="or"
 COM_USERS_PROFILE="User Profile"
-COM_USERS_PROFILE_BIND_FAILED="Could not bind profile data: %s"
 COM_USERS_PROFILE_CORE_LEGEND="Profile"
 COM_USERS_PROFILE_DEFAULT_LABEL="Edit Your Profile"
 COM_USERS_PROFILE_EMAIL1_LABEL="Email Address"
@@ -78,7 +77,6 @@ COM_USERS_REGISTRATION_ACTIVATE_SUCCESS="Your Account has been activated. You ca
 COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED="An error was encountered while sending activation notification email"
 COM_USERS_REGISTRATION_ACTIVATION_SAVE_FAILED="Failed to save activation data: %s"
 COM_USERS_REGISTRATION_ADMINACTIVATE_SUCCESS="The user's account has been activated and the user has been notified about it."
-COM_USERS_REGISTRATION_BIND_FAILED="Failed to bind registration data: %s"
 COM_USERS_REGISTRATION_COMPLETE_ACTIVATE="Your account has been created and an activation link has been sent to the email address you entered. Note that you must activate the account by selecting the activation link when you get the email before you can login."
 COM_USERS_REGISTRATION_COMPLETE_VERIFY="Your account has been created and a verification link has been sent to the email address you entered. Note that you must verify the account by selecting the verification link when you get the email and then an administrator will activate your account before you can login."
 COM_USERS_REGISTRATION_DEFAULT_LABEL="User Registration"
tecpromotion added a commit to tecpromotion/joomla that referenced this issue Feb 6, 2021
@tecpromotion tecpromotion linked a pull request Feb 6, 2021 that will close this issue
zero-24 pushed a commit that referenced this issue Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants