Migrate more strings to translation keys (#11532)

This commit is contained in:
Michael Telatynski 2023-09-05 17:52:06 +01:00 committed by GitHub
parent c853257d54
commit 85be845f16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
89 changed files with 5313 additions and 4434 deletions

View file

@ -259,23 +259,23 @@ export const Lobby: FC<LobbyProps> = ({ room, joinCallButtonDisabledTooltip, con
kind="audio"
devices={audioInputs}
setDevice={setAudioInput}
deviceListLabel={_t("Audio devices")}
deviceListLabel={_t("voip|audio_devices")}
muted={audioMuted}
disabled={connecting}
toggle={toggleAudio}
unmutedTitle={_t("Mute microphone")}
mutedTitle={_t("Unmute microphone")}
unmutedTitle={_t("voip|disable_microphone")}
mutedTitle={_t("voip|enable_microphone")}
/>
<DeviceButton
kind="video"
devices={videoInputs}
setDevice={setVideoInput}
deviceListLabel={_t("Video devices")}
deviceListLabel={_t("voip|video_devices")}
muted={videoMuted}
disabled={connecting}
toggle={toggleVideo}
unmutedTitle={_t("Turn off camera")}
mutedTitle={_t("Turn on camera")}
unmutedTitle={_t("voip|disable_camera")}
mutedTitle={_t("voip|enable_camera")}
/>
</div>
</div>

View file

@ -66,7 +66,7 @@ class DialPadButton extends React.PureComponent<DigitButtonProps | DialButtonPro
<AccessibleButton
className="mx_DialPad_button mx_DialPad_dialButton"
onClick={this.onClick}
aria-label={_t("Dial")}
aria-label={_t("voip|dial")}
/>
);
}

View file

@ -404,11 +404,9 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
const sharerName = primaryFeed?.getMember()?.name;
if (!sharerName) return null;
let text = isScreensharing ? _t("You are presenting") : _t("%(sharerName)s is presenting", { sharerName });
let text = isScreensharing ? _t("voip|you_are_presenting") : _t("voip|user_is_presenting", { sharerName });
if (!sidebarShown) {
text +=
" • " +
(call.isLocalVideoMuted() ? _t("Your camera is turned off") : _t("Your camera is still enabled"));
text += " • " + (call.isLocalVideoMuted() ? _t("voip|camera_disabled") : _t("voip|camera_enabled"));
}
return <div className="mx_LegacyCallView_toast">{text}</div>;
@ -450,7 +448,7 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
holdTransferContent = (
<div className="mx_LegacyCallView_status">
{_t(
"Consulting with %(transferTarget)s. <a>Transfer to %(transferee)s</a>",
"voip|consulting",
{
transferTarget: transferTargetName,
transferee: transfereeName,
@ -470,8 +468,8 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
if (isRemoteOnHold) {
onHoldText = _t(
LegacyCallHandler.instance.hasAnyUnheldCall()
? _td("You held the call <a>Switch</a>")
: _td("You held the call <a>Resume</a>"),
? _td("voip|call_held_switch")
: _td("voip|call_held_resume"),
{},
{
a: (sub) => (
@ -482,7 +480,7 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
},
);
} else if (isLocalOnHold) {
onHoldText = _t("%(peerName)s held the call", {
onHoldText = _t("voip|call_held", {
peerName: call.getOpponentMember()?.name,
});
}

View file

@ -269,15 +269,15 @@ export default class LegacyCallViewButtons extends React.Component<IProps, IStat
inputRef={this.dialpadButton}
onClick={this.onDialpadClick}
isExpanded={this.state.showDialpad}
title={_t("Dialpad")}
title={_t("voip|dialpad")}
alignment={Alignment.Top}
/>
)}
<LegacyCallViewDropdownButton
state={!this.props.buttonsState.micMuted}
className="mx_LegacyCallViewButtons_button_mic"
onLabel={_t("Mute the microphone")}
offLabel={_t("Unmute the microphone")}
onLabel={_t("voip|disable_microphone")}
offLabel={_t("voip|enable_microphone")}
onClick={this.props.handlers.onMicMuteClick}
deviceKinds={[MediaDeviceKindEnum.AudioInput, MediaDeviceKindEnum.AudioOutput]}
/>
@ -285,8 +285,8 @@ export default class LegacyCallViewButtons extends React.Component<IProps, IStat
<LegacyCallViewDropdownButton
state={!this.props.buttonsState.vidMuted}
className="mx_LegacyCallViewButtons_button_vid"
onLabel={_t("Stop the camera")}
offLabel={_t("Start the camera")}
onLabel={_t("voip|disable_camera")}
offLabel={_t("voip|enable_camera")}
onClick={this.props.handlers.onVidMuteClick}
deviceKinds={[MediaDeviceKindEnum.VideoInput]}
/>
@ -295,8 +295,8 @@ export default class LegacyCallViewButtons extends React.Component<IProps, IStat
<LegacyCallViewToggleButton
state={this.props.buttonsState.screensharing}
className="mx_LegacyCallViewButtons_button_screensharing"
onLabel={_t("Stop sharing your screen")}
offLabel={_t("Start sharing your screen")}
onLabel={_t("voip|stop_screenshare")}
offLabel={_t("voip|start_screenshare")}
onClick={this.props.handlers.onScreenshareClick}
/>
)}
@ -322,7 +322,7 @@ export default class LegacyCallViewButtons extends React.Component<IProps, IStat
<AccessibleTooltipButton
className="mx_LegacyCallViewButtons_button mx_LegacyCallViewButtons_button_hangup"
onClick={this.props.handlers.onHangupClick}
title={_t("Hangup")}
title={_t("voip|hangup")}
alignment={Alignment.Top}
/>
</div>

View file

@ -34,7 +34,7 @@ const LegacyCallViewHeaderControls: React.FC<LegacyCallControlsProps> = ({ onExp
<AccessibleTooltipButton
className="mx_LegacyCallViewHeader_button mx_LegacyCallViewHeader_button_fullscreen"
onClick={onMaximize}
title={_t("Fill screen")}
title={_t("voip|maximise")}
/>
)}
{onPin && (
@ -48,7 +48,7 @@ const LegacyCallViewHeaderControls: React.FC<LegacyCallControlsProps> = ({ onExp
<AccessibleTooltipButton
className="mx_LegacyCallViewHeader_button mx_LegacyCallViewHeader_button_expand"
onClick={onExpand}
title={_t("Return to call")}
title={_t("voip|expand")}
/>
)}
</div>
@ -64,7 +64,7 @@ const SecondaryCallInfo: React.FC<ISecondaryCallInfoProps> = ({ callRoom }) => {
<span className="mx_LegacyCallViewHeader_secondaryCallInfo">
<RoomAvatar room={callRoom} size="16px" />
<span className="mx_LegacyCallView_secondaryCall_roomName">
{_t("%(name)s on hold", { name: callRoom.name })}
{_t("voip|on_hold", { name: callRoom.name })}
</span>
</span>
);