mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fully migrate to ICU
This commit is contained in:
@@ -40,7 +40,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.AddingUserToGroup) {
|
||||
return (
|
||||
<Toast onClose={hideToast} timeout={SHORT_TIMEOUT}>
|
||||
{i18n('AddUserToAnotherGroupModal__toast--adding-user-to-group', {
|
||||
{i18n('icu:AddUserToAnotherGroupModal__toast--adding-user-to-group', {
|
||||
...toast.parameters,
|
||||
})}
|
||||
</Toast>
|
||||
@@ -50,7 +50,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.AlreadyGroupMember) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('GroupV2--join--already-in-group')}
|
||||
{i18n('icu:GroupV2--join--already-in-group')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -58,17 +58,17 @@ export function ToastManager({
|
||||
if (toastType === ToastType.AlreadyRequestedToJoin) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('GroupV2--join--already-awaiting-approval')}
|
||||
{i18n('icu:GroupV2--join--already-awaiting-approval')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.Blocked) {
|
||||
return <Toast onClose={hideToast}>{i18n('unblockToSend')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:unblockToSend')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.BlockedGroup) {
|
||||
return <Toast onClose={hideToast}>{i18n('unblockGroupToSend')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:unblockGroupToSend')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.CannotForwardEmptyMessage) {
|
||||
@@ -82,7 +82,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.CannotMixMultiAndNonMultiAttachments) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('cannotSelectPhotosAndVideosAlongWithFiles')}
|
||||
{i18n('icu:cannotSelectPhotosAndVideosAlongWithFiles')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.CannotStartGroupCall) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('GroupV2--cannot-start-group-call', {
|
||||
{i18n('icu:GroupV2--cannot-start-group-call', {
|
||||
...toast.parameters,
|
||||
})}
|
||||
</Toast>
|
||||
@@ -118,7 +118,7 @@ export function ToastManager({
|
||||
<Toast
|
||||
onClose={hideToast}
|
||||
toastAction={{
|
||||
label: i18n('conversationArchivedUndo'),
|
||||
label: i18n('icu:conversationArchivedUndo'),
|
||||
onClick: () => {
|
||||
if (toast.parameters && 'conversationId' in toast.parameters) {
|
||||
onUndoArchive(String(toast.parameters.conversationId));
|
||||
@@ -126,27 +126,29 @@ export function ToastManager({
|
||||
},
|
||||
}}
|
||||
>
|
||||
{i18n('conversationArchived')}
|
||||
{i18n('icu:conversationArchived')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.ConversationMarkedUnread) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>{i18n('conversationMarkedUnread')}</Toast>
|
||||
<Toast onClose={hideToast}>{i18n('icu:conversationMarkedUnread')}</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.ConversationUnarchived) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>{i18n('conversationReturnedToInbox')}</Toast>
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('icu:conversationReturnedToInbox')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.CopiedUsername) {
|
||||
return (
|
||||
<Toast onClose={hideToast} timeout={3 * SECOND}>
|
||||
{i18n('ProfileEditor--username--copied-username')}
|
||||
{i18n('icu:ProfileEditor--username--copied-username')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -154,17 +156,19 @@ export function ToastManager({
|
||||
if (toastType === ToastType.CopiedUsernameLink) {
|
||||
return (
|
||||
<Toast onClose={hideToast} timeout={3 * SECOND}>
|
||||
{i18n('ProfileEditor--username--copied-username-link')}
|
||||
{i18n('icu:ProfileEditor--username--copied-username-link')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.DangerousFileType) {
|
||||
return <Toast onClose={hideToast}>{i18n('dangerousFileType')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:dangerousFileType')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.DeleteForEveryoneFailed) {
|
||||
return <Toast onClose={hideToast}>{i18n('deleteForEveryoneFailed')}</Toast>;
|
||||
return (
|
||||
<Toast onClose={hideToast}>{i18n('icu:deleteForEveryoneFailed')}</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.Error) {
|
||||
@@ -173,23 +177,23 @@ export function ToastManager({
|
||||
autoDismissDisabled
|
||||
onClose={hideToast}
|
||||
toastAction={{
|
||||
label: i18n('Toast--error--action'),
|
||||
label: i18n('icu:Toast--error--action'),
|
||||
onClick: () => window.IPC.showDebugLog(),
|
||||
}}
|
||||
>
|
||||
{i18n('Toast--error')}
|
||||
{i18n('icu:Toast--error')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.Expired) {
|
||||
return <Toast onClose={hideToast}>{i18n('expiredWarning')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:expiredWarning')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.FailedToDeleteUsername) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('ProfileEditor--username--delete-general-error')}
|
||||
{i18n('icu:ProfileEditor--username--delete-general-error')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -199,7 +203,7 @@ export function ToastManager({
|
||||
<Toast
|
||||
onClose={hideToast}
|
||||
toastAction={{
|
||||
label: i18n('attachmentSavedShow'),
|
||||
label: i18n('icu:attachmentSavedShow'),
|
||||
onClick: () => {
|
||||
if (toast.parameters && 'fullPath' in toast.parameters) {
|
||||
openFileInFolder(String(toast.parameters.fullPath));
|
||||
@@ -207,7 +211,7 @@ export function ToastManager({
|
||||
},
|
||||
}}
|
||||
>
|
||||
{i18n('attachmentSaved')}
|
||||
{i18n('icu:attachmentSaved')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -221,37 +225,41 @@ export function ToastManager({
|
||||
}
|
||||
|
||||
if (toastType === ToastType.InvalidConversation) {
|
||||
return <Toast onClose={hideToast}>{i18n('invalidConversation')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:invalidConversation')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.LeftGroup) {
|
||||
return <Toast onClose={hideToast}>{i18n('youLeftTheGroup')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:youLeftTheGroup')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.MaxAttachments) {
|
||||
return <Toast onClose={hideToast}>{i18n('maximumAttachments')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:maximumAttachments')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.MessageBodyTooLong) {
|
||||
return <Toast onClose={hideToast}>{i18n('messageBodyTooLong')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:messageBodyTooLong')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.OriginalMessageNotFound) {
|
||||
return <Toast onClose={hideToast}>{i18n('originalMessageNotFound')}</Toast>;
|
||||
return (
|
||||
<Toast onClose={hideToast}>{i18n('icu:originalMessageNotFound')}</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.PinnedConversationsFull) {
|
||||
return <Toast onClose={hideToast}>{i18n('pinnedConversationsFull')}</Toast>;
|
||||
return (
|
||||
<Toast onClose={hideToast}>{i18n('icu:pinnedConversationsFull')}</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.ReactionFailed) {
|
||||
return <Toast onClose={hideToast}>{i18n('Reactions--error')}</Toast>;
|
||||
return <Toast onClose={hideToast}>{i18n('icu:Reactions--error')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.ReportedSpamAndBlocked) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('MessageRequests--block-and-report-spam-success-toast')}
|
||||
{i18n('icu:MessageRequests--block-and-report-spam-success-toast')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -259,7 +267,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.StoryMuted) {
|
||||
return (
|
||||
<Toast onClose={hideToast} timeout={SHORT_TIMEOUT}>
|
||||
{i18n('Stories__toast--hasNoSound')}
|
||||
{i18n('icu:Stories__toast--hasNoSound')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -267,7 +275,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.StoryReact) {
|
||||
return (
|
||||
<Toast onClose={hideToast} timeout={SHORT_TIMEOUT}>
|
||||
{i18n('Stories__toast--sending-reaction')}
|
||||
{i18n('icu:Stories__toast--sending-reaction')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -275,7 +283,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.StoryReply) {
|
||||
return (
|
||||
<Toast onClose={hideToast} timeout={SHORT_TIMEOUT}>
|
||||
{i18n('Stories__toast--sending-reply')}
|
||||
{i18n('icu:Stories__toast--sending-reply')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -283,7 +291,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.StoryVideoError) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('StoryCreator__error--video-error')}
|
||||
{i18n('icu:StoryCreator__error--video-error')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -291,7 +299,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.StoryVideoUnsupported) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('StoryCreator__error--video-unsupported')}
|
||||
{i18n('icu:StoryCreator__error--video-unsupported')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -299,7 +307,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.TapToViewExpiredIncoming) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('Message--tap-to-view--incoming--expired-toast')}
|
||||
{i18n('icu:Message--tap-to-view--incoming--expired-toast')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -307,7 +315,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.TapToViewExpiredOutgoing) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('Message--tap-to-view--outgoing--expired-toast')}
|
||||
{i18n('icu:Message--tap-to-view--outgoing--expired-toast')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -323,13 +331,15 @@ export function ToastManager({
|
||||
}
|
||||
|
||||
if (toastType === ToastType.UnableToLoadAttachment) {
|
||||
return <Toast onClose={hideToast}>{i18n('unableToLoadAttachment')}</Toast>;
|
||||
return (
|
||||
<Toast onClose={hideToast}>{i18n('icu:unableToLoadAttachment')}</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.UnsupportedMultiAttachment) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('cannotSelectMultipleFileAttachments')}
|
||||
{i18n('icu:cannotSelectMultipleFileAttachments')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
@@ -345,7 +355,7 @@ export function ToastManager({
|
||||
if (toastType === ToastType.UserAddedToGroup) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('AddUserToAnotherGroupModal__toast--user-added-to-group', {
|
||||
{i18n('icu:AddUserToAnotherGroupModal__toast--user-added-to-group', {
|
||||
...toast.parameters,
|
||||
})}
|
||||
</Toast>
|
||||
|
||||
Reference in New Issue
Block a user