Migrate more strings to translation keys (#11613)

This commit is contained in:
Michael Telatynski 2023-09-19 17:16:38 +01:00 committed by GitHub
parent d46d4b3d04
commit 5cb8cbd893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
111 changed files with 8214 additions and 6766 deletions

View file

@ -270,7 +270,7 @@ const SpaceLanding: React.FC<{ space: Room }> = ({ space }) => {
<RoomName room={space}>
{(name) => {
const tags = { name: () => <h1>{name}</h1> };
return _t("Welcome to <name/>", {}, tags) as JSX.Element;
return _t("space|landing_welcome", {}, tags) as JSX.Element;
}}
</RoomName>
</div>
@ -351,7 +351,7 @@ const SpaceSetupFirstRooms: React.FC<{
onFinished(roomIds[0] ?? undefined);
} catch (e) {
logger.error("Failed to create initial space rooms", e);
setError(_t("Failed to create initial space rooms"));
setError(_t("create_space|failed_create_initial_rooms"));
}
setBusy(false);
};
@ -360,10 +360,10 @@ const SpaceSetupFirstRooms: React.FC<{
ev.preventDefault();
onFinished();
};
let buttonLabel = _t("Skip for now");
let buttonLabel = _t("create_space|skip_action");
if (roomNames.some((name) => name.trim())) {
onClick = onNextClick;
buttonLabel = busy ? _t("Creating rooms…") : _t("action|continue");
buttonLabel = busy ? _t("create_space|creating_rooms") : _t("action|continue");
}
return (
@ -397,18 +397,14 @@ const SpaceAddExistingRooms: React.FC<{
}> = ({ space, onFinished }) => {
return (
<div>
<h1>{_t("What do you want to organise?")}</h1>
<div className="mx_SpaceRoomView_description">
{_t(
"Pick rooms or conversations to add. This is just a space for you, no one will be informed. You can add more later.",
)}
</div>
<h1>{_t("create_space|add_existing_rooms_heading")}</h1>
<div className="mx_SpaceRoomView_description">{_t("create_space|add_existing_rooms_description")}</div>
<AddExistingToSpace
space={space}
emptySelectionButton={
<AccessibleButton kind="primary" onClick={onFinished}>
{_t("Skip for now")}
{_t("create_space|skip_action")}
</AccessibleButton>
}
filterPlaceholder={_t("Search for rooms")}
@ -433,19 +429,17 @@ const SpaceSetupPublicShare: React.FC<ISpaceSetupPublicShareProps> = ({
return (
<div className="mx_SpaceRoomView_publicShare">
<h1>
{_t("Share %(name)s", {
{_t("create_space|share_heading", {
name: justCreatedOpts?.createOpts?.name || space.name,
})}
</h1>
<div className="mx_SpaceRoomView_description">
{_t("It's just you at the moment, it will be even better with others.")}
</div>
<div className="mx_SpaceRoomView_description">{_t("create_space|share_description")}</div>
<SpacePublicShare space={space} />
<div className="mx_SpaceRoomView_buttons">
<AccessibleButton kind="primary" onClick={onFinished}>
{firstRoomId ? _t("Go to my first room") : _t("Go to my space")}
{firstRoomId ? _t("create_space|done_action_first_room") : _t("create_space|done_action")}
</AccessibleButton>
</div>
</div>
@ -459,9 +453,9 @@ const SpaceSetupPrivateScope: React.FC<{
}> = ({ space, justCreatedOpts, onFinished }) => {
return (
<div className="mx_SpaceRoomView_privateScope">
<h1>{_t("Who are you working with?")}</h1>
<h1>{_t("create_space|private_personal_heading")}</h1>
<div className="mx_SpaceRoomView_description">
{_t("Make sure the right people have access to %(name)s", {
{_t("create_space|private_personal_description", {
name: justCreatedOpts?.createOpts?.name || space.name,
})}
</div>
@ -472,8 +466,8 @@ const SpaceSetupPrivateScope: React.FC<{
onFinished(false);
}}
>
{_t("Just me")}
<div>{_t("A private space to organise your rooms")}</div>
{_t("create_space|personal_space")}
<div>{_t("create_space|personal_space_description")}</div>
</AccessibleButton>
<AccessibleButton
className="mx_SpaceRoomView_privateScope_meAndMyTeammatesButton"
@ -481,8 +475,8 @@ const SpaceSetupPrivateScope: React.FC<{
onFinished(true);
}}
>
{_t("Me and my teammates")}
<div>{_t("A private space for you and your teammates")}</div>
{_t("create_space|private_space")}
<div>{_t("create_space|private_space_description")}</div>
</AccessibleButton>
</div>
);
@ -550,7 +544,7 @@ const SpaceSetupPrivateInvite: React.FC<{
if (failedUsers.length > 0) {
logger.log("Failed to invite users to space: ", result);
setError(
_t("Failed to invite the following users to your space: %(csvUsers)s", {
_t("create_space|failed_invite_users", {
csvUsers: failedUsers.join(", "),
}),
);
@ -568,18 +562,16 @@ const SpaceSetupPrivateInvite: React.FC<{
ev.preventDefault();
onFinished();
};
let buttonLabel = _t("Skip for now");
let buttonLabel = _t("create_space|skip_action");
if (emailAddresses.some((name) => name.trim())) {
onClick = onNextClick;
buttonLabel = busy ? _t("Inviting…") : _t("action|continue");
buttonLabel = busy ? _t("create_space|inviting_users") : _t("action|continue");
}
return (
<div className="mx_SpaceRoomView_inviteTeammates">
<h1>{_t("Invite your teammates")}</h1>
<div className="mx_SpaceRoomView_description">
{_t("Make sure the right people have access. You can invite more later.")}
</div>
<h1>{_t("create_space|invite_teammates_heading")}</h1>
<div className="mx_SpaceRoomView_description">{_t("create_space|invite_teammates_description")}</div>
{error && <div className="mx_SpaceRoomView_errorText">{error}</div>}
<form onSubmit={onClick} id="mx_SpaceSetupPrivateInvite">
@ -591,7 +583,7 @@ const SpaceSetupPrivateInvite: React.FC<{
className="mx_SpaceRoomView_inviteTeammates_inviteDialogButton"
onClick={() => showRoomInviteDialog(space.roomId)}
>
{_t("Invite by username")}
{_t("create_space|invite_teammates_by_username")}
</AccessibleButton>
</div>
@ -701,14 +693,14 @@ export default class SpaceRoomView extends React.PureComponent<IProps, IState> {
return (
<SpaceSetupFirstRooms
space={this.props.space}
title={_t("What are some things you want to discuss in %(spaceName)s?", {
title={_t("create_space|setup_rooms_community_heading", {
spaceName: this.props.justCreatedOpts?.createOpts?.name || this.props.space.name,
})}
description={
<>
{_t("Let's create a room for each of them.")}
{_t("create_space|setup_rooms_community_description")}
<br />
{_t("You can add more later too, including already existing ones.")}
{_t("create_space|setup_rooms_description")}
</>
}
onFinished={(firstRoomId: string) => this.setState({ phase: Phase.PublicShare, firstRoomId })}
@ -745,12 +737,12 @@ export default class SpaceRoomView extends React.PureComponent<IProps, IState> {
return (
<SpaceSetupFirstRooms
space={this.props.space}
title={_t("What projects are your team working on?")}
title={_t("create_space|setup_rooms_private_heading")}
description={
<>
{_t("We'll create rooms for each of them.")}
{_t("create_space|setup_rooms_private_description")}
<br />
{_t("You can add more later too, including already existing ones.")}
{_t("create_space|setup_rooms_description")}
</>
}
onFinished={(firstRoomId: string) => this.setState({ phase: Phase.PrivateInvite, firstRoomId })}

View file

@ -74,13 +74,13 @@ export const ThreadPanelHeader: React.FC<{
const [menuDisplayed, button, openMenu, closeMenu] = useContextMenu<HTMLElement>();
const options: readonly ThreadPanelHeaderOption[] = [
{
label: _t("All threads"),
description: _t("Shows all threads from current room"),
label: _t("threads|all_threads"),
description: _t("threads|all_threads_description"),
key: ThreadFilterType.All,
},
{
label: _t("My threads"),
description: _t("Shows all threads you've participated in"),
label: _t("threads|my_threads"),
description: _t("threads|my_threads_description"),
key: ThreadFilterType.My,
},
];
@ -125,7 +125,7 @@ export const ThreadPanelHeader: React.FC<{
PosthogTrackers.trackInteraction("WebRightPanelThreadPanelFilterDropdown", ev);
}}
>
{`${_t("Show:")} ${value?.label}`}
{`${_t("threads|show_thread_filter")} ${value?.label}`}
</ContextMenuButton>
{contextMenu}
</>
@ -146,17 +146,14 @@ const EmptyThread: React.FC<EmptyThreadIProps> = ({ hasThreads, filterOption, sh
body = (
<>
<p>
{_t(
"Reply to an ongoing thread or use “%(replyInThread)s” when hovering over a message to start a new one.",
{
replyInThread: _t("Reply in thread"),
},
)}
{_t("threads|empty_has_threads_tip", {
replyInThread: _t("Reply in thread"),
})}
</p>
<p>
{/* Always display that paragraph to prevent layout shift when hiding the button */}
{filterOption === ThreadFilterType.My ? (
<button onClick={showAllThreadsCallback}>{_t("Show all threads")}</button>
<button onClick={showAllThreadsCallback}>{_t("threads|show_all_threads")}</button>
) : (
<>&nbsp;</>
)}
@ -166,10 +163,10 @@ const EmptyThread: React.FC<EmptyThreadIProps> = ({ hasThreads, filterOption, sh
} else {
body = (
<>
<p>{_t("Threads help keep your conversations on-topic and easy to track.")}</p>
<p>{_t("threads|empty_explainer")}</p>
<p className="mx_ThreadPanel_empty_tip">
{_t(
"<b>Tip:</b> Use “%(replyInThread)s” when hovering over a message.",
"threads|empty_tip",
{
replyInThread: _t("Reply in thread"),
},
@ -185,7 +182,7 @@ const EmptyThread: React.FC<EmptyThreadIProps> = ({ hasThreads, filterOption, sh
return (
<aside className="mx_ThreadPanel_empty">
<div className="mx_ThreadPanel_largeIcon" />
<h2>{_t("Keep discussions organised with threads")}</h2>
<h2>{_t("threads|empty_heading")}</h2>
{body}
</aside>
);

View file

@ -40,7 +40,7 @@ export const DeveloperToolsOption: React.FC<Props> = ({ onFinished, roomId }) =>
);
onFinished();
}}
label={_t("Developer tools")}
label={_t("devtools|title")}
iconClassName="mx_IconizedContextMenu_developerTools"
/>
);

View file

@ -87,7 +87,9 @@ export const IconizedContextMenuCheckbox: React.FC<ICheckboxProps> = ({
}) => {
let marker: JSX.Element;
if (words) {
marker = <span className="mx_IconizedContextMenu_activeText">{active ? _t("On") : _t("Off")}</span>;
marker = (
<span className="mx_IconizedContextMenu_activeText">{active ? _t("common|on") : _t("common|off")}</span>
);
} else {
marker = (
<span

View file

@ -113,7 +113,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
tabs.push(
new Tab(
UserTab.Keyboard,
_td("Keyboard"),
_td("settings|keyboard|title"),
"mx_UserSettingsDialog_keyboardIcon",
<KeyboardUserSettingsTab />,
"UserSettingsKeyboard",

View file

@ -39,7 +39,7 @@ export const MapError: React.FC<MapErrorProps> = ({ error, isMinimised, classNam
>
<WarningBadge className="mx_MapError_icon" />
<Heading className="mx_MapError_heading" size="3">
{_t("Unable to load map")}
{_t("location_sharing|failed_load_map")}
</Heading>
<p className="mx_MapError_message">{getLocationShareErrorMessage(error)}</p>
{onFinished && (

View file

@ -99,7 +99,7 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
mxEvent={this.props.mxEvent}
mapId={this.mapId}
onError={this.onError}
tooltip={_t("Expand map")}
tooltip={_t("location_sharing|expand_map")}
onClick={this.onClick}
/>
);
@ -108,11 +108,11 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
export const LocationBodyFallbackContent: React.FC<{ event: MatrixEvent; error: Error }> = ({ error, event }) => {
const errorType = error?.message as LocationShareError;
const message = `${_t("Unable to load map")}: ${getLocationShareErrorMessage(errorType)}`;
const message = `${_t("location_sharing|failed_load_map")}: ${getLocationShareErrorMessage(errorType)}`;
const locationFallback = isSelfLocation(event.getContent())
? _t("Shared their location: ") + event.getContent()?.body
: _t("Shared a location: ") + event.getContent()?.body;
? _t("timeline|m.location|self_location") + event.getContent()?.body
: _t("timeline|m.location|location") + event.getContent()?.body;
return (
<div className="mx_EventTile_body mx_MLocationBody">

View file

@ -125,7 +125,7 @@ export default class ReactionsRowButton extends React.PureComponent<IProps, ISta
const reactors = formatCommaSeparatedList(senders, 6);
if (content) {
label = _t("%(reactors)s reacted with %(content)s", {
label = _t("timeline|reactions|label", {
reactors,
content: customReactionName || content,
});

View file

@ -60,7 +60,7 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent<IProp
tooltipLabel = (
<div>
{_t(
"<reactors/><reactedWith>reacted with %(shortName)s</reactedWith>",
"timeline|reactions|tooltip",
{
shortName,
},

View file

@ -38,7 +38,7 @@ const RedactedBody = React.forwardRef<any, IBodyProps>(({ mxEvent }, ref) => {
const fullDate = unsigned.redacted_because
? formatFullDate(new Date(unsigned.redacted_because.origin_server_ts), showTwelveHour)
: undefined;
const titleText = fullDate ? _t("Message deleted on %(date)s", { date: fullDate }) : undefined;
const titleText = fullDate ? _t("timeline|redacted|tooltip", { date: fullDate }) : undefined;
return (
<span className="mx_RedactedBody" ref={ref} title={titleText}>

View file

@ -39,7 +39,7 @@ export default class RoomAvatarEvent extends React.Component<IProps> {
if (!httpUrl) return;
const room = cli.getRoom(this.props.mxEvent.getRoomId());
const text = _t("%(senderDisplayName)s changed the avatar for %(roomName)s", {
const text = _t("timeline|m.room.avatar|lightbox_title", {
senderDisplayName: ev.sender && ev.sender.name ? ev.sender.name : ev.getSender(),
roomName: room ? room.name : "",
});
@ -56,11 +56,7 @@ export default class RoomAvatarEvent extends React.Component<IProps> {
const senderDisplayName = ev.sender && ev.sender.name ? ev.sender.name : ev.getSender();
if (!ev.getContent().url || ev.getContent().url.trim().length === 0) {
return (
<div className="mx_TextualEvent">
{_t("%(senderDisplayName)s removed the room avatar.", { senderDisplayName })}
</div>
);
return <div className="mx_TextualEvent">{_t("timeline|m.room.avatar|removed", { senderDisplayName })}</div>;
}
const room = MatrixClientPeg.safeGet().getRoom(ev.getRoomId());
@ -73,7 +69,7 @@ export default class RoomAvatarEvent extends React.Component<IProps> {
return (
<>
{_t(
"%(senderDisplayName)s changed the room avatar to <img/>",
"timeline|m.room.avatar|changed_img",
{ senderDisplayName: senderDisplayName },
{
img: () => (

View file

@ -98,28 +98,22 @@ export const RoomPredecessorTile: React.FC<IProps> = ({ mxEvent, timestamp }) =>
return (
<EventTileBubble
className="mx_CreateEvent"
title={_t("This room is a continuation of another conversation.")}
title={_t("timeline|m.room.create|continuation")}
timestamp={timestamp}
>
<div className="mx_EventTile_body">
<span className="mx_EventTile_tileError">
{!!guessedLink ? (
<>
{_t(
"Can't find the old version of this room (room ID: %(roomId)s), and we have not been provided with 'via_servers' to look for it. It's possible that guessing the server from the room ID will work. If you want to try, click this link:",
{
roomId: predecessor.roomId,
},
)}
{_t("timeline|m.room.create|unknown_predecessor_guess_server", {
roomId: predecessor.roomId,
})}
<a href={guessedLink}>{guessedLink}</a>
</>
) : (
_t(
"Can't find the old version of this room (room ID: %(roomId)s), and we have not been provided with 'via_servers' to look for it.",
{
roomId: predecessor.roomId,
},
)
_t("timeline|m.room.create|unknown_predecessor", {
roomId: predecessor.roomId,
})
)}
</span>
</div>
@ -136,14 +130,14 @@ export const RoomPredecessorTile: React.FC<IProps> = ({ mxEvent, timestamp }) =>
const link = (
<a href={predecessorPermalink} onClick={onLinkClicked}>
{_t("Click here to see older messages.")}
{_t("timeline|m.room.create|see_older_messages")}
</a>
);
return (
<EventTileBubble
className="mx_CreateEvent"
title={_t("This room is a continuation of another conversation.")}
title={_t("timeline|m.room.create|continuation")}
subtitle={link}
timestamp={timestamp}
/>

View file

@ -46,7 +46,7 @@ interface IState {
}
export default class FontScalingPanel extends React.Component<IProps, IState> {
private readonly MESSAGE_PREVIEW_TEXT = _t("Hey you. You're the best!");
private readonly MESSAGE_PREVIEW_TEXT = _t("common|preview_message");
private unmounted = false;
@ -89,19 +89,19 @@ export default class FontScalingPanel extends React.Component<IProps, IState> {
const max = FontWatcher.MAX_SIZE;
if (isNaN(parsedSize)) {
return { valid: false, feedback: _t("Size must be a number") };
return { valid: false, feedback: _t("settings|appearance|font_size_nan") };
}
if (!(min <= parsedSize && parsedSize <= max)) {
return {
valid: false,
feedback: _t("Custom font size can only be between %(min)s pt and %(max)s pt", { min, max }),
feedback: _t("settings|appearance|font_size_limit", { min, max }),
};
}
SettingsStore.setValue("baseFontSizeV2", null, SettingLevel.DEVICE, parseInt(value!, 10));
return { valid: true, feedback: _t("Use between %(min)s pt and %(max)s pt", { min, max }) };
return { valid: true, feedback: _t("settings|appearance|font_size_valid", { min, max }) };
};
public render(): React.ReactNode {

View file

@ -60,7 +60,7 @@ export default class ImageSizePanel extends React.Component<IProps, IState> {
checked={this.state.size === ImageSize.Normal}
onChange={this.onSizeChange}
>
{_t("Default")}
{_t("settings|appearance|image_size_default")}
</StyledRadioButton>
</label>
<label>
@ -71,7 +71,7 @@ export default class ImageSizePanel extends React.Component<IProps, IState> {
checked={this.state.size === ImageSize.Large}
onChange={this.onSizeChange}
>
{_t("Large")}
{_t("settings|appearance|image_size_large")}
</StyledRadioButton>
</label>
</div>

View file

@ -184,8 +184,8 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
const definitions: IDefinition<JoinRule>[] = [
{
value: JoinRule.Invite,
label: _t("Private (invite only)"),
description: _t("Only invited people can join."),
label: _t("room_settings|security|join_rule_invite"),
description: _t("room_settings|security|join_rule_invite_description"),
checked:
joinRule === JoinRule.Invite || (joinRule === JoinRule.Restricted && !restrictedAllowRoomIds?.length),
},
@ -194,7 +194,7 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
label: _t("common|public"),
description: (
<>
{_t("Anyone can find and join.")}
{_t("room_settings|security|join_rule_public_description")}
{aliasWarning}
</>
),

View file

@ -783,9 +783,9 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
}
const VectorStateToLabel = {
[VectorState.On]: _t("On"),
[VectorState.Off]: _t("Off"),
[VectorState.Loud]: _t("Noisy"),
[VectorState.On]: _t("common|on"),
[VectorState.Off]: _t("common|off"),
[VectorState.Loud]: _t("settings|notifications|noisy"),
};
const makeRadio = (r: IVectorPushRule, s: VectorState): JSX.Element => (

View file

@ -243,7 +243,7 @@ export default class NotificationsSettingsTab extends React.Component<IProps, IS
className: "mx_NotificationSettingsTab_noneEntry",
label: (
<>
{_t("Off")}
{_t("common|off")}
<div className="mx_NotificationSettingsTab_microCopy">
{_t("You won't get any notifications")}
</div>

View file

@ -52,7 +52,7 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
private readonly MESSAGE_PREVIEW_TEXT = _t("Hey you. You're the best!");
private readonly MESSAGE_PREVIEW_TEXT = _t("common|preview_message");
private unmounted = false;

View file

@ -73,7 +73,7 @@ const KeyboardShortcutSection: React.FC<IKeyboardShortcutSectionProps> = ({ cate
const KeyboardUserSettingsTab: React.FC = () => {
return (
<SettingsTab>
<SettingsSection heading={_t("Keyboard")}>
<SettingsSection heading={_t("settings|keyboard|title")}>
{visibleCategories.map(([categoryName, category]) => {
return (
<KeyboardShortcutSection key={categoryName} categoryName={categoryName} category={category} />

View file

@ -275,7 +275,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
description={_t(
"Your personal ban list holds all the users/servers you personally don't want to see messages from. After ignoring your first user/server, a new room will show up in your room list named '%(myBanList)s' - stay in this room to keep the ban list in effect.",
{
myBanList: _t("My Ban List"),
myBanList: _t("labs_mjolnir|room_name"),
},
)}
>

View file

@ -147,7 +147,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
<SettingsTab data-testid="mx_PreferencesUserSettingsTab">
<SettingsSection heading={_t("common|preferences")}>
{roomListSettings.length > 0 && (
<SettingsSubsection heading={_t("Room list")}>
<SettingsSubsection heading={_t("settings|preferences|room_list_heading")}>
{this.renderGroup(roomListSettings)}
</SettingsSubsection>
)}
@ -157,9 +157,9 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
</SettingsSubsection>
<SettingsSubsection
heading={_t("Keyboard shortcuts")}
heading={_t("settings|preferences|keyboard_heading")}
description={_t(
"To view all keyboard shortcuts, <a>click here</a>.",
"settings|preferences|keyboard_view_shortcuts_button",
{},
{
a: (sub) => (
@ -173,26 +173,26 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
{this.renderGroup(PreferencesUserSettingsTab.KEYBINDINGS_SETTINGS)}
</SettingsSubsection>
<SettingsSubsection heading={_t("Displaying time")}>
<SettingsSubsection heading={_t("settings|preferences|time_heading")}>
{this.renderGroup(PreferencesUserSettingsTab.TIME_SETTINGS)}
</SettingsSubsection>
<SettingsSubsection
heading={_t("common|presence")}
description={_t("Share your activity and status with others.")}
description={_t("settings|preferences|presence_description")}
>
{this.renderGroup(PreferencesUserSettingsTab.PRESENCE_SETTINGS)}
</SettingsSubsection>
<SettingsSubsection heading={_t("Composer")}>
<SettingsSubsection heading={_t("settings|preferences|composer_heading")}>
{this.renderGroup(PreferencesUserSettingsTab.COMPOSER_SETTINGS)}
</SettingsSubsection>
<SettingsSubsection heading={_t("Code blocks")}>
<SettingsSubsection heading={_t("settings|preferences|code_blocks_heading")}>
{this.renderGroup(PreferencesUserSettingsTab.CODE_BLOCKS_SETTINGS)}
</SettingsSubsection>
<SettingsSubsection heading={_t("Images, GIFs and videos")}>
<SettingsSubsection heading={_t("settings|preferences|media_heading")}>
{this.renderGroup(PreferencesUserSettingsTab.IMAGES_AND_VIDEOS_SETTINGS)}
</SettingsSubsection>
@ -200,7 +200,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
{this.renderGroup(PreferencesUserSettingsTab.TIMELINE_SETTINGS)}
</SettingsSubsection>
<SettingsSubsection heading={_t("Room directory")}>
<SettingsSubsection heading={_t("settings|preferences|room_directory_heading")}>
{this.renderGroup(PreferencesUserSettingsTab.ROOM_DIRECTORY_SETTINGS)}
</SettingsSubsection>
@ -212,7 +212,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
name="Electron.enableHardwareAcceleration"
level={SettingLevel.PLATFORM}
hideIfCannotSet
label={_t("Enable hardware acceleration (restart %(appName)s to take effect)", {
label={_t("settings|preferences|Electron.enableHardwareAcceleration", {
appName: SdkConfig.get().brand,
})}
/>
@ -221,19 +221,19 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
<SettingsFlag name="Electron.warnBeforeExit" level={SettingLevel.PLATFORM} hideIfCannotSet />
<Field
label={_t("Autocomplete delay (ms)")}
label={_t("settings|preferences|autocomplete_delay")}
type="number"
value={this.state.autocompleteDelay}
onChange={this.onAutocompleteDelayChange}
/>
<Field
label={_t("Read Marker lifetime (ms)")}
label={_t("settings|preferences|rm_lifetime")}
type="number"
value={this.state.readMarkerInViewThresholdMs}
onChange={this.onReadMarkerInViewThresholdMs}
/>
<Field
label={_t("Read Marker off-screen lifetime (ms)")}
label={_t("settings|preferences|rm_lifetime_offscreen")}
type="number"
value={this.state.readMarkerOutOfViewThresholdMs}
onChange={this.onReadMarkerOutOfViewThresholdMs}

View file

@ -208,7 +208,7 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
await MediaDeviceHandler.setAudioNoiseSuppression(v);
this.setState({ audioNoiseSuppression: MediaDeviceHandler.getAudioNoiseSuppression() });
}}
label={_t("Noise suppression")}
label={_t("settings|voip|noise_suppression")}
data-testid="voice-noise-suppression"
/>
<LabelledToggleSwitch
@ -217,7 +217,7 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
await MediaDeviceHandler.setAudioEchoCancellation(v);
this.setState({ audioEchoCancellation: MediaDeviceHandler.getAudioEchoCancellation() });
}}
label={_t("Echo cancellation")}
label={_t("settings|voip|echo_cancellation")}
data-testid="voice-echo-cancellation"
/>
</SettingsSubsection>
@ -229,7 +229,7 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
/>
<SettingsFlag
name="fallbackICEServerAllowed"
label={_t("Allow fallback call assist server (%(server)s)", {
label={_t("settings|voip|enable_fallback_ice_server", {
server: new URL(FALLBACK_ICE_SERVER).pathname,
})}
level={SettingLevel.DEVICE}

View file

@ -84,7 +84,7 @@ const QuickSettingsButton: React.FC<{
}}
kind="danger_outline"
>
{_t("Developer tools")}
{_t("devtools|title")}
</AccessibleButton>
)}

View file

@ -110,7 +110,7 @@ const spaceNameValidator = withValidation({
{
key: "required",
test: async ({ value }) => !!value,
invalid: () => _t("Please enter a name for the space"),
invalid: () => _t("create_space|name_required"),
},
],
});
@ -193,7 +193,7 @@ export const SpaceCreateForm: React.FC<ISpaceCreateFormProps> = ({
onChange={setAlias}
domain={domain}
value={alias}
placeholder={name ? nameToLocalpart(name) : _t("e.g. my-space")}
placeholder={name ? nameToLocalpart(name) : _t("create_space|name_placeholder")}
label={_t("Address")}
disabled={busy}
onKeyDown={onKeyDown}
@ -285,28 +285,24 @@ const SpaceCreateMenu: React.FC<{
body = (
<React.Fragment>
<h2>{_t("Create a space")}</h2>
<p>
{_t(
"Spaces are a new way to group rooms and people. What kind of Space do you want to create? You can change this later.",
)}
</p>
<p>{_t("create_space|explainer")}</p>
<SpaceCreateMenuType
title={_t("common|public")}
description={_t("Open space for anyone, best for communities")}
description={_t("create_space|public_description")}
className="mx_SpaceCreateMenuType_public"
onClick={() => setVisibility(Visibility.Public)}
/>
<SpaceCreateMenuType
title={_t("common|private")}
description={_t("Invite only, best for yourself or teams")}
description={_t("create_space|private_description")}
className="mx_SpaceCreateMenuType_private"
onClick={() => setVisibility(Visibility.Private)}
/>
{supportsSpaceFiltering && (
<AccessibleButton kind="primary_outline" onClick={onSearchClick}>
{_t("Search for public spaces")}
{_t("create_space|search_public_button")}
</AccessibleButton>
)}
</React.Fragment>
@ -320,9 +316,13 @@ const SpaceCreateMenu: React.FC<{
title={_t("action|go_back")}
/>
<h2>{visibility === Visibility.Public ? _t("Your public space") : _t("Your private space")}</h2>
<h2>
{visibility === Visibility.Public
? _t("create_space|public_heading")
: _t("create_space|private_heading")}
</h2>
<p>
{_t("Add some details to help people recognise it.")} {_t("You can change these anytime.")}
{_t("create_space|add_details_prompt")} {_t("You can change these anytime.")}
</p>
<SpaceCreateForm