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.
This commit is contained in:
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; let title;
if (this.props.timestamp) { if (this.props.timestamp) {
title = _t( title = _t(
"Seen by %(userName)s at %(dateTime)s", "Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
{userName: this.props.member.userId, dateTime: formatDate(new Date(this.props.timestamp), this.props.showTwelveHour)}, {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", "Offline": "Offline",
"Unknown": "Unknown", "Unknown": "Unknown",
"Replying": "Replying", "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", "No rooms to show": "No rooms to show",
"Unnamed room": "Unnamed room", "Unnamed room": "Unnamed room",
"World readable": "World readable", "World readable": "World readable",