Remove "you" qualifier from ReactionViewer and ContactName
This commit is contained in:
parent
b714a6817b
commit
c6a23ff4f6
3 changed files with 3 additions and 29 deletions
|
@ -2190,15 +2190,5 @@
|
|||
"Reactions--error": {
|
||||
"message": "Failed to send reaction. Please try again.",
|
||||
"description": "Shown when a reaction fails to send"
|
||||
},
|
||||
"ContactName--you": {
|
||||
"message": "$name$ (you)",
|
||||
"descriptions": "Indicates that a name represents the current user",
|
||||
"placeholders": {
|
||||
"name": {
|
||||
"content": "$1",
|
||||
"example": "Captain Jack Sparrow"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
import React from 'react';
|
||||
|
||||
import { Emojify } from './Emojify';
|
||||
import { Intl } from '../Intl';
|
||||
import { LocalizerType } from '../../types/Util';
|
||||
|
||||
interface Props {
|
||||
phoneNumber?: string;
|
||||
name?: string;
|
||||
profileName?: string;
|
||||
module?: string;
|
||||
isMe?: boolean;
|
||||
i18n?: LocalizerType;
|
||||
}
|
||||
|
||||
export class ContactName extends React.Component<Props> {
|
||||
public render() {
|
||||
const { phoneNumber, name, profileName, module, isMe, i18n } = this.props;
|
||||
const { phoneNumber, name, profileName, module } = this.props;
|
||||
const prefix = module ? module : 'module-contact-name';
|
||||
|
||||
const title = name ? name : phoneNumber;
|
||||
|
@ -26,21 +22,11 @@ export class ContactName extends React.Component<Props> {
|
|||
</span>
|
||||
) : null;
|
||||
|
||||
const fragment = (
|
||||
<>
|
||||
return (
|
||||
<span className={prefix} dir="auto">
|
||||
<Emojify text={title} />
|
||||
{shouldShowProfile ? ' ' : null}
|
||||
{profileElement}
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<span className={prefix} dir="auto">
|
||||
{isMe ? (
|
||||
<Intl i18n={i18n} id="ContactName--you" components={[fragment]} />
|
||||
) : (
|
||||
fragment
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -143,11 +143,9 @@ export const ReactionViewer = React.forwardRef<HTMLDivElement, Props>(
|
|||
</div>
|
||||
<ContactName
|
||||
module="module-reaction-viewer__body__row__name"
|
||||
i18n={i18n}
|
||||
name={from.name}
|
||||
profileName={from.profileName}
|
||||
phoneNumber={from.phoneNumber}
|
||||
isMe={from.isMe}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
|
Loading…
Reference in a new issue