Update strings for group call lobby and contact voice call

This commit is contained in:
ayumi-signal 2024-09-09 14:12:53 -07:00 committed by GitHub
parent 319890d138
commit 5835e9033d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 6 deletions

View file

@ -3595,6 +3595,10 @@
"messageformat": "Call link", "messageformat": "Call link",
"description": "Shown in the call lobby for a 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": { "icu:CallControls__InfoDisplay--adhoc-join-request-pending": {
"messageformat": "Waiting to be let in", "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." "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", "messageformat": "You are already in a call",
"description": "(Deleted 2024/08/28) Tooltip text for video or voice call button in Contact Details modal" "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": { "icu:showChatColorEditor": {
"messageformat": "Chat color", "messageformat": "Chat color",
"description": "This is a button in the conversation context menu to show the chat color editor" "description": "This is a button in the conversation context menu to show the chat color editor"

View file

@ -6,7 +6,7 @@ import type { LocalizerType } from '../types/Util';
import { CallMode } from '../types/CallDisposition'; import { CallMode } from '../types/CallDisposition';
export type PropsType = { export type PropsType = {
callMode: CallMode; callMode: CallMode.Group | CallMode.Adhoc;
i18n: LocalizerType; i18n: LocalizerType;
isAdhocJoinRequestPending?: boolean; isAdhocJoinRequestPending?: boolean;
groupMemberCount?: number; groupMemberCount?: number;
@ -18,13 +18,15 @@ export function CallParticipantCount({
callMode, callMode,
i18n, i18n,
isAdhocJoinRequestPending, isAdhocJoinRequestPending,
groupMemberCount,
participantCount, participantCount,
toggleParticipants, toggleParticipants,
}: PropsType): JSX.Element { }: PropsType): JSX.Element {
const isToggleVisible = const isToggleVisible =
Boolean(participantCount) || callMode === CallMode.Adhoc; 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; let innerText: string | undefined;
if (callMode === CallMode.Adhoc) { if (callMode === CallMode.Adhoc) {
if (isAdhocJoinRequestPending) { if (isAdhocJoinRequestPending) {
@ -34,7 +36,10 @@ export function CallParticipantCount({
} else if (!participantCount) { } else if (!participantCount) {
innerText = i18n('icu:CallControls__InfoDisplay--adhoc-call'); innerText = i18n('icu:CallControls__InfoDisplay--adhoc-call');
} }
} else if (!participantCount) {
innerText = i18n('icu:CallControls__InfoDisplay--group-call');
} }
if (!innerText) { if (!innerText) {
innerText = i18n('icu:CallControls__InfoDisplay--participants', { innerText = i18n('icu:CallControls__InfoDisplay--participants', {
count, count,

View file

@ -237,7 +237,6 @@ export function CallingLobby({
callMode={callMode} callMode={callMode}
i18n={i18n} i18n={i18n}
isAdhocJoinRequestPending={isAdhocJoinRequestPending} isAdhocJoinRequestPending={isAdhocJoinRequestPending}
groupMemberCount={groupMembers?.length ?? 0}
participantCount={peekedParticipants.length} participantCount={peekedParticipants.length}
toggleParticipants={toggleParticipants} toggleParticipants={toggleParticipants}
/> />
@ -258,7 +257,6 @@ export function CallingLobby({
i18n, i18n,
hasLocalVideo, hasLocalVideo,
hasLocalAudio, hasLocalAudio,
groupMembers?.length,
toggleParticipants, toggleParticipants,
]); ]);

View file

@ -156,7 +156,7 @@ export function ContactModal({
onOutgoingAudioCallInConversation(conversationId); onOutgoingAudioCallInConversation(conversationId);
}} }}
> >
{i18n('icu:audio')} {i18n('icu:ContactModal--voice')}
</Button> </Button>
); );