Migrate more strings to translation keys (#11669)

This commit is contained in:
Michael Telatynski 2023-09-26 13:04:17 +01:00 committed by GitHub
parent 0c6e56ca91
commit 5252361d1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
112 changed files with 4855 additions and 4542 deletions

View file

@ -410,7 +410,7 @@ export const joinRoom = async (cli: MatrixClient, hierarchy: RoomHierarchy, room
logger.warn("Got a non-MatrixError while joining room", err);
SdkContextClass.instance.roomViewStore.showJoinRoomError(
new MatrixError({
error: _t("Unknown error"),
error: _t("error|unknown"),
}),
roomId,
);
@ -673,7 +673,7 @@ const ManageButtons: React.FC<IManageButtonsProps> = ({ hierarchy, selected, set
};
}
let buttonText = _t("Saving…");
let buttonText = _t("common|saving");
if (!saving) {
buttonText = selectionAllSuggested ? _t("space|unmark_suggested") : _t("space|mark_suggested");
}

View file

@ -303,8 +303,8 @@ const SpaceSetupFirstRooms: React.FC<{
const [busy, setBusy] = useState(false);
const [error, setError] = useState("");
const numFields = 3;
const placeholders = [_t("General"), _t("common|random"), _t("common|support")];
const [roomNames, setRoomName] = useStateArray(numFields, [_t("General"), _t("common|random"), ""]);
const placeholders = [_t("common|general"), _t("common|random"), _t("common|support")];
const [roomNames, setRoomName] = useStateArray(numFields, [_t("common|general"), _t("common|random"), ""]);
const fields = new Array(numFields).fill(0).map((x, i) => {
const name = "roomName" + i;
return (

View file

@ -99,7 +99,7 @@ export default function MemberAvatar({
}
: props.onClick
}
altText={_t("Profile picture")}
altText={_t("common|user_avatar")}
/>
);
}

View file

@ -70,7 +70,7 @@ export const RoomNotificationContextMenu: React.FC<IProps> = ({ room, onFinished
const mentionsOption: JSX.Element = (
<IconizedContextMenuRadio
label={_t("Mentions & keywords")}
label={_t("notifications|mentions_keywords")}
active={notificationState === RoomNotifState.MentionsOnly}
iconClassName="mx_RoomNotificationContextMenu_iconBellMentions"
onClick={wrapHandler(() => setNotificationState(RoomNotifState.MentionsOnly))}

View file

@ -388,7 +388,7 @@ const defaultRendererFactory =
);
export const defaultRoomsRenderer = defaultRendererFactory(_td("Rooms"));
export const defaultSpacesRenderer = defaultRendererFactory(_td("Spaces"));
export const defaultSpacesRenderer = defaultRendererFactory(_td("common|spaces"));
export const defaultDmsRenderer = defaultRendererFactory(_td("Direct Messages"));
interface ISubspaceSelectorProps {
@ -494,7 +494,7 @@ const AddExistingToSpaceDialog: React.FC<IProps> = ({ space, onCreateRoomClick,
roomsRenderer={defaultRoomsRenderer}
spacesRenderer={() => (
<div className="mx_AddExistingToSpace_section">
<h3>{_t("Spaces")}</h3>
<h3>{_t("common|spaces")}</h3>
<AccessibleButton
kind="link"
onClick={() => {

View file

@ -61,7 +61,7 @@ export default class ChangelogDialog extends React.Component<IProps, State> {
const body = await res.json();
this.setState({ [repo]: body.commits });
} catch (err) {
this.setState({ [repo]: err instanceof Error ? err.message : _t("Unknown error") });
this.setState({ [repo]: err instanceof Error ? err.message : _t("error|unknown") });
}
}

View file

@ -334,7 +334,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
visibilitySection = (
<LabelledCheckbox
className="mx_CreateRoomDialog_labelledCheckbox"
label={_t("Make this room visible in the public room directory.")}
label={_t("room_settings|security|publish_room")}
onChange={this.onIsPublicKnockRoomChange}
value={this.state.isPublicKnockRoom}
/>
@ -417,7 +417,9 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
<JoinRuleDropdown
label={_t("create_room|room_visibility_label")}
labelInvite={_t("create_room|join_rule_invite")}
labelKnock={this.askToJoinEnabled ? _t("Ask to join") : undefined}
labelKnock={
this.askToJoinEnabled ? _t("room_settings|security|join_rule_knock") : undefined
}
labelPublic={_t("Public room")}
labelRestricted={
this.supportsRestricted ? _t("create_room|join_rule_restricted") : undefined
@ -432,7 +434,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
{aliasField}
<details onToggle={this.onDetailsToggled} className="mx_CreateRoomDialog_details">
<summary className="mx_CreateRoomDialog_details_summary">
{this.state.detailsOpen ? _t("Hide advanced") : _t("Show advanced")}
{this.state.detailsOpen ? _t("action|hide_advanced") : _t("action|show_advanced")}
</summary>
<LabelledToggleSwitch
label={_t("create_room|unfederated", {

View file

@ -182,7 +182,7 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
let setupButtonCaption;
if (this.state.backupStatus === BackupStatus.SERVER_BACKUP_BUT_DISABLED) {
setupButtonCaption = _t("Connect this session to Key Backup");
setupButtonCaption = _t("settings|security|key_backup_connect");
} else {
// if there's an error fetching the backup info, we'll just assume there's
// no backup for the purpose of the button caption
@ -203,7 +203,7 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
<button onClick={this.onLogoutConfirm}>{_t("I don't want my encrypted messages")}</button>
</DialogButtons>
<details>
<summary>{_t("common|Advanced")}</summary>
<summary>{_t("common|advanced")}</summary>
<p>
<button onClick={this.onExportE2eKeysClicked}>{_t("Manually export keys")}</button>
</p>

View file

@ -134,7 +134,7 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
tabs.push(
new Tab(
RoomSettingsTab.General,
_td("General"),
_td("common|general"),
"mx_RoomSettingsDialog_settingsIcon",
<GeneralRoomSettingsTab room={this.state.room} />,
"RoomSettingsGeneral",
@ -218,7 +218,7 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
tabs.push(
new Tab(
RoomSettingsTab.Advanced,
_td("common|Advanced"),
_td("common|advanced"),
"mx_RoomSettingsDialog_warningIcon",
(
<AdvancedRoomSettingsTab

View file

@ -55,13 +55,13 @@ const SpaceSettingsDialog: React.FC<IProps> = ({ matrixClient: cli, space, onFin
return [
new Tab(
SpaceSettingsTab.General,
_td("General"),
_td("common|general"),
"mx_SpaceSettingsDialog_generalIcon",
<SpaceSettingsGeneralTab matrixClient={cli} space={space} />,
),
new Tab(
SpaceSettingsTab.Visibility,
_td("Visibility"),
_td("room_settings|visibility|title"),
"mx_SpaceSettingsDialog_visibilityIcon",
<SpaceSettingsVisibilityTab matrixClient={cli} space={space} closeSettingsFn={onFinished} />,
),
@ -74,7 +74,7 @@ const SpaceSettingsDialog: React.FC<IProps> = ({ matrixClient: cli, space, onFin
SettingsStore.getValue(UIFeature.AdvancedSettings)
? new Tab(
SpaceSettingsTab.Advanced,
_td("common|Advanced"),
_td("common|advanced"),
"mx_RoomSettingsDialog_warningIcon",
<AdvancedRoomSettingsTab room={space} closeSettingsFn={onFinished} />,
)

View file

@ -77,7 +77,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
tabs.push(
new Tab(
UserTab.General,
_td("General"),
_td("common|general"),
"mx_UserSettingsDialog_settingsIcon",
<GeneralUserSettingsTab closeSettingsFn={this.props.onFinished} />,
"UserSettingsGeneral",

View file

@ -92,7 +92,7 @@ export function RoomResultContextMenus({ room }: Props): JSX.Element {
const target = ev.target as HTMLElement;
setGeneralMenuPosition(target.getBoundingClientRect());
}}
title={room.isSpaceRoom() ? _t("Space options") : _t("Room options")}
title={room.isSpaceRoom() ? _t("space|context_menu|options") : _t("Room options")}
isExpanded={generalMenuPosition !== null}
/>
)}

View file

@ -79,8 +79,8 @@ export default class TagComposer extends React.PureComponent<IProps, IState> {
id={this.props.id ? this.props.id + "_field" : undefined}
value={this.state.newTag}
onChange={this.onInputChange}
label={this.props.label || _t("Keyword")}
placeholder={this.props.placeholder || _t("New keyword")}
label={this.props.label || _t("notifications|keyword")}
placeholder={this.props.placeholder || _t("notifications|keyword_new")}
disabled={this.props.disabled}
autoComplete="off"
/>

View file

@ -250,7 +250,7 @@ export default class LegacyCallEvent extends React.PureComponent<IProps, IState>
if (this.state.callState === CallState.Connecting) {
return (
<div className="mx_LegacyCallEvent_content">
{_t("Connecting")}
{_t("voip|connecting")}
{this.props.timestamp}
</div>
);

View file

@ -1163,7 +1163,7 @@ export const PowerLevelEditor: React.FC<{
logger.error("Failed to change power level " + err);
Modal.createDialog(ErrorDialog, {
title: _t("common|error"),
description: _t("Failed to change power level"),
description: _t("error|update_power_level"),
});
},
);

View file

@ -737,7 +737,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
switch (this.state.shieldReason) {
case null:
case EventShieldReason.UNKNOWN:
shieldReasonMessage = _t("Unknown error");
shieldReasonMessage = _t("error|unknown");
break;
case EventShieldReason.UNVERIFIED_IDENTITY:

View file

@ -290,26 +290,24 @@ const CallButtons: FC<CallButtonsProps> = ({ room }) => {
} else if (groupCallsEnabled) {
if (useElementCallExclusively) {
if (hasGroupCall) {
return makeVideoCallButton(new DisabledWithReason(_t("Ongoing call")));
return makeVideoCallButton(new DisabledWithReason(_t("voip|disabled_ongoing_call")));
} else if (mayCreateElementCalls) {
return makeVideoCallButton("element");
} else {
return makeVideoCallButton(
new DisabledWithReason(_t("You do not have permission to start video calls")),
);
return makeVideoCallButton(new DisabledWithReason(_t("voip|disabled_no_perms_start_video_call")));
}
} else if (hasLegacyCall || hasJitsiWidget || hasGroupCall) {
return (
<>
{makeVoiceCallButton(new DisabledWithReason(_t("Ongoing call")))}
{makeVideoCallButton(new DisabledWithReason(_t("Ongoing call")))}
{makeVoiceCallButton(new DisabledWithReason(_t("voip|disabled_ongoing_call")))}
{makeVideoCallButton(new DisabledWithReason(_t("voip|disabled_ongoing_call")))}
</>
);
} else if (functionalMembers.length <= 1) {
return (
<>
{makeVoiceCallButton(new DisabledWithReason(_t("There's no one here to call")))}
{makeVideoCallButton(new DisabledWithReason(_t("There's no one here to call")))}
{makeVoiceCallButton(new DisabledWithReason(_t("voip|disabled_no_one_here")))}
{makeVideoCallButton(new DisabledWithReason(_t("voip|disabled_no_one_here")))}
</>
);
} else if (functionalMembers.length === 2) {
@ -329,10 +327,10 @@ const CallButtons: FC<CallButtonsProps> = ({ room }) => {
} else {
const videoCallBehavior = mayCreateElementCalls
? "element"
: new DisabledWithReason(_t("You do not have permission to start video calls"));
: new DisabledWithReason(_t("voip|disabled_no_perms_start_video_call"));
return (
<>
{makeVoiceCallButton(new DisabledWithReason(_t("You do not have permission to start voice calls")))}
{makeVoiceCallButton(new DisabledWithReason(_t("voip|disabled_no_perms_start_voice_call")))}
{makeVideoCallButton(videoCallBehavior)}
</>
);
@ -340,15 +338,15 @@ const CallButtons: FC<CallButtonsProps> = ({ room }) => {
} else if (hasLegacyCall || hasJitsiWidget) {
return (
<>
{makeVoiceCallButton(new DisabledWithReason(_t("Ongoing call")))}
{makeVideoCallButton(new DisabledWithReason(_t("Ongoing call")))}
{makeVoiceCallButton(new DisabledWithReason(_t("voip|disabled_ongoing_call")))}
{makeVideoCallButton(new DisabledWithReason(_t("voip|disabled_ongoing_call")))}
</>
);
} else if (functionalMembers.length <= 1) {
return (
<>
{makeVoiceCallButton(new DisabledWithReason(_t("There's no one here to call")))}
{makeVideoCallButton(new DisabledWithReason(_t("There's no one here to call")))}
{makeVoiceCallButton(new DisabledWithReason(_t("voip|disabled_no_one_here")))}
{makeVideoCallButton(new DisabledWithReason(_t("voip|disabled_no_one_here")))}
</>
);
} else if (functionalMembers.length === 2 || mayEditWidgets) {
@ -361,8 +359,8 @@ const CallButtons: FC<CallButtonsProps> = ({ room }) => {
} else {
return (
<>
{makeVoiceCallButton(new DisabledWithReason(_t("You do not have permission to start voice calls")))}
{makeVideoCallButton(new DisabledWithReason(_t("You do not have permission to start video calls")))}
{makeVoiceCallButton(new DisabledWithReason(_t("voip|disabled_no_perms_start_voice_call")))}
{makeVideoCallButton(new DisabledWithReason(_t("voip|disabled_no_perms_start_video_call")))}
</>
);
}
@ -764,7 +762,7 @@ export default class RoomHeader extends React.Component<IProps, IState> {
const buttons = this.props.showButtons ? this.renderButtons(isVideoRoom) : null;
let oobName = _t("Join Room");
let oobName = _t("Unnamed room");
if (this.props.oobData && this.props.oobData.name) {
oobName = this.props.oobData.name;
}

View file

@ -650,9 +650,9 @@ export default class RoomSublist extends React.Component<IProps, IState> {
{({ onFocus, isActive, ref }) => {
const tabIndex = isActive ? 0 : -1;
let ariaLabel = _t("Jump to first unread room.");
let ariaLabel = _t("a11y_jump_first_unread_room");
if (this.props.tagId === DefaultTagID.Invite) {
ariaLabel = _t("Jump to first invite.");
ariaLabel = _t("a11y|jump_first_invite");
}
const badge = (

View file

@ -35,7 +35,7 @@ export default class TopUnreadMessagesBar extends React.PureComponent<IProps> {
/>
<AccessibleButton
className="mx_TopUnreadMessagesBar_markAsRead"
title={_t("Mark all as read")}
title={_t("notifications|mark_all_read")}
onClick={this.props.onCloseClick}
/>
</div>

View file

@ -55,7 +55,7 @@ export const AddPrivilegedUsers: React.FC<AddPrivilegedUsersProps> = ({ room, de
if (powerLevelEvent === null) {
Modal.createDialog(ErrorDialog, {
title: _t("common|error"),
description: _t("Failed to change power level"),
description: _t("error|update_power_level"),
});
return;
@ -68,7 +68,7 @@ export const AddPrivilegedUsers: React.FC<AddPrivilegedUsersProps> = ({ room, de
} catch (error) {
Modal.createDialog(ErrorDialog, {
title: _t("common|error"),
description: _t("Failed to change power level"),
description: _t("error|update_power_level"),
});
} finally {
setIsLoading(false);
@ -78,13 +78,13 @@ export const AddPrivilegedUsers: React.FC<AddPrivilegedUsersProps> = ({ room, de
return (
<form style={{ display: "flex" }} onSubmit={onSubmit}>
<SettingsFieldset
legend={_t("Add privileged users")}
description={_t("Give one or multiple users in this room more privileges")}
legend={_t("room_settings|permissions|add_privileged_user_heading")}
description={_t("room_settings|permissions|add_privileged_user_description")}
style={{ flexGrow: 1 }}
>
<AutocompleteInput
provider={userProvider.current}
placeholder={_t("Search users in this room…")}
placeholder={_t("room_settings|permissions|add_privileged_user_filter_placeholder")}
onSelectionChange={setSelectedUsers}
selection={selectedUsers}
additionalFilter={hasLowerOrEqualLevelThanDefaultLevelFilter}

View file

@ -42,7 +42,7 @@ export default class ChangeDisplayName extends React.Component {
return (
<EditableTextContainer
getInitialValue={this.getDisplayName}
placeholder={_t("No display name")}
placeholder={_t("settings|general|name_placeholder")}
blurToSubmit={true}
onSubmit={this.changeDisplayName}
/>

View file

@ -258,7 +258,7 @@ export default class CrossSigningPanel extends React.PureComponent<{}, IState> {
<>
{summarisedStatus}
<details>
<summary>{_t("common|Advanced")}</summary>
<summary>{_t("common|advanced")}</summary>
<table className="mx_CrossSigningPanel_statusList">
<tr>
<th scope="row">{_t("settings|security|cross_signing_public_keys")}</th>

View file

@ -227,11 +227,11 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
{EventIndexPeg.error && (
<SettingsSubsectionText>
<details>
<summary>{_t("common|Advanced")}</summary>
<summary>{_t("common|advanced")}</summary>
<code>
{EventIndexPeg.error instanceof Error
? EventIndexPeg.error.message
: _t("Unknown error")}
: _t("error|unknown")}
</code>
<p>
<AccessibleButton key="delete" kind="danger" onClick={this.confirmEventStoreReset}>

View file

@ -89,7 +89,7 @@ export default class IntegrationManager extends React.Component<IProps, IState>
if (this.props.loading) {
return (
<div className="mx_IntegrationManager_loading">
<Heading size="3">{_t("Connecting to integration manager…")}</Heading>
<Heading size="3">{_t("integration_manager|connecting")}</Heading>
<Spinner />
</div>
);
@ -98,8 +98,8 @@ export default class IntegrationManager extends React.Component<IProps, IState>
if (!this.props.connected || this.state.errored) {
return (
<div className="mx_IntegrationManager_error">
<Heading size="3">{_t("Cannot connect to integration manager")}</Heading>
<p>{_t("The integration manager is offline or it cannot reach your homeserver.")}</p>
<Heading size="3">{_t("integration_manager|error_connecting_heading")}</Heading>
<p>{_t("integration_manager|error_connecting")}</p>
</div>
);
}

View file

@ -131,15 +131,15 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
const roomId = await upgradeRoom(room, targetVersion, opts.invite, true, true, true, (progress) => {
const total = 2 + progress.updateSpacesTotal + progress.inviteUsersTotal;
if (!progress.roomUpgraded) {
fn(_t("Upgrading room"), 0, total);
fn(_t("room_settings|security|join_rule_upgrade_upgrading_room"), 0, total);
} else if (!progress.roomSynced) {
fn(_t("Loading new room"), 1, total);
fn(_t("room_settings|security|join_rule_upgrade_awaiting_room"), 1, total);
} else if (
progress.inviteUsersProgress !== undefined &&
progress.inviteUsersProgress < progress.inviteUsersTotal
) {
fn(
_t("Sending invites... (%(progress)s out of %(count)s)", {
_t("room_settings|security|join_rule_upgrade_sending_invites", {
progress: progress.inviteUsersProgress,
count: progress.inviteUsersTotal,
}),
@ -151,7 +151,7 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
progress.updateSpacesProgress < progress.updateSpacesTotal
) {
fn(
_t("Updating spaces... (%(progress)s out of %(count)s)", {
_t("room_settings|security|join_rule_upgrade_updating_spaces", {
progress: progress.updateSpacesProgress,
count: progress.updateSpacesTotal,
}),
@ -179,7 +179,11 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
});
};
const upgradeRequiredPill = <span className="mx_JoinRuleSettings_upgradeRequired">{_t("Upgrade required")}</span>;
const upgradeRequiredPill = (
<span className="mx_JoinRuleSettings_upgradeRequired">
{_t("room_settings|security|join_rule_upgrade_required")}
</span>
);
const definitions: IDefinition<JoinRule>[] = [
{
@ -213,11 +217,11 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
let moreText;
if (shownSpaces.length < restrictedAllowRoomIds.length) {
if (shownSpaces.length > 0) {
moreText = _t("& %(count)s more", {
moreText = _t("room_settings|security|join_rule_restricted_n_more", {
count: restrictedAllowRoomIds.length - shownSpaces.length,
});
} else {
moreText = _t("Currently, %(count)s spaces have access", {
moreText = _t("room_settings|security|join_rule_restricted_summary", {
count: restrictedAllowRoomIds.length,
});
}
@ -256,7 +260,7 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
<div>
<span>
{_t(
"Anyone in a space can find and join. <a>Edit which spaces can access here.</a>",
"room_settings|security|join_rule_restricted_description",
{},
{
a: (sub) => (
@ -273,7 +277,7 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
</span>
<div className="mx_JoinRuleSettings_spacesWithAccess">
<h4>{_t("Spaces with access")}</h4>
<h4>{_t("room_settings|security|join_rule_restricted_description_spaces")}</h4>
{shownSpaces.map((room) => {
return (
<span key={room.roomId}>
@ -288,21 +292,21 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
);
} else if (SpaceStore.instance.activeSpaceRoom) {
description = _t(
"Anyone in <spaceName/> can find and join. You can select other spaces too.",
"room_settings|security|join_rule_restricted_description_active_space",
{},
{
spaceName: () => <b>{SpaceStore.instance.activeSpaceRoom!.name}</b>,
},
);
} else {
description = _t("Anyone in a space can find and join. You can select multiple spaces.");
description = _t("room_settings|security|join_rule_restricted_description_prompt");
}
definitions.splice(1, 0, {
value: JoinRule.Restricted,
label: (
<>
{_t("Space members")}
{_t("room_settings|security|join_rule_restricted")}
{preferredRestrictionVersion && upgradeRequiredPill}
</>
),
@ -317,20 +321,20 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
value: JoinRule.Knock,
label: (
<>
{_t("Ask to join")}
{_t("room_settings|security|join_rule_knock")}
{preferredKnockVersion && upgradeRequiredPill}
</>
),
description: (
<>
{_t("People cannot join unless access is granted.")}
{_t("room_settings|security|join_rule_knock_description")}
<LabelledCheckbox
className="mx_JoinRuleSettings_labelledCheckbox"
disabled={joinRule !== JoinRule.Knock}
label={
room.isSpaceRoom()
? _t("Make this space visible in the public room directory.")
: _t("Make this room visible in the public room directory.")
? _t("room_settings|security|publish_space")
: _t("room_settings|security|publish_room")
}
onChange={onIsPublicKnockRoomChange}
value={isPublicKnockRoom}
@ -359,21 +363,13 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
(roomId) => !cli.getRoom(roomId)?.currentState.maySendStateEvent(EventType.SpaceChild, userId),
);
if (unableToUpdateSomeParents) {
warning = (
<b>
{_t(
"This room is in some spaces you're not an admin of. In those spaces, the old room will still be shown, but people will be prompted to join the new one.",
)}
</b>
);
warning = <b>{_t("room_settings|security|join_rule_restricted_upgrade_warning")}</b>;
}
upgradeRequiredDialog(
targetVersion,
<>
{_t(
"This upgrade will allow members of selected spaces access to this room without an invite.",
)}
{_t("room_settings|security|join_rule_restricted_upgrade_description")}
{warning}
</>,
);

View file

@ -749,7 +749,7 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
className="mx_UserNotifSettings_clearNotifsButton"
data-testid="clear-notifications"
>
{_t("Mark all as read")}
{_t("notifications|mark_all_read")}
</AccessibleButton>
);
}
@ -759,7 +759,7 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
if (clearNotifsButton) {
return (
<div className="mx_UserNotifSettings_floatingSection">
<div>{_t("Other")}</div>
<div>{_t("notifications|class_other")}</div>
{clearNotifsButton}
</div>
);
@ -776,8 +776,8 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
onAdd={this.onKeywordAdd}
onRemove={this.onKeywordRemove}
disabled={this.state.phase === Phase.Persisting}
label={_t("Keyword")}
placeholder={_t("New keyword")}
label={_t("notifications|keyword")}
placeholder={_t("notifications|keyword_new")}
/>
);
}
@ -811,11 +811,7 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
{makeRadio(r, VectorState.Loud)}
{this.state.ruleIdsWithError[r.ruleId] && (
<div className="mx_UserNotifSettings_gridRowError">
<Caption isError>
{_t(
"An error occurred when updating your notification preferences. Please try to toggle your option again.",
)}
</Caption>
<Caption isError>{_t("settings|notifications|error_updating")}</Caption>
</div>
)}
</fieldset>
@ -824,13 +820,13 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
let sectionName: string;
switch (category) {
case RuleClass.VectorGlobal:
sectionName = _t("Global");
sectionName = _t("notifications|class_global");
break;
case RuleClass.VectorMentions:
sectionName = _t("Mentions & keywords");
sectionName = _t("notifications|mentions_keywords");
break;
case RuleClass.VectorOther:
sectionName = _t("Other");
sectionName = _t("notifications|class_other");
break;
default:
throw new Error("Developer error: Unnamed notifications section: " + category);
@ -865,7 +861,7 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
return (
<div className="mx_UserNotifSettings_floatingSection">
<div>{_t("Notification targets")}</div>
<div>{_t("settings|notifications|push_targets")}</div>
<table>
<tbody>{rows}</tbody>
</table>
@ -878,7 +874,7 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
// Ends up default centered
return <Spinner />;
} else if (this.state.phase === Phase.Error) {
return <p data-testid="error-message">{_t("There was an error loading your notification settings.")}</p>;
return <p data-testid="error-message">{_t("settings|notifications|error_loading")}</p>;
}
return (

View file

@ -123,8 +123,8 @@ export default class ProfileSettings extends React.Component<{}, IState> {
} catch (err) {
logger.log("Failed to save profile", err);
Modal.createDialog(ErrorDialog, {
title: _t("Failed to save your profile"),
description: err instanceof Error ? err.message : _t("The operation could not be completed"),
title: _t("settings|general|error_saving_profile_title"),
description: err instanceof Error ? err.message : _t("settings|general|error_saving_profile"),
});
}
@ -184,9 +184,9 @@ export default class ProfileSettings extends React.Component<{}, IState> {
/>
<div className="mx_ProfileSettings_profile">
<div className="mx_ProfileSettings_profile_controls">
<SettingsSubsectionHeading heading={_t("Profile")} />
<SettingsSubsectionHeading heading={_t("common|profile")} />
<Field
label={_t("Display Name")}
label={_t("common|display_name")}
type="text"
value={this.state.displayName}
autoComplete="off"
@ -201,7 +201,7 @@ export default class ProfileSettings extends React.Component<{}, IState> {
<AvatarSetting
avatarUrl={avatarUrl}
avatarName={this.state.displayName || this.userId}
avatarAltText={_t("Profile picture")}
avatarAltText={_t("common|user_avatar")}
uploadAvatar={this.uploadAvatar}
removeAvatar={this.removeAvatar}
/>

View file

@ -195,11 +195,9 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
private deleteBackup = (): void => {
Modal.createDialog(QuestionDialog, {
title: _t("Delete Backup"),
description: _t(
"Are you sure? You will lose your encrypted messages if your keys are not backed up properly.",
),
button: _t("Delete Backup"),
title: _t("settings|security|delete_backup"),
description: _t("settings|security|delete_backup_confirm_description"),
button: _t("settings|security|delete_backup"),
danger: true,
onFinished: (proceed) => {
if (!proceed) return;
@ -253,36 +251,30 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
if (error) {
statusDescription = (
<SettingsSubsectionText className="error">
{_t("Unable to load key backup status")}
{_t("settings|security|error_loading_key_backup_status")}
</SettingsSubsectionText>
);
} else if (loading) {
statusDescription = <Spinner />;
} else if (backupInfo) {
let restoreButtonCaption = _t("Restore from Backup");
let restoreButtonCaption = _t("settings|security|restore_key_backup");
if (this.state.activeBackupVersion !== null) {
statusDescription = (
<SettingsSubsectionText> {_t("This session is backing up your keys.")}</SettingsSubsectionText>
<SettingsSubsectionText> {_t("settings|security|key_backup_active")}</SettingsSubsectionText>
);
} else {
statusDescription = (
<>
<SettingsSubsectionText>
{_t(
"This session is <b>not backing up your keys</b>, but you do have an existing backup you can restore from and add to going forward.",
{},
{ b: (sub) => <b>{sub}</b> },
)}
{_t("settings|security|key_backup_inactive", {}, { b: (sub) => <b>{sub}</b> })}
</SettingsSubsectionText>
<SettingsSubsectionText>
{_t(
"Connect this session to key backup before signing out to avoid losing any keys that may only be on this session.",
)}
{_t("settings|security|key_backup_connect_prompt")}
</SettingsSubsectionText>
</>
);
restoreButtonCaption = _t("Connect this session to Key Backup");
restoreButtonCaption = _t("settings|security|key_backup_connect");
}
let uploadStatus: ReactNode;
@ -292,32 +284,33 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
} else if (sessionsRemaining > 0) {
uploadStatus = (
<div>
{_t("Backing up %(sessionsRemaining)s keys…", { sessionsRemaining })} <br />
{_t("settings|security|key_backup_in_progress", { sessionsRemaining })} <br />
</div>
);
} else {
uploadStatus = (
<div>
{_t("All keys backed up")} <br />
{_t("settings|security|key_backup_complete")} <br />
</div>
);
}
let trustedLocally: string | undefined;
if (backupTrustInfo?.matchesDecryptionKey) {
trustedLocally = _t("This backup can be restored on this session");
trustedLocally = _t("settings|security|key_backup_can_be_restored");
}
extraDetailsTableRows = (
<>
<tr>
<th scope="row">{_t("Latest backup version on server:")}</th>
<th scope="row">{_t("settings|security|key_backup_latest_version")}</th>
<td>
{backupInfo.version} ({_t("Algorithm:")} <code>{backupInfo.algorithm}</code>)
{backupInfo.version} ({_t("settings|security|key_backup_algorithm")}{" "}
<code>{backupInfo.algorithm}</code>)
</td>
</tr>
<tr>
<th scope="row">{_t("Active backup version:")}</th>
<th scope="row">{_t("settings|security|key_backup_active_version")}</th>
<td>{this.state.activeBackupVersion === null ? _t("None") : this.state.activeBackupVersion}</td>
</tr>
</>
@ -339,7 +332,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
if (!isSecureBackupRequired(MatrixClientPeg.safeGet())) {
actions.push(
<AccessibleButton key="delete" kind="danger" onClick={this.deleteBackup}>
{_t("Delete Backup")}
{_t("settings|security|delete_backup")}
</AccessibleButton>,
);
}
@ -347,11 +340,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
statusDescription = (
<>
<SettingsSubsectionText>
{_t(
"Your keys are <b>not being backed up from this session</b>.",
{},
{ b: (sub) => <b>{sub}</b> },
)}
{_t("settings|security|key_backup_inactive_warning", {}, { b: (sub) => <b>{sub}</b> })}
</SettingsSubsectionText>
<SettingsSubsectionText>
{_t("Back up your keys before signing out to avoid losing them.")}
@ -377,9 +366,9 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
if (backupKeyCached) {
backupKeyWellFormedText = ", ";
if (backupKeyWellFormed) {
backupKeyWellFormedText += _t("well formed");
backupKeyWellFormedText += _t("settings|security|backup_key_well_formed");
} else {
backupKeyWellFormedText += _t("unexpected type");
backupKeyWellFormedText += _t("settings|security|backup_key_unexpected_type");
}
}
@ -390,25 +379,21 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
return (
<>
<SettingsSubsectionText>
{_t(
"Back up your encryption keys with your account data in case you lose access to your sessions. Your keys will be secured with a unique Security Key.",
)}
</SettingsSubsectionText>
<SettingsSubsectionText>{_t("settings|security|backup_keys_description")}</SettingsSubsectionText>
{statusDescription}
<details>
<summary>{_t("common|Advanced")}</summary>
<summary>{_t("common|advanced")}</summary>
<table className="mx_SecureBackupPanel_statusList">
<tr>
<th scope="row">{_t("Backup key stored:")}</th>
<th scope="row">{_t("settings|security|backup_key_stored_status")}</th>
<td>
{backupKeyStored === true
? _t("settings|security|cross_signing_in_4s")
: _t("not stored")}
: _t("settings|security|cross_signing_not_stored")}
</td>
</tr>
<tr>
<th scope="row">{_t("Backup key cached:")}</th>
<th scope="row">{_t("settings|security|backup_key_cached_status")}</th>
<td>
{backupKeyCached
? _t("settings|security|cross_signing_cached")
@ -417,16 +402,20 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
</td>
</tr>
<tr>
<th scope="row">{_t("Secret storage public key:")}</th>
<th scope="row">{_t("settings|security|4s_public_key_status")}</th>
<td>
{secretStorageKeyInAccount
? _t("in account data")
? _t("settings|security|4s_public_key_in_account_data")
: _t("settings|security|cross_signing_not_found")}
</td>
</tr>
<tr>
<th scope="row">{_t("Secret storage:")}</th>
<td>{secretStorageReady ? _t("ready") : _t("not ready")}</td>
<th scope="row">{_t("settings|security|secret_storage_status")}</th>
<td>
{secretStorageReady
? _t("settings|security|secret_storage_ready")
: _t("settings|security|secret_storage_not_ready")}
</td>
</tr>
{extraDetailsTableRows}
</table>

View file

@ -118,7 +118,7 @@ export function NotificationPusherSettings(): JSX.Element {
</SettingsIndent>
</SettingsSubsection>
{notificationTargets.length > 0 && (
<SettingsSubsection heading={_t("Notification targets")}>
<SettingsSubsection heading={_t("settings|notifications|push_targets")}>
<ul>
{pushers
.filter((it) => it.kind !== "email")

View file

@ -343,8 +343,8 @@ export default function NotificationSettings2(): JSX.Element {
keywords: model!.keywords.filter((it) => it !== keyword),
});
}}
label={_t("Keyword")}
placeholder={_t("New keyword")}
label={_t("notifications|keyword")}
placeholder={_t("notifications|keyword_new")}
/>
</SettingsSubsection>
<NotificationPusherSettings />

View file

@ -155,7 +155,7 @@ export default class AdvancedRoomSettingsTab extends React.Component<IProps, ISt
return (
<SettingsTab>
<SettingsSection heading={_t("common|Advanced")}>
<SettingsSection heading={_t("common|advanced")}>
<SettingsSubsection heading={room.isSpaceRoom() ? _t("Space information") : _t("Room information")}>
<div>
<span>{_t("room_settings|advanced|room_id")}</span>

View file

@ -85,7 +85,7 @@ export default class GeneralRoomSettingsTab extends React.Component<IProps, ISta
return (
<SettingsTab data-testid="General">
<SettingsSection heading={_t("General")}>
<SettingsSection heading={_t("common|general")}>
<RoomProfileSettings roomId={room.roomId} />
</SettingsSection>

View file

@ -277,7 +277,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
className="mx_SettingsTab_showAdvanced"
aria-expanded={this.state.showAdvancedSection}
>
{this.state.showAdvancedSection ? _t("Hide advanced") : _t("Show advanced")}
{this.state.showAdvancedSection ? _t("action|hide_advanced") : _t("action|show_advanced")}
</AccessibleButton>
{this.state.showAdvancedSection && this.renderAdvanced()}
</div>
@ -285,7 +285,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
}
return (
<SettingsFieldset legend={_t("Access")} description={description}>
<SettingsFieldset legend={_t("room_settings|access|title")} description={description}>
<JoinRuleSettings
room={room}
beforeChange={this.onBeforeJoinRuleChange}
@ -411,7 +411,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
value={guestAccess === GuestAccess.CanJoin}
onChange={this.onGuestAccessChange}
disabled={!canSetGuestAccess}
label={_t("Enable guest access")}
label={_t("room_settings|visibility|guest_access_label")}
/>
<p>{_t("room_settings|security|guest_access_warning")}</p>
</div>

View file

@ -99,7 +99,7 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
onClick={() => this.setState({ showAdvanced: !this.state.showAdvanced })}
aria-expanded={this.state.showAdvanced}
>
{this.state.showAdvanced ? _t("Hide advanced") : _t("Show advanced")}
{this.state.showAdvanced ? _t("action|hide_advanced") : _t("action|show_advanced")}
</AccessibleButton>
);

View file

@ -561,7 +561,7 @@ export default class GeneralUserSettingsTab extends React.Component<IProps, ISta
return (
<SettingsTab data-testid="mx_GeneralUserSettingsTab">
<SettingsSection heading={_t("General")}>
<SettingsSection heading={_t("common|general")}>
<ProfileSettings />
{this.renderAccountSection()}
{this.renderLanguageSection()}

View file

@ -322,7 +322,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
</SettingsSubsection>
{this.renderLegal()}
{this.renderCredits()}
<SettingsSubsection heading={_t("common|Advanced")}>
<SettingsSubsection heading={_t("common|advanced")}>
<SettingsSubsectionText>
{_t(
"setting|help_about|homeserver",

View file

@ -152,7 +152,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
</SettingsSubsection>
)}
<SettingsSubsection heading={_t("Spaces")}>
<SettingsSubsection heading={_t("common|spaces")}>
{this.renderGroup(PreferencesUserSettingsTab.SPACES_SETTINGS, SettingLevel.ACCOUNT)}
</SettingsSubsection>
@ -204,7 +204,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
{this.renderGroup(PreferencesUserSettingsTab.ROOM_DIRECTORY_SETTINGS)}
</SettingsSubsection>
<SettingsSubsection heading={_t("General")} stretchContent>
<SettingsSubsection heading={_t("common|general")} stretchContent>
{this.renderGroup(PreferencesUserSettingsTab.GENERAL_SETTINGS)}
<SettingsFlag name="Electron.showTrayIcon" level={SettingLevel.PLATFORM} hideIfCannotSet />

View file

@ -346,7 +346,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
// only show the section if there's something to show
if (ignoreUsersPanel || invitesPanel || e2ePanel) {
advancedSection = (
<SettingsSection heading={_t("common|Advanced")}>
<SettingsSection heading={_t("common|advanced")}>
{ignoreUsersPanel}
{invitesPanel}
{e2ePanel}

View file

@ -93,10 +93,12 @@ const SidebarUserSettingsTab: React.FC = () => {
className="mx_SidebarUserSettingsTab_checkbox mx_SidebarUserSettingsTab_homeAllRoomsCheckbox"
data-testid="mx_SidebarUserSettingsTab_homeAllRoomsCheckbox"
>
<SettingsSubsectionText>{_t("Show all rooms")}</SettingsSubsectionText>
<SettingsSubsectionText>
{_t("settings|sidebar|metaspaces_home_all_rooms")}
</SettingsSubsectionText>
<SettingsSubsectionText>
{_t("settings|sidebar|metaspaces_home_all_rooms_description")}
</SettingsSubsectionText>
</StyledCheckbox>
<StyledCheckbox

View file

@ -200,7 +200,7 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
</SettingsSubsection>
</SettingsSection>
<SettingsSection heading={_t("common|Advanced")}>
<SettingsSection heading={_t("common|advanced")}>
<SettingsSubsection heading={_t("Voice processing")}>
<LabelledToggleSwitch
value={this.state.audioNoiseSuppression}

View file

@ -145,7 +145,7 @@ const SpaceChildrenPicker: React.FC<IProps> = ({
{state === Target.Specific && (
<SpecificChildrenPicker
filterPlaceholder={_t("Search %(spaceName)s", { spaceName: space.name })}
filterPlaceholder={_t("space|search_children", { spaceName: space.name })}
rooms={spaceChildren}
selected={selected}
onChange={(isSelected: boolean, room: Room) => {

View file

@ -193,8 +193,8 @@ export const SpaceCreateForm: React.FC<ISpaceCreateFormProps> = ({
onChange={setAlias}
domain={domain}
value={alias}
placeholder={name ? nameToLocalpart(name) : _t("create_space|name_placeholder")}
label={_t("Address")}
placeholder={name ? nameToLocalpart(name) : _t("create_space|address_placeholder")}
label={_t("create_space|address_label")}
disabled={busy}
onKeyDown={onKeyDown}
/>
@ -284,7 +284,7 @@ const SpaceCreateMenu: React.FC<{
if (visibility === null) {
body = (
<React.Fragment>
<h2>{_t("Create a space")}</h2>
<h2>{_t("create_space|label")}</h2>
<p>{_t("create_space|explainer")}</p>
<SpaceCreateMenuType
@ -322,7 +322,7 @@ const SpaceCreateMenu: React.FC<{
: _t("create_space|private_heading")}
</h2>
<p>
{_t("create_space|add_details_prompt")} {_t("You can change these anytime.")}
{_t("create_space|add_details_prompt")} {_t("create_space|add_details_prompt_2")}
</p>
<SpaceCreateForm
@ -341,7 +341,7 @@ const SpaceCreateMenu: React.FC<{
/>
<AccessibleButton kind="primary" onClick={onSpaceCreateClick} disabled={busy}>
{busy ? _t("Creating…") : _t("action|create")}
{busy ? _t("create_space|creating") : _t("action|create")}
</AccessibleButton>
</React.Fragment>
);

View file

@ -101,7 +101,7 @@ export const HomeButtonContextMenu: React.FC<ComponentProps<typeof SpaceContextM
<IconizedContextMenuOptionList first>
<IconizedContextMenuCheckbox
iconClassName="mx_SpacePanel_noIcon"
label={_t("Show all rooms")}
label={_t("settings|sidebar|metaspaces_home_all_rooms")}
active={allRoomsInHome}
onClick={() => {
onFinished();
@ -245,7 +245,7 @@ const CreateSpaceButton: React.FC<Pick<IInnerSpacePanelProps, "isPanelCollapsed"
className={classNames("mx_SpaceButton_new", {
mx_SpaceButton_newCancel: menuDisplayed,
})}
label={menuDisplayed ? _t("action|cancel") : _t("Create a space")}
label={menuDisplayed ? _t("action|cancel") : _t("create_space|label")}
onClick={onNewClick}
isNarrow={isPanelCollapsed}
innerRef={handle}
@ -297,7 +297,7 @@ const InnerSpacePanel = React.memo<IInnerSpacePanelProps>(
}
element="ul"
role="tree"
aria-label={_t("Spaces")}
aria-label={_t("common|spaces")}
>
{metaSpacesSection}
{invites.map((s) => (

View file

@ -52,7 +52,7 @@ const SpacePublicShare: React.FC<IProps> = ({ space, onFinished }) => {
}
}}
>
{_t("Share invite link")}
{_t("space|invite_link")}
<div>{copiedText}</div>
</AccessibleButton>
{space.canInvite(MatrixClientPeg.safeGet().getSafeUserId()) &&
@ -64,8 +64,8 @@ const SpacePublicShare: React.FC<IProps> = ({ space, onFinished }) => {
showRoomInviteDialog(space.roomId);
}}
>
{_t("Invite people")}
<div>{_t("Invite with email or username")}</div>
{_t("space|invite")}
<div>{_t("space|invite_description")}</div>
</AccessibleButton>
) : null}
</div>

View file

@ -90,15 +90,15 @@ const SpaceSettingsGeneralTab: React.FC<IProps> = ({ matrixClient: cli, space })
const failures = results.filter((r) => r.status === "rejected");
if (failures.length > 0) {
logger.error("Failed to save space settings: ", failures);
setError(_t("Failed to save space settings."));
setError(_t("room_settings|general|error_save_space_settings"));
}
};
return (
<SettingsTab>
<SettingsSection heading={_t("General")}>
<SettingsSection heading={_t("common|general")}>
<div>
<div>{_t("Edit settings relating to your space.")}</div>
<div>{_t("room_settings|general|description_space")}</div>
{error && <div className="mx_SpaceRoomView_errorText">{error}</div>}
@ -122,18 +122,18 @@ const SpaceSettingsGeneralTab: React.FC<IProps> = ({ matrixClient: cli, space })
{_t("action|cancel")}
</AccessibleButton>
<AccessibleButton onClick={onSave} disabled={busy} kind="primary">
{busy ? _t("Saving…") : _t("Save Changes")}
{busy ? _t("common|saving") : _t("room_settings|general|save")}
</AccessibleButton>
</div>
<SettingsSubsection heading={_t("Leave Space")}>
<SettingsSubsection heading={_t("room_settings|general|leave_space")}>
<AccessibleButton
kind="danger"
onClick={() => {
leaveSpace(space);
}}
>
{_t("Leave Space")}
{_t("room_settings|general|leave_space")}
</AccessibleButton>
</SettingsSubsection>
</SettingsSection>

View file

@ -64,7 +64,7 @@ const SpaceSettingsVisibilityTab: React.FC<IProps> = ({ matrixClient: cli, space
},
"",
),
() => setError(_t("Failed to update the guest access of this space")),
() => setError(_t("room_settings|visibility|error_update_guest_access")),
);
const [historyVisibility, setHistoryVisibility] = useLocalEcho<HistoryVisibility>(
() =>
@ -79,7 +79,7 @@ const SpaceSettingsVisibilityTab: React.FC<IProps> = ({ matrixClient: cli, space
},
"",
),
() => setError(_t("Failed to update the history visibility of this space")),
() => setError(_t("room_settings|visibility|error_update_history_visibility")),
);
const [showAdvancedSection, toggleAdvancedSection] = useStateToggle();
@ -100,7 +100,7 @@ const SpaceSettingsVisibilityTab: React.FC<IProps> = ({ matrixClient: cli, space
className="mx_SettingsTab_showAdvanced"
aria-expanded={showAdvancedSection}
>
{showAdvancedSection ? _t("Hide advanced") : _t("Show advanced")}
{showAdvancedSection ? _t("action|hide_advanced") : _t("action|show_advanced")}
</AccessibleButton>
{showAdvancedSection && (
@ -109,12 +109,12 @@ const SpaceSettingsVisibilityTab: React.FC<IProps> = ({ matrixClient: cli, space
value={guestAccessEnabled}
onChange={setGuestAccessEnabled}
disabled={!canSetGuestAccess}
label={_t("Enable guest access")}
label={_t("room_settings|visibility|guest_access_label")}
/>
<p>
{_t("Guests can join a space without having an account.")}
{_t("room_settings|visibility|guest_access_explainer")}
<br />
{_t("This may be useful for public spaces.")}
{_t("room_settings|visibility|guest_access_explainer_public_space")}
</p>
</div>
)}
@ -139,7 +139,7 @@ const SpaceSettingsVisibilityTab: React.FC<IProps> = ({ matrixClient: cli, space
return (
<SettingsTab>
<SettingsSection heading={_t("Visibility")}>
<SettingsSection heading={_t("room_settings|visibility|title")}>
{error && (
<div data-testid="space-settings-error" className="mx_SpaceRoomView_errorText">
{error}
@ -148,12 +148,12 @@ const SpaceSettingsVisibilityTab: React.FC<IProps> = ({ matrixClient: cli, space
<SettingsFieldset
data-testid="access-fieldset"
legend={_t("Access")}
description={_t("Decide who can view and join %(spaceName)s.", { spaceName: space.name })}
legend={_t("room_settings|access|title")}
description={_t("room_settings|access|description_space", { spaceName: space.name })}
>
<JoinRuleSettings
room={space}
onError={(): void => setError(_t("Failed to update the visibility of this space"))}
onError={(): void => setError(_t("room_settings|visibility|error_failed_save"))}
closeSettingsFn={closeSettingsFn}
/>
{advancedSection}
@ -166,12 +166,12 @@ const SpaceSettingsVisibilityTab: React.FC<IProps> = ({ matrixClient: cli, space
);
}}
disabled={!canSetHistoryVisibility}
label={_t("Preview Space")}
label={_t("room_settings|visibility|history_visibility_anyone_space")}
/>
<p>
{_t("Allow people to preview your space before they join.")}
{_t("room_settings|visibility|history_visibility_anyone_space_description")}
<br />
<b>{_t("Recommended for public spaces.")}</b>
<b>{_t("room_settings|visibility|history_visibility_anyone_space_recommendation")}</b>
</p>
</div>
</SettingsFieldset>

View file

@ -95,9 +95,9 @@ export const SpaceButton: React.FC<IButtonProps> = ({
let notifBadge;
if (spaceKey && notificationState) {
let ariaLabel = _t("Jump to first unread room.");
let ariaLabel = _t("a11y_jump_first_unread_room");
if (space?.getMyMembership() === "invite") {
ariaLabel = _t("Jump to first invite.");
ariaLabel = _t("a11y|jump_first_invite");
}
const jumpToNotification = (ev: MouseEvent): void => {
@ -371,7 +371,7 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
className={isInvite ? "mx_SpaceButton_invite" : undefined}
selected={selected}
label={this.state.name}
contextMenuTooltip={_t("Space options")}
contextMenuTooltip={_t("space|context_menu|options")}
notificationState={notificationState}
isNarrow={isPanelCollapsed}
size={isNested ? "24px" : "32px"}

View file

@ -285,7 +285,7 @@ export const Lobby: FC<LobbyProps> = ({ room, joinCallButtonDisabledTooltip, con
disabled={connecting || joinCallButtonDisabledTooltip !== undefined}
onClick={onConnectClick}
label={_t("action|join")}
tooltip={connecting ? _t("Connecting") : joinCallButtonDisabledTooltip}
tooltip={connecting ? _t("voip|connecting") : joinCallButtonDisabledTooltip}
alignment={Alignment.Bottom}
/>
</div>
@ -397,7 +397,7 @@ const JoinCallView: FC<JoinCallViewProps> = ({ room, resizing, call }) => {
facePile = (
<div className="mx_CallView_participants">
{_t("%(count)s people joined", { count: members.length })}
{_t("voip|n_people_joined", { count: members.length })}
<FacePile members={shownMembers} size="24px" overflow={overflow} />
</div>
);

View file

@ -440,10 +440,10 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
const cli = MatrixClientPeg.safeGet();
const callRoomId = LegacyCallHandler.instance.roomIdForCall(call);
const transferTargetRoom = callRoomId ? cli.getRoom(callRoomId) : null;
const transferTargetName = transferTargetRoom ? transferTargetRoom.name : _t("unknown person");
const transferTargetName = transferTargetRoom ? transferTargetRoom.name : _t("voip|unknown_person");
const transfereeCallRoomId = LegacyCallHandler.instance.roomIdForCall(transfereeCall);
const transfereeRoom = transfereeCallRoomId ? cli.getRoom(transfereeCallRoomId) : null;
const transfereeName = transfereeRoom ? transfereeRoom.name : _t("unknown person");
const transfereeName = transfereeRoom ? transfereeRoom.name : _t("voip|unknown_person");
holdTransferContent = (
<div className="mx_LegacyCallView_status">
@ -508,7 +508,7 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
<RoomAvatar room={callRoom} size={avatarSize} />
</div>
</div>
<div className="mx_LegacyCallView_status">{_t("Connecting")}</div>
<div className="mx_LegacyCallView_status">{_t("voip|connecting")}</div>
{secondaryFeedElement}
</div>
);