Fully migrate to ICU
This commit is contained in:
parent
d4e7177ba6
commit
5e647c55d1
274 changed files with 7948 additions and 1944 deletions
|
@ -72,7 +72,7 @@ export function AttachmentList<T extends AttachmentType | AttachmentDraftType>({
|
|||
type="button"
|
||||
onClick={onClose}
|
||||
className="module-attachments__close-button"
|
||||
aria-label={i18n('close')}
|
||||
aria-label={i18n('icu:close')}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
|
@ -102,7 +102,7 @@ export function AttachmentList<T extends AttachmentType | AttachmentDraftType>({
|
|||
const imgElement = (
|
||||
<Image
|
||||
key={key}
|
||||
alt={i18n('stagedImageAttachment', {
|
||||
alt={i18n('icu:stagedImageAttachment', {
|
||||
path: attachment.fileName || url || index.toString(),
|
||||
})}
|
||||
className="module-staged-attachment"
|
||||
|
|
|
@ -54,10 +54,10 @@ export function AudioCapture({
|
|||
<>
|
||||
<div className="AudioCapture">
|
||||
<button
|
||||
aria-label={i18n('voiceRecording--start')}
|
||||
aria-label={i18n('icu:voiceRecording--start')}
|
||||
className="AudioCapture__microphone"
|
||||
onClick={handleClick}
|
||||
title={i18n('voiceRecording--start')}
|
||||
title={i18n('icu:voiceRecording--start')}
|
||||
type="button"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -110,10 +110,10 @@ function renderCallingNotificationButton(
|
|||
case CallMode.Direct: {
|
||||
const { wasIncoming, wasVideoCall } = props;
|
||||
buttonText = wasIncoming
|
||||
? i18n('calling__call-back')
|
||||
: i18n('calling__call-again');
|
||||
? i18n('icu:calling__call-back')
|
||||
: i18n('icu:calling__call-again');
|
||||
if (activeCallConversationId) {
|
||||
disabledTooltipText = i18n('calling__in-another-call-tooltip');
|
||||
disabledTooltipText = i18n('icu:calling__in-another-call-tooltip');
|
||||
onClick = noop;
|
||||
} else {
|
||||
onClick = () => {
|
||||
|
@ -129,24 +129,24 @@ function renderCallingNotificationButton(
|
|||
const { deviceCount, maxDevices } = props;
|
||||
if (activeCallConversationId) {
|
||||
if (activeCallConversationId === conversationId) {
|
||||
buttonText = i18n('calling__return');
|
||||
buttonText = i18n('icu:calling__return');
|
||||
onClick = returnToActiveCall;
|
||||
} else {
|
||||
buttonText = i18n('calling__join');
|
||||
disabledTooltipText = i18n('calling__in-another-call-tooltip');
|
||||
buttonText = i18n('icu:calling__join');
|
||||
disabledTooltipText = i18n('icu:calling__in-another-call-tooltip');
|
||||
onClick = noop;
|
||||
}
|
||||
} else if (deviceCount >= maxDevices) {
|
||||
buttonText = i18n('calling__call-is-full');
|
||||
buttonText = i18n('icu:calling__call-is-full');
|
||||
disabledTooltipText = i18n(
|
||||
'calling__call-notification__button__call-full-tooltip',
|
||||
'icu:calling__call-notification__button__call-full-tooltip',
|
||||
{
|
||||
max: String(deviceCount),
|
||||
}
|
||||
);
|
||||
onClick = noop;
|
||||
} else {
|
||||
buttonText = i18n('calling__join');
|
||||
buttonText = i18n('icu:calling__join');
|
||||
onClick = () => {
|
||||
startCallingLobby({ conversationId, isVideoCall: true });
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ export function ChangeNumberNotification(props: Props): JSX.Element {
|
|||
contents={
|
||||
<>
|
||||
<Intl
|
||||
id="ChangeNumber--notification"
|
||||
id="icu:ChangeNumber--notification"
|
||||
components={{
|
||||
sender: <Emojify text={sender.title || sender.firstName || ''} />,
|
||||
}}
|
||||
|
|
|
@ -41,10 +41,10 @@ export function ChatSessionRefreshedDialog(
|
|||
/>
|
||||
</div>
|
||||
<div className="module-chat-session-refreshed-dialog__title">
|
||||
{i18n('ChatRefresh--notification')}
|
||||
{i18n('icu:ChatRefresh--notification')}
|
||||
</div>
|
||||
<div className="module-chat-session-refreshed-dialog__description">
|
||||
{i18n('ChatRefresh--summary')}
|
||||
{i18n('icu:ChatRefresh--summary')}
|
||||
</div>
|
||||
<div className="module-chat-session-refreshed-dialog__buttons">
|
||||
<button
|
||||
|
@ -55,7 +55,7 @@ export function ChatSessionRefreshedDialog(
|
|||
'module-chat-session-refreshed-dialog__button--secondary'
|
||||
)}
|
||||
>
|
||||
{i18n('ChatRefresh--contactSupport')}
|
||||
{i18n('icu:ChatRefresh--contactSupport')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
|
@ -63,7 +63,7 @@ export function ChatSessionRefreshedDialog(
|
|||
ref={focusRef}
|
||||
className="module-chat-session-refreshed-dialog__button"
|
||||
>
|
||||
{i18n('Confirmation--confirm')}
|
||||
{i18n('icu:Confirmation--confirm')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -46,14 +46,14 @@ export function ChatSessionRefreshedNotification(
|
|||
return (
|
||||
<>
|
||||
<SystemMessage
|
||||
contents={i18n('ChatRefresh--notification')}
|
||||
contents={i18n('icu:ChatRefresh--notification')}
|
||||
button={
|
||||
<Button
|
||||
onClick={openDialog}
|
||||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
>
|
||||
{i18n('ChatRefresh--learnMore')}
|
||||
{i18n('icu:ChatRefresh--learnMore')}
|
||||
</Button>
|
||||
}
|
||||
icon="session-refresh"
|
||||
|
|
|
@ -30,13 +30,13 @@ export type Props = {
|
|||
function getLabelForEmail(method: Email, i18n: LocalizerType): string {
|
||||
switch (method.type) {
|
||||
case ContactFormType.CUSTOM:
|
||||
return method.label || i18n('email');
|
||||
return method.label || i18n('icu:email');
|
||||
case ContactFormType.HOME:
|
||||
return i18n('home');
|
||||
return i18n('icu:home');
|
||||
case ContactFormType.MOBILE:
|
||||
return i18n('mobile');
|
||||
return i18n('icu:mobile');
|
||||
case ContactFormType.WORK:
|
||||
return i18n('work');
|
||||
return i18n('icu:work');
|
||||
default:
|
||||
throw missingCaseError(method.type);
|
||||
}
|
||||
|
@ -45,13 +45,13 @@ function getLabelForEmail(method: Email, i18n: LocalizerType): string {
|
|||
function getLabelForPhone(method: Phone, i18n: LocalizerType): string {
|
||||
switch (method.type) {
|
||||
case ContactFormType.CUSTOM:
|
||||
return method.label || i18n('phone');
|
||||
return method.label || i18n('icu:phone');
|
||||
case ContactFormType.HOME:
|
||||
return i18n('home');
|
||||
return i18n('icu:home');
|
||||
case ContactFormType.MOBILE:
|
||||
return i18n('mobile');
|
||||
return i18n('icu:mobile');
|
||||
case ContactFormType.WORK:
|
||||
return i18n('work');
|
||||
return i18n('icu:work');
|
||||
default:
|
||||
throw missingCaseError(method.type);
|
||||
}
|
||||
|
@ -63,11 +63,11 @@ function getLabelForAddress(
|
|||
): string {
|
||||
switch (address.type) {
|
||||
case AddressType.CUSTOM:
|
||||
return address.label || i18n('address');
|
||||
return address.label || i18n('icu:address');
|
||||
case AddressType.HOME:
|
||||
return i18n('home');
|
||||
return i18n('icu:home');
|
||||
case AddressType.WORK:
|
||||
return i18n('work');
|
||||
return i18n('icu:work');
|
||||
default:
|
||||
throw missingCaseError(address.type);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ export class ContactDetail extends React.Component<Props> {
|
|||
>
|
||||
<div className="module-contact-detail__send-message__inner">
|
||||
<div className="module-contact-detail__send-message__bubble-icon" />
|
||||
{i18n('sendMessageToContact')}
|
||||
{i18n('icu:sendMessageToContact')}
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
|
@ -172,7 +172,7 @@ export class ContactDetail extends React.Component<Props> {
|
|||
|
||||
return (
|
||||
<div>
|
||||
{i18n('poBox')} {poBox}
|
||||
{i18n('icu:poBox')} {poBox}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -117,18 +117,18 @@ export function ContactModal({
|
|||
{
|
||||
action: () => toggleAdmin(conversation.id, contact.id),
|
||||
text: isAdmin
|
||||
? i18n('ContactModal--rm-admin')
|
||||
: i18n('ContactModal--make-admin'),
|
||||
? i18n('icu:ContactModal--rm-admin')
|
||||
: i18n('icu:ContactModal--make-admin'),
|
||||
},
|
||||
]}
|
||||
i18n={i18n}
|
||||
onClose={() => setSubModalState(SubModalState.None)}
|
||||
>
|
||||
{isAdmin
|
||||
? i18n('ContactModal--rm-admin-info', {
|
||||
? i18n('icu:ContactModal--rm-admin-info', {
|
||||
contact: contact.title,
|
||||
})
|
||||
: i18n('ContactModal--make-admin-info', {
|
||||
: i18n('icu:ContactModal--make-admin-info', {
|
||||
contact: contact.title,
|
||||
})}
|
||||
</ConfirmationDialog>
|
||||
|
@ -233,7 +233,7 @@ export function ContactModal({
|
|||
<div className="ContactModal__bubble-icon">
|
||||
<div className="ContactModal__send-message__bubble-icon" />
|
||||
</div>
|
||||
<span>{i18n('ContactModal--message')}</span>
|
||||
<span>{i18n('icu:ContactModal--message')}</span>
|
||||
</button>
|
||||
{!contact.isMe && (
|
||||
<button
|
||||
|
@ -247,7 +247,7 @@ export function ContactModal({
|
|||
<div className="ContactModal__bubble-icon">
|
||||
<div className="ContactModal__safety-number__bubble-icon" />
|
||||
</div>
|
||||
<span>{i18n('showSafetyNumber')}</span>
|
||||
<span>{i18n('icu:showSafetyNumber')}</span>
|
||||
</button>
|
||||
)}
|
||||
{!contact.isMe && isMember && conversation?.id && (
|
||||
|
@ -276,9 +276,9 @@ export function ContactModal({
|
|||
<div className="ContactModal__make-admin__bubble-icon" />
|
||||
</div>
|
||||
{isAdmin ? (
|
||||
<span>{i18n('ContactModal--rm-admin')}</span>
|
||||
<span>{i18n('icu:ContactModal--rm-admin')}</span>
|
||||
) : (
|
||||
<span>{i18n('ContactModal--make-admin')}</span>
|
||||
<span>{i18n('icu:ContactModal--make-admin')}</span>
|
||||
)}
|
||||
</button>
|
||||
<button
|
||||
|
@ -289,7 +289,7 @@ export function ContactModal({
|
|||
<div className="ContactModal__bubble-icon">
|
||||
<div className="ContactModal__remove-from-group__bubble-icon" />
|
||||
</div>
|
||||
<span>{i18n('ContactModal--remove-from-group')}</span>
|
||||
<span>{i18n('icu:ContactModal--remove-from-group')}</span>
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
|
|
|
@ -180,11 +180,13 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
'<ContactSpoofingReviewDialog> expected a direct conversation for the "safe" conversation'
|
||||
);
|
||||
|
||||
title = i18n('ContactSpoofingReviewDialog__title');
|
||||
title = i18n('icu:ContactSpoofingReviewDialog__title');
|
||||
contents = (
|
||||
<>
|
||||
<p>{i18n('ContactSpoofingReviewDialog__description')}</p>
|
||||
<h2>{i18n('ContactSpoofingReviewDialog__possibly-unsafe-title')}</h2>
|
||||
<p>{i18n('icu:ContactSpoofingReviewDialog__description')}</p>
|
||||
<h2>
|
||||
{i18n('icu:ContactSpoofingReviewDialog__possibly-unsafe-title')}
|
||||
</h2>
|
||||
<ContactSpoofingReviewDialogPerson
|
||||
conversation={possiblyUnsafeConversation}
|
||||
getPreferredBadge={getPreferredBadge}
|
||||
|
@ -201,7 +203,7 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
});
|
||||
}}
|
||||
>
|
||||
{i18n('MessageRequests--delete')}
|
||||
{i18n('icu:MessageRequests--delete')}
|
||||
</Button>
|
||||
<Button
|
||||
variant={ButtonVariant.SecondaryDestructive}
|
||||
|
@ -212,12 +214,12 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
});
|
||||
}}
|
||||
>
|
||||
{i18n('MessageRequests--block')}
|
||||
{i18n('icu:MessageRequests--block')}
|
||||
</Button>
|
||||
</div>
|
||||
</ContactSpoofingReviewDialogPerson>
|
||||
<hr />
|
||||
<h2>{i18n('ContactSpoofingReviewDialog__safe-title')}</h2>
|
||||
<h2>{i18n('icu:ContactSpoofingReviewDialog__safe-title')}</h2>
|
||||
<ContactSpoofingReviewDialogPerson
|
||||
conversation={safeConversation}
|
||||
getPreferredBadge={getPreferredBadge}
|
||||
|
@ -246,15 +248,17 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
'id',
|
||||
]);
|
||||
|
||||
title = i18n('ContactSpoofingReviewDialog__group__title');
|
||||
title = i18n('icu:ContactSpoofingReviewDialog__group__title');
|
||||
contents = (
|
||||
<>
|
||||
<p>
|
||||
{i18n('ContactSpoofingReviewDialog__group__description', {
|
||||
{i18n('icu:ContactSpoofingReviewDialog__group__description', {
|
||||
count: conversationInfos.length.toString(),
|
||||
})}
|
||||
</p>
|
||||
<h2>{i18n('ContactSpoofingReviewDialog__group__members-header')}</h2>
|
||||
<h2>
|
||||
{i18n('icu:ContactSpoofingReviewDialog__group__members-header')}
|
||||
</h2>
|
||||
{conversationInfos.map((conversationInfo, index) => {
|
||||
let button: ReactNode;
|
||||
if (group.areWeAdmin) {
|
||||
|
@ -269,7 +273,7 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
});
|
||||
}}
|
||||
>
|
||||
{i18n('RemoveGroupMemberConfirmation__remove-button')}
|
||||
{i18n('icu:RemoveGroupMemberConfirmation__remove-button')}
|
||||
</Button>
|
||||
);
|
||||
} else if (conversationInfo.conversation.isBlocked) {
|
||||
|
@ -280,7 +284,7 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
acceptConversation(conversationInfo.conversation.id);
|
||||
}}
|
||||
>
|
||||
{i18n('MessageRequests--unblock')}
|
||||
{i18n('icu:MessageRequests--unblock')}
|
||||
</Button>
|
||||
);
|
||||
} else if (!isInSystemContacts(conversationInfo.conversation)) {
|
||||
|
@ -294,7 +298,7 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
});
|
||||
}}
|
||||
>
|
||||
{i18n('MessageRequests--block')}
|
||||
{i18n('icu:MessageRequests--block')}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
@ -310,7 +314,7 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element {
|
|||
<div className="module-ContactSpoofingReviewDialogPerson__info__property module-ContactSpoofingReviewDialogPerson__info__property--callout">
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="ContactSpoofingReviewDialog__group__name-change-info"
|
||||
id="icu:ContactSpoofingReviewDialog__group__name-change-info"
|
||||
components={{
|
||||
oldName: <Emojify text={oldName} />,
|
||||
newName: <Emojify text={newName} />,
|
||||
|
|
|
@ -166,7 +166,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
showBackButton ? 'module-ConversationHeader__back-icon--show' : null
|
||||
)}
|
||||
disabled={!showBackButton}
|
||||
aria-label={i18n('goBack')}
|
||||
aria-label={i18n('icu:goBack')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
if (isMe) {
|
||||
return (
|
||||
<div className="module-ConversationHeader__header__info__title">
|
||||
{i18n('noteToSelf')}
|
||||
{i18n('icu:noteToSelf')}
|
||||
<span className="ContactModal__official-badge" />
|
||||
</div>
|
||||
);
|
||||
|
@ -291,7 +291,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
|
||||
return (
|
||||
<div className="module-ConversationHeader__header__info__subtitle__verified">
|
||||
{i18n('verified')}
|
||||
{i18n('icu:verified')}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
showBackButton ? null : 'module-ConversationHeader__button--show'
|
||||
)}
|
||||
disabled={showBackButton}
|
||||
aria-label={i18n('moreInfo')}
|
||||
aria-label={i18n('icu:moreInfo')}
|
||||
/>
|
||||
</ContextMenuTrigger>
|
||||
);
|
||||
|
@ -329,7 +329,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
showBackButton ? null : 'module-ConversationHeader__button--show'
|
||||
)}
|
||||
disabled={showBackButton}
|
||||
aria-label={i18n('search')}
|
||||
aria-label={i18n('icu:search')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
|
||||
const muteOptions = getMuteOptions(muteExpiresAt, i18n);
|
||||
|
||||
const muteTitle = <span>{i18n('muteNotificationsTitle')}</span>;
|
||||
const muteTitle = <span>{i18n('icu:muteNotificationsTitle')}</span>;
|
||||
|
||||
if (isSignalConversation) {
|
||||
const isMuted = muteExpiresAt && isConversationMuted({ muteExpiresAt });
|
||||
|
@ -376,7 +376,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
setMuteExpiration(id, 0);
|
||||
}}
|
||||
>
|
||||
{i18n('unmute')}
|
||||
{i18n('icu:unmute')}
|
||||
</MenuItem>
|
||||
) : (
|
||||
<MenuItem
|
||||
|
@ -384,7 +384,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
setMuteExpiration(id, Number.MAX_SAFE_INTEGER);
|
||||
}}
|
||||
>
|
||||
{i18n('muteAlways')}
|
||||
{i18n('icu:muteAlways')}
|
||||
</MenuItem>
|
||||
)}
|
||||
</SubMenu>
|
||||
|
@ -423,7 +423,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
let text: string;
|
||||
|
||||
if (seconds === -1) {
|
||||
text = i18n('customDisappearingTimeOption');
|
||||
text = i18n('icu:customDisappearingTimeOption');
|
||||
} else {
|
||||
text = expirationTimer.format(i18n, seconds, {
|
||||
capitalizeOff: true,
|
||||
|
@ -483,8 +483,8 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
}
|
||||
>
|
||||
{isGroup
|
||||
? i18n('showConversationDetails')
|
||||
: i18n('showConversationDetails--direct')}
|
||||
? i18n('icu:showConversationDetails')
|
||||
: i18n('icu:showConversationDetails--direct')}
|
||||
</MenuItem>
|
||||
) : null}
|
||||
{isGroup && !hasGV2AdminEnabled ? (
|
||||
|
@ -493,18 +493,18 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
pushPanelForConversation({ type: PanelType.GroupV1Members })
|
||||
}
|
||||
>
|
||||
{i18n('showMembers')}
|
||||
{i18n('icu:showMembers')}
|
||||
</MenuItem>
|
||||
) : null}
|
||||
<MenuItem
|
||||
onClick={() => pushPanelForConversation({ type: PanelType.AllMedia })}
|
||||
>
|
||||
{i18n('viewRecentMedia')}
|
||||
{i18n('icu:viewRecentMedia')}
|
||||
</MenuItem>
|
||||
<MenuItem divider />
|
||||
{!markedUnread ? (
|
||||
<MenuItem onClick={() => onMarkUnread(id)}>
|
||||
{i18n('markUnread')}
|
||||
{i18n('icu:markUnread')}
|
||||
</MenuItem>
|
||||
) : null}
|
||||
<MenuItem
|
||||
|
@ -516,25 +516,25 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
</MenuItem>
|
||||
{isArchived ? (
|
||||
<MenuItem onClick={() => onMoveToInbox(id)}>
|
||||
{i18n('moveConversationToInbox')}
|
||||
{i18n('icu:moveConversationToInbox')}
|
||||
</MenuItem>
|
||||
) : (
|
||||
<MenuItem onClick={() => onArchive(id)}>
|
||||
{i18n('archiveConversation')}
|
||||
{i18n('icu:archiveConversation')}
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem
|
||||
onClick={() => this.setState({ hasDeleteMessagesConfirmation: true })}
|
||||
>
|
||||
{i18n('deleteMessages')}
|
||||
{i18n('icu:deleteMessages')}
|
||||
</MenuItem>
|
||||
{isPinned ? (
|
||||
<MenuItem onClick={() => setPinned(id, false)}>
|
||||
{i18n('unpinConversation')}
|
||||
{i18n('icu:unpinConversation')}
|
||||
</MenuItem>
|
||||
) : (
|
||||
<MenuItem onClick={() => setPinned(id, true)}>
|
||||
{i18n('pinConversation')}
|
||||
{i18n('icu:pinConversation')}
|
||||
</MenuItem>
|
||||
)}
|
||||
</ContextMenu>
|
||||
|
@ -559,7 +559,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
destroyMessages(id);
|
||||
},
|
||||
style: 'negative',
|
||||
text: i18n('delete'),
|
||||
text: i18n('icu:delete'),
|
||||
},
|
||||
]}
|
||||
i18n={i18n}
|
||||
|
@ -567,7 +567,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
this.setState({ hasDeleteMessagesConfirmation: false });
|
||||
}}
|
||||
>
|
||||
{i18n('deleteConversationConfirmation')}
|
||||
{i18n('icu:deleteConversationConfirmation')}
|
||||
</ConfirmationDialog>
|
||||
);
|
||||
}
|
||||
|
@ -751,7 +751,7 @@ function OutgoingCallButtons({
|
|||
>): JSX.Element | null {
|
||||
const videoButton = (
|
||||
<button
|
||||
aria-label={i18n('makeOutgoingVideoCall')}
|
||||
aria-label={i18n('icu:makeOutgoingVideoCall')}
|
||||
className={classNames(
|
||||
'module-ConversationHeader__button',
|
||||
'module-ConversationHeader__button--video',
|
||||
|
@ -790,14 +790,14 @@ function OutgoingCallButtons({
|
|||
showBackButton ? null : 'module-ConversationHeader__button--show'
|
||||
)}
|
||||
disabled={showBackButton}
|
||||
aria-label={i18n('makeOutgoingCall')}
|
||||
aria-label={i18n('icu:makeOutgoingCall')}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
case OutgoingCallButtonStyle.Join:
|
||||
return (
|
||||
<button
|
||||
aria-label={i18n('joinOngoingCall')}
|
||||
aria-label={i18n('icu:joinOngoingCall')}
|
||||
className={classNames(
|
||||
'module-ConversationHeader__button',
|
||||
'module-ConversationHeader__button--join-call',
|
||||
|
@ -807,7 +807,7 @@ function OutgoingCallButtons({
|
|||
onClick={() => onOutgoingVideoCallInConversation(id)}
|
||||
type="button"
|
||||
>
|
||||
{isNarrow ? null : i18n('joinOngoingCall')}
|
||||
{isNarrow ? null : i18n('icu:joinOngoingCall')}
|
||||
</button>
|
||||
);
|
||||
default:
|
||||
|
|
|
@ -63,7 +63,7 @@ const renderMembershipRow = ({
|
|||
}
|
||||
|
||||
if (isMe) {
|
||||
return <div className={className}>{i18n('noteToSelfHero')}</div>;
|
||||
return <div className={className}>{i18n('icu:noteToSelfHero')}</div>;
|
||||
}
|
||||
|
||||
if (sharedGroupNames.length > 0) {
|
||||
|
@ -81,20 +81,20 @@ const renderMembershipRow = ({
|
|||
if (phoneNumber) {
|
||||
return null;
|
||||
}
|
||||
return <div className={className}>{i18n('no-groups-in-common')}</div>;
|
||||
return <div className={className}>{i18n('icu:no-groups-in-common')}</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="module-conversation-hero__message-request-warning">
|
||||
<div className="module-conversation-hero__message-request-warning__message">
|
||||
{i18n('no-groups-in-common-warning')}
|
||||
{i18n('icu:no-groups-in-common-warning')}
|
||||
</div>
|
||||
<Button
|
||||
onClick={onClickMessageRequestWarning}
|
||||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SecondaryAffirmative}
|
||||
>
|
||||
{i18n('MessageRequestWarning__learn-more')}
|
||||
{i18n('icu:MessageRequestWarning__learn-more')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
@ -188,7 +188,7 @@ export function ConversationHero({
|
|||
/>
|
||||
<h1 className="module-conversation-hero__profile-name">
|
||||
{isMe ? (
|
||||
i18n('noteToSelf')
|
||||
i18n('icu:noteToSelf')
|
||||
) : (
|
||||
<ContactName
|
||||
isSignalConversation={isSignalConversation}
|
||||
|
@ -231,7 +231,7 @@ export function ConversationHero({
|
|||
})}
|
||||
{!isSignalConversation && (
|
||||
<div className="module-conversation-hero__linkNotification">
|
||||
{i18n('messageHistoryUnsynced')}
|
||||
{i18n('icu:messageHistoryUnsynced')}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
@ -242,7 +242,7 @@ export function ConversationHero({
|
|||
onClose={closeMessageRequestWarning}
|
||||
actions={[
|
||||
{
|
||||
text: i18n('MessageRequestWarning__dialog__learn-even-more'),
|
||||
text: i18n('icu:MessageRequestWarning__dialog__learn-even-more'),
|
||||
action: () => {
|
||||
openLinkInWebBrowser(
|
||||
'https://support.signal.org/hc/articles/360007459591'
|
||||
|
@ -252,7 +252,7 @@ export function ConversationHero({
|
|||
},
|
||||
]}
|
||||
>
|
||||
{i18n('MessageRequestWarning__dialog__details')}
|
||||
{i18n('icu:MessageRequestWarning__dialog__details')}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
</>
|
||||
|
|
|
@ -38,7 +38,7 @@ export function DeliveryIssueDialog(props: PropsType): React.ReactElement {
|
|||
size={ButtonSize.Medium}
|
||||
variant={ButtonVariant.Secondary}
|
||||
>
|
||||
{i18n('DeliveryIssue--learnMore')}
|
||||
{i18n('icu:DeliveryIssue--learnMore')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={onClose}
|
||||
|
@ -47,7 +47,7 @@ export function DeliveryIssueDialog(props: PropsType): React.ReactElement {
|
|||
variant={ButtonVariant.Primary}
|
||||
className="module-delivery-issue-dialog__close-button"
|
||||
>
|
||||
{i18n('Confirmation--confirm')}
|
||||
{i18n('icu:Confirmation--confirm')}
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
|
@ -74,18 +74,18 @@ export function DeliveryIssueDialog(props: PropsType): React.ReactElement {
|
|||
/>
|
||||
</div>
|
||||
<div className="module-delivery-issue-dialog__title">
|
||||
{i18n('DeliveryIssue--title')}
|
||||
{i18n('icu:DeliveryIssue--title')}
|
||||
</div>
|
||||
<div className="module-delivery-issue-dialog__description">
|
||||
{inGroup ? (
|
||||
<Intl
|
||||
id="DeliveryIssue--summary--group"
|
||||
id="icu:DeliveryIssue--summary--group"
|
||||
components={intlComponents}
|
||||
i18n={i18n}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
id="DeliveryIssue--summary"
|
||||
id="icu:DeliveryIssue--summary"
|
||||
components={intlComponents}
|
||||
i18n={i18n}
|
||||
/>
|
||||
|
|
|
@ -46,7 +46,7 @@ export function DeliveryIssueNotification(
|
|||
<SystemMessage
|
||||
contents={
|
||||
<Intl
|
||||
id="DeliveryIssue--notification"
|
||||
id="icu:DeliveryIssue--notification"
|
||||
components={{
|
||||
sender: <Emojify text={sender.firstName || sender.title} />,
|
||||
}}
|
||||
|
@ -60,7 +60,7 @@ export function DeliveryIssueNotification(
|
|||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
>
|
||||
{i18n('DeliveryIssue--learnMore')}
|
||||
{i18n('icu:DeliveryIssue--learnMore')}
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
|
|
@ -56,7 +56,7 @@ export class ErrorBoundary extends React.PureComponent<Props, State> {
|
|||
<div className={`${CSS_MODULE}__icon`} />
|
||||
</div>
|
||||
<div className={`${CSS_MODULE}__message`}>
|
||||
{i18n('ErrorBoundaryNotification__text')}
|
||||
{i18n('icu:ErrorBoundaryNotification__text')}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -238,7 +238,7 @@ export function GIF(props: Props): JSX.Element {
|
|||
<div className="module-image__download-pending--spinner-container">
|
||||
<div
|
||||
className="module-image__download-pending--spinner"
|
||||
title={i18n('loading')}
|
||||
title={i18n('icu:loading')}
|
||||
>
|
||||
<Spinner moduleClassName="module-image-spinner" svgSize="small" />
|
||||
</div>
|
||||
|
|
|
@ -62,7 +62,7 @@ export function GroupDescription({
|
|||
}}
|
||||
type="button"
|
||||
>
|
||||
{i18n('GroupDescription__read-more')}
|
||||
{i18n('icu:GroupDescription__read-more')}
|
||||
</button>
|
||||
)}
|
||||
</>
|
||||
|
|
|
@ -68,12 +68,12 @@ export class GroupNotification extends React.Component<Props> {
|
|||
return (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="titleIsNow"
|
||||
id="icu:titleIsNow"
|
||||
components={{ name: newName || '' }}
|
||||
/>
|
||||
);
|
||||
case 'avatar':
|
||||
return <Intl i18n={i18n} id="updatedGroupAvatar" />;
|
||||
return <Intl i18n={i18n} id="icu:updatedGroupAvatar" />;
|
||||
case 'add':
|
||||
if (!contacts || !contacts.length) {
|
||||
throw new Error('Group update is missing contacts');
|
||||
|
@ -86,13 +86,13 @@ export class GroupNotification extends React.Component<Props> {
|
|||
{otherPeople.length === 1 ? (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="joinedTheGroup"
|
||||
id="icu:joinedTheGroup"
|
||||
components={{ name: otherPeopleWithCommas }}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="multipleJoinedTheGroup"
|
||||
id="icu:multipleJoinedTheGroup"
|
||||
components={{ names: otherPeopleWithCommas }}
|
||||
/>
|
||||
)}
|
||||
|
@ -100,14 +100,14 @@ export class GroupNotification extends React.Component<Props> {
|
|||
)}
|
||||
{contactsIncludesMe && (
|
||||
<div className="module-group-notification__change">
|
||||
<Intl i18n={i18n} id="youJoinedTheGroup" />
|
||||
<Intl i18n={i18n} id="icu:youJoinedTheGroup" />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
case 'remove':
|
||||
if (from && from.isMe) {
|
||||
return i18n('youLeftTheGroup');
|
||||
return i18n('icu:youLeftTheGroup');
|
||||
}
|
||||
|
||||
if (!contacts || !contacts.length) {
|
||||
|
@ -116,13 +116,13 @@ export class GroupNotification extends React.Component<Props> {
|
|||
|
||||
return contacts.length > 1 ? (
|
||||
<Intl
|
||||
id="multipleLeftTheGroup"
|
||||
id="icu:multipleLeftTheGroup"
|
||||
i18n={i18n}
|
||||
components={{ name: otherPeopleWithCommas }}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
id="leftTheGroup"
|
||||
id="icu:leftTheGroup"
|
||||
i18n={i18n}
|
||||
components={{ name: otherPeopleWithCommas }}
|
||||
/>
|
||||
|
@ -146,11 +146,11 @@ export class GroupNotification extends React.Component<Props> {
|
|||
const isLeftOnly = changes.length === 1 && firstChange?.type === 'remove';
|
||||
|
||||
const fromLabel = from.isMe ? (
|
||||
<Intl i18n={i18n} id="youUpdatedTheGroup" />
|
||||
<Intl i18n={i18n} id="icu:youUpdatedTheGroup" />
|
||||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="updatedTheGroup"
|
||||
id="icu:updatedTheGroup"
|
||||
components={{ name: <ContactName title={from.title} /> }}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -21,7 +21,7 @@ export function GroupV1DisabledActions({
|
|||
<p className="module-group-v1-disabled-actions__message">
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="GroupV1--Migration--disabled"
|
||||
id="icu:GroupV1--Migration--disabled"
|
||||
components={{
|
||||
learnMore: (
|
||||
<a
|
||||
|
@ -30,7 +30,7 @@ export function GroupV1DisabledActions({
|
|||
rel="noreferrer"
|
||||
className="module-group-v1-disabled-actions__message__learn-more"
|
||||
>
|
||||
{i18n('MessageRequests--learn-more')}
|
||||
{i18n('icu:MessageRequests--learn-more')}
|
||||
</a>
|
||||
),
|
||||
}}
|
||||
|
@ -43,7 +43,7 @@ export function GroupV1DisabledActions({
|
|||
tabIndex={0}
|
||||
className="module-group-v1-disabled-actions__buttons__button"
|
||||
>
|
||||
{i18n('MessageRequests--continue')}
|
||||
{i18n('icu:MessageRequests--continue')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -54,10 +54,10 @@ export function GroupV1Migration(props: PropsType): React.ReactElement {
|
|||
icon="group"
|
||||
contents={
|
||||
<>
|
||||
<p>{i18n('GroupV1--Migration--was-upgraded')}</p>
|
||||
<p>{i18n('icu:GroupV1--Migration--was-upgraded')}</p>
|
||||
<p>
|
||||
{areWeInvited ? (
|
||||
i18n('GroupV1--Migration--invited--you')
|
||||
i18n('icu:GroupV1--Migration--invited--you')
|
||||
) : (
|
||||
<>
|
||||
{renderUsers(invitedMembers, i18n, 'invited')}
|
||||
|
@ -73,7 +73,7 @@ export function GroupV1Migration(props: PropsType): React.ReactElement {
|
|||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
>
|
||||
{i18n('GroupV1--Migration--learn-more')}
|
||||
{i18n('icu:GroupV1--Migration--learn-more')}
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
@ -111,14 +111,14 @@ function renderUsers(
|
|||
{kind === 'invited' && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="GroupV1--Migration--invited--one"
|
||||
id="icu:GroupV1--Migration--invited--one"
|
||||
components={{ contact }}
|
||||
/>
|
||||
)}
|
||||
{kind === 'removed' && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="GroupV1--Migration--removed--one"
|
||||
id="icu:GroupV1--Migration--removed--one"
|
||||
components={{ contact }}
|
||||
/>
|
||||
)}
|
||||
|
@ -133,14 +133,14 @@ function renderUsers(
|
|||
{kind === 'invited' && members.length > 1 && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="GroupV1--Migration--invited--many"
|
||||
id="icu:GroupV1--Migration--invited--many"
|
||||
components={{ count }}
|
||||
/>
|
||||
)}
|
||||
{kind === 'removed' && members.length > 1 && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="GroupV1--Migration--removed--many"
|
||||
id="icu:GroupV1--Migration--removed--many"
|
||||
components={{ count }}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -216,11 +216,11 @@ function GroupV2Detail({
|
|||
modalNode = (
|
||||
<ConfirmationDialog
|
||||
dialogName="GroupV2Change.confirmBlockLinkRequests"
|
||||
title={i18n('PendingRequests--block--title')}
|
||||
title={i18n('icu:PendingRequests--block--title')}
|
||||
actions={[
|
||||
{
|
||||
action: () => blockGroupLinkRequests(conversationId, detail.uuid),
|
||||
text: i18n('PendingRequests--block--confirm'),
|
||||
text: i18n('icu:PendingRequests--block--confirm'),
|
||||
style: 'affirmative',
|
||||
},
|
||||
]}
|
||||
|
@ -228,7 +228,7 @@ function GroupV2Detail({
|
|||
onClose={() => setModalState(ModalState.None)}
|
||||
>
|
||||
<Intl
|
||||
id="PendingRequests--block--contents"
|
||||
id="icu:PendingRequests--block--contents"
|
||||
i18n={i18n}
|
||||
components={{
|
||||
name: renderContact(detail.uuid),
|
||||
|
@ -252,7 +252,7 @@ function GroupV2Detail({
|
|||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
>
|
||||
{i18n('view')}
|
||||
{i18n('icu:view')}
|
||||
</Button>
|
||||
);
|
||||
} else if (
|
||||
|
@ -274,7 +274,7 @@ function GroupV2Detail({
|
|||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
>
|
||||
{i18n('PendingRequests--block--button')}
|
||||
{i18n('icu:PendingRequests--block--button')}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export function GroupV2PendingApprovalActions({
|
|||
return (
|
||||
<div className="module-group-v2-pending-approval-actions">
|
||||
<p className="module-group-v2-pending-approval-actions__message">
|
||||
{i18n('GroupV2--join--requested')}
|
||||
{i18n('icu:GroupV2--join--requested')}
|
||||
</p>
|
||||
<div className="module-group-v2-pending-approval-actions__buttons">
|
||||
<button
|
||||
|
@ -30,24 +30,24 @@ export function GroupV2PendingApprovalActions({
|
|||
tabIndex={0}
|
||||
className="module-group-v2-pending-approval-actions__buttons__button"
|
||||
>
|
||||
{i18n('GroupV2--join--cancel-request-to-join')}
|
||||
{i18n('icu:GroupV2--join--cancel-request-to-join')}
|
||||
</button>
|
||||
</div>
|
||||
{isConfirming ? (
|
||||
<ConfirmationDialog
|
||||
actions={[
|
||||
{
|
||||
text: i18n('GroupV2--join--cancel-request-to-join--yes'),
|
||||
text: i18n('icu:GroupV2--join--cancel-request-to-join--yes'),
|
||||
style: 'negative',
|
||||
action: () => cancelJoinRequest(conversationId),
|
||||
},
|
||||
]}
|
||||
cancelText={i18n('GroupV2--join--cancel-request-to-join--no')}
|
||||
cancelText={i18n('icu:GroupV2--join--cancel-request-to-join--no')}
|
||||
dialogName="GroupV2CancelRequestToJoin"
|
||||
i18n={i18n}
|
||||
onClose={() => setIsConfirming(false)}
|
||||
>
|
||||
{i18n('GroupV2--join--cancel-request-to-join--confirmation')}
|
||||
{i18n('icu:GroupV2--join--cancel-request-to-join--confirmation')}
|
||||
</ConfirmationDialog>
|
||||
) : undefined}
|
||||
</div>
|
||||
|
|
|
@ -115,7 +115,7 @@ export class Image extends React.Component<Props> {
|
|||
<div className="module-image__download-pending--spinner-container">
|
||||
<div
|
||||
className="module-image__download-pending--spinner"
|
||||
title={i18n('loading')}
|
||||
title={i18n('icu:loading')}
|
||||
>
|
||||
<Spinner moduleClassName="module-image-spinner" svgSize="small" />
|
||||
</div>
|
||||
|
@ -133,7 +133,7 @@ export class Image extends React.Component<Props> {
|
|||
lineHeight: `${height}px`,
|
||||
textAlign: 'center',
|
||||
}}
|
||||
title={i18n('loading')}
|
||||
title={i18n('icu:loading')}
|
||||
>
|
||||
<Spinner svgSize="normal" />
|
||||
</div>
|
||||
|
@ -242,7 +242,7 @@ export class Image extends React.Component<Props> {
|
|||
<img
|
||||
className="module-image__caption-icon"
|
||||
src="images/caption-shadow.svg"
|
||||
alt={i18n('imageCaptionIconAlt')}
|
||||
alt={i18n('icu:imageCaptionIconAlt')}
|
||||
/>
|
||||
) : null}
|
||||
{bottomOverlay ? (
|
||||
|
@ -280,8 +280,8 @@ export class Image extends React.Component<Props> {
|
|||
}
|
||||
}}
|
||||
className="module-image__close-button"
|
||||
title={i18n('remove-attachment')}
|
||||
aria-label={i18n('remove-attachment')}
|
||||
title={i18n('icu:remove-attachment')}
|
||||
aria-label={i18n('icu:remove-attachment')}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
@ -14,8 +14,8 @@ export const LastSeenIndicator = forwardRef<HTMLDivElement, Props>(
|
|||
function LastSeenIndicatorInner({ count, i18n }, ref) {
|
||||
const message =
|
||||
count === 1
|
||||
? i18n('unreadMessage')
|
||||
: i18n('unreadMessages', {
|
||||
? i18n('icu:unreadMessage')
|
||||
: i18n('icu:unreadMessages', {
|
||||
count: String(count),
|
||||
});
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ export function MandatoryProfileSharingActions({
|
|||
rel="noreferrer"
|
||||
className="module-message-request-actions__message__learn-more"
|
||||
>
|
||||
{i18n('MessageRequests--learn-more')}
|
||||
{i18n('icu:MessageRequests--learn-more')}
|
||||
</a>
|
||||
);
|
||||
|
||||
|
@ -85,13 +85,13 @@ export function MandatoryProfileSharingActions({
|
|||
{conversationType === 'direct' ? (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--profile-sharing--direct"
|
||||
id="icu:MessageRequests--profile-sharing--direct"
|
||||
components={{ firstName: firstNameContact, learnMore }}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--profile-sharing--group"
|
||||
id="icu:MessageRequests--profile-sharing--group"
|
||||
components={{ firstName: firstNameContact, learnMore }}
|
||||
/>
|
||||
)}
|
||||
|
@ -103,7 +103,7 @@ export function MandatoryProfileSharingActions({
|
|||
}}
|
||||
variant={ButtonVariant.SecondaryDestructive}
|
||||
>
|
||||
{i18n('MessageRequests--block')}
|
||||
{i18n('icu:MessageRequests--block')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
|
@ -111,13 +111,13 @@ export function MandatoryProfileSharingActions({
|
|||
}}
|
||||
variant={ButtonVariant.SecondaryDestructive}
|
||||
>
|
||||
{i18n('MessageRequests--delete')}
|
||||
{i18n('icu:MessageRequests--delete')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => acceptConversation(conversationId)}
|
||||
variant={ButtonVariant.SecondaryAffirmative}
|
||||
>
|
||||
{i18n('MessageRequests--continue')}
|
||||
{i18n('icu:MessageRequests--continue')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -836,7 +836,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
<div className={moduleName}>
|
||||
<ContactName
|
||||
contactNameColor={contactNameColor}
|
||||
title={author.isMe ? i18n('you') : author.title}
|
||||
title={author.isMe ? i18n('icu:you') : author.title}
|
||||
module={moduleName}
|
||||
/>
|
||||
</div>
|
||||
|
@ -1171,7 +1171,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
curveBottomRight={CurveType.Tiny}
|
||||
curveTopRight={CurveType.Tiny}
|
||||
curveTopLeft={CurveType.Tiny}
|
||||
alt={i18n('previewThumbnail', {
|
||||
alt={i18n('icu:previewThumbnail', {
|
||||
domain: first.domain,
|
||||
})}
|
||||
height={72}
|
||||
|
@ -1550,7 +1550,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
<>
|
||||
{storyReplyContext.emoji && (
|
||||
<div className="module-message__quote-story-reaction-header">
|
||||
{i18n('Quote__story-reaction', {
|
||||
{i18n('icu:Quote__story-reaction', {
|
||||
name: storyReplyContext.authorTitle,
|
||||
})}
|
||||
</div>
|
||||
|
@ -1668,7 +1668,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
'module-message__send-message-button--no-bottom-right-curve'
|
||||
)}
|
||||
>
|
||||
{i18n('sendMessageToContact')}
|
||||
{i18n('icu:sendMessageToContact')}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
@ -1748,9 +1748,9 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
const contents = deletedForEveryone
|
||||
? i18n('message--deletedForEveryone')
|
||||
? i18n('icu:message--deletedForEveryone')
|
||||
: direction === 'incoming' && status === 'error'
|
||||
? i18n('incomingError')
|
||||
? i18n('icu:incomingError')
|
||||
: text;
|
||||
|
||||
if (!contents) {
|
||||
|
@ -1939,18 +1939,18 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
return;
|
||||
}
|
||||
if (isTapToViewError) {
|
||||
return i18n('incomingError');
|
||||
return i18n('icu:incomingError');
|
||||
}
|
||||
if (direction === 'outgoing') {
|
||||
return i18n('Message--tap-to-view--outgoing');
|
||||
return i18n('icu:Message--tap-to-view--outgoing');
|
||||
}
|
||||
if (isTapToViewExpired) {
|
||||
return i18n('Message--tap-to-view-expired');
|
||||
return i18n('icu:Message--tap-to-view-expired');
|
||||
}
|
||||
if (isVideo(attachments)) {
|
||||
return i18n('Message--tap-to-view--incoming-video');
|
||||
return i18n('icu:Message--tap-to-view--incoming-video');
|
||||
}
|
||||
return i18n('Message--tap-to-view--incoming');
|
||||
return i18n('icu:Message--tap-to-view--incoming');
|
||||
}
|
||||
|
||||
public renderTapToView(): JSX.Element {
|
||||
|
|
|
@ -280,7 +280,7 @@ export function MessageAudio(props: Props): JSX.Element {
|
|||
variant="message"
|
||||
mod="pending"
|
||||
onClick={noop}
|
||||
label={i18n('MessageAudio--pending')}
|
||||
label={i18n('icu:MessageAudio--pending')}
|
||||
context={direction}
|
||||
/>
|
||||
);
|
||||
|
@ -290,7 +290,7 @@ export function MessageAudio(props: Props): JSX.Element {
|
|||
ref={buttonRef}
|
||||
variant="message"
|
||||
mod="download"
|
||||
label={i18n('MessageAudio--download')}
|
||||
label={i18n('icu:MessageAudio--download')}
|
||||
onClick={kickOffAttachmentDownload}
|
||||
context={direction}
|
||||
/>
|
||||
|
@ -303,7 +303,9 @@ export function MessageAudio(props: Props): JSX.Element {
|
|||
variant="message"
|
||||
mod={isPlaying ? 'pause' : 'play'}
|
||||
label={
|
||||
isPlaying ? i18n('MessageAudio--pause') : i18n('MessageAudio--play')
|
||||
isPlaying
|
||||
? i18n('icu:MessageAudio--pause')
|
||||
: i18n('icu:MessageAudio--play')
|
||||
}
|
||||
onClick={toggleIsPlaying}
|
||||
context={direction}
|
||||
|
|
|
@ -111,7 +111,7 @@ export function MessageBody({
|
|||
pendingContent = null;
|
||||
} else if (textAttachment?.pending) {
|
||||
pendingContent = (
|
||||
<span className="MessageBody__highlight"> {i18n('downloading')}</span>
|
||||
<span className="MessageBody__highlight"> {i18n('icu:downloading')}</span>
|
||||
);
|
||||
} else if (
|
||||
textAttachment &&
|
||||
|
@ -134,7 +134,7 @@ export function MessageBody({
|
|||
tabIndex={0}
|
||||
type="button"
|
||||
>
|
||||
{i18n('downloadFullMessage')}
|
||||
{i18n('icu:downloadFullMessage')}
|
||||
</button>
|
||||
</span>
|
||||
);
|
||||
|
@ -194,7 +194,7 @@ export function MessageBody({
|
|||
type="button"
|
||||
>
|
||||
{' '}
|
||||
{i18n('MessageBody--read-more')}
|
||||
{i18n('icu:MessageBody--read-more')}
|
||||
</button>
|
||||
) : null}
|
||||
</span>
|
||||
|
|
|
@ -163,7 +163,7 @@ export class MessageDetail extends React.Component<Props> {
|
|||
className="module-message-detail__contact__show-safety-number"
|
||||
onClick={() => toggleSafetyNumberModal(contact.id)}
|
||||
>
|
||||
{i18n('showSafetyNumber')}
|
||||
{i18n('icu:showSafetyNumber')}
|
||||
</button>
|
||||
</div>
|
||||
) : null;
|
||||
|
@ -207,22 +207,22 @@ export class MessageDetail extends React.Component<Props> {
|
|||
const { i18n } = this.props;
|
||||
|
||||
if (sendStatus === undefined) {
|
||||
return i18n('from');
|
||||
return i18n('icu:from');
|
||||
}
|
||||
|
||||
switch (sendStatus) {
|
||||
case SendStatus.Failed:
|
||||
return i18n('MessageDetailsHeader--Failed');
|
||||
return i18n('icu:MessageDetailsHeader--Failed');
|
||||
case SendStatus.Pending:
|
||||
return i18n('MessageDetailsHeader--Pending');
|
||||
return i18n('icu:MessageDetailsHeader--Pending');
|
||||
case SendStatus.Sent:
|
||||
return i18n('MessageDetailsHeader--Sent');
|
||||
return i18n('icu:MessageDetailsHeader--Sent');
|
||||
case SendStatus.Delivered:
|
||||
return i18n('MessageDetailsHeader--Delivered');
|
||||
return i18n('icu:MessageDetailsHeader--Delivered');
|
||||
case SendStatus.Read:
|
||||
return i18n('MessageDetailsHeader--Read');
|
||||
return i18n('icu:MessageDetailsHeader--Read');
|
||||
case SendStatus.Viewed:
|
||||
return i18n('MessageDetailsHeader--Viewed');
|
||||
return i18n('icu:MessageDetailsHeader--Viewed');
|
||||
default:
|
||||
throw missingCaseError(sendStatus);
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ export class MessageDetail extends React.Component<Props> {
|
|||
{(errors || []).map(error => (
|
||||
<tr key={_keyForError(error)}>
|
||||
<td className="module-message-detail__label">
|
||||
{i18n('error')}
|
||||
{i18n('icu:error')}
|
||||
</td>
|
||||
<td>
|
||||
{' '}
|
||||
|
@ -386,14 +386,16 @@ export class MessageDetail extends React.Component<Props> {
|
|||
</tr>
|
||||
))}
|
||||
<tr>
|
||||
<td className="module-message-detail__label">{i18n('sent')}</td>
|
||||
<td className="module-message-detail__label">
|
||||
{i18n('icu:sent')}
|
||||
</td>
|
||||
<td>
|
||||
<ContextMenu
|
||||
i18n={i18n}
|
||||
menuOptions={[
|
||||
{
|
||||
icon: 'StoryDetailsModal__copy-icon',
|
||||
label: i18n('StoryDetailsModal__copy-timestamp'),
|
||||
label: i18n('icu:StoryDetailsModal__copy-timestamp'),
|
||||
onClick: () => {
|
||||
void window.navigator.clipboard.writeText(
|
||||
String(sentAt)
|
||||
|
@ -416,7 +418,7 @@ export class MessageDetail extends React.Component<Props> {
|
|||
{receivedAt && message.direction === 'incoming' ? (
|
||||
<tr>
|
||||
<td className="module-message-detail__label">
|
||||
{i18n('received')}
|
||||
{i18n('icu:received')}
|
||||
</td>
|
||||
<td>
|
||||
<Time timestamp={receivedAt}>
|
||||
|
@ -431,7 +433,7 @@ export class MessageDetail extends React.Component<Props> {
|
|||
{timeRemaining && timeRemaining > 0 && (
|
||||
<tr>
|
||||
<td className="module-message-detail__label">
|
||||
{i18n('MessageDetail--disappears-in')}
|
||||
{i18n('icu:MessageDetail--disappears-in')}
|
||||
</td>
|
||||
<td>
|
||||
{formatRelativeTime(i18n, timeRemaining, {
|
||||
|
|
|
@ -69,10 +69,10 @@ export function MessageMetadata({
|
|||
let statusInfo: React.ReactChild;
|
||||
if (isError) {
|
||||
statusInfo = deletedForEveryone
|
||||
? i18n('deleteFailed')
|
||||
: i18n('sendFailed');
|
||||
? i18n('icu:deleteFailed')
|
||||
: i18n('icu:sendFailed');
|
||||
} else if (isPaused) {
|
||||
statusInfo = i18n('sendPaused');
|
||||
statusInfo = i18n('icu:sendPaused');
|
||||
} else {
|
||||
statusInfo = (
|
||||
<button
|
||||
|
@ -89,8 +89,8 @@ export function MessageMetadata({
|
|||
}}
|
||||
>
|
||||
{deletedForEveryone
|
||||
? i18n('partiallyDeleted')
|
||||
: i18n('partiallySent')}
|
||||
? i18n('icu:partiallyDeleted')
|
||||
: i18n('icu:partiallySent')}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -65,28 +65,28 @@ export function MessageRequestActions({
|
|||
{conversationType === 'direct' && isBlocked && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--message-direct-blocked"
|
||||
id="icu:MessageRequests--message-direct-blocked"
|
||||
components={{ name }}
|
||||
/>
|
||||
)}
|
||||
{conversationType === 'direct' && !isBlocked && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--message-direct"
|
||||
id="icu:MessageRequests--message-direct"
|
||||
components={{ name }}
|
||||
/>
|
||||
)}
|
||||
{conversationType === 'group' && isBlocked && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--message-group-blocked"
|
||||
id="icu:MessageRequests--message-group-blocked"
|
||||
components={{ name }}
|
||||
/>
|
||||
)}
|
||||
{conversationType === 'group' && !isBlocked && (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--message-group"
|
||||
id="icu:MessageRequests--message-group"
|
||||
components={{ name }}
|
||||
/>
|
||||
)}
|
||||
|
@ -98,7 +98,7 @@ export function MessageRequestActions({
|
|||
}}
|
||||
variant={ButtonVariant.SecondaryDestructive}
|
||||
>
|
||||
{i18n('MessageRequests--delete')}
|
||||
{i18n('icu:MessageRequests--delete')}
|
||||
</Button>
|
||||
{isBlocked ? (
|
||||
<Button
|
||||
|
@ -107,7 +107,7 @@ export function MessageRequestActions({
|
|||
}}
|
||||
variant={ButtonVariant.SecondaryAffirmative}
|
||||
>
|
||||
{i18n('MessageRequests--unblock')}
|
||||
{i18n('icu:MessageRequests--unblock')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
|
@ -116,7 +116,7 @@ export function MessageRequestActions({
|
|||
}}
|
||||
variant={ButtonVariant.SecondaryDestructive}
|
||||
>
|
||||
{i18n('MessageRequests--block')}
|
||||
{i18n('icu:MessageRequests--block')}
|
||||
</Button>
|
||||
)}
|
||||
{!isBlocked ? (
|
||||
|
@ -124,7 +124,7 @@ export function MessageRequestActions({
|
|||
onClick={() => acceptConversation(conversationId)}
|
||||
variant={ButtonVariant.SecondaryAffirmative}
|
||||
>
|
||||
{i18n('MessageRequests--accept')}
|
||||
{i18n('icu:MessageRequests--accept')}
|
||||
</Button>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,7 @@ export function MessageRequestActionsConfirmation({
|
|||
conversationType === 'direct' ? (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--block-direct-confirm-title"
|
||||
id="icu:MessageRequests--block-direct-confirm-title"
|
||||
components={{
|
||||
title: <ContactName key="name" title={title} />,
|
||||
}}
|
||||
|
@ -60,7 +60,7 @@ export function MessageRequestActionsConfirmation({
|
|||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--block-group-confirm-title"
|
||||
id="icu:MessageRequests--block-group-confirm-title"
|
||||
components={{
|
||||
title: <ContactName key="name" title={title} />,
|
||||
}}
|
||||
|
@ -71,22 +71,22 @@ export function MessageRequestActionsConfirmation({
|
|||
...(conversationType === 'direct'
|
||||
? [
|
||||
{
|
||||
text: i18n('MessageRequests--block-and-report-spam'),
|
||||
text: i18n('icu:MessageRequests--block-and-report-spam'),
|
||||
action: () => blockAndReportSpam(conversationId),
|
||||
style: 'negative' as const,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
text: i18n('MessageRequests--block'),
|
||||
text: i18n('icu:MessageRequests--block'),
|
||||
action: () => blockConversation(conversationId),
|
||||
style: 'negative',
|
||||
},
|
||||
]}
|
||||
>
|
||||
{conversationType === 'direct'
|
||||
? i18n('MessageRequests--block-direct-confirm-body')
|
||||
: i18n('MessageRequests--block-group-confirm-body')}
|
||||
? i18n('icu:MessageRequests--block-direct-confirm-body')
|
||||
: i18n('icu:MessageRequests--block-group-confirm-body')}
|
||||
</ConfirmationDialog>
|
||||
);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ export function MessageRequestActionsConfirmation({
|
|||
title={
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--unblock-direct-confirm-title"
|
||||
id="icu:MessageRequests--unblock-direct-confirm-title"
|
||||
components={{
|
||||
name: <ContactName key="name" title={title} />,
|
||||
}}
|
||||
|
@ -110,15 +110,15 @@ export function MessageRequestActionsConfirmation({
|
|||
}
|
||||
actions={[
|
||||
{
|
||||
text: i18n('MessageRequests--unblock'),
|
||||
text: i18n('icu:MessageRequests--unblock'),
|
||||
action: () => acceptConversation(conversationId),
|
||||
style: 'affirmative',
|
||||
},
|
||||
]}
|
||||
>
|
||||
{conversationType === 'direct'
|
||||
? i18n('MessageRequests--unblock-direct-confirm-body')
|
||||
: i18n('MessageRequests--unblock-group-confirm-body')}
|
||||
? i18n('icu:MessageRequests--unblock-direct-confirm-body')
|
||||
: i18n('icu:MessageRequests--unblock-group-confirm-body')}
|
||||
</ConfirmationDialog>
|
||||
);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ export function MessageRequestActionsConfirmation({
|
|||
conversationType === 'direct' ? (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--delete-direct-confirm-title"
|
||||
id="icu:MessageRequests--delete-direct-confirm-title"
|
||||
components={{
|
||||
title: <ContactName key="name" title={title} />,
|
||||
}}
|
||||
|
@ -143,7 +143,7 @@ export function MessageRequestActionsConfirmation({
|
|||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="MessageRequests--delete-group-confirm-title"
|
||||
id="icu:MessageRequests--delete-group-confirm-title"
|
||||
components={{
|
||||
title: <ContactName key="name" title={title} />,
|
||||
}}
|
||||
|
@ -154,16 +154,16 @@ export function MessageRequestActionsConfirmation({
|
|||
{
|
||||
text:
|
||||
conversationType === 'direct'
|
||||
? i18n('MessageRequests--delete-direct')
|
||||
: i18n('MessageRequests--delete-group'),
|
||||
? i18n('icu:MessageRequests--delete-direct')
|
||||
: i18n('icu:MessageRequests--delete-group'),
|
||||
action: () => deleteConversation(conversationId),
|
||||
style: 'negative',
|
||||
},
|
||||
]}
|
||||
>
|
||||
{conversationType === 'direct'
|
||||
? i18n('MessageRequests--delete-direct-confirm-body')
|
||||
: i18n('MessageRequests--delete-group-confirm-body')}
|
||||
? i18n('icu:MessageRequests--delete-direct-confirm-body')
|
||||
: i18n('icu:MessageRequests--delete-group-confirm-body')}
|
||||
</ConfirmationDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -116,26 +116,26 @@ function getTypeLabel({
|
|||
}): string | undefined {
|
||||
if (GoogleChrome.isVideoTypeSupported(contentType)) {
|
||||
if (isViewOnce) {
|
||||
return i18n('message--getDescription--disappearing-video');
|
||||
return i18n('icu:message--getDescription--disappearing-video');
|
||||
}
|
||||
return i18n('video');
|
||||
return i18n('icu:video');
|
||||
}
|
||||
if (GoogleChrome.isImageTypeSupported(contentType)) {
|
||||
if (isViewOnce) {
|
||||
return i18n('message--getDescription--disappearing-photo');
|
||||
return i18n('icu:message--getDescription--disappearing-photo');
|
||||
}
|
||||
return i18n('photo');
|
||||
return i18n('icu:photo');
|
||||
}
|
||||
|
||||
if (isViewOnce) {
|
||||
return i18n('message--getDescription--disappearing-media');
|
||||
return i18n('icu:message--getDescription--disappearing-media');
|
||||
}
|
||||
|
||||
if (MIME.isAudio(contentType) && isVoiceMessage) {
|
||||
return i18n('voiceMessage');
|
||||
return i18n('icu:voiceMessage');
|
||||
}
|
||||
|
||||
return MIME.isAudio(contentType) ? i18n('audio') : undefined;
|
||||
return MIME.isAudio(contentType) ? i18n('icu:audio') : undefined;
|
||||
}
|
||||
|
||||
export class Quote extends React.Component<Props, State> {
|
||||
|
@ -454,7 +454,7 @@ export class Quote extends React.Component<Props, State> {
|
|||
// We can't be a button because the overall quote is a button; can't nest them
|
||||
role="button"
|
||||
className={this.getClassName('__close-button')}
|
||||
aria-label={i18n('close')}
|
||||
aria-label={i18n('icu:close')}
|
||||
onKeyDown={keyDownHandler}
|
||||
onClick={clickHandler}
|
||||
/>
|
||||
|
@ -466,10 +466,14 @@ export class Quote extends React.Component<Props, State> {
|
|||
const { authorTitle, i18n, isFromMe, isIncoming, isStoryReply } =
|
||||
this.props;
|
||||
|
||||
const title = isFromMe ? i18n('you') : <ContactName title={authorTitle} />;
|
||||
const title = isFromMe ? (
|
||||
i18n('icu:you')
|
||||
) : (
|
||||
<ContactName title={authorTitle} />
|
||||
);
|
||||
const author = isStoryReply ? (
|
||||
<>
|
||||
{title} · {i18n('Quote__story')}
|
||||
{title} · {i18n('icu:Quote__story')}
|
||||
</>
|
||||
) : (
|
||||
title
|
||||
|
@ -527,7 +531,7 @@ export class Quote extends React.Component<Props, State> {
|
|||
: null
|
||||
)}
|
||||
>
|
||||
{i18n('originalMessageNotFound')}
|
||||
{i18n('icu:originalMessageNotFound')}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -100,7 +100,7 @@ export const ReactionPicker = React.forwardRef<HTMLDivElement, Props>(
|
|||
onPick(selected);
|
||||
}}
|
||||
isSelected
|
||||
title={i18n('Reactions--remove')}
|
||||
title={i18n('icu:Reactions--remove')}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -202,7 +202,7 @@ export const ReactionViewer = React.forwardRef<HTMLDivElement, Props>(
|
|||
>
|
||||
{isAll ? (
|
||||
<span className="module-reaction-viewer__header__button__all">
|
||||
{i18n('ReactionsViewer--all')} · 
|
||||
{i18n('icu:ReactionsViewer--all')} · 
|
||||
{count}
|
||||
</span>
|
||||
) : (
|
||||
|
@ -242,7 +242,7 @@ export const ReactionViewer = React.forwardRef<HTMLDivElement, Props>(
|
|||
</div>
|
||||
<div className="module-reaction-viewer__body__row__name">
|
||||
{from.isMe ? (
|
||||
i18n('you')
|
||||
i18n('icu:you')
|
||||
) : (
|
||||
<ContactName
|
||||
module="module-reaction-viewer__body__row__name__contact-name"
|
||||
|
|
|
@ -40,7 +40,7 @@ export function RemoveGroupMemberConfirmationDialog({
|
|||
actions={[
|
||||
{
|
||||
action: onRemove,
|
||||
text: i18n('RemoveGroupMemberConfirmation__remove-button'),
|
||||
text: i18n('icu:RemoveGroupMemberConfirmation__remove-button'),
|
||||
style: 'negative',
|
||||
},
|
||||
]}
|
||||
|
@ -50,13 +50,13 @@ export function RemoveGroupMemberConfirmationDialog({
|
|||
accessControlEnabled ? (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="RemoveGroupMemberConfirmation__description__with-link"
|
||||
id="icu:RemoveGroupMemberConfirmation__description__with-link"
|
||||
components={intlComponents}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="RemoveGroupMemberConfirmation__description"
|
||||
id="icu:RemoveGroupMemberConfirmation__description"
|
||||
components={intlComponents}
|
||||
/>
|
||||
)
|
||||
|
|
|
@ -12,6 +12,6 @@ export type Props = {
|
|||
|
||||
export function ResetSessionNotification({ i18n }: Props): JSX.Element {
|
||||
return (
|
||||
<SystemMessage contents={i18n('sessionEnded')} icon="session-refresh" />
|
||||
<SystemMessage contents={i18n('icu:sessionEnded')} icon="session-refresh" />
|
||||
);
|
||||
}
|
||||
|
|
|
@ -52,12 +52,16 @@ export function SafetyNumberNotification({
|
|||
contents={
|
||||
isGroup ? (
|
||||
<Intl
|
||||
id="safetyNumberChangedGroup"
|
||||
id="icu:safetyNumberChangedGroup"
|
||||
components={{ name }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
) : (
|
||||
<Intl id="safetyNumberChanged" components={{ name }} i18n={i18n} />
|
||||
<Intl
|
||||
id="icu:safetyNumberChanged"
|
||||
components={{ name }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
)
|
||||
}
|
||||
button={
|
||||
|
|
|
@ -20,7 +20,9 @@ export function ScrollDownButton({
|
|||
i18n,
|
||||
scrollDown,
|
||||
}: Props): JSX.Element {
|
||||
const altText = unreadCount ? i18n('messagesBelow') : i18n('scrollDown');
|
||||
const altText = unreadCount
|
||||
? i18n('icu:messagesBelow')
|
||||
: i18n('icu:scrollDown');
|
||||
|
||||
let badgeText: string | undefined;
|
||||
if (unreadCount) {
|
||||
|
|
|
@ -26,7 +26,7 @@ export function StagedGenericAttachment({
|
|||
<button
|
||||
type="button"
|
||||
className="module-staged-generic-attachment__close-button"
|
||||
aria-label={i18n('close')}
|
||||
aria-label={i18n('icu:close')}
|
||||
onClick={() => {
|
||||
if (onClose) {
|
||||
onClose(attachment);
|
||||
|
|
|
@ -80,13 +80,13 @@ export function StagedLinkPreview({
|
|||
>
|
||||
{!isLoaded ? (
|
||||
<div className={getClassName('__loading')}>
|
||||
{i18n('loadingPreview')}
|
||||
{i18n('icu:loadingPreview')}
|
||||
</div>
|
||||
) : null}
|
||||
{isLoaded && image && isImage && domain ? (
|
||||
<div className={getClassName('__icon-container')}>
|
||||
<Image
|
||||
alt={i18n('stagedPreviewThumbnail', {
|
||||
alt={i18n('icu:stagedPreviewThumbnail', {
|
||||
domain,
|
||||
})}
|
||||
attachment={image}
|
||||
|
@ -105,7 +105,7 @@ export function StagedLinkPreview({
|
|||
{maybeContent}
|
||||
{onClose && (
|
||||
<button
|
||||
aria-label={i18n('close')}
|
||||
aria-label={i18n('icu:close')}
|
||||
className={getClassName('__close-button')}
|
||||
onClick={onClose}
|
||||
type="button"
|
||||
|
|
|
@ -18,7 +18,7 @@ export function StagedPlaceholderAttachment({
|
|||
type="button"
|
||||
className="module-staged-placeholder-attachment"
|
||||
onClick={onClick}
|
||||
title={i18n('addImageOrVideoattachment')}
|
||||
title={i18n('icu:addImageOrVideoattachment')}
|
||||
>
|
||||
<div className="module-staged-placeholder-attachment__plus-icon" />
|
||||
</button>
|
||||
|
|
|
@ -905,7 +905,7 @@ export class Timeline extends React.Component<
|
|||
text = (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="ContactSpoofing__same-name"
|
||||
id="icu:ContactSpoofing__same-name"
|
||||
components={{
|
||||
link: (
|
||||
<TimelineWarning.Link
|
||||
|
@ -915,7 +915,7 @@ export class Timeline extends React.Component<
|
|||
});
|
||||
}}
|
||||
>
|
||||
{i18n('ContactSpoofing__same-name__link')}
|
||||
{i18n('icu:ContactSpoofing__same-name__link')}
|
||||
</TimelineWarning.Link>
|
||||
),
|
||||
}}
|
||||
|
@ -932,7 +932,7 @@ export class Timeline extends React.Component<
|
|||
text = (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="ContactSpoofing__same-name-in-group"
|
||||
id="icu:ContactSpoofing__same-name-in-group"
|
||||
components={{
|
||||
count: Object.values(groupNameCollisions)
|
||||
.reduce(
|
||||
|
@ -946,7 +946,7 @@ export class Timeline extends React.Component<
|
|||
reviewGroupMemberNameCollision(id);
|
||||
}}
|
||||
>
|
||||
{i18n('ContactSpoofing__same-name-in-group__link')}
|
||||
{i18n('icu:ContactSpoofing__same-name-in-group__link')}
|
||||
</TimelineWarning.Link>
|
||||
),
|
||||
}}
|
||||
|
|
|
@ -349,14 +349,14 @@ export function TimelineMessage(props: Props): JSX.Element {
|
|||
{
|
||||
action: () => deleteMessageForEveryone(id),
|
||||
style: 'negative',
|
||||
text: i18n('delete'),
|
||||
text: i18n('icu:delete'),
|
||||
},
|
||||
]}
|
||||
dialogName="TimelineMessage/deleteMessageForEveryone"
|
||||
i18n={i18n}
|
||||
onClose={() => setHasDOEConfirmation(false)}
|
||||
>
|
||||
{i18n('deleteForEveryoneWarning')}
|
||||
{i18n('icu:deleteForEveryoneWarning')}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
{hasDeleteConfirmation && (
|
||||
|
@ -471,7 +471,7 @@ function MessageMenu({
|
|||
ref={maybePopperRef}
|
||||
role="button"
|
||||
onClick={showMenu}
|
||||
aria-label={i18n('messageContextMenuButton')}
|
||||
aria-label={i18n('icu:messageContextMenuButton')}
|
||||
className={classNames(
|
||||
'module-message__buttons__menu',
|
||||
`module-message__buttons__download--${direction}`
|
||||
|
@ -522,7 +522,7 @@ function MessageMenu({
|
|||
}}
|
||||
role="button"
|
||||
className="module-message__buttons__react"
|
||||
aria-label={i18n('reactToMessage')}
|
||||
aria-label={i18n('icu:reactToMessage')}
|
||||
onDoubleClick={ev => {
|
||||
// Prevent double click from triggering the replyToMessage action
|
||||
ev.stopPropagation();
|
||||
|
@ -540,7 +540,7 @@ function MessageMenu({
|
|||
<div
|
||||
onClick={onDownload}
|
||||
role="button"
|
||||
aria-label={i18n('downloadAttachment')}
|
||||
aria-label={i18n('icu:downloadAttachment')}
|
||||
className={classNames(
|
||||
'module-message__buttons__download',
|
||||
`module-message__buttons__download--${direction}`
|
||||
|
@ -565,7 +565,7 @@ function MessageMenu({
|
|||
}}
|
||||
// This a menu meant for mouse use only
|
||||
role="button"
|
||||
aria-label={i18n('replyToMessage')}
|
||||
aria-label={i18n('icu:replyToMessage')}
|
||||
className={classNames(
|
||||
'module-message__buttons__reply',
|
||||
`module-message__buttons__download--${direction}`
|
||||
|
@ -627,7 +627,7 @@ const MessageContextMenu = ({
|
|||
}}
|
||||
onClick={onDownload}
|
||||
>
|
||||
{i18n('downloadAttachment')}
|
||||
{i18n('icu:downloadAttachment')}
|
||||
</MenuItem>
|
||||
)}
|
||||
{onReplyToMessage && (
|
||||
|
@ -643,7 +643,7 @@ const MessageContextMenu = ({
|
|||
onReplyToMessage();
|
||||
}}
|
||||
>
|
||||
{i18n('replyToMessage')}
|
||||
{i18n('icu:replyToMessage')}
|
||||
</MenuItem>
|
||||
)}
|
||||
{onReact && (
|
||||
|
@ -659,7 +659,7 @@ const MessageContextMenu = ({
|
|||
onReact();
|
||||
}}
|
||||
>
|
||||
{i18n('reactToMessage')}
|
||||
{i18n('icu:reactToMessage')}
|
||||
</MenuItem>
|
||||
)}
|
||||
</>
|
||||
|
@ -676,7 +676,7 @@ const MessageContextMenu = ({
|
|||
onMoreInfo();
|
||||
}}
|
||||
>
|
||||
{i18n('moreInfo')}
|
||||
{i18n('icu:moreInfo')}
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
attributes={{
|
||||
|
@ -702,7 +702,7 @@ const MessageContextMenu = ({
|
|||
onRetryMessageSend();
|
||||
}}
|
||||
>
|
||||
{i18n('retrySend')}
|
||||
{i18n('icu:retrySend')}
|
||||
</MenuItem>
|
||||
)}
|
||||
{onRetryDeleteForEveryone && (
|
||||
|
@ -718,7 +718,7 @@ const MessageContextMenu = ({
|
|||
onRetryDeleteForEveryone();
|
||||
}}
|
||||
>
|
||||
{i18n('retryDeleteForEveryone')}
|
||||
{i18n('icu:retryDeleteForEveryone')}
|
||||
</MenuItem>
|
||||
)}
|
||||
{onForward && (
|
||||
|
@ -734,7 +734,7 @@ const MessageContextMenu = ({
|
|||
onForward();
|
||||
}}
|
||||
>
|
||||
{i18n('forwardMessage')}
|
||||
{i18n('icu:forwardMessage')}
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem
|
||||
|
@ -749,7 +749,7 @@ const MessageContextMenu = ({
|
|||
onDeleteForMe();
|
||||
}}
|
||||
>
|
||||
{i18n('deleteMessage')}
|
||||
{i18n('icu:deleteMessage')}
|
||||
</MenuItem>
|
||||
{onDeleteForEveryone && (
|
||||
<MenuItem
|
||||
|
@ -764,7 +764,7 @@ const MessageContextMenu = ({
|
|||
onDeleteForEveryone();
|
||||
}}
|
||||
>
|
||||
{i18n('deleteMessageForEveryone')}
|
||||
{i18n('icu:deleteMessageForEveryone')}
|
||||
</MenuItem>
|
||||
)}
|
||||
</ContextMenu>
|
||||
|
|
|
@ -28,7 +28,7 @@ export function TimelineWarning({
|
|||
<div className={CLASS_NAME}>
|
||||
{children}
|
||||
<button
|
||||
aria-label={i18n('close')}
|
||||
aria-label={i18n('icu:close')}
|
||||
className={CLOSE_BUTTON_CLASS_NAME}
|
||||
onClick={onClose}
|
||||
type="button"
|
||||
|
|
|
@ -56,31 +56,31 @@ export function TimerNotification(props: Props): JSX.Element {
|
|||
message = props.disabled ? (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="disabledDisappearingMessages"
|
||||
id="icu:disabledDisappearingMessages"
|
||||
components={{ name }}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="theyChangedTheTimer"
|
||||
id="icu:theyChangedTheTimer"
|
||||
components={{ name, time: timespan }}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case 'fromMe':
|
||||
message = disabled
|
||||
? i18n('youDisabledDisappearingMessages')
|
||||
: i18n('youChangedTheTimer', { time: timespan });
|
||||
? i18n('icu:youDisabledDisappearingMessages')
|
||||
: i18n('icu:youChangedTheTimer', { time: timespan });
|
||||
break;
|
||||
case 'fromSync':
|
||||
message = disabled
|
||||
? i18n('disappearingMessagesDisabled')
|
||||
: i18n('timerSetOnSync', { time: timespan });
|
||||
? i18n('icu:disappearingMessagesDisabled')
|
||||
: i18n('icu:timerSetOnSync', { time: timespan });
|
||||
break;
|
||||
case 'fromMember':
|
||||
message = disabled
|
||||
? i18n('disappearingMessagesDisabledByMember')
|
||||
: i18n('timerSetByMember', { time: timespan });
|
||||
? i18n('icu:disappearingMessagesDisabledByMember')
|
||||
: i18n('icu:timerSetByMember', { time: timespan });
|
||||
break;
|
||||
default:
|
||||
log.warn('TimerNotification: unsupported type provided:', type);
|
||||
|
|
|
@ -13,7 +13,7 @@ export type Props = {
|
|||
|
||||
export function TypingAnimation({ i18n, color }: Props): JSX.Element {
|
||||
return (
|
||||
<div className="module-typing-animation" title={i18n('typingAlt')}>
|
||||
<div className="module-typing-animation" title={i18n('icu:typingAlt')}>
|
||||
<div
|
||||
className={classNames(
|
||||
'module-typing-animation__dot',
|
||||
|
|
|
@ -25,7 +25,7 @@ export function UniversalTimerNotification(props: Props): JSX.Element | null {
|
|||
return (
|
||||
<SystemMessage
|
||||
icon="timer"
|
||||
contents={i18n('UniversalTimerNotification__text', {
|
||||
contents={i18n('icu:UniversalTimerNotification__text', {
|
||||
timeValue,
|
||||
})}
|
||||
/>
|
||||
|
|
|
@ -44,7 +44,7 @@ function UnsupportedMessageContents({ canProcessNow, contact, i18n }: Props) {
|
|||
if (canProcessNow) {
|
||||
return (
|
||||
<Intl
|
||||
id="Message--unsupported-message-ask-to-resend"
|
||||
id="icu:Message--unsupported-message-ask-to-resend"
|
||||
components={{ contact: contactName }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
|
@ -52,7 +52,7 @@ function UnsupportedMessageContents({ canProcessNow, contact, i18n }: Props) {
|
|||
}
|
||||
return (
|
||||
<Intl
|
||||
id="Message--from-me-unsupported-message"
|
||||
id="icu:Message--from-me-unsupported-message"
|
||||
components={{ contact: contactName }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
|
@ -61,7 +61,7 @@ function UnsupportedMessageContents({ canProcessNow, contact, i18n }: Props) {
|
|||
if (canProcessNow) {
|
||||
return (
|
||||
<Intl
|
||||
id="Message--from-me-unsupported-message-ask-to-resend"
|
||||
id="icu:Message--from-me-unsupported-message-ask-to-resend"
|
||||
components={{ contact: contactName }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
|
@ -69,7 +69,7 @@ function UnsupportedMessageContents({ canProcessNow, contact, i18n }: Props) {
|
|||
}
|
||||
return (
|
||||
<Intl
|
||||
id="Message--from-me-unsupported-message"
|
||||
id="icu:Message--from-me-unsupported-message"
|
||||
components={{ contact: contactName }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
|
@ -101,7 +101,7 @@ export function UnsupportedMessage({
|
|||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
>
|
||||
{i18n('Message--update-signal')}
|
||||
{i18n('icu:Message--update-signal')}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -39,20 +39,28 @@ export class VerificationNotification extends React.Component<Props> {
|
|||
switch (type) {
|
||||
case 'markVerified':
|
||||
return isLocal ? (
|
||||
<Intl id="youMarkedAsVerified" components={{ name }} i18n={i18n} />
|
||||
<Intl
|
||||
id="icu:youMarkedAsVerified"
|
||||
components={{ name }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
id="youMarkedAsVerifiedOtherDevice"
|
||||
id="icu:youMarkedAsVerifiedOtherDevice"
|
||||
components={{ name }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
);
|
||||
case 'markNotVerified':
|
||||
return isLocal ? (
|
||||
<Intl id="youMarkedAsNotVerified" components={{ name }} i18n={i18n} />
|
||||
<Intl
|
||||
id="icu:youMarkedAsNotVerified"
|
||||
components={{ name }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
id="youMarkedAsNotVerifiedOtherDevice"
|
||||
id="icu:youMarkedAsNotVerifiedOtherDevice"
|
||||
components={{ name }}
|
||||
i18n={i18n}
|
||||
/>
|
||||
|
|
|
@ -104,7 +104,7 @@ export const WaveformScrubber = React.forwardRef(function WaveformScrubber(
|
|||
onKeyDown={handleKeyDown}
|
||||
tabIndex={0}
|
||||
role="slider"
|
||||
aria-label={i18n('MessageAudio--slider')}
|
||||
aria-label={i18n('icu:MessageAudio--slider')}
|
||||
aria-orientation="horizontal"
|
||||
aria-valuenow={currentTime}
|
||||
aria-valuemin={0}
|
||||
|
|
|
@ -211,7 +211,7 @@ export function ChooseGroupMembersModal({
|
|||
return {
|
||||
type: RowType.Header,
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
getHeaderText: i18n => i18n('contactsHeader'),
|
||||
getHeaderText: i18n => i18n('icu:contactsHeader'),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ export function ChooseGroupMembersModal({
|
|||
return {
|
||||
type: RowType.Header,
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
getHeaderText: i18n => i18n('findByPhoneNumberHeader'),
|
||||
getHeaderText: i18n => i18n('icu:findByPhoneNumberHeader'),
|
||||
};
|
||||
}
|
||||
if (virtualIndex === 1) {
|
||||
|
@ -269,7 +269,7 @@ export function ChooseGroupMembersModal({
|
|||
return {
|
||||
type: RowType.Header,
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
getHeaderText: i18n => i18n('findByUsernameHeader'),
|
||||
getHeaderText: i18n => i18n('icu:findByUsernameHeader'),
|
||||
};
|
||||
}
|
||||
if (virtualIndex === 1) {
|
||||
|
@ -383,7 +383,7 @@ export function ChooseGroupMembersModal({
|
|||
>
|
||||
<div className="module-AddGroupMembersModal module-AddGroupMembersModal--choose-members">
|
||||
<button
|
||||
aria-label={i18n('close')}
|
||||
aria-label={i18n('icu:close')}
|
||||
className="module-AddGroupMembersModal__close-button"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
|
@ -391,11 +391,11 @@ export function ChooseGroupMembersModal({
|
|||
}}
|
||||
/>
|
||||
<h1 className="module-AddGroupMembersModal__header">
|
||||
{i18n('AddGroupMembersModal--title')}
|
||||
{i18n('icu:AddGroupMembersModal--title')}
|
||||
</h1>
|
||||
<SearchInput
|
||||
i18n={i18n}
|
||||
placeholder={i18n('contactSearchPlaceholder')}
|
||||
placeholder={i18n('icu:contactSearchPlaceholder')}
|
||||
onChange={event => {
|
||||
setSearchTerm(event.target.value);
|
||||
}}
|
||||
|
@ -483,16 +483,16 @@ export function ChooseGroupMembersModal({
|
|||
</Measure>
|
||||
) : (
|
||||
<div className="module-AddGroupMembersModal__no-candidate-contacts">
|
||||
{i18n('noContactsFound')}
|
||||
{i18n('icu:noContactsFound')}
|
||||
</div>
|
||||
)}
|
||||
<div className="module-AddGroupMembersModal__button-container">
|
||||
<Button onClick={onClose} variant={ButtonVariant.Secondary}>
|
||||
{i18n('cancel')}
|
||||
{i18n('icu:cancel')}
|
||||
</Button>
|
||||
|
||||
<Button disabled={!canContinue} onClick={confirmAdds}>
|
||||
{i18n('AddGroupMembersModal--continue-to-confirm')}
|
||||
{i18n('icu:AddGroupMembersModal--continue-to-confirm')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -47,7 +47,7 @@ export function ConfirmAdditionsModal({
|
|||
headerText = (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="AddGroupMembersModal--confirm-title--one"
|
||||
id="icu:AddGroupMembersModal--confirm-title--one"
|
||||
components={{
|
||||
person: <ContactName title={firstContact.title} />,
|
||||
group: groupTitleNode,
|
||||
|
@ -58,7 +58,7 @@ export function ConfirmAdditionsModal({
|
|||
headerText = (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="AddGroupMembersModal--confirm-title--many"
|
||||
id="icu:AddGroupMembersModal--confirm-title--many"
|
||||
components={{
|
||||
count: selectedContacts.length.toString(),
|
||||
group: groupTitleNode,
|
||||
|
@ -73,9 +73,9 @@ export function ConfirmAdditionsModal({
|
|||
<Spinner size="20px" svgSize="small" direction="on-avatar" />
|
||||
);
|
||||
} else if (selectedContacts.length === 1) {
|
||||
buttonContents = i18n('AddGroupMembersModal--confirm-button--one');
|
||||
buttonContents = i18n('icu:AddGroupMembersModal--confirm-button--one');
|
||||
} else {
|
||||
buttonContents = i18n('AddGroupMembersModal--confirm-button--many');
|
||||
buttonContents = i18n('icu:AddGroupMembersModal--confirm-button--many');
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -87,12 +87,12 @@ export function ConfirmAdditionsModal({
|
|||
<h1 className="module-AddGroupMembersModal__header">{headerText}</h1>
|
||||
{requestState === RequestState.InactiveWithError && (
|
||||
<div className="module-AddGroupMembersModal__error-message">
|
||||
{i18n('updateGroupAttributes__error-message')}
|
||||
{i18n('icu:updateGroupAttributes__error-message')}
|
||||
</div>
|
||||
)}
|
||||
<div className="module-AddGroupMembersModal__button-container">
|
||||
<Button onClick={onClose} variant={ButtonVariant.Secondary}>
|
||||
{i18n('cancel')}
|
||||
{i18n('icu:cancel')}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
|
|
|
@ -315,12 +315,12 @@ export function ConversationDetails({
|
|||
{
|
||||
action: () => setMuteExpiration(conversation.id, 0),
|
||||
style: 'affirmative',
|
||||
text: i18n('unmute'),
|
||||
text: i18n('icu:unmute'),
|
||||
},
|
||||
]}
|
||||
hasXButton
|
||||
i18n={i18n}
|
||||
title={i18n('ConversationDetails__unmute--title')}
|
||||
title={i18n('icu:ConversationDetails__unmute--title')}
|
||||
onClose={onCloseModal}
|
||||
>
|
||||
{getMutedUntilText(Number(conversation.muteExpiresAt), i18n)}
|
||||
|
@ -386,7 +386,7 @@ export function ConversationDetails({
|
|||
}}
|
||||
variant={ButtonVariant.Details}
|
||||
>
|
||||
{isMuted ? i18n('unmute') : i18n('mute')}
|
||||
{isMuted ? i18n('icu:unmute') : i18n('icu:mute')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={ButtonIconType.search}
|
||||
|
@ -395,7 +395,7 @@ export function ConversationDetails({
|
|||
}}
|
||||
variant={ButtonVariant.Details}
|
||||
>
|
||||
{i18n('search')}
|
||||
{i18n('icu:search')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
|
@ -405,19 +405,21 @@ export function ConversationDetails({
|
|||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n(
|
||||
'ConversationDetails--disappearing-messages-label'
|
||||
'icu:ConversationDetails--disappearing-messages-label'
|
||||
)}
|
||||
icon={IconType.timer}
|
||||
/>
|
||||
}
|
||||
info={
|
||||
isGroup
|
||||
? i18n('ConversationDetails--disappearing-messages-info--group')
|
||||
? i18n(
|
||||
'icu:ConversationDetails--disappearing-messages-info--group'
|
||||
)
|
||||
: i18n(
|
||||
'ConversationDetails--disappearing-messages-info--direct'
|
||||
'icu:ConversationDetails--disappearing-messages-info--direct'
|
||||
)
|
||||
}
|
||||
label={i18n('ConversationDetails--disappearing-messages-label')}
|
||||
label={i18n('icu:ConversationDetails--disappearing-messages-label')}
|
||||
right={
|
||||
<DisappearingTimerSelect
|
||||
i18n={i18n}
|
||||
|
@ -432,11 +434,11 @@ export function ConversationDetails({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('showChatColorEditor')}
|
||||
ariaLabel={i18n('icu:showChatColorEditor')}
|
||||
icon={IconType.color}
|
||||
/>
|
||||
}
|
||||
label={i18n('showChatColorEditor')}
|
||||
label={i18n('icu:showChatColorEditor')}
|
||||
onClick={() => {
|
||||
pushPanelForConversation({
|
||||
type: PanelType.ChatColorEditor,
|
||||
|
@ -455,11 +457,11 @@ export function ConversationDetails({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetails--notifications')}
|
||||
ariaLabel={i18n('icu:ConversationDetails--notifications')}
|
||||
icon={IconType.notifications}
|
||||
/>
|
||||
}
|
||||
label={i18n('ConversationDetails--notifications')}
|
||||
label={i18n('icu:ConversationDetails--notifications')}
|
||||
onClick={() =>
|
||||
pushPanelForConversation({
|
||||
type: PanelType.NotificationSettings,
|
||||
|
@ -511,27 +513,29 @@ export function ConversationDetails({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetails--group-link')}
|
||||
ariaLabel={i18n('icu:ConversationDetails--group-link')}
|
||||
icon={IconType.link}
|
||||
/>
|
||||
}
|
||||
label={i18n('ConversationDetails--group-link')}
|
||||
label={i18n('icu:ConversationDetails--group-link')}
|
||||
onClick={() =>
|
||||
pushPanelForConversation({
|
||||
type: PanelType.GroupLinkManagement,
|
||||
})
|
||||
}
|
||||
right={hasGroupLink ? i18n('on') : i18n('off')}
|
||||
right={hasGroupLink ? i18n('icu:on') : i18n('icu:off')}
|
||||
/>
|
||||
) : null}
|
||||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetails--requests-and-invites')}
|
||||
ariaLabel={i18n(
|
||||
'icu:ConversationDetails--requests-and-invites'
|
||||
)}
|
||||
icon={IconType.invites}
|
||||
/>
|
||||
}
|
||||
label={i18n('ConversationDetails--requests-and-invites')}
|
||||
label={i18n('icu:ConversationDetails--requests-and-invites')}
|
||||
onClick={() =>
|
||||
pushPanelForConversation({
|
||||
type: PanelType.GroupInvites,
|
||||
|
@ -543,11 +547,11 @@ export function ConversationDetails({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('permissions')}
|
||||
ariaLabel={i18n('icu:permissions')}
|
||||
icon={IconType.lock}
|
||||
/>
|
||||
}
|
||||
label={i18n('permissions')}
|
||||
label={i18n('icu:permissions')}
|
||||
onClick={() =>
|
||||
pushPanelForConversation({
|
||||
type: PanelType.GroupPermissions,
|
||||
|
@ -618,13 +622,13 @@ function ConversationDetailsCallButton({
|
|||
onClick={onClick}
|
||||
variant={ButtonVariant.Details}
|
||||
>
|
||||
{type === 'audio' ? i18n('audio') : i18n('video')}
|
||||
{type === 'audio' ? i18n('icu:audio') : i18n('icu:video')}
|
||||
</Button>
|
||||
);
|
||||
|
||||
if (disabled) {
|
||||
return (
|
||||
<Tooltip content={i18n('calling__in-another-call-tooltip')}>
|
||||
<Tooltip content={i18n('icu:calling__in-another-call-tooltip')}>
|
||||
{button}
|
||||
</Tooltip>
|
||||
);
|
||||
|
|
|
@ -52,7 +52,7 @@ export function ConversationDetailsActions({
|
|||
onClick={() => gLeave(true)}
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetailsActions--leave-group')}
|
||||
ariaLabel={i18n('icu:ConversationDetailsActions--leave-group')}
|
||||
disabled={cannotLeaveBecauseYouAreLastAdmin}
|
||||
icon={IconType.leave}
|
||||
/>
|
||||
|
@ -65,7 +65,7 @@ export function ConversationDetailsActions({
|
|||
'ConversationDetails__leave-group--disabled'
|
||||
)}
|
||||
>
|
||||
{i18n('ConversationDetailsActions--leave-group')}
|
||||
{i18n('icu:ConversationDetailsActions--leave-group')}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
@ -74,7 +74,7 @@ export function ConversationDetailsActions({
|
|||
leaveGroupNode = (
|
||||
<Tooltip
|
||||
content={i18n(
|
||||
'ConversationDetailsActions--leave-group-must-choose-new-admin'
|
||||
'icu:ConversationDetailsActions--leave-group-must-choose-new-admin'
|
||||
)}
|
||||
direction={TooltipPlacement.Top}
|
||||
>
|
||||
|
@ -92,13 +92,13 @@ export function ConversationDetailsActions({
|
|||
onClick={() => gGroupBlock(true)}
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetailsActions--block-group')}
|
||||
ariaLabel={i18n('icu:ConversationDetailsActions--block-group')}
|
||||
icon={IconType.block}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<div className="ConversationDetails__block-group">
|
||||
{i18n('ConversationDetailsActions--block-group')}
|
||||
{i18n('icu:ConversationDetailsActions--block-group')}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
@ -109,21 +109,21 @@ export function ConversationDetailsActions({
|
|||
onClick={() => gGroupUnblock(true)}
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetailsActions--unblock-group')}
|
||||
ariaLabel={i18n('icu:ConversationDetailsActions--unblock-group')}
|
||||
icon={IconType.unblock}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<div className="ConversationDetails__unblock-group">
|
||||
{i18n('ConversationDetailsActions--unblock-group')}
|
||||
{i18n('icu:ConversationDetailsActions--unblock-group')}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
const label = isBlocked
|
||||
? i18n('MessageRequests--unblock')
|
||||
: i18n('MessageRequests--block');
|
||||
? i18n('icu:MessageRequests--unblock')
|
||||
: i18n('icu:MessageRequests--block');
|
||||
blockNode = (
|
||||
<PanelRow
|
||||
onClick={() => (isBlocked ? gDirectUnblock(true) : gDirectBlock(true))}
|
||||
|
@ -152,7 +152,7 @@ export function ConversationDetailsActions({
|
|||
blockNode = (
|
||||
<Tooltip
|
||||
content={i18n(
|
||||
'ConversationDetailsActions--leave-group-must-choose-new-admin'
|
||||
'icu:ConversationDetailsActions--leave-group-must-choose-new-admin'
|
||||
)}
|
||||
direction={TooltipPlacement.Top}
|
||||
>
|
||||
|
@ -173,7 +173,7 @@ export function ConversationDetailsActions({
|
|||
actions={[
|
||||
{
|
||||
text: i18n(
|
||||
'ConversationDetailsActions--leave-group-modal-confirm'
|
||||
'icu:ConversationDetailsActions--leave-group-modal-confirm'
|
||||
),
|
||||
action: onLeave,
|
||||
style: 'affirmative',
|
||||
|
@ -181,9 +181,11 @@ export function ConversationDetailsActions({
|
|||
]}
|
||||
i18n={i18n}
|
||||
onClose={() => gLeave(false)}
|
||||
title={i18n('ConversationDetailsActions--leave-group-modal-title')}
|
||||
title={i18n(
|
||||
'icu:ConversationDetailsActions--leave-group-modal-title'
|
||||
)}
|
||||
>
|
||||
{i18n('ConversationDetailsActions--leave-group-modal-content')}
|
||||
{i18n('icu:ConversationDetailsActions--leave-group-modal-content')}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
|
||||
|
@ -193,7 +195,7 @@ export function ConversationDetailsActions({
|
|||
actions={[
|
||||
{
|
||||
text: i18n(
|
||||
'ConversationDetailsActions--block-group-modal-confirm'
|
||||
'icu:ConversationDetailsActions--block-group-modal-confirm'
|
||||
),
|
||||
action: () => blockConversation(conversationId),
|
||||
style: 'affirmative',
|
||||
|
@ -201,11 +203,14 @@ export function ConversationDetailsActions({
|
|||
]}
|
||||
i18n={i18n}
|
||||
onClose={() => gGroupBlock(false)}
|
||||
title={i18n('ConversationDetailsActions--block-group-modal-title', {
|
||||
groupName: conversationTitle,
|
||||
})}
|
||||
title={i18n(
|
||||
'icu:ConversationDetailsActions--block-group-modal-title',
|
||||
{
|
||||
groupName: conversationTitle,
|
||||
}
|
||||
)}
|
||||
>
|
||||
{i18n('ConversationDetailsActions--block-group-modal-content')}
|
||||
{i18n('icu:ConversationDetailsActions--block-group-modal-content')}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
{confirmGroupUnblock && (
|
||||
|
@ -214,7 +219,7 @@ export function ConversationDetailsActions({
|
|||
actions={[
|
||||
{
|
||||
text: i18n(
|
||||
'ConversationDetailsActions--unblock-group-modal-confirm'
|
||||
'icu:ConversationDetailsActions--unblock-group-modal-confirm'
|
||||
),
|
||||
action: () => acceptConversation(conversationId),
|
||||
style: 'affirmative',
|
||||
|
@ -222,11 +227,14 @@ export function ConversationDetailsActions({
|
|||
]}
|
||||
i18n={i18n}
|
||||
onClose={() => gGroupUnblock(false)}
|
||||
title={i18n('ConversationDetailsActions--unblock-group-modal-title', {
|
||||
groupName: conversationTitle,
|
||||
})}
|
||||
title={i18n(
|
||||
'icu:ConversationDetailsActions--unblock-group-modal-title',
|
||||
{
|
||||
groupName: conversationTitle,
|
||||
}
|
||||
)}
|
||||
>
|
||||
{i18n('ConversationDetailsActions--unblock-group-modal-content')}
|
||||
{i18n('icu:ConversationDetailsActions--unblock-group-modal-content')}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
|
||||
|
@ -235,18 +243,18 @@ export function ConversationDetailsActions({
|
|||
dialogName="ConversationDetailsAction.confirmDirectBlock"
|
||||
actions={[
|
||||
{
|
||||
text: i18n('MessageRequests--block'),
|
||||
text: i18n('icu:MessageRequests--block'),
|
||||
action: () => blockConversation(conversationId),
|
||||
style: 'affirmative',
|
||||
},
|
||||
]}
|
||||
i18n={i18n}
|
||||
onClose={() => gDirectBlock(false)}
|
||||
title={i18n('MessageRequests--block-direct-confirm-title', {
|
||||
title={i18n('icu:MessageRequests--block-direct-confirm-title', {
|
||||
name: conversationTitle,
|
||||
})}
|
||||
>
|
||||
{i18n('MessageRequests--block-direct-confirm-body')}
|
||||
{i18n('icu:MessageRequests--block-direct-confirm-body')}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
{confirmDirectUnblock && (
|
||||
|
@ -254,18 +262,18 @@ export function ConversationDetailsActions({
|
|||
dialogName="ConversationDetailsAction.confirmDirectUnblock"
|
||||
actions={[
|
||||
{
|
||||
text: i18n('MessageRequests--unblock'),
|
||||
text: i18n('icu:MessageRequests--unblock'),
|
||||
action: () => acceptConversation(conversationId),
|
||||
style: 'affirmative',
|
||||
},
|
||||
]}
|
||||
i18n={i18n}
|
||||
onClose={() => gDirectUnblock(false)}
|
||||
title={i18n('MessageRequests--unblock-direct-confirm-title', {
|
||||
title={i18n('icu:MessageRequests--unblock-direct-confirm-title', {
|
||||
name: conversationTitle,
|
||||
})}
|
||||
>
|
||||
{i18n('MessageRequests--unblock-direct-confirm-body')}
|
||||
{i18n('icu:MessageRequests--unblock-direct-confirm-body')}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
</>
|
||||
|
|
|
@ -49,7 +49,7 @@ export function ConversationDetailsGroups({
|
|||
>
|
||||
<PanelRow
|
||||
icon={<div className="ConversationDetails-groups__add-to-group-icon" />}
|
||||
label={i18n('ConversationDetailsGroups--add-to-group')}
|
||||
label={i18n('icu:ConversationDetailsGroups--add-to-group')}
|
||||
onClick={() => toggleAddUserToAnotherGroupModal(contactId)}
|
||||
/>
|
||||
{groupsInCommon.slice(0, groupsToShow).map(group => (
|
||||
|
@ -77,12 +77,12 @@ export function ConversationDetailsGroups({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetailsGroups--show-all')}
|
||||
ariaLabel={i18n('icu:ConversationDetailsGroups--show-all')}
|
||||
icon={IconType.down}
|
||||
/>
|
||||
}
|
||||
onClick={() => setShowAllGroups(true)}
|
||||
label={i18n('ConversationDetailsGroups--show-all')}
|
||||
label={i18n('icu:ConversationDetailsGroups--show-all')}
|
||||
/>
|
||||
)}
|
||||
</PanelSection>
|
||||
|
|
|
@ -64,9 +64,9 @@ export function ConversationDetailsHeader({
|
|||
/>
|
||||
);
|
||||
} else if (canEdit) {
|
||||
subtitle = i18n('ConversationDetailsHeader--add-group-description');
|
||||
subtitle = i18n('icu:ConversationDetailsHeader--add-group-description');
|
||||
} else {
|
||||
subtitle = i18n('ConversationDetailsHeader--members', {
|
||||
subtitle = i18n('icu:ConversationDetailsHeader--members', {
|
||||
number: memberships.length.toString(),
|
||||
});
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ export function ConversationDetailsHeader({
|
|||
const contents = (
|
||||
<div>
|
||||
<div className={bem('title')}>
|
||||
<Emojify text={isMe ? i18n('noteToSelf') : conversation.title} />
|
||||
<Emojify text={isMe ? i18n('icu:noteToSelf') : conversation.title} />
|
||||
{isMe && <span className="ContactModal__official-badge__large" />}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -55,10 +55,10 @@ export function ConversationDetailsMediaList({
|
|||
onClick={showAllMedia}
|
||||
type="button"
|
||||
>
|
||||
{i18n('ConversationDetailsMediaList--show-all')}
|
||||
{i18n('icu:ConversationDetailsMediaList--show-all')}
|
||||
</button>
|
||||
}
|
||||
title={i18n('ConversationDetailsMediaList--shared-media')}
|
||||
title={i18n('icu:ConversationDetailsMediaList--shared-media')}
|
||||
>
|
||||
<div className={bem('root')}>
|
||||
{mediaItems.slice(0, MEDIA_ITEM_LIMIT).map(mediaItem => (
|
||||
|
|
|
@ -93,7 +93,7 @@ export function ConversationDetailsMembershipList({
|
|||
|
||||
return (
|
||||
<PanelSection
|
||||
title={i18n('ConversationDetailsMembershipList--title', {
|
||||
title={i18n('icu:ConversationDetailsMembershipList--title', {
|
||||
number: sortedMemberships.length.toString(),
|
||||
})}
|
||||
>
|
||||
|
@ -102,7 +102,7 @@ export function ConversationDetailsMembershipList({
|
|||
icon={
|
||||
<div className="ConversationDetails-membership-list__add-members-icon" />
|
||||
}
|
||||
label={i18n('ConversationDetailsMembershipList--add-members')}
|
||||
label={i18n('icu:ConversationDetailsMembershipList--add-members')}
|
||||
onClick={() => startAddingNewMembers?.()}
|
||||
/>
|
||||
)}
|
||||
|
@ -120,8 +120,10 @@ export function ConversationDetailsMembershipList({
|
|||
{...member}
|
||||
/>
|
||||
}
|
||||
label={<Emojify text={member.isMe ? i18n('you') : member.title} />}
|
||||
right={isAdmin ? i18n('GroupV2--admin') : ''}
|
||||
label={
|
||||
<Emojify text={member.isMe ? i18n('icu:you') : member.title} />
|
||||
}
|
||||
right={isAdmin ? i18n('icu:GroupV2--admin') : ''}
|
||||
/>
|
||||
))}
|
||||
{showAllMembers === false && shouldHideRestMembers && (
|
||||
|
@ -129,12 +131,14 @@ export function ConversationDetailsMembershipList({
|
|||
className="ConversationDetails-membership-list--show-all"
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('ConversationDetailsMembershipList--show-all')}
|
||||
ariaLabel={i18n(
|
||||
'icu:ConversationDetailsMembershipList--show-all'
|
||||
)}
|
||||
icon={IconType.down}
|
||||
/>
|
||||
}
|
||||
onClick={() => setShowAllMembers(true)}
|
||||
label={i18n('ConversationDetailsMembershipList--show-all')}
|
||||
label={i18n('icu:ConversationDetailsMembershipList--show-all')}
|
||||
/>
|
||||
)}
|
||||
</PanelSection>
|
||||
|
|
|
@ -62,14 +62,14 @@ export function ConversationNotificationsModal({
|
|||
hasXButton
|
||||
onClose={onClose}
|
||||
i18n={i18n}
|
||||
title={i18n('muteNotificationsTitle')}
|
||||
title={i18n('icu:muteNotificationsTitle')}
|
||||
modalFooter={
|
||||
<>
|
||||
<Button onClick={onClose} variant={ButtonVariant.Secondary}>
|
||||
{i18n('cancel')}
|
||||
{i18n('icu:cancel')}
|
||||
</Button>
|
||||
<Button onClick={onMuteChange} variant={ButtonVariant.Primary}>
|
||||
{i18n('mute')}
|
||||
{i18n('icu:mute')}
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ export function ConversationNotificationsSettings({
|
|||
: [
|
||||
{
|
||||
disabled: true,
|
||||
text: i18n('notMuted'),
|
||||
text: i18n('icu:notMuted'),
|
||||
value: -1,
|
||||
},
|
||||
]),
|
||||
|
@ -81,13 +81,13 @@ export function ConversationNotificationsSettings({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('muteNotificationsTitle')}
|
||||
ariaLabel={i18n('icu:muteNotificationsTitle')}
|
||||
icon={IconType.mute}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<label htmlFor={muteNotificationsSelectId}>
|
||||
{i18n('muteNotificationsTitle')}
|
||||
{i18n('icu:muteNotificationsTitle')}
|
||||
</label>
|
||||
}
|
||||
right={
|
||||
|
@ -104,30 +104,30 @@ export function ConversationNotificationsSettings({
|
|||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n(
|
||||
'ConversationNotificationsSettings__mentions__label'
|
||||
'icu:ConversationNotificationsSettings__mentions__label'
|
||||
)}
|
||||
icon={IconType.mention}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<label htmlFor={mentionsSelectId}>
|
||||
{i18n('ConversationNotificationsSettings__mentions__label')}
|
||||
{i18n('icu:ConversationNotificationsSettings__mentions__label')}
|
||||
</label>
|
||||
}
|
||||
info={i18n('ConversationNotificationsSettings__mentions__info')}
|
||||
info={i18n('icu:ConversationNotificationsSettings__mentions__info')}
|
||||
right={
|
||||
<Select
|
||||
id={mentionsSelectId}
|
||||
options={[
|
||||
{
|
||||
text: i18n(
|
||||
'ConversationNotificationsSettings__mentions__select__always-notify'
|
||||
'icu:ConversationNotificationsSettings__mentions__select__always-notify'
|
||||
),
|
||||
value: 'no',
|
||||
},
|
||||
{
|
||||
text: i18n(
|
||||
'ConversationNotificationsSettings__mentions__select__dont-notify-for-mentions-if-muted'
|
||||
'icu:ConversationNotificationsSettings__mentions__select__dont-notify-for-mentions-if-muted'
|
||||
),
|
||||
value: 'yes',
|
||||
},
|
||||
|
|
|
@ -192,12 +192,12 @@ export function EditConversationAttributesModal({
|
|||
/>
|
||||
|
||||
<div className="module-EditConversationAttributesModal__description-warning">
|
||||
{i18n('EditConversationAttributesModal__description-warning')}
|
||||
{i18n('icu:EditConversationAttributesModal__description-warning')}
|
||||
</div>
|
||||
|
||||
{requestState === RequestState.InactiveWithError && (
|
||||
<div className="module-EditConversationAttributesModal__error-message">
|
||||
{i18n('updateGroupAttributes__error-message')}
|
||||
{i18n('icu:updateGroupAttributes__error-message')}
|
||||
</div>
|
||||
)}
|
||||
</form>
|
||||
|
@ -212,7 +212,7 @@ export function EditConversationAttributesModal({
|
|||
onClick={onClose}
|
||||
variant={ButtonVariant.Secondary}
|
||||
>
|
||||
{i18n('cancel')}
|
||||
{i18n('icu:cancel')}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
|
@ -224,7 +224,7 @@ export function EditConversationAttributesModal({
|
|||
{isRequestActive ? (
|
||||
<Spinner size="20px" svgSize="small" direction="on-avatar" />
|
||||
) : (
|
||||
i18n('save')
|
||||
i18n('icu:save')
|
||||
)}
|
||||
</Button>
|
||||
</>
|
||||
|
@ -236,7 +236,7 @@ export function EditConversationAttributesModal({
|
|||
hasXButton
|
||||
i18n={i18n}
|
||||
onClose={onClose}
|
||||
title={i18n('updateGroupAttributes__title')}
|
||||
title={i18n('icu:updateGroupAttributes__title')}
|
||||
modalFooter={modalFooter}
|
||||
>
|
||||
{content}
|
||||
|
|
|
@ -83,14 +83,14 @@ export function GroupLinkManagement({
|
|||
generateNewGroupLink(conversation.id);
|
||||
},
|
||||
style: 'negative',
|
||||
text: i18n('GroupLinkManagement--reset'),
|
||||
text: i18n('icu:GroupLinkManagement--reset'),
|
||||
},
|
||||
]}
|
||||
i18n={i18n}
|
||||
onClose={() => {
|
||||
setHasGenerateNewLinkDialog(false);
|
||||
}}
|
||||
title={i18n('GroupLinkManagement--confirm-reset')}
|
||||
title={i18n('icu:GroupLinkManagement--confirm-reset')}
|
||||
/>
|
||||
)}
|
||||
<PanelSection>
|
||||
|
@ -98,7 +98,7 @@ export function GroupLinkManagement({
|
|||
info={groupLinkInfo}
|
||||
label={
|
||||
<label htmlFor={groupLinkSelectId}>
|
||||
{i18n('ConversationDetails--group-link')}
|
||||
{i18n('icu:ConversationDetails--group-link')}
|
||||
</label>
|
||||
}
|
||||
right={
|
||||
|
@ -108,11 +108,11 @@ export function GroupLinkManagement({
|
|||
onChange={createEventHandler(changeHasGroupLink)}
|
||||
options={[
|
||||
{
|
||||
text: i18n('on'),
|
||||
text: i18n('icu:on'),
|
||||
value: 'true',
|
||||
},
|
||||
{
|
||||
text: i18n('off'),
|
||||
text: i18n('icu:off'),
|
||||
value: 'false',
|
||||
},
|
||||
]}
|
||||
|
@ -130,11 +130,11 @@ export function GroupLinkManagement({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('GroupLinkManagement--share')}
|
||||
ariaLabel={i18n('icu:GroupLinkManagement--share')}
|
||||
icon={IconType.share}
|
||||
/>
|
||||
}
|
||||
label={i18n('GroupLinkManagement--share')}
|
||||
label={i18n('icu:GroupLinkManagement--share')}
|
||||
ref={!isAdmin ? focusRef : undefined}
|
||||
onClick={() => {
|
||||
if (conversation.groupLink) {
|
||||
|
@ -146,11 +146,11 @@ export function GroupLinkManagement({
|
|||
<PanelRow
|
||||
icon={
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('GroupLinkManagement--reset')}
|
||||
ariaLabel={i18n('icu:GroupLinkManagement--reset')}
|
||||
icon={IconType.reset}
|
||||
/>
|
||||
}
|
||||
label={i18n('GroupLinkManagement--reset')}
|
||||
label={i18n('icu:GroupLinkManagement--reset')}
|
||||
onClick={() => setHasGenerateNewLinkDialog(true)}
|
||||
/>
|
||||
) : null}
|
||||
|
@ -159,10 +159,10 @@ export function GroupLinkManagement({
|
|||
{isAdmin ? (
|
||||
<PanelSection>
|
||||
<PanelRow
|
||||
info={i18n('GroupLinkManagement--approve-info')}
|
||||
info={i18n('icu:GroupLinkManagement--approve-info')}
|
||||
label={
|
||||
<label htmlFor={approveSelectId}>
|
||||
{i18n('GroupLinkManagement--approve-label')}
|
||||
{i18n('icu:GroupLinkManagement--approve-label')}
|
||||
</label>
|
||||
}
|
||||
right={
|
||||
|
@ -173,11 +173,11 @@ export function GroupLinkManagement({
|
|||
)}
|
||||
options={[
|
||||
{
|
||||
text: i18n('on'),
|
||||
text: i18n('icu:on'),
|
||||
value: 'true',
|
||||
},
|
||||
{
|
||||
text: i18n('off'),
|
||||
text: i18n('icu:off'),
|
||||
value: 'false',
|
||||
},
|
||||
]}
|
||||
|
|
|
@ -70,10 +70,10 @@ export function GroupV2Permissions({
|
|||
<PanelRow
|
||||
label={
|
||||
<label htmlFor={addMembersSelectId}>
|
||||
{i18n('ConversationDetails--add-members-label')}
|
||||
{i18n('icu:ConversationDetails--add-members-label')}
|
||||
</label>
|
||||
}
|
||||
info={i18n('ConversationDetails--add-members-info')}
|
||||
info={i18n('icu:ConversationDetails--add-members-info')}
|
||||
right={
|
||||
<Select
|
||||
id={addMembersSelectId}
|
||||
|
@ -86,10 +86,10 @@ export function GroupV2Permissions({
|
|||
<PanelRow
|
||||
label={
|
||||
<label htmlFor={groupInfoSelectId}>
|
||||
{i18n('ConversationDetails--group-info-label')}
|
||||
{i18n('icu:ConversationDetails--group-info-label')}
|
||||
</label>
|
||||
}
|
||||
info={i18n('ConversationDetails--group-info-info')}
|
||||
info={i18n('icu:ConversationDetails--group-info-info')}
|
||||
right={
|
||||
<Select
|
||||
id={groupInfoSelectId}
|
||||
|
@ -103,10 +103,10 @@ export function GroupV2Permissions({
|
|||
<PanelRow
|
||||
label={
|
||||
<label htmlFor={announcementSelectId}>
|
||||
{i18n('ConversationDetails--announcement-label')}
|
||||
{i18n('icu:ConversationDetails--announcement-label')}
|
||||
</label>
|
||||
}
|
||||
info={i18n('ConversationDetails--announcement-info')}
|
||||
info={i18n('icu:ConversationDetails--announcement-info')}
|
||||
right={
|
||||
<Select
|
||||
id={announcementSelectId}
|
||||
|
|
|
@ -107,7 +107,7 @@ export function PendingInvites({
|
|||
role="tab"
|
||||
tabIndex={0}
|
||||
>
|
||||
{i18n('PendingInvites--tab-requests', {
|
||||
{i18n('icu:PendingInvites--tab-requests', {
|
||||
count: String(pendingApprovalMemberships.length),
|
||||
})}
|
||||
</div>
|
||||
|
@ -128,7 +128,7 @@ export function PendingInvites({
|
|||
role="tab"
|
||||
tabIndex={0}
|
||||
>
|
||||
{i18n('PendingInvites--tab-invites', {
|
||||
{i18n('icu:PendingInvites--tab-invites', {
|
||||
count: String(pendingMemberships.length),
|
||||
})}
|
||||
</div>
|
||||
|
@ -229,14 +229,14 @@ function MembershipActionConfirmation({
|
|||
? approveStagedMembership
|
||||
: revokeStagedMemberships;
|
||||
|
||||
let modalActionText = i18n('PendingInvites--revoke');
|
||||
let modalActionText = i18n('icu:PendingInvites--revoke');
|
||||
|
||||
if (membershipType === StageType.APPROVE_REQUEST) {
|
||||
modalActionText = i18n('PendingRequests--approve');
|
||||
modalActionText = i18n('icu:PendingRequests--approve');
|
||||
} else if (membershipType === StageType.DENY_REQUEST) {
|
||||
modalActionText = i18n('PendingRequests--deny');
|
||||
modalActionText = i18n('icu:PendingRequests--deny');
|
||||
} else if (membershipType === StageType.REVOKE_INVITE) {
|
||||
modalActionText = i18n('PendingInvites--revoke');
|
||||
modalActionText = i18n('icu:PendingInvites--revoke');
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -286,16 +286,16 @@ function getConfirmationMessage({
|
|||
// Requesting a membership since they weren't added by anyone
|
||||
if (membershipType === StageType.DENY_REQUEST) {
|
||||
return isAccessControlEnabled(conversation.accessControlAddFromInviteLink)
|
||||
? i18n('PendingRequests--deny-for--with-link', {
|
||||
? i18n('icu:PendingRequests--deny-for--with-link', {
|
||||
name: firstMembership.member.title,
|
||||
})
|
||||
: i18n('PendingRequests--deny-for', {
|
||||
: i18n('icu:PendingRequests--deny-for', {
|
||||
name: firstMembership.member.title,
|
||||
});
|
||||
}
|
||||
|
||||
if (membershipType === StageType.APPROVE_REQUEST) {
|
||||
return i18n('PendingRequests--approve-for', {
|
||||
return i18n('icu:PendingRequests--approve-for', {
|
||||
name: firstMembership.member.title,
|
||||
});
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ function getConfirmationMessage({
|
|||
const invitedByUs = firstPendingMembership.metadata.addedByUserId === ourUuid;
|
||||
|
||||
if (invitedByUs) {
|
||||
return i18n('PendingInvites--revoke-for', {
|
||||
return i18n('icu:PendingInvites--revoke-for', {
|
||||
name: firstPendingMembership.member.title,
|
||||
});
|
||||
}
|
||||
|
@ -326,10 +326,10 @@ function getConfirmationMessage({
|
|||
const name = inviter.title;
|
||||
|
||||
if (stagedMemberships.length === 1) {
|
||||
return i18n('PendingInvites--revoke-from-singular', { name });
|
||||
return i18n('icu:PendingInvites--revoke-from-singular', { name });
|
||||
}
|
||||
|
||||
return i18n('PendingInvites--revoke-from-plural', {
|
||||
return i18n('icu:PendingInvites--revoke-from-plural', {
|
||||
number: stagedMemberships.length.toString(),
|
||||
name,
|
||||
});
|
||||
|
@ -382,7 +382,7 @@ function MembersPendingAdminApproval({
|
|||
]);
|
||||
}}
|
||||
>
|
||||
{i18n('delete')}
|
||||
{i18n('icu:delete')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
|
@ -396,7 +396,7 @@ function MembersPendingAdminApproval({
|
|||
]);
|
||||
}}
|
||||
>
|
||||
{i18n('accept')}
|
||||
{i18n('icu:accept')}
|
||||
</button>
|
||||
</>
|
||||
) : null
|
||||
|
@ -404,7 +404,7 @@ function MembersPendingAdminApproval({
|
|||
/>
|
||||
))}
|
||||
<div className="ConversationDetails__pending--info">
|
||||
{i18n('PendingRequests--info', {
|
||||
{i18n('icu:PendingRequests--info', {
|
||||
name: conversation.title,
|
||||
})}
|
||||
</div>
|
||||
|
@ -453,7 +453,7 @@ function MembersPendingProfileKey({
|
|||
return (
|
||||
<PanelSection>
|
||||
{ourPendingMemberships && (
|
||||
<PanelSection title={i18n('PendingInvites--invited-by-you')}>
|
||||
<PanelSection title={i18n('icu:PendingInvites--invited-by-you')}>
|
||||
{ourPendingMemberships.map(membership => (
|
||||
<PanelRow
|
||||
key={membership.member.id}
|
||||
|
@ -471,7 +471,7 @@ function MembersPendingProfileKey({
|
|||
actions={
|
||||
conversation.areWeAdmin ? (
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('PendingInvites--revoke-for-label')}
|
||||
ariaLabel={i18n('icu:PendingInvites--revoke-for-label')}
|
||||
icon={IconType.trash}
|
||||
onClick={() => {
|
||||
setStagedMemberships([
|
||||
|
@ -489,7 +489,7 @@ function MembersPendingProfileKey({
|
|||
</PanelSection>
|
||||
)}
|
||||
{otherPendingMemberships.length > 0 && (
|
||||
<PanelSection title={i18n('PendingInvites--invited-by-others')}>
|
||||
<PanelSection title={i18n('icu:PendingInvites--invited-by-others')}>
|
||||
{otherPendingMemberships.map(({ member, pendingMemberships }) => (
|
||||
<PanelRow
|
||||
key={member.id}
|
||||
|
@ -504,13 +504,13 @@ function MembersPendingProfileKey({
|
|||
/>
|
||||
}
|
||||
label={member.title}
|
||||
right={i18n('PendingInvites--invited-count', {
|
||||
right={i18n('icu:PendingInvites--invited-count', {
|
||||
number: pendingMemberships.length.toString(),
|
||||
})}
|
||||
actions={
|
||||
conversation.areWeAdmin ? (
|
||||
<ConversationDetailsIcon
|
||||
ariaLabel={i18n('PendingInvites--revoke-for-label')}
|
||||
ariaLabel={i18n('icu:PendingInvites--revoke-for-label')}
|
||||
icon={IconType.trash}
|
||||
onClick={() => {
|
||||
setStagedMemberships(
|
||||
|
@ -528,7 +528,7 @@ function MembersPendingProfileKey({
|
|||
</PanelSection>
|
||||
)}
|
||||
<div className="ConversationDetails__pending--info">
|
||||
{i18n('PendingInvites--info')}
|
||||
{i18n('icu:PendingInvites--info')}
|
||||
</div>
|
||||
</PanelSection>
|
||||
);
|
||||
|
|
|
@ -53,10 +53,10 @@ function MediaSection({
|
|||
const label = (() => {
|
||||
switch (type) {
|
||||
case 'media':
|
||||
return i18n('mediaEmptyState');
|
||||
return i18n('icu:mediaEmptyState');
|
||||
|
||||
case 'documents':
|
||||
return i18n('documentsEmptyState');
|
||||
return i18n('icu:documentsEmptyState');
|
||||
|
||||
default:
|
||||
throw missingCaseError(type);
|
||||
|
@ -77,13 +77,13 @@ function MediaSection({
|
|||
case 'yearMonth':
|
||||
return date.format(MONTH_FORMAT);
|
||||
case 'today':
|
||||
return i18n('today');
|
||||
return i18n('icu:today');
|
||||
case 'yesterday':
|
||||
return i18n('yesterday');
|
||||
return i18n('icu:yesterday');
|
||||
case 'thisWeek':
|
||||
return i18n('thisWeek');
|
||||
return i18n('icu:thisWeek');
|
||||
case 'thisMonth':
|
||||
return i18n('thisMonth');
|
||||
return i18n('icu:thisMonth');
|
||||
default:
|
||||
throw missingCaseError(section);
|
||||
}
|
||||
|
@ -147,11 +147,11 @@ export function MediaGallery({
|
|||
tabs={[
|
||||
{
|
||||
id: TabViews.Media,
|
||||
label: i18n('media'),
|
||||
label: i18n('icu:media'),
|
||||
},
|
||||
{
|
||||
id: TabViews.Documents,
|
||||
label: i18n('documents'),
|
||||
label: i18n('icu:documents'),
|
||||
},
|
||||
]}
|
||||
>
|
||||
|
|
|
@ -68,7 +68,7 @@ export class MediaGridItem extends React.Component<Props, State> {
|
|||
|
||||
return (
|
||||
<img
|
||||
alt={i18n('lightboxImageAlt')}
|
||||
alt={i18n('icu:lightboxImageAlt')}
|
||||
className="module-media-grid-item__image"
|
||||
src={mediaItem.thumbnailObjectUrl}
|
||||
onError={this.onImageErrorBound}
|
||||
|
@ -90,7 +90,7 @@ export class MediaGridItem extends React.Component<Props, State> {
|
|||
return (
|
||||
<div className="module-media-grid-item__image-container">
|
||||
<img
|
||||
alt={i18n('lightboxImageAlt')}
|
||||
alt={i18n('icu:lightboxImageAlt')}
|
||||
className="module-media-grid-item__image"
|
||||
src={mediaItem.thumbnailObjectUrl}
|
||||
onError={this.onImageErrorBound}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue