diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 581e264473..f0b5fb0f67 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -100,7 +100,7 @@ "description": "(deleted 03/29/2023) Shown below the group name when selecting a group to invite a contact to" }, "icu:GroupListItem__message-default": { - "messageformat": "{count} members", + "messageformat": "{count, plural, one {1 member} other {# members}}", "description": "Shown below the group name when selecting a group to invite a contact to" }, "GroupListItem__message-already-member": { @@ -768,7 +768,7 @@ "description": "(deleted 03/25/2023) Message shown on the loading screen when we're catching up on the backlog of messages" }, "icu:loadingMessages--other": { - "messageformat": "Loading messages from {daysAgo} days ago...", + "messageformat": "Loading messages from {daysAgo, plural, one {1 day} other {# days}} ago...", "description": "Message shown on the loading screen when we're catching up on the backlog of messages from day before yesterday and earlier" }, "icu:loadingMessages--yesterday": { @@ -832,7 +832,7 @@ "description": "(deleted 03/29/2023) Text for unread message separator, with count" }, "icu:unreadMessages": { - "messageformat": "{count} Unread Messages", + "messageformat": "{count, plural, one {1 Unread Message} other {# Unread Messages}}", "description": "Text for unread message separator, with count" }, "messageHistoryUnsynced": { @@ -1376,7 +1376,7 @@ "description": "An error popup when the user has attempted to add an attachment" }, "icu:fileSizeWarning": { - "messageformat": "Sorry, the selected file exceeds message size restrictions. {limit}{units}", + "messageformat": "Sorry, the selected file exceeds message size restrictions. {limit, number}{units}", "description": "Shown in a toast if the user tries to attach too-large file" }, "unableToLoadAttachment": { @@ -3635,7 +3635,7 @@ "description": "(deleted 03/29/2023) Contracted form of 'X hours ago' which works both for singular and plural" }, "icu:hoursAgo": { - "messageformat": "{hours}h", + "messageformat": "{hours, number}h", "description": "Contracted form of 'X hours ago' which works both for singular and plural" }, "minutesAgo": { @@ -3643,7 +3643,7 @@ "description": "(deleted 03/29/2023) Contracted form of 'X minutes ago' which works both for singular and plural" }, "icu:minutesAgo": { - "messageformat": "{minutes}m", + "messageformat": "{minutes, number}m", "description": "Contracted form of 'X minutes ago' which works both for singular and plural" }, "justNow": { @@ -4107,7 +4107,7 @@ "description": "(deleted 03/29/2023) Shown in the alert when you add the maximum number of group members" }, "icu:chooseGroupMembers__maximum-group-size__body": { - "messageformat": "Signal groups can have a maximum of {max} members.", + "messageformat": "Signal groups can have a maximum of {max, number} members.", "description": "Shown in the alert when you add the maximum number of group members" }, "chooseGroupMembers__maximum-recommended-group-size__title": { @@ -4123,7 +4123,7 @@ "description": "(deleted 03/29/2023) Shown in the alert when you add the maximum recommended number of group members" }, "icu:chooseGroupMembers__maximum-recommended-group-size__body": { - "messageformat": "Signal groups perform best with {max} members or less. Adding more members will cause delays sending and receiving messages.", + "messageformat": "Signal groups perform best with {max, number} members or less. Adding more members will cause delays sending and receiving messages.", "description": "Shown in the alert when you add the maximum recommended number of group members" }, "setGroupMetadata__title": { @@ -4384,7 +4384,7 @@ "description": "(deleted 03/29/2023) Aria label for the conversation list item" }, "icu:ConversationList__aria-label": { - "messageformat": "Conversation with {title}, {unreadCount} new messages, last message: {lastMessage}.", + "messageformat": "Conversation with {title}, {unreadCount, plural, one {1 new message} other {# new messages}}, last message: {lastMessage}.", "description": "Aria label for the conversation list item" }, "ConversationList__last-message-undefined": { @@ -4568,11 +4568,11 @@ "description": "Shown to label a donation badge you've replied to." }, "icu:message--donation--remaining--days": { - "messageformat": "{days} days remaining", + "messageformat": "{days, plural, one {1 day} other {# days}} remaining", "description": "Describes how long remains for the donation badge you've redeemed on another device (only rendered for days > 1)." }, "icu:message--donation--remaining--hours": { - "messageformat": "{hours} hours remaining", + "messageformat": "{hours, plural, one {1 hour} other {# hours}} remaining", "description": "Describes how long remains for the donation badge you've redeemed on another device (only rendered for hours > 1)" }, "icu:message--donation--remaining--minutes": { @@ -6001,6 +6001,10 @@ }, "icu:MessageRequests--profile-sharing--group": { "messageformat": "Continue your conversation with this group and share your name and photo with its members? {learnMore}", + "description": "(deleted 03/29/2023) Shown when user hasn't shared their profile in a group yet" + }, + "icu:MessageRequests--profile-sharing--group--link": { + "messageformat": "Continue your conversation with this group and share your name and photo with its members? Learn more.", "description": "Shown when user hasn't shared their profile in a group yet" }, "MessageRequests--profile-sharing--direct": { @@ -6009,6 +6013,10 @@ }, "icu:MessageRequests--profile-sharing--direct": { "messageformat": "Continue this conversation with {firstName} and share your name and photo with them? {learnMore}", + "description": "(deleted 03/29/2023) Shown when user hasn't shared their profile in a 1:1 conversation yet" + }, + "icu:MessageRequests--profile-sharing--direct--link": { + "messageformat": "Continue this conversation with {firstName} and share your name and photo with them? Learn more", "description": "Shown when user hasn't shared their profile in a 1:1 conversation yet" }, "MessageRequests--learn-more": { @@ -6017,7 +6025,7 @@ }, "icu:MessageRequests--learn-more": { "messageformat": "Learn more.", - "description": "Shown at the end of profile sharing messages as a link." + "description": "(deleted 03/29/2023) Shown at the end of profile sharing messages as a link." }, "icu:ConversationHero--members": { "messageformat": "{count, plural, one {1 member} other {# members}}", @@ -6060,7 +6068,7 @@ "description": "(deleted 03/29/2023) Shown in the conversation hero to indicate this user is a member of 5+ mutual groups." }, "icu:member-of-more-than-3-groups--multiple-more": { - "messageformat": "Member of {group1}, {group2}, {group3} and {remainingCount} more", + "messageformat": "Member of {group1}, {group2}, {group3} and {remainingCount, number} more", "description": "Shown in the conversation hero to indicate this user is a member of 5+ mutual groups." }, "ConversationHero--membership-added": { @@ -6260,7 +6268,7 @@ "description": "(deleted 03/29/2023) Shown in the incoming call bar when someone is ringing you for a group call" }, "icu:incomingGroupCall__ringing-many": { - "messageformat": "{ringer} is calling you, {first}, {second}, and {remaining} others", + "messageformat": "{ringer} is calling you, {first}, {second}, and {remaining, plural, one {1 other} other {# others}}", "description": "Shown in the incoming call bar when someone is ringing you for a group call" }, "outgoingCallRinging": { @@ -6380,7 +6388,7 @@ "description": "(deleted 03/29/2023) Tooltip in disabled notification button when the call is full" }, "icu:calling__call-notification__button__call-full-tooltip": { - "messageformat": "Call has reached capacity of {max} participants", + "messageformat": "Call has reached capacity of {max, number} participants", "description": "Tooltip in disabled notification button when the call is full" }, "calling__pip--on": { @@ -6789,15 +6797,15 @@ }, "icu:GroupV2--join--member-count--single": { "messageformat": "1 member", - "description": "Shown in the metadata section if group has just one member" + "description": "(deleted 03/29/2023) Shown in the metadata section if group has just one member" }, "GroupV2--join--member-count--multiple": { "message": "$count$ members", "description": "(deleted 03/29/2023) Shown in the metadata section if group has more than one member" }, "icu:GroupV2--join--member-count--multiple": { - "messageformat": "{count} members", - "description": "Shown in the metadata section if group has more than one member" + "messageformat": "{count, number} members", + "description": "(deleted 03/29/2023) Shown in the metadata section if group has more than one member" }, "GroupV2--join--group-metadata": { "message": "Group · $memberCount$", @@ -6805,6 +6813,10 @@ }, "icu:GroupV2--join--group-metadata": { "messageformat": "Group · {memberCount}", + "description": "(deleted 03/29/2023) A holder for two pieces of information - the type of conversation, and the member count" + }, + "icu:GroupV2--join--group-metadata--full": { + "messageformat": "Group · {memberCount, plural, one {1 member} other {# members}}", "description": "A holder for two pieces of information - the type of conversation, and the member count" }, "GroupV2--join--requested": { @@ -7476,7 +7488,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-add--many--other": { - "messageformat": "{memberName} invited {count} people to the group.", + "messageformat": "{memberName} invited {count, number} people to the group.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-add--many--you": { @@ -7484,7 +7496,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-add--many--you": { - "messageformat": "You invited {count} people to the group.", + "messageformat": "You invited {count, number} people to the group.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-add--many--unknown": { @@ -7492,7 +7504,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-add--many--unknown": { - "messageformat": "{count} people were invited to the group.", + "messageformat": "{count, number} people were invited to the group.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--decline--other": { @@ -7572,7 +7584,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke--many--other": { - "messageformat": "{memberName} revoked invitations to the group for {count} people.", + "messageformat": "{memberName} revoked invitations to the group for {count, number} people.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke--many--you": { @@ -7580,7 +7592,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke--many--you": { - "messageformat": "You revoked invitations to the group for {count} people.", + "messageformat": "You revoked invitations to the group for {count, number} people.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke--many--unknown": { @@ -7588,7 +7600,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke--many--unknown": { - "messageformat": "An admin revoked invitations to the group for {count} people.", + "messageformat": "An admin revoked invitations to the group for {count, number} people.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke-invite-from--one--other": { @@ -7644,7 +7656,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke-invite-from--many--other": { - "messageformat": "{adminName} revoked invitations to the group for {count} people invited by {memberName}.", + "messageformat": "{adminName} revoked invitations to the group for {count, number} people invited by {memberName}.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke-invite-from--many--you": { @@ -7652,7 +7664,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke-invite-from--many--you": { - "messageformat": "You revoked invitations to the group for {count} people invited by {memberName}.", + "messageformat": "You revoked invitations to the group for {count, number} people invited by {memberName}.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke-invite-from--many--unknown": { @@ -7660,7 +7672,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke-invite-from--many--unknown": { - "messageformat": "An admin revoked invitations to the group for {count} people invited by {memberName}.", + "messageformat": "An admin revoked invitations to the group for {count, number} people invited by {memberName}.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke-invite-from-you--many--other": { @@ -7668,7 +7680,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke-invite-from-you--many--other": { - "messageformat": "{adminName} revoked the invitations to the group you sent to {count} people.", + "messageformat": "{adminName} revoked the invitations to the group you sent to {count, number} people.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke-invite-from-you--many--you": { @@ -7676,7 +7688,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke-invite-from-you--many--you": { - "messageformat": "You rescinded your invitation to {count} people.", + "messageformat": "You rescinded your invitation to {count, number} people.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--pending-remove--revoke-invite-from-you--many--unknown": { @@ -7684,7 +7696,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--pending-remove--revoke-invite-from-you--many--unknown": { - "messageformat": "An admin revoked the invitations to the group you sent to {count} people.", + "messageformat": "An admin revoked the invitations to the group you sent to {count, number} people.", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--admin-approval-add-one--you": { @@ -7756,7 +7768,7 @@ "description": "(deleted 03/29/2023) Shown in timeline or conversation preview when v2 group changes" }, "icu:GroupV2--admin-approval-bounce": { - "messageformat": "{joinerName} requested and cancelled {numberOfRequests} requests to join via the group link", + "messageformat": "{joinerName} requested and cancelled {numberOfRequests, number} requests to join via the group link", "description": "Shown in timeline or conversation preview when v2 group changes" }, "GroupV2--group-link-add--disabled--you": { @@ -7961,6 +7973,10 @@ }, "icu:GroupV1--Migration--disabled": { "messageformat": "Upgrade this group to activate new features like @mentions and admins. Members who have not shared their name or photo in this group will be invited to join. {learnMore}", + "description": "(deleted 03/29/2023) Shown instead of composition area when user is forced to migrate a legacy group (GV1)." + }, + "icu:GroupV1--Migration--disabled--link": { + "messageformat": "Upgrade this group to activate new features like @mentions and admins. Members who have not shared their name or photo in this group will be invited to join. Learn more.", "description": "Shown instead of composition area when user is forced to migrate a legacy group (GV1)." }, "GroupV1--Migration--was-upgraded": { @@ -8104,7 +8120,7 @@ "description": "(deleted 03/29/2023) Shown in timeline when a group is upgraded and some people were invited, instead of added" }, "icu:GroupV1--Migration--invited--many": { - "messageformat": "{count} members couldn’t be added to the New Group and have been invited to join.", + "messageformat": "{count, number} members couldn’t be added to the New Group and have been invited to join.", "description": "Shown in timeline when a group is upgraded and some people were invited, instead of added" }, "GroupV1--Migration--removed--one": { @@ -8120,7 +8136,7 @@ "description": "(deleted 03/29/2023) Shown in timeline when a group is upgraded and some people were removed entirely during the upgrade" }, "icu:GroupV1--Migration--removed--many": { - "messageformat": "{count} members were removed from the group.", + "messageformat": "{count, number} members were removed from the group.", "description": "Shown in timeline when a group is upgraded and some people were removed entirely during the upgrade" }, "close": { @@ -8528,7 +8544,7 @@ "description": "(deleted 03/29/2023) This is the number of members in a group" }, "icu:ConversationDetailsHeader--members": { - "messageformat": "{number} members", + "messageformat": "{number, plural, one {1 member} other {# members}}", "description": "This is the number of members in a group" }, "ConversationDetailsMediaList--shared-media": { @@ -8552,7 +8568,7 @@ "description": "(deleted 03/29/2023) The title of the membership list panel" }, "icu:ConversationDetailsMembershipList--title": { - "messageformat": "{number} members", + "messageformat": "{number, plural, one {1 member} other {# members}}", "description": "The title of the membership list panel" }, "ConversationDetailsMembershipList--add-members": { @@ -8680,7 +8696,7 @@ "description": "(deleted 03/29/2023) Label for the tab to view pending requests" }, "icu:PendingInvites--tab-requests": { - "messageformat": "Requests ({count})", + "messageformat": "Requests ({count, number})", "description": "Label for the tab to view pending requests" }, "PendingInvites--tab-invites": { @@ -8688,7 +8704,7 @@ "description": "(deleted 03/29/2023) Label for the tab to view pending invites" }, "icu:PendingInvites--tab-invites": { - "messageformat": "Invites ({count})", + "messageformat": "Invites ({count, number})", "description": "Label for the tab to view pending invites" }, "PendingRequests--approve-for": { @@ -8744,7 +8760,7 @@ "description": "(deleted 03/29/2023) This is the label for the number of members someone has invited" }, "icu:PendingInvites--invited-count": { - "messageformat": "Invited {number}", + "messageformat": "Invited {number, number}", "description": "This is the label for the number of members someone has invited" }, "PendingInvites--revoke-for-label": { @@ -8769,14 +8785,18 @@ }, "icu:PendingInvites--revoke-from-singular": { "messageformat": "Revoke 1 invite sent by \"{name}\"?", - "description": "This is the modal content when confirming revoking a single invite" + "description": "(deleted 03/29/2023) This is the modal content when confirming revoking a single invite" }, "PendingInvites--revoke-from-plural": { "message": "Revoke $number$ invites sent by \"$name$\"?", "description": "(deleted 03/29/2023) This is the modal content when confirming revoking multiple invites" }, "icu:PendingInvites--revoke-from-plural": { - "messageformat": "Revoke {number} invites sent by \"{name}\"?", + "messageformat": "Revoke {number, number} invites sent by \"{name}\"?", + "description": "(deleted 03/29/2023) This is the modal content when confirming revoking multiple invites" + }, + "icu:PendingInvites--revoke-from": { + "messageformat": "Revoke {number, plural, one {1 invite} other {# invites}} sent by \"{name}\"?", "description": "This is the modal content when confirming revoking multiple invites" }, "PendingInvites--revoke": { @@ -8856,7 +8876,7 @@ "description": "conversation > in select mode > composition area actions > exit select mode > accessibility label" }, "icu:SelectModeActions--selectedMessages": { - "messageformat": "{count} selected", + "messageformat": "{count, number} selected", "description": "conversation > in select mode > composition area actions > count of selected messsages" }, "icu:SelectModeActions--deleteSelectedMessages": { @@ -8957,14 +8977,18 @@ }, "icu:NewlyCreatedGroupInvitedContactsDialog--title--one": { "messageformat": "Invitation sent", - "description": "When creating a new group and inviting users, this is shown in the dialog" + "description": "(deleted 03/29/2023) When creating a new group and inviting users, this is shown in the dialog" }, "NewlyCreatedGroupInvitedContactsDialog--title--many": { "message": "$count$ invitations sent", "description": "(deleted 03/29/2023) When creating a new group and inviting users, this is shown in the dialog" }, "icu:NewlyCreatedGroupInvitedContactsDialog--title--many": { - "messageformat": "{count} invitations sent", + "messageformat": "{count, number} invitations sent", + "description": "(deleted 03/29/2023) When creating a new group and inviting users, this is shown in the dialog" + }, + "icu:NewlyCreatedGroupInvitedContactsDialog--title": { + "messageformat": "{count, plural, one {Invitation sent} other {# invitations sent}}", "description": "When creating a new group and inviting users, this is shown in the dialog" }, "NewlyCreatedGroupInvitedContactsDialog--body--user-paragraph--one": { @@ -9028,7 +9052,7 @@ "description": "(deleted 03/29/2023) When adding new members to an existing group, this is shown in the confirmation dialog" }, "icu:AddGroupMembersModal--confirm-title--many": { - "messageformat": "Add {count} members to \"{group}\"?", + "messageformat": "Add {count, number} members to \"{group}\"?", "description": "When adding new members to an existing group, this is shown in the confirmation dialog" }, "AddGroupMembersModal--confirm-button--one": { @@ -9225,6 +9249,10 @@ }, "icu:ContactSpoofing__same-name": { "messageformat": "Review requests carefully. Signal found another contact with the same name. {link}", + "description": "(deleted 03/29/2023) Shown in the timeline warning when you have a message request from someone with the same name as someone else" + }, + "icu:ContactSpoofing__same-name--link": { + "messageformat": "Review requests carefully. Signal found another contact with the same name. Review request", "description": "Shown in the timeline warning when you have a message request from someone with the same name as someone else" }, "ContactSpoofing__same-name-in-group": { @@ -9232,7 +9260,11 @@ "description": "(deleted 03/29/2023) Shown in the timeline warning when you multiple group members have the same name" }, "icu:ContactSpoofing__same-name-in-group": { - "messageformat": "{count} group members have the same name. {link}", + "messageformat": "{count, plural, one {1 group member} other {# group members}} have the same name. {link}", + "description": "Shown in the timeline warning when you multiple group members have the same name" + }, + "icu:ContactSpoofing__same-name-in-group--link": { + "messageformat": "{count, plural, one {1 group member} other {# group members}} have the same name. Review request", "description": "Shown in the timeline warning when you multiple group members have the same name" }, "ContactSpoofing__same-name__link": { @@ -9241,7 +9273,7 @@ }, "icu:ContactSpoofing__same-name__link": { "messageformat": "Review request", - "description": "Shown in the timeline warning when you have a message request from someone with the same name as someone else" + "description": "(deleted 03/29/2023) Shown in the timeline warning when you have a message request from someone with the same name as someone else" }, "ContactSpoofing__same-name-in-group__link": { "message": "Click to review", @@ -9296,7 +9328,7 @@ "description": "(deleted 03/29/2023) Description for the group contact spoofing review dialog" }, "icu:ContactSpoofingReviewDialog__group__description": { - "messageformat": "{count} group members have similar names. Review the members below or choose to take action.", + "messageformat": "{count, plural, one {1 group member} other {# group members}} have similar names. Review the members below or choose to take action.", "description": "Description for the group contact spoofing review dialog" }, "ContactSpoofingReviewDialog__group__members-header": { @@ -9424,7 +9456,7 @@ "description": "(deleted 03/29/2023) Confirm message for deleting custom color" }, "icu:ChatColorPicker__delete--message": { - "messageformat": "This custom color is used in {num} chats. Do you want to delete it for all chats?", + "messageformat": "This custom color is used in {num, plural, one {1 chat} other {# chats}}. Do you want to delete it for all chats?", "description": "Confirm message for deleting custom color" }, "ChatColorPicker__global-chat-color": { @@ -9888,7 +9920,7 @@ "description": "(deleted 03/29/2023) Shown if user has attempted to enter a username with too few characters - currently min is 3" }, "icu:ProfileEditor--username--check-character-min": { - "messageformat": "Usernames must have a least {min} characters.", + "messageformat": "Usernames must have a least {min, number} characters.", "description": "Shown if user has attempted to enter a username with too few characters - currently min is 3" }, "ProfileEditor--username--check-character-max": { @@ -9896,7 +9928,7 @@ "description": "(deleted 03/29/2023) Shown if user has attempted to enter a username with too many characters - currently min is 25" }, "icu:ProfileEditor--username--check-character-max": { - "messageformat": "Usernames must have at most {max} characters.", + "messageformat": "Usernames must have at most {max, number} characters.", "description": "Shown if user has attempted to enter a username with too many characters - currently min is 25" }, "ProfileEditor--username--unavailable": { @@ -10049,6 +10081,10 @@ }, "icu:ProfileEditor--info": { "messageformat": "Your profile is encrypted. Your profile and changes to it will be visible to your contacts and when you start or accept new chats. {learnMore}", + "description": "(deleted 03/29/2023) Information shown at the bottom of the profile editor section" + }, + "icu:ProfileEditor--info--link": { + "messageformat": "Your profile is encrypted. Your profile and changes to it will be visible to your contacts and when you start or accept new chats. {learnMore}", "description": "Information shown at the bottom of the profile editor section" }, "ProfileEditor--learnMore": { @@ -10312,15 +10348,19 @@ "description": "(deleted 03/29/2023) Number of contacts blocked singular" }, "icu:Preferences--blocked-count-singular": { - "messageformat": "{num} contact", - "description": "Number of contacts blocked singular" + "messageformat": "{num, number} contact", + "description": "(deleted 03/29/2023) Number of contacts blocked singular" }, "Preferences--blocked-count-plural": { "message": "$num$ contacts", "description": "(deleted 03/29/2023) Number of contacts blocked plural" }, "icu:Preferences--blocked-count-plural": { - "messageformat": "{num} contacts", + "messageformat": "{num, number} contacts", + "description": "(deleted 03/29/2023) Number of contacts blocked plural" + }, + "icu:Preferences--blocked-count": { + "messageformat": "{num, plural, one {1 contact} other {# contacts}}", "description": "Number of contacts blocked plural" }, "Preferences__privacy--description": { @@ -10848,21 +10888,25 @@ "description": "(deleted 03/29/2023) Number of views your story has" }, "icu:MyStories__views--singular": { - "messageformat": "{num} view", - "description": "Number of views your story has" + "messageformat": "{viewCount, number} view", + "description": "(deleted 03/29/2023) Number of views your story has" }, "MyStories__views--plural": { "message": "$num$ views", "description": "(deleted 03/29/2023) Number of views your story has" }, "icu:MyStories__views--plural": { - "messageformat": "{num} views", - "description": "Number of views your story has" + "messageformat": "{viewCount, number} views", + "description": "(deleted 03/29/2023) Number of views your story has" }, "icu:MyStories__views": { "messageformat": "{views, plural, one {1 view} other {# views}}", "description": "Number of views your story has" }, + "icu:MyStories__views--strong": { + "messageformat": "{views, plural, one {1 view} other {# views}}", + "description": "Number of views your story has" + }, "icu:MyStories__views-off": { "messageformat": "Views off", "description": "Shown next to the user's story when the user has read receipts turned off" @@ -10872,15 +10916,19 @@ "description": "(deleted 03/29/2023) Number of replies your story has" }, "icu:MyStories__replies--singular": { - "messageformat": "{num} reply", - "description": "Number of replies your story has" + "messageformat": "{num, number} reply", + "description": "(deleted 03/29/2023) Number of replies your story has" }, "MyStories__replies--plural": { "message": "$num$ replies", "description": "(deleted 03/29/2023) Number of replies your story has" }, "icu:MyStories__replies--plural": { - "messageformat": "{num} replies", + "messageformat": "{num, number} replies", + "description": "(deleted 03/29/2023) Number of replies your story has" + }, + "icu:MyStories__replies": { + "messageformat": "{replyCount, plural, one {1 reply} other {# replies}}", "description": "Number of replies your story has" }, "MyStories__delete": { @@ -11300,7 +11348,7 @@ "description": "(deleted 03/29/2023) Description of how many people are excluded in a list" }, "icu:StoriesSettings__mine__exclude--description": { - "messageformat": "{num} people excluded", + "messageformat": "{num, number} people excluded", "description": "Description of how many people are excluded in a list" }, "StoriesSettings__mine__only--label": { @@ -11324,7 +11372,7 @@ "description": "(deleted 03/29/2023) Description of how many people are in the exclusive allow list" }, "icu:StoriesSettings__mine__only--description--people": { - "messageformat": "{num} people", + "messageformat": "{num, number} people", "description": "Description of how many people are in the exclusive allow list" }, "StoriesSettings__mine__disclaimer": { @@ -11333,6 +11381,10 @@ }, "icu:StoriesSettings__mine__disclaimer": { "messageformat": "Choose who can view your story. Changes won't affect stories you've already sent. {learnMore}", + "description": "(deleted 03/29/2023) Disclaimer on how changes to story settings work" + }, + "icu:StoriesSettings__mine__disclaimer--link": { + "messageformat": "Choose who can view your story. Changes won't affect stories you've already sent. Learn more.", "description": "Disclaimer on how changes to story settings work" }, "StoriesSettings__mine__disclaimer--learn-more": { @@ -11341,7 +11393,7 @@ }, "icu:StoriesSettings__mine__disclaimer--learn-more": { "messageformat": "Learn more.", - "description": "Learn more link to learn about who can view your story" + "description": "(deleted 03/29/2023) Learn more link to learn about who can view your story" }, "StoriesSettings__context-menu": { "message": "Story privacy", @@ -11505,6 +11557,10 @@ }, "icu:SendStoryModal__privacy-disclaimer": { "messageformat": "Choose which Signal connections can view your story. You can always change this in privacy settings. {learnMore}", + "description": "(deleted 03/29/2023) Disclaimer on how changes to story settings work" + }, + "icu:SendStoryModal__privacy-disclaimer--link": { + "messageformat": "Choose which Signal connections can view your story. You can always change this in privacy settings. Learn more.", "description": "Disclaimer on how changes to story settings work" }, "SendStoryModal__delete-story": { @@ -11856,7 +11912,7 @@ "description": "Error string for when a video post to story fails because video's duration is too long" }, "icu:StoryCreator__error--video-too-big": { - "messageformat": "Cannot post video to story because it is larger than {limit}{units}.", + "messageformat": "Cannot post video to story because it is larger than {limit, number}{units}.", "description": "Error string for when a video post to story fails because video's file size is too big" }, "StoryCreator__error--video-error": { diff --git a/ts/components/AddGroupMemberErrorDialog.tsx b/ts/components/AddGroupMemberErrorDialog.tsx index d9c84672d7..cae318cfa2 100644 --- a/ts/components/AddGroupMemberErrorDialog.tsx +++ b/ts/components/AddGroupMemberErrorDialog.tsx @@ -38,7 +38,7 @@ export function AddGroupMemberErrorDialog(props: PropsType): JSX.Element { const { maximumNumberOfContacts } = props; title = i18n('icu:chooseGroupMembers__maximum-group-size__title'); body = i18n('icu:chooseGroupMembers__maximum-group-size__body', { - max: maximumNumberOfContacts.toString(), + max: maximumNumberOfContacts, }); break; } @@ -50,7 +50,7 @@ export function AddGroupMemberErrorDialog(props: PropsType): JSX.Element { body = i18n( 'icu:chooseGroupMembers__maximum-recommended-group-size__body', { - max: recommendedMaximumNumberOfContacts.toString(), + max: recommendedMaximumNumberOfContacts, } ); break; diff --git a/ts/components/ChatColorPicker.tsx b/ts/components/ChatColorPicker.tsx index bf3a78e6cb..9d709bd7a8 100644 --- a/ts/components/ChatColorPicker.tsx +++ b/ts/components/ChatColorPicker.tsx @@ -349,7 +349,7 @@ function CustomColorBubble({ title={i18n('icu:ChatColorPicker__delete--title')} > {i18n('icu:ChatColorPicker__delete--message', { - num: String(confirmDeleteCount), + num: confirmDeleteCount, })} ) : null} diff --git a/ts/components/ConversationList.tsx b/ts/components/ConversationList.tsx index 1082c192cd..304d5f8110 100644 --- a/ts/components/ConversationList.tsx +++ b/ts/components/ConversationList.tsx @@ -360,7 +360,7 @@ export function ConversationList({ get(lastMessage, 'text') || i18n('icu:ConversationList__last-message-undefined'), title, - unreadCount: String(unreadCount), + unreadCount, })} > { setIsWorking(true); @@ -93,9 +87,7 @@ export const GroupV2JoinDialog = React.memo(function GroupV2JoinDialogInner(
{title}
- {i18n('icu:GroupV2--join--group-metadata', { - memberCount: memberString, - })} + {i18n('icu:GroupV2--join--group-metadata--full', { memberCount })}
{groupDescription && (
diff --git a/ts/components/IncomingCallBar.tsx b/ts/components/IncomingCallBar.tsx index 6e0db025ab..55847e90cf 100644 --- a/ts/components/IncomingCallBar.tsx +++ b/ts/components/IncomingCallBar.tsx @@ -150,7 +150,7 @@ function GroupCallMessage({ ringer: ringerNode, first, second, - remaining: String(otherMembersRung.length - 2), + remaining: otherMembersRung.length - 2, }} /> ); diff --git a/ts/components/NewlyCreatedGroupInvitedContactsDialog.tsx b/ts/components/NewlyCreatedGroupInvitedContactsDialog.tsx index bee310be7d..e0c17032d7 100644 --- a/ts/components/NewlyCreatedGroupInvitedContactsDialog.tsx +++ b/ts/components/NewlyCreatedGroupInvitedContactsDialog.tsx @@ -27,12 +27,10 @@ export function NewlyCreatedGroupInvitedContactsDialog({ onClose, theme, }: PropsType): JSX.Element { - let title: string; let body: ReactNode; if (contacts.length === 1) { const contact = contacts[0]; - title = i18n('icu:NewlyCreatedGroupInvitedContactsDialog--title--one'); body = ( <> @@ -50,9 +48,6 @@ export function NewlyCreatedGroupInvitedContactsDialog({ ); } else { - title = i18n('icu:NewlyCreatedGroupInvitedContactsDialog--title--many', { - count: contacts.length.toString(), - }); body = ( <> @@ -89,7 +84,9 @@ export function NewlyCreatedGroupInvitedContactsDialog({ ); }} onClose={onClose} - title={title} + title={i18n('icu:NewlyCreatedGroupInvitedContactsDialog--title', { + count: contacts.length, + })} > {body} diff --git a/ts/components/Preferences.tsx b/ts/components/Preferences.tsx index 5c082b4377..7b8166d628 100644 --- a/ts/components/Preferences.tsx +++ b/ts/components/Preferences.tsx @@ -883,15 +883,9 @@ export function Preferences({ diff --git a/ts/components/ProfileEditor.tsx b/ts/components/ProfileEditor.tsx index 309483e65a..8eddaa0d57 100644 --- a/ts/components/ProfileEditor.tsx +++ b/ts/components/ProfileEditor.tsx @@ -643,15 +643,17 @@ export function ProfileEditor({
( - {i18n('icu:ProfileEditor--learnMore')} + {parts} ), }} diff --git a/ts/components/SharedGroupNames.tsx b/ts/components/SharedGroupNames.tsx index 4064e6e6b8..763fc83eee 100644 --- a/ts/components/SharedGroupNames.tsx +++ b/ts/components/SharedGroupNames.tsx @@ -37,7 +37,7 @@ export function SharedGroupNames({ group1: firstThreeGroups[0], group2: firstThreeGroups[1], group3: firstThreeGroups[2], - remainingCount: remainingCount.toString(), + remainingCount, }} /> ); diff --git a/ts/components/StoriesSettingsModal.tsx b/ts/components/StoriesSettingsModal.tsx index c7cebe2329..f8551cf1ca 100644 --- a/ts/components/StoriesSettingsModal.tsx +++ b/ts/components/StoriesSettingsModal.tsx @@ -816,28 +816,28 @@ export function EditMyStoryPrivacy({ toggleSignalConnectionsModal, signalConnectionsCount, }: EditMyStoryPrivacyPropsType): JSX.Element { - const learnMore = ( + const learnMoreLink = (parts: Array) => ( ); const disclaimerElement = (
{kind === 'mine' ? ( ) : ( )}
diff --git a/ts/components/StoryViewer.tsx b/ts/components/StoryViewer.tsx index 827676ff0d..c569ff379c 100644 --- a/ts/components/StoryViewer.tsx +++ b/ts/components/StoryViewer.tsx @@ -54,6 +54,10 @@ import { useRetryStorySend } from '../hooks/useRetryStorySend'; import { resolveStorySendStatus } from '../util/resolveStorySendStatus'; import { strictAssert } from '../util/assert'; +function renderStrong(parts: Array) { + return {parts}; +} + export type PropsType = { currentIndex: number; deleteGroupStoryReply: (id: string) => void; @@ -851,36 +855,21 @@ export function StoryViewer({ {isSent && !hasViewReceiptSetting && !replyCount && ( <>{i18n('icu:StoryViewer__views-off')} )} - {isSent && - hasViewReceiptSetting && - (viewCount === 1 ? ( - {viewCount} }} - /> - ) : ( - {viewCount} }} - /> - ))} + {isSent && hasViewReceiptSetting && ( + + )} {(isSent || viewCount > 0) && replyCount > 0 && ' '} - {replyCount > 0 && - (replyCount === 1 ? ( - {replyCount} }} - /> - ) : ( - {replyCount} }} - /> - ))} + {replyCount > 0 && ( + + )} ) : null} {!isSent && !replyCount && ( diff --git a/ts/components/ToastFileSize.stories.tsx b/ts/components/ToastFileSize.stories.tsx index 9835d69d90..4641897d8d 100644 --- a/ts/components/ToastFileSize.stories.tsx +++ b/ts/components/ToastFileSize.stories.tsx @@ -20,7 +20,7 @@ export default { }; export const _ToastFileSize = (): JSX.Element => ( - + ); _ToastFileSize.story = { diff --git a/ts/components/ToastFileSize.tsx b/ts/components/ToastFileSize.tsx index 50e5ee464b..6baf2f26f8 100644 --- a/ts/components/ToastFileSize.tsx +++ b/ts/components/ToastFileSize.tsx @@ -6,7 +6,7 @@ import type { LocalizerType } from '../types/Util'; import { Toast } from './Toast'; export type ToastPropsType = { - limit: string; + limit: number; units: string; }; diff --git a/ts/components/conversation/CallingNotification.tsx b/ts/components/conversation/CallingNotification.tsx index 7b7c624aac..898b9bb4aa 100644 --- a/ts/components/conversation/CallingNotification.tsx +++ b/ts/components/conversation/CallingNotification.tsx @@ -141,7 +141,7 @@ function renderCallingNotificationButton( disabledTooltipText = i18n( 'icu:calling__call-notification__button__call-full-tooltip', { - max: String(deviceCount), + max: deviceCount, } ); onClick = noop; diff --git a/ts/components/conversation/ContactSpoofingReviewDialog.tsx b/ts/components/conversation/ContactSpoofingReviewDialog.tsx index 1180efefaa..c4aaaa0bfa 100644 --- a/ts/components/conversation/ContactSpoofingReviewDialog.tsx +++ b/ts/components/conversation/ContactSpoofingReviewDialog.tsx @@ -253,7 +253,7 @@ export function ContactSpoofingReviewDialog(props: PropsType): JSX.Element { <>

{i18n('icu:ContactSpoofingReviewDialog__group__description', { - count: conversationInfos.length.toString(), + count: conversationInfos.length, })}

diff --git a/ts/components/conversation/GroupV1DisabledActions.tsx b/ts/components/conversation/GroupV1DisabledActions.tsx index 55159a9e48..f1d218e69e 100644 --- a/ts/components/conversation/GroupV1DisabledActions.tsx +++ b/ts/components/conversation/GroupV1DisabledActions.tsx @@ -21,18 +21,22 @@ export function GroupV1DisabledActions({

- {i18n('icu:MessageRequests--learn-more')} - - ), + // This is a render prop, not a component + // eslint-disable-next-line react/no-unstable-nested-components + learnMoreLink: (...parts) => { + return ( + + {parts} + + ); + }, }} />

diff --git a/ts/components/conversation/LastSeenIndicator.tsx b/ts/components/conversation/LastSeenIndicator.tsx index 7cdbab5653..4d566c410c 100644 --- a/ts/components/conversation/LastSeenIndicator.tsx +++ b/ts/components/conversation/LastSeenIndicator.tsx @@ -15,9 +15,7 @@ export const LastSeenIndicator = forwardRef( const message = count === 1 ? i18n('icu:unreadMessage') - : i18n('icu:unreadMessages', { - count: String(count), - }); + : i18n('icu:unreadMessages', { count }); return (
diff --git a/ts/components/conversation/MandatoryProfileSharingActions.tsx b/ts/components/conversation/MandatoryProfileSharingActions.tsx index fb4cb37b90..cf92ba6fd1 100644 --- a/ts/components/conversation/MandatoryProfileSharingActions.tsx +++ b/ts/components/conversation/MandatoryProfileSharingActions.tsx @@ -27,6 +27,17 @@ export type Props = { | 'deleteConversation' >; +const learnMoreLink = (parts: Array) => ( + + {parts} + +); + export function MandatoryProfileSharingActions({ acceptConversation, blockAndReportSpam, @@ -49,17 +60,6 @@ export function MandatoryProfileSharingActions({ ); - const learnMore = ( - - {i18n('icu:MessageRequests--learn-more')} - - ); - return ( <> {mrState !== MessageRequestState.default ? ( @@ -85,14 +85,14 @@ export function MandatoryProfileSharingActions({ {conversationType === 'direct' ? ( ) : ( )}

diff --git a/ts/components/conversation/Timeline.tsx b/ts/components/conversation/Timeline.tsx index 5f7f34d302..9a6f474998 100644 --- a/ts/components/conversation/Timeline.tsx +++ b/ts/components/conversation/Timeline.tsx @@ -905,9 +905,11 @@ export class Timeline extends React.Component< text = ( ( { reviewMessageRequestNameCollision({ @@ -915,7 +917,7 @@ export class Timeline extends React.Component< }); }} > - {i18n('icu:ContactSpoofing__same-name__link')} + {parts} ), }} @@ -932,21 +934,21 @@ export class Timeline extends React.Component< text = ( result + conversations.length, - 0 - ) - .toString(), - link: ( + count: Object.values(groupNameCollisions).reduce( + (result, conversations) => result + conversations.length, + 0 + ), + // This is a render props, not a component + // eslint-disable-next-line react/no-unstable-nested-components + reviewRequestLink: parts => ( { reviewGroupMemberNameCollision(id); }} > - {i18n('icu:ContactSpoofing__same-name-in-group__link')} + {parts} ), }} diff --git a/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.tsx b/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.tsx index 7d6461ac8a..d0fc07d9c9 100644 --- a/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.tsx +++ b/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.tsx @@ -60,7 +60,7 @@ export function ConfirmAdditionsModal({ i18n={i18n} id="icu:AddGroupMembersModal--confirm-title--many" components={{ - count: selectedContacts.length.toString(), + count: selectedContacts.length, group: groupTitleNode, }} /> diff --git a/ts/components/conversation/conversation-details/ConversationDetailsHeader.tsx b/ts/components/conversation/conversation-details/ConversationDetailsHeader.tsx index 9181a43de6..28796366c2 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsHeader.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsHeader.tsx @@ -67,7 +67,7 @@ export function ConversationDetailsHeader({ subtitle = i18n('icu:ConversationDetailsHeader--add-group-description'); } else { subtitle = i18n('icu:ConversationDetailsHeader--members', { - number: memberships.length.toString(), + number: memberships.length, }); } } else if (!isMe) { diff --git a/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.tsx b/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.tsx index 587b3b3f29..8f882ca165 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.tsx @@ -94,7 +94,7 @@ export function ConversationDetailsMembershipList({ return ( {canAddNewMembers && ( diff --git a/ts/components/conversation/conversation-details/PendingInvites.tsx b/ts/components/conversation/conversation-details/PendingInvites.tsx index 14e305d95b..fc80c832f8 100644 --- a/ts/components/conversation/conversation-details/PendingInvites.tsx +++ b/ts/components/conversation/conversation-details/PendingInvites.tsx @@ -108,7 +108,7 @@ export function PendingInvites({ tabIndex={0} > {i18n('icu:PendingInvites--tab-requests', { - count: String(pendingApprovalMemberships.length), + count: pendingApprovalMemberships.length, })}
@@ -129,7 +129,7 @@ export function PendingInvites({ tabIndex={0} > {i18n('icu:PendingInvites--tab-invites', { - count: String(pendingMemberships.length), + count: pendingMemberships.length, })}

@@ -325,12 +325,8 @@ function getConfirmationMessage({ const name = inviter.title; - if (stagedMemberships.length === 1) { - return i18n('icu:PendingInvites--revoke-from-singular', { name }); - } - - return i18n('icu:PendingInvites--revoke-from-plural', { - number: stagedMemberships.length.toString(), + return i18n('icu:PendingInvites--revoke-from', { + number: stagedMemberships.length, name, }); } @@ -505,7 +501,7 @@ function MembersPendingProfileKey({ } label={member.title} right={i18n('icu:PendingInvites--invited-count', { - number: pendingMemberships.length.toString(), + number: pendingMemberships.length, })} actions={ conversation.areWeAdmin ? ( diff --git a/ts/groupChange.ts b/ts/groupChange.ts index eb4348ccda..385955e15b 100644 --- a/ts/groupChange.ts +++ b/ts/groupChange.ts @@ -14,7 +14,7 @@ export type SmartContactRendererType = (uuid: UUIDStringType) => T | string; export type StringRendererType = ( id: string, i18n: LocalizerType, - components?: ReplacementValuesType + components?: ReplacementValuesType ) => T | string; export type RenderOptionsType = { @@ -76,7 +76,10 @@ export function renderChangeDetail( renderString, } = options; - function i18n(id: string, components?: ReplacementValuesType) { + function i18n( + id: string, + components?: ReplacementValuesType + ) { return renderString(id, localizer, components); } @@ -530,17 +533,17 @@ export function renderChangeDetail( if (fromYou) { return i18n('icu:GroupV2--pending-add--many--you', { - count: count.toString(), + count, }); } if (from) { return i18n('icu:GroupV2--pending-add--many--other', { memberName: renderContact(from), - count: count.toString(), + count, }); } return i18n('icu:GroupV2--pending-add--many--unknown', { - count: count.toString(), + count, }); } if (detail.type === 'pending-remove-one') { @@ -647,7 +650,7 @@ export function renderChangeDetail( return i18n( 'icu:GroupV2--pending-remove--revoke-invite-from-you--many--you', - { count: count.toString() } + { count } ); } if (from) { @@ -656,14 +659,14 @@ export function renderChangeDetail( { adminName: renderContact(from), - count: count.toString(), + count, } ); } return i18n( 'icu:GroupV2--pending-remove--revoke-invite-from-you--many--unknown', - { count: count.toString() } + { count } ); } if (inviter) { @@ -672,7 +675,7 @@ export function renderChangeDetail( 'icu:GroupV2--pending-remove--revoke-invite-from--many--you', { - count: count.toString(), + count, memberName: renderContact(inviter), } ); @@ -683,7 +686,7 @@ export function renderChangeDetail( { adminName: renderContact(from), - count: count.toString(), + count, memberName: renderContact(inviter), } ); @@ -692,14 +695,14 @@ export function renderChangeDetail( 'icu:GroupV2--pending-remove--revoke-invite-from--many--unknown', { - count: count.toString(), + count, memberName: renderContact(inviter), } ); } if (fromYou) { return i18n('icu:GroupV2--pending-remove--revoke--many--you', { - count: count.toString(), + count, }); } if (from) { @@ -708,14 +711,14 @@ export function renderChangeDetail( { memberName: renderContact(from), - count: count.toString(), + count, } ); } return i18n( 'icu:GroupV2--pending-remove--revoke--many--unknown', - { count: count.toString() } + { count } ); } if (detail.type === 'admin-approval-add-one') { @@ -784,7 +787,7 @@ export function renderChangeDetail( } else { firstMessage = i18n('icu:GroupV2--admin-approval-bounce', { joinerName: renderContact(uuid), - numberOfRequests: String(times), + numberOfRequests: times, }); } diff --git a/ts/models/messages.ts b/ts/models/messages.ts index ff735774a8..68966871b3 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -510,7 +510,7 @@ export class MessageModel extends window.Backbone.Model { renderString: ( key: string, _i18n: unknown, - components: ReplacementValuesType | undefined + components: ReplacementValuesType | undefined ) => { // eslint-disable-next-line local-rules/valid-i18n-keys return window.i18n(key, components); diff --git a/ts/services/LinkPreview.ts b/ts/services/LinkPreview.ts index bc92945f4c..2dc348c543 100644 --- a/ts/services/LinkPreview.ts +++ b/ts/services/LinkPreview.ts @@ -518,12 +518,9 @@ async function getGroupPreview( const title = window.Signal.Groups.decryptGroupTitle(result.title, secretParams) || window.i18n('icu:unknownGroup'); - const description = - result.memberCount === 1 || result.memberCount === undefined - ? window.i18n('icu:GroupV2--join--member-count--single') - : window.i18n('icu:GroupV2--join--member-count--multiple', { - count: result.memberCount.toString(), - }); + const description = window.i18n('icu:GroupV2--join--group-metadata--full', { + count: result?.memberCount ?? 0, + }); let image: undefined | LinkPreviewImage; if (result.avatar) { diff --git a/ts/test-both/types/setupI18n_test.ts b/ts/test-both/types/setupI18n_test.ts index 03993e6feb..502f9b1a91 100644 --- a/ts/test-both/types/setupI18n_test.ts +++ b/ts/test-both/types/setupI18n_test.ts @@ -38,13 +38,11 @@ describe('setupI18n', () => { ); }); it('returns a modern icu message formatted', () => { - const actual = i18n('icu:ProfileEditor--info', { - learnMore: 'LEARN MORE', - }); - assert.equal( - actual, - 'Your profile is encrypted. Your profile and changes to it will be visible to your contacts and when you start or accept new chats. LEARN MORE' + const actual = i18n( + 'icu:AddUserToAnotherGroupModal__toast--adding-user-to-group', + { contact: 'CONTACT' } ); + assert.equal(actual, 'Adding CONTACT...'); }); }); @@ -72,7 +70,11 @@ describe('setupI18n', () => { describe('isLegacyFormat', () => { it('returns false for new format', () => { - assert.isFalse(i18n.isLegacyFormat('icu:ProfileEditor--info')); + assert.isFalse( + i18n.isLegacyFormat( + 'icu:AddUserToAnotherGroupModal__toast--adding-user-to-group' + ) + ); assert.isTrue(i18n.isLegacyFormat('softwareAcknowledgments')); }); }); diff --git a/ts/types/AttachmentSize.ts b/ts/types/AttachmentSize.ts index 45e0a9cb7b..6511c21048 100644 --- a/ts/types/AttachmentSize.ts +++ b/ts/types/AttachmentSize.ts @@ -28,7 +28,7 @@ export const getMaximumAttachmentSizeInKb = ( }; export function getRenderDetailsForLimit(limitKb: number): { - limit: string; + limit: number; units: string; } { const units = ['kB', 'MB', 'GB']; @@ -40,7 +40,7 @@ export function getRenderDetailsForLimit(limitKb: number): { } while (limit >= KIBIBYTE && u < units.length - 1); return { - limit: limit.toFixed(0), + limit: Math.trunc(limit), units: units[u], }; } diff --git a/ts/util/timestamp.ts b/ts/util/timestamp.ts index 812e75832f..7732f60b2a 100644 --- a/ts/util/timestamp.ts +++ b/ts/util/timestamp.ts @@ -166,13 +166,13 @@ export function formatTime( if (diff < HOUR) { return i18n('icu:minutesAgo', { - minutes: Math.floor(diff / MINUTE).toString(), + minutes: Math.floor(diff / MINUTE), }); } if (isRelativeTime) { return i18n('icu:hoursAgo', { - hours: Math.floor(diff / HOUR).toString(), + hours: Math.floor(diff / HOUR), }); }