From 5835e9033de3d68a2a7d4ac806da025da28dc5c0 Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:12:53 -0700 Subject: [PATCH] Update strings for group call lobby and contact voice call --- _locales/en/messages.json | 8 ++++++++ ts/components/CallParticipantCount.tsx | 11 ++++++++--- ts/components/CallingLobby.tsx | 2 -- ts/components/conversation/ContactModal.tsx | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 22654affd9c..50f4ef57d12 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -3595,6 +3595,10 @@ "messageformat": "Call link", "description": "Shown in the call lobby for a call link." }, + "icu:CallControls__InfoDisplay--group-call": { + "messageformat": "Group call", + "description": "Shown in the call lobby before starting a group call." + }, "icu:CallControls__InfoDisplay--adhoc-join-request-pending": { "messageformat": "Waiting to be let in", "description": "Shown in the call lobby for call link calls when requesting to join a call which requires admin approval." @@ -4771,6 +4775,10 @@ "messageformat": "You are already in a call", "description": "(Deleted 2024/08/28) Tooltip text for video or voice call button in Contact Details modal" }, + "icu:ContactModal--voice": { + "messageformat": "Voice", + "description": "Text for button to start a new voice call in the Contact Details modal" + }, "icu:showChatColorEditor": { "messageformat": "Chat color", "description": "This is a button in the conversation context menu to show the chat color editor" diff --git a/ts/components/CallParticipantCount.tsx b/ts/components/CallParticipantCount.tsx index 5e02ed5c9cd..6aed12c23d3 100644 --- a/ts/components/CallParticipantCount.tsx +++ b/ts/components/CallParticipantCount.tsx @@ -6,7 +6,7 @@ import type { LocalizerType } from '../types/Util'; import { CallMode } from '../types/CallDisposition'; export type PropsType = { - callMode: CallMode; + callMode: CallMode.Group | CallMode.Adhoc; i18n: LocalizerType; isAdhocJoinRequestPending?: boolean; groupMemberCount?: number; @@ -18,13 +18,15 @@ export function CallParticipantCount({ callMode, i18n, isAdhocJoinRequestPending, - groupMemberCount, participantCount, toggleParticipants, }: PropsType): JSX.Element { const isToggleVisible = Boolean(participantCount) || callMode === CallMode.Adhoc; - const count = participantCount || groupMemberCount || 1; + + // 1 is for yourself, when the call has started but no peek info is available + const count = participantCount || 1; + let innerText: string | undefined; if (callMode === CallMode.Adhoc) { if (isAdhocJoinRequestPending) { @@ -34,7 +36,10 @@ export function CallParticipantCount({ } else if (!participantCount) { innerText = i18n('icu:CallControls__InfoDisplay--adhoc-call'); } + } else if (!participantCount) { + innerText = i18n('icu:CallControls__InfoDisplay--group-call'); } + if (!innerText) { innerText = i18n('icu:CallControls__InfoDisplay--participants', { count, diff --git a/ts/components/CallingLobby.tsx b/ts/components/CallingLobby.tsx index 5d834cea3e8..dff35863d81 100644 --- a/ts/components/CallingLobby.tsx +++ b/ts/components/CallingLobby.tsx @@ -237,7 +237,6 @@ export function CallingLobby({ callMode={callMode} i18n={i18n} isAdhocJoinRequestPending={isAdhocJoinRequestPending} - groupMemberCount={groupMembers?.length ?? 0} participantCount={peekedParticipants.length} toggleParticipants={toggleParticipants} /> @@ -258,7 +257,6 @@ export function CallingLobby({ i18n, hasLocalVideo, hasLocalAudio, - groupMembers?.length, toggleParticipants, ]); diff --git a/ts/components/conversation/ContactModal.tsx b/ts/components/conversation/ContactModal.tsx index 296f6491083..483b9ace68d 100644 --- a/ts/components/conversation/ContactModal.tsx +++ b/ts/components/conversation/ContactModal.tsx @@ -156,7 +156,7 @@ export function ContactModal({ onOutgoingAudioCallInConversation(conversationId); }} > - {i18n('icu:audio')} + {i18n('icu:ContactModal--voice')} );