Fully migrate to ICU

This commit is contained in:
Jamie Kyle 2023-03-29 17:03:25 -07:00 committed by GitHub
parent d4e7177ba6
commit 5e647c55d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
274 changed files with 7948 additions and 1944 deletions

View file

@ -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: