Add display name to the read receipt view

Show the user's display name (aka nick) in the ReadReceiptMarker
title (mouseover text), and then the user ID in parentheses.
pull/21833/head
Aidan Gauland 2018-02-11 16:14:17 +13:00
parent 40cee9bb02
commit 97ce84c8e3
2 changed files with 5 additions and 3 deletions

View File

@ -186,8 +186,10 @@ module.exports = React.createClass({
let title;
if (this.props.timestamp) {
title = _t(
"Seen by %(userName)s at %(dateTime)s",
{userName: this.props.member.userId, dateTime: formatDate(new Date(this.props.timestamp), this.props.showTwelveHour)},
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
{displayName: this.props.member.name,
userName: this.props.member.userId,
dateTime: formatDate(new Date(this.props.timestamp), this.props.showTwelveHour)},
);
}

View File

@ -360,7 +360,7 @@
"Offline": "Offline",
"Unknown": "Unknown",
"Replying": "Replying",
"Seen by %(userName)s at %(dateTime)s": "Seen by %(userName)s at %(dateTime)s",
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s": "Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
"No rooms to show": "No rooms to show",
"Unnamed room": "Unnamed room",
"World readable": "World readable",