-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
Replace username with display name in more places #3040
Conversation
This can be considered part of https://github.com/flarum/core/issues/1734 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only nit is in the comment thread.
app.alerts.show( | ||
{ type }, | ||
app.translator.trans(message, { | ||
user, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this meant to be username: user.displayName()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's now using our "magic" translator behavior that automatically provides a username
variable with the output of the username()
helper function if you pass a user (which actually returns the display name). This is actually more consistent with the other uses of the translator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow, I actually wasn't aware it was a thing lol
Changes proposed in this pull request:
Replaces instances of
username
which have not been converted to use display name yet.The following were fixed:
I don't think any of these had an open issue.
Reviewers should focus on:
For the alert change I have kept the existing name
username
for the translation variable. I think that's what we have already done in all previous instances.Confirmed
composer test
).