-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: leave warning modal translation interpolation #35522
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
fix: leave warning modal translation interpolation #35522
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
I have updated the code now. #35290 |
There is no need, I had already pushed the fix. |
|
you have wasted your time but I didn't said this thing. check the new messages I have posted #35290. |
|
Instead of focusing your energy in disputing who will fix what, you could try to help each other improve your fixes and be cordial to each other. Both your PR's have several issues that need to be addressed, and since you'd rather fight instead of reading the documentation and following the rules to open a proper PR, I fixed this issue here: #35568 I'll be closing both PRs. Take this as a warning. We don't want this kind of behaviour, and it paints a terrible picture for you guys. This is not a competition. |
|
New learning for me: |
|
Great to hear! Let's collaborate and help each other out. |
Fix leave warning modal translation interpolation
Proposed changes (including videos or screenshots)
This pull request addresses an issue in the leave room warning modal where the translation string wasn’t interpolating the room name correctly, resulting in the
%splaceholder being displayed instead of the actual room name. The changes include:useTranslationfrom@rocket.chat/ui-contextsinstead ofreact-i18next%splaceholder.Before:
After:
Fixes #35289
Steps to test or reproduce
%s.Further comments
This fix ensures that the leave room warning modal now provides clear, user-friendly feedback by correctly interpolating the room name. Please review and let me know if further adjustments or additional tests are required.
This issue was particularly difficult to debug because I tested multiple formatting variations, but none of them worked. The main culprit turned out to be a sneaky different import of useTranslation, which caused unexpected behavior. Fixing this import, and changing the formatting resolved the issue.
A similar fix was attempted in #35290 . In that PR, gabriellsh requested changes with the comment:
You have to correct the translation string. String interpolation shouldn't be handled manually
Originally posted by @gabriellsh in #35290 (review)
Please review and let me know if further adjustments or additional tests are required.