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": {
|
"Reactions--error": {
|
||||||
"message": "Failed to send reaction. Please try again.",
|
"message": "Failed to send reaction. Please try again.",
|
||||||
"description": "Shown when a reaction fails to send"
|
"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 React from 'react';
|
||||||
|
|
||||||
import { Emojify } from './Emojify';
|
import { Emojify } from './Emojify';
|
||||||
import { Intl } from '../Intl';
|
|
||||||
import { LocalizerType } from '../../types/Util';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
phoneNumber?: string;
|
phoneNumber?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
profileName?: string;
|
profileName?: string;
|
||||||
module?: string;
|
module?: string;
|
||||||
isMe?: boolean;
|
|
||||||
i18n?: LocalizerType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ContactName extends React.Component<Props> {
|
export class ContactName extends React.Component<Props> {
|
||||||
public render() {
|
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 prefix = module ? module : 'module-contact-name';
|
||||||
|
|
||||||
const title = name ? name : phoneNumber;
|
const title = name ? name : phoneNumber;
|
||||||
|
@ -26,21 +22,11 @@ export class ContactName extends React.Component<Props> {
|
||||||
</span>
|
</span>
|
||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
const fragment = (
|
return (
|
||||||
<>
|
<span className={prefix} dir="auto">
|
||||||
<Emojify text={title} />
|
<Emojify text={title} />
|
||||||
{shouldShowProfile ? ' ' : null}
|
{shouldShowProfile ? ' ' : null}
|
||||||
{profileElement}
|
{profileElement}
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span className={prefix} dir="auto">
|
|
||||||
{isMe ? (
|
|
||||||
<Intl i18n={i18n} id="ContactName--you" components={[fragment]} />
|
|
||||||
) : (
|
|
||||||
fragment
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,11 +143,9 @@ export const ReactionViewer = React.forwardRef<HTMLDivElement, Props>(
|
||||||
</div>
|
</div>
|
||||||
<ContactName
|
<ContactName
|
||||||
module="module-reaction-viewer__body__row__name"
|
module="module-reaction-viewer__body__row__name"
|
||||||
i18n={i18n}
|
|
||||||
name={from.name}
|
name={from.name}
|
||||||
profileName={from.profileName}
|
profileName={from.profileName}
|
||||||
phoneNumber={from.phoneNumber}
|
phoneNumber={from.phoneNumber}
|
||||||
isMe={from.isMe}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Reference in a new issue