-
Notifications
You must be signed in to change notification settings - Fork 889
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
Translation of the alert error when disconnecting from the session : "Your password was changed in another browser session. Please login again using the new password." #5359
Conversation
…"Your password was changed in another browser session..."
BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly. Please keep in mind that:
Thank you! -- |
Hey @dimer47 Thanks for the PR. Two small suggestions:
Cheers |
Thank you for your feedback @phpfour. I've made the changes to respect snake_case conventions and to improve the clarity of the key. |
Hey @dimer47, Thanks for addressing the suggestions! Before I merge this, can you fix the formatting issues in some of the files? Cheers |
Hey guys, I totally agree with what you are doing here. Let's finish this up and merge it 🙏 I would like also to add that I dislike that error message from the start. It's misleading in some scenarios, and I don't think we need/should be that specific on a session error. I propose we make it more general and change the message to: What you think @dimer47 @phpfour ? Cheers |
Hey @pxpm, thanks for chiming in here! To be honest, I was a bit skeptical seeing the password mentioned in the error message, but I thought maybe it was from a real use case that I was not aware of. If that's not the case, then I'm definitely in favor of making it generalized as you suggested. |
I agree that the default message is not very adequate and that it should be more general. Given that it can be overridden in laravel translations, I simply took the message already entered and translated it. However, if everyone is ok @tabacitu @pxpm @phpfour, I am also in favor of @pxpm's proposal: Based on feedback, I will make changes. |
@pxpm I just made the change, it's good now. 👍 |
WHOOP-WHOOP! Congrats, your first PR on this repo has officialy been merged. You should also receive an email inviting you to the Community Members team. That's where we, commited community members, debate new features and decide what's in the Backpack roadmap. Feel free to ignore the invitation if you're not interested :-) If you want to help out the community in other ways, you can:
Again. Thank you for the PR. You are a wonderful person. Keep 'em coming :-) -- P.S. Help in the Backpack community is rewarded with free Backpack commercial licenses. It's the least we can do. If you feel you've helped the community with PRs, help & other stuff, please apply for free licenses and mention this PR. You scratch my back, I scratch your back. Thank you! |
Translation of the alert error when disconnecting from the session : "Your password was changed in another browser session. Please login again using the new password."
WHY
BEFORE - What was wrong? What was happening before this PR?
The translation of the text was not managed, and the text was only in Englis. Additionally, the text could not be changed by translation override.
AFTER - What is happening after this PR?
The text is translated in the language files with the
backpack::base.error-login
key which allows it to be modified if necessary by overriding the translations.The translation of the message was done by default for all other languages, respecting the basic message in English.
HOW
How did you achieve that, in technical terms?
I put the text in the translation files and replace the text with its translation key in the
src/app/Http/Middleware/AuthenticateSession.php
file. I chose the translation keybackpack::base.error-login
.Is it a breaking change?
No, this is a minor, imperceptible change intended to improve the user experience when using Backpack for applications in native languages other than English (🇫🇷 France in my case).
How can we test the before & after?
Get the patch from my commit and apply it to an installation of Backpack in a Laravel project.
There are no dependencies with other repo as part of this PR.