Migrate more strings to translation keys (#11613)
This commit is contained in:
parent
d46d4b3d04
commit
5cb8cbd893
111 changed files with 8214 additions and 6766 deletions
|
@ -85,7 +85,7 @@ export const VoiceBroadcastHeader: React.FC<VoiceBroadcastHeaderProps> = ({
|
|||
const bufferingLine = showBuffering && bufferingPosition === "line" && (
|
||||
<div className="mx_VoiceBroadcastHeader_line">
|
||||
<Spinner w={14} h={14} />
|
||||
{_t("Buffering…")}
|
||||
{_t("voice_broadcast|buffering")}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
@ -98,7 +98,7 @@ export const VoiceBroadcastHeader: React.FC<VoiceBroadcastHeaderProps> = ({
|
|||
<AccessibleTooltipButton
|
||||
className={microphoneLineClasses}
|
||||
onClick={onMicrophoneLineClick}
|
||||
title={_t("Change input device")}
|
||||
title={_t("voip|change_input_device")}
|
||||
>
|
||||
<MicrophoneIcon className="mx_Icon mx_Icon_16" />
|
||||
<span>{microphoneLabel}</span>
|
||||
|
|
|
@ -35,17 +35,17 @@ export const VoiceBroadcastPlaybackControl: React.FC<Props> = ({ onClick, state
|
|||
case VoiceBroadcastPlaybackState.Stopped:
|
||||
controlIcon = <PlayIcon className="mx_Icon mx_Icon_16" />;
|
||||
className = "mx_VoiceBroadcastControl-play";
|
||||
controlLabel = _t("play voice broadcast");
|
||||
controlLabel = _t("voice_broadcast|play");
|
||||
break;
|
||||
case VoiceBroadcastPlaybackState.Paused:
|
||||
controlIcon = <PlayIcon className="mx_Icon mx_Icon_16" />;
|
||||
className = "mx_VoiceBroadcastControl-play";
|
||||
controlLabel = _t("resume voice broadcast");
|
||||
controlLabel = _t("voice_broadcast|resume");
|
||||
break;
|
||||
case VoiceBroadcastPlaybackState.Buffering:
|
||||
case VoiceBroadcastPlaybackState.Playing:
|
||||
controlIcon = <PauseIcon className="mx_Icon mx_Icon_12" />;
|
||||
controlLabel = _t("pause voice broadcast");
|
||||
controlLabel = _t("voice_broadcast|pause");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ export const VoiceBroadcastRecordingConnectionError: React.FC = () => {
|
|||
return (
|
||||
<div className="mx_VoiceBroadcastRecordingConnectionError">
|
||||
<WarningIcon className="mx_Icon mx_Icon_16" />
|
||||
{_t("Connection error - Recording paused")}
|
||||
{_t("voice_broadcast|connection_error")}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -27,15 +27,11 @@ interface Props {
|
|||
|
||||
export const ConfirmListenBroadcastStopCurrentDialog: React.FC<Props> = ({ onFinished }) => {
|
||||
return (
|
||||
<BaseDialog title={_t("Listen to live broadcast?")} hasCancel={true} onFinished={onFinished}>
|
||||
<p>
|
||||
{_t(
|
||||
"If you start listening to this live broadcast, your current live broadcast recording will be ended.",
|
||||
)}
|
||||
</p>
|
||||
<BaseDialog title={_t("voice_broadcast|confirm_listen_title")} hasCancel={true} onFinished={onFinished}>
|
||||
<p>{_t("voice_broadcast|confirm_listen_description")}</p>
|
||||
<DialogButtons
|
||||
onPrimaryButtonClick={() => onFinished(true)}
|
||||
primaryButton={_t("Yes, end my recording")}
|
||||
primaryButton={_t("voice_broadcast|confirm_listen_affirm")}
|
||||
cancelButton={_t("action|no")}
|
||||
onCancel={() => onFinished(false)}
|
||||
/>
|
||||
|
|
|
@ -51,7 +51,11 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
};
|
||||
|
||||
seekBackwardButton = (
|
||||
<SeekButton icon={Back30sIcon} label={_t("30s backward")} onClick={onSeekBackwardButtonClick} />
|
||||
<SeekButton
|
||||
icon={Back30sIcon}
|
||||
label={_t("voice_broadcast|30s_backward")}
|
||||
onClick={onSeekBackwardButtonClick}
|
||||
/>
|
||||
);
|
||||
|
||||
const onSeekForwardButtonClick = (): void => {
|
||||
|
@ -59,7 +63,11 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
};
|
||||
|
||||
seekForwardButton = (
|
||||
<SeekButton icon={Forward30sIcon} label={_t("30s forward")} onClick={onSeekForwardButtonClick} />
|
||||
<SeekButton
|
||||
icon={Forward30sIcon}
|
||||
label={_t("voice_broadcast|30s_forward")}
|
||||
onClick={onSeekForwardButtonClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ export const VoiceBroadcastPreRecordingPip: React.FC<Props> = ({ voiceBroadcastP
|
|||
disabled={state.disableStartButton}
|
||||
>
|
||||
<LiveIcon className="mx_Icon mx_Icon_16" />
|
||||
{_t("Go live")}
|
||||
{_t("voice_broadcast|go_live")}
|
||||
</AccessibleButton>
|
||||
{state.showDeviceSelect && (
|
||||
<DevicesContextMenu
|
||||
|
|
|
@ -76,13 +76,13 @@ export const VoiceBroadcastRecordingPip: React.FC<VoiceBroadcastRecordingPipProp
|
|||
className="mx_VoiceBroadcastControl-recording"
|
||||
onClick={toggleRecording}
|
||||
icon={<RecordIcon className="mx_Icon mx_Icon_12" />}
|
||||
label={_t("resume voice broadcast")}
|
||||
label={_t("voice_broadcast|resume")}
|
||||
/>
|
||||
) : (
|
||||
<VoiceBroadcastControl
|
||||
onClick={toggleRecording}
|
||||
icon={<PauseIcon className="mx_Icon mx_Icon_12" />}
|
||||
label={_t("pause voice broadcast")}
|
||||
label={_t("voice_broadcast|pause")}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -94,7 +94,7 @@ export const VoiceBroadcastRecordingPip: React.FC<VoiceBroadcastRecordingPipProp
|
|||
{toggleControl}
|
||||
<AccessibleTooltipButton
|
||||
onClick={(): void => setShowDeviceSelect(true)}
|
||||
title={_t("Change input device")}
|
||||
title={_t("voip|change_input_device")}
|
||||
>
|
||||
<MicrophoneIcon className="mx_Icon mx_Icon_16 mx_Icon_alert" />
|
||||
</AccessibleTooltipButton>
|
||||
|
|
|
@ -31,15 +31,9 @@ import Modal from "../../Modal";
|
|||
|
||||
const showStopBroadcastingDialog = async (): Promise<boolean> => {
|
||||
const { finished } = Modal.createDialog(QuestionDialog, {
|
||||
title: _t("Stop live broadcasting?"),
|
||||
description: (
|
||||
<p>
|
||||
{_t(
|
||||
"Are you sure you want to stop your live broadcast? This will end the broadcast and the full recording will be available in the room.",
|
||||
)}
|
||||
</p>
|
||||
),
|
||||
button: _t("Yes, stop broadcast"),
|
||||
title: _t("voice_broadcast|confirm_stop_title"),
|
||||
description: <p>{_t("voice_broadcast|confirm_stop_description")}</p>,
|
||||
button: _t("voice_broadcast|confirm_stop_affirm"),
|
||||
});
|
||||
const [confirmed] = await finished;
|
||||
return !!confirmed;
|
||||
|
|
|
@ -637,8 +637,8 @@ export class VoiceBroadcastPlayback
|
|||
|
||||
public get errorMessage(): string {
|
||||
if (this.getState() !== VoiceBroadcastPlaybackState.Error) return "";
|
||||
if (this.utdChunkEvents.size) return _t("Unable to decrypt voice broadcast");
|
||||
return _t("Unable to play this voice broadcast");
|
||||
if (this.utdChunkEvents.size) return _t("voice_broadcast|failed_decrypt");
|
||||
return _t("voice_broadcast|failed_generic");
|
||||
}
|
||||
|
||||
public destroy(): void {
|
||||
|
|
|
@ -24,50 +24,32 @@ import Modal from "../../Modal";
|
|||
|
||||
const showAlreadyRecordingDialog = (): void => {
|
||||
Modal.createDialog(InfoDialog, {
|
||||
title: _t("Can't start a new voice broadcast"),
|
||||
description: (
|
||||
<p>
|
||||
{_t(
|
||||
"You are already recording a voice broadcast. Please end your current voice broadcast to start a new one.",
|
||||
)}
|
||||
</p>
|
||||
),
|
||||
title: _t("voice_broadcast|failed_already_recording_title"),
|
||||
description: <p>{_t("voice_broadcast|failed_already_recording_description")}</p>,
|
||||
hasCloseButton: true,
|
||||
});
|
||||
};
|
||||
|
||||
const showInsufficientPermissionsDialog = (): void => {
|
||||
Modal.createDialog(InfoDialog, {
|
||||
title: _t("Can't start a new voice broadcast"),
|
||||
description: (
|
||||
<p>
|
||||
{_t(
|
||||
"You don't have the required permissions to start a voice broadcast in this room. Contact a room administrator to upgrade your permissions.",
|
||||
)}
|
||||
</p>
|
||||
),
|
||||
title: _t("voice_broadcast|failed_insufficient_permission_title"),
|
||||
description: <p>{_t("voice_broadcast|failed_insufficient_permission_description")}</p>,
|
||||
hasCloseButton: true,
|
||||
});
|
||||
};
|
||||
|
||||
const showOthersAlreadyRecordingDialog = (): void => {
|
||||
Modal.createDialog(InfoDialog, {
|
||||
title: _t("Can't start a new voice broadcast"),
|
||||
description: (
|
||||
<p>
|
||||
{_t(
|
||||
"Someone else is already recording a voice broadcast. Wait for their voice broadcast to end to start a new one.",
|
||||
)}
|
||||
</p>
|
||||
),
|
||||
title: _t("voice_broadcast|failed_others_already_recording_title"),
|
||||
description: <p>{_t("voice_broadcast|failed_others_already_recording_description")}</p>,
|
||||
hasCloseButton: true,
|
||||
});
|
||||
};
|
||||
|
||||
const showNoConnectionDialog = (): void => {
|
||||
Modal.createDialog(InfoDialog, {
|
||||
title: _t("Connection error"),
|
||||
description: <p>{_t("Unfortunately we're unable to start a recording right now. Please try again later.")}</p>,
|
||||
title: _t("voice_broadcast|failed_no_connection_title"),
|
||||
description: <p>{_t("voice_broadcast|failed_no_connection_description")}</p>,
|
||||
hasCloseButton: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -41,9 +41,9 @@ export const textForVoiceBroadcastStoppedEvent = (event: MatrixEvent, client: Ma
|
|||
};
|
||||
|
||||
if (ownUserId && ownUserId === event.getSender()) {
|
||||
return _t("You ended a <a>voice broadcast</a>", {}, templateTags);
|
||||
return _t("timeline|io.element.voice_broadcast_info|you", {}, templateTags);
|
||||
}
|
||||
|
||||
return _t("%(senderName)s ended a <a>voice broadcast</a>", { senderName: getSenderName(event) }, templateTags);
|
||||
return _t("timeline|io.element.voice_broadcast_info|user", { senderName: getSenderName(event) }, templateTags);
|
||||
};
|
||||
};
|
||||
|
|
|
@ -24,8 +24,8 @@ export const textForVoiceBroadcastStoppedEventWithoutLink = (event: MatrixEvent)
|
|||
const ownUserId = MatrixClientPeg.get()?.getUserId();
|
||||
|
||||
if (ownUserId && ownUserId === event.getSender()) {
|
||||
return _t("You ended a voice broadcast", {});
|
||||
return _t("event_preview|io.element.voice_broadcast_info|you", {});
|
||||
}
|
||||
|
||||
return _t("%(senderName)s ended a voice broadcast", { senderName: getSenderName(event) });
|
||||
return _t("event_preview|io.element.voice_broadcast_info|user", { senderName: getSenderName(event) });
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue