diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 7bbe4199047d..08fd3eb40a9c 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -468,6 +468,10 @@ "message": "Replying to You", "description": "Shown in iOS theme when someone else quotes a message from you" }, + "you": { + "message": "You", + "description": "In Android theme, shown in quote if you or someone else replies to you" + }, "replyingTo": { "message": "Replying to $name$", "description": "Shown in iOS theme when you or someone quotes to a message which is not from you", diff --git a/ts/components/conversation/Quote.tsx b/ts/components/conversation/Quote.tsx index d71f6f36d089..54365c4f54fd 100644 --- a/ts/components/conversation/Quote.tsx +++ b/ts/components/conversation/Quote.tsx @@ -176,10 +176,32 @@ export class Quote extends React.Component { ); } + public renderAuthor() { + const { + authorColor, + authorProfileName, + authorTitle, + i18n, + isFromMe, + } = this.props; + + + const authorProfileElement = authorProfileName + ? ~{authorProfileName} + : null; + + return ( +
+ { isFromMe + ? i18n('you') + : {authorTitle}{' '}{authorProfileElement} + } +
+ ); + } + public render() { const { - authorTitle, - authorProfileName, authorColor, onClick, isFromMe, @@ -189,9 +211,6 @@ export class Quote extends React.Component { return null; } - const authorProfileElement = authorProfileName - ? ~{authorProfileName} - : null; const classes = classnames( authorColor, 'quoted-message', @@ -203,9 +222,7 @@ export class Quote extends React.Component {
{this.renderIOSLabel()} -
- {authorTitle}{' '}{authorProfileElement} -
+ {this.renderAuthor()} {this.renderText()}
{this.renderIconContainer()}