Align common_* strings with Element X project in Localazy (#11434)

This commit is contained in:
Michael Telatynski 2023-08-22 18:47:33 +01:00 committed by GitHub
parent 1a49a38f04
commit c40141cc4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
132 changed files with 1491 additions and 1247 deletions

View file

@ -1990,7 +1990,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
this.subTitleStatus = "";
if (state === SyncState.Error) {
this.subTitleStatus += `[${_t("Offline")}] `;
this.subTitleStatus += `[${_t("common|offline")}] `;
}
if (numUnreadRooms > 0) {
this.subTitleStatus += `[${numUnreadRooms}]`;

View file

@ -199,7 +199,7 @@ export const RoomSearchView = forwardRef<ScrollPanel, Props>(
if (!results?.results?.length) {
ret.push(
<li key="search-top-marker">
<h2 className="mx_RoomView_topMarker">{_t("No results")}</h2>
<h2 className="mx_RoomView_topMarker">{_t("common|no_results")}</h2>
</li>,
);
} else {

View file

@ -253,7 +253,7 @@ const SpaceLanding: React.FC<{ space: Room }> = ({ space }) => {
onClick={() => {
showSpaceSettings(space);
}}
title={_t("Settings")}
title={_t("common|settings")}
/>
);
}
@ -313,7 +313,7 @@ const SpaceSetupFirstRooms: React.FC<{
key={name}
name={name}
type="text"
label={_t("Room name")}
label={_t("common|room_name")}
placeholder={placeholders[i]}
value={roomNames[i]}
onChange={(ev: React.ChangeEvent<HTMLInputElement>) => setRoomName(i, ev.target.value)}

View file

@ -378,7 +378,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
{homeButton}
<IconizedContextMenuOption
iconClassName="mx_UserMenu_iconSettings"
label={_t("Settings")}
label={_t("common|settings")}
onClick={(e) => this.onSettingsOpen(e)}
/>
{feedbackButton}

View file

@ -234,7 +234,7 @@ export default class SoftLogout extends React.Component<IProps, IState> {
{error}
<Field
type="password"
label={_t("Password")}
label={_t("common|password")}
onChange={this.onPasswordChange}
value={this.state.password}
disabled={this.state.busy}

View file

@ -175,7 +175,7 @@ export class PasswordAuthEntry extends React.Component<IAuthEntryProps, IPasswor
className={passwordBoxClass}
type="password"
name="passwordField"
label={_t("Password")}
label={_t("common|password")}
autoFocus={true}
value={this.state.password}
onChange={this.onPasswordFieldChange}

View file

@ -211,7 +211,7 @@ export default class LoginWithQRFlow extends React.Component<IProps> {
buttons = this.cancelButton();
break;
case Phase.Verifying:
title = _t("Success");
title = _t("common|success");
centreTitle = true;
main = this.simpleSpinner(_t("Completing set up of your new device"));
break;

View file

@ -45,7 +45,7 @@ interface IProps extends Omit<IInputProps, "onValidate" | "element"> {
class PassphraseField extends PureComponent<IProps> {
public static defaultProps = {
label: _td("Password"),
label: _td("common|password"),
labelEnterPassword: _td("Enter password"),
labelStrongPassword: _td("Nice, strong password!"),
labelAllowedButUnsafe: _td("Password is allowed, but unsafe"),

View file

@ -308,8 +308,8 @@ export default class PasswordLogin extends React.PureComponent<IProps, IState> {
autoComplete="username"
key="username_input"
type="text"
label={_t("Username")}
placeholder={_t("Username").toLocaleLowerCase()}
label={_t("common|username")}
placeholder={_t("common|username").toLocaleLowerCase()}
value={this.props.username}
onChange={this.onUsernameChanged}
onBlur={this.onUsernameBlur}
@ -404,7 +404,7 @@ export default class PasswordLogin extends React.PureComponent<IProps, IState> {
disabled={this.props.busy}
>
<option key={LoginField.MatrixId} value={LoginField.MatrixId}>
{_t("Username")}
{_t("common|username")}
</option>
<option key={LoginField.Email} value={LoginField.Email}>
{_t("Email address")}
@ -428,7 +428,7 @@ export default class PasswordLogin extends React.PureComponent<IProps, IState> {
autoComplete="current-password"
type="password"
name="password"
label={_t("Password")}
label={_t("common|password")}
value={this.state.password}
onChange={this.onPasswordChanged}
disabled={this.props.busy}

View file

@ -525,8 +525,8 @@ export default class RegistrationForm extends React.PureComponent<IProps, IState
ref={(field) => (this[RegistrationField.Username] = field)}
type="text"
autoFocus={true}
label={_t("Username")}
placeholder={_t("Username").toLocaleLowerCase()}
label={_t("common|username")}
placeholder={_t("common|username").toLocaleLowerCase()}
value={this.state.username}
onChange={this.onUsernameChange}
onValidate={this.onUsernameValidate}

View file

@ -67,7 +67,7 @@ function tooltipText(variant: Icon): string | undefined {
case Icon.PresenceAway:
return _t("Away");
case Icon.PresenceOffline:
return _t("Offline");
return _t("common|offline");
case Icon.PresenceBusy:
return _t("Busy");
}

View file

@ -186,7 +186,7 @@ const RoomContextMenu: React.FC<IProps> = ({ room, onFinished, ...props }) => {
iconClassName = "mx_RoomTile_iconNotificationsMentionsKeywords";
break;
case RoomNotifState.Mute:
notificationLabel = _t("Mute");
notificationLabel = _t("common|mute");
iconClassName = "mx_RoomTile_iconNotificationsNone";
break;
}
@ -228,7 +228,7 @@ const RoomContextMenu: React.FC<IProps> = ({ room, onFinished, ...props }) => {
onFinished();
PosthogTrackers.trackInteraction("WebRoomHeaderContextMenuPeopleItem", ev);
}}
label={_t("People")}
label={_t("common|people")}
iconClassName="mx_RoomTile_iconPeople"
>
<span className="mx_IconizedContextMenu_sublabel">{room.getJoinedMemberCount()}</span>
@ -390,7 +390,7 @@ const RoomContextMenu: React.FC<IProps> = ({ room, onFinished, ...props }) => {
onFinished();
PosthogTrackers.trackInteraction("WebRoomHeaderContextMenuSettingsItem", ev);
}}
label={_t("Settings")}
label={_t("common|settings")}
iconClassName="mx_RoomTile_iconSettings"
/>

View file

@ -172,7 +172,7 @@ export const RoomGeneralContextMenu: React.FC<RoomGeneralContextMenuProps> = ({
}),
onPostSettingsClick,
)}
label={_t("Settings")}
label={_t("common|settings")}
iconClassName="mx_RoomGeneralContextMenu_iconSettings"
/>
);

View file

@ -90,7 +90,7 @@ const SpaceContextMenu: React.FC<IProps> = ({ space, hideHeader, onFinished, ...
<IconizedContextMenuOption
data-testid="settings-option"
iconClassName="mx_SpacePanel_iconSettings"
label={_t("Settings")}
label={_t("common|settings")}
onClick={onSettingsClick}
/>
);

View file

@ -348,7 +348,9 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
{dms.length > 0 && dmsRenderer ? dmsRenderer(dms, selectedToAdd, dmsScrollState, onChange) : null}
{noResults ? <span className="mx_AddExistingToSpace_noResults">{_t("No results")}</span> : undefined}
{noResults ? (
<span className="mx_AddExistingToSpace_noResults">{_t("common|no_results")}</span>
) : undefined}
</AutoHideScrollbar>
<div className="mx_AddExistingToSpace_footer">{footer}</div>

View file

@ -87,7 +87,7 @@ export default class ConfirmAndWaitRedactDialog extends React.PureComponent<IPro
return (
<ErrorDialog
onFinished={this.props.onFinished}
title={_t("Error")}
title={_t("common|error")}
description={_t("You cannot delete this message. (%(code)s)", { code })}
/>
);

View file

@ -104,7 +104,7 @@ export function createRedactEventDialog({
if (typeof code !== "undefined") {
// display error message stating you couldn't delete this.
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("You cannot delete this message. (%(code)s)", { code }),
});
}

View file

@ -188,7 +188,7 @@ export default class DeactivateAccountDialog extends React.Component<IProps, ISt
error = <div className="error">{this.state.errStr}</div>;
}
let auth = <div>{_t("Loading…")}</div>;
let auth = <div>{_t("common|loading")}</div>;
if (this.state.authData && this.state.authEnabled) {
auth = (
<div>

View file

@ -74,7 +74,7 @@ export default class ErrorDialog extends React.Component<IProps, IState> {
<BaseDialog
className="mx_ErrorDialog"
onFinished={this.props.onFinished}
title={this.props.title || _t("Error")}
title={this.props.title || _t("common|error")}
headerImage={this.props.headerImage}
contentId="mx_Dialog_content"
>

View file

@ -121,7 +121,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
description={
<React.Fragment>
<div className="mx_FeedbackDialog_section mx_FeedbackDialog_reportBug">
<h3>{_t("Report a bug")}</h3>
<h3>{_t("common|report_a_bug")}</h3>
<p>
{_t(
"Please view <existingIssuesLink>existing bugs on Github</existingIssuesLink> first. No match? <newIssueLink>Start a new one</newIssueLink>.",

View file

@ -276,7 +276,7 @@ const ForwardDialog: React.FC<IProps> = ({ matrixClient: cli, event, permalinkCr
return (
<BaseDialog
title={_t("Forward message")}
title={_t("common|forward_message")}
className="mx_ForwardDialog"
contentId="mx_ForwardList"
onFinished={onFinished}
@ -329,7 +329,7 @@ const ForwardDialog: React.FC<IProps> = ({ matrixClient: cli, event, permalinkCr
/>
</div>
) : (
<span className="mx_ForwardList_noResults">{_t("No results")}</span>
<span className="mx_ForwardList_noResults">{_t("common|no_results")}</span>
)}
</AutoHideScrollbar>
</div>

View file

@ -52,7 +52,7 @@ export default class IntegrationsDisabledDialog extends React.Component<IProps>
</p>
</div>
<DialogButtons
primaryButton={_t("Settings")}
primaryButton={_t("common|settings")}
onPrimaryButtonClick={this.onOpenSettingsClick}
cancelButton={_t("OK")}
onCancel={this.onAcknowledgeClick}

View file

@ -990,10 +990,10 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
let showNum = kind === "recents" ? this.state.numRecentsShown : this.state.numSuggestionsShown;
const showMoreFn = kind === "recents" ? this.showMoreRecents.bind(this) : this.showMoreSuggestions.bind(this);
const lastActive = (m: Result): number | undefined => (kind === "recents" ? m.lastActive : undefined);
let sectionName = kind === "recents" ? _t("Recent Conversations") : _t("Suggestions");
let sectionName = kind === "recents" ? _t("Recent Conversations") : _t("common|suggestions");
if (this.props.kind === InviteKind.Invite) {
sectionName = kind === "recents" ? _t("Recently Direct Messaged") : _t("Suggestions");
sectionName = kind === "recents" ? _t("Recently Direct Messaged") : _t("common|suggestions");
}
// Mix in the server results if we have any, but only if we're searching. We track the additional
@ -1038,7 +1038,7 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
return (
<div className="mx_InviteDialog_section">
<h3>{sectionName}</h3>
<p>{_t("No results")}</p>
<p>{_t("common|no_results")}</p>
</div>
);
}

View file

@ -229,7 +229,7 @@ const ManageRestrictedJoinRuleDialog: React.FC<IProps> = ({ room, selected = [],
) : null}
{totalResults < 1 ? (
<span className="mx_ManageRestrictedJoinRuleDialog_noResults">{_t("No results")}</span>
<span className="mx_ManageRestrictedJoinRuleDialog_noResults">{_t("common|no_results")}</span>
) : undefined}
</AutoHideScrollbar>

View file

@ -144,7 +144,7 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
tabs.push(
new Tab(
RoomSettingsTab.People,
_td("People"),
_td("common|people"),
"mx_RoomSettingsDialog_peopleIcon",
<PeopleRoomSettingsTab room={this.state.room} />,
),

View file

@ -55,7 +55,7 @@ const SpacePreferencesAppearanceTab: React.FC<Pick<IProps, "space">> = ({ space
);
}}
>
{_t("People")}
{_t("common|people")}
</StyledCheckbox>
<SettingsSubsectionText>
{_t(

View file

@ -50,7 +50,7 @@ export default class TextInputDialog extends React.Component<IProps, IState> {
title: "",
value: "",
description: "",
busyMessage: _td("Loading…"),
busyMessage: _td("common|loading"),
focus: true,
hasCancel: true,
};

View file

@ -205,7 +205,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
className="mx_UserSettingsDialog"
hasCancel={true}
onFinished={this.props.onFinished}
title={_t("Settings")}
title={_t("common|settings")}
>
<div className="mx_SettingsDialog_content">
<TabbedView

View file

@ -338,7 +338,7 @@ export default class RestoreKeyBackupDialog extends React.PureComponent<IProps,
</div>
);
} else if (this.state.loadError) {
title = _t("Error");
title = _t("common|error");
content = _t("Unable to load backup status");
} else if (this.state.restoreError) {
if (
@ -369,11 +369,11 @@ export default class RestoreKeyBackupDialog extends React.PureComponent<IProps,
);
}
} else {
title = _t("Error");
title = _t("common|error");
content = _t("Unable to restore backup");
}
} else if (this.state.backupInfo === null) {
title = _t("Error");
title = _t("common|error");
content = _t("No backup found!");
} else if (this.state.recoverInfo) {
title = _t("Keys restored");

View file

@ -120,7 +120,7 @@ enum Section {
function filterToLabel(filter: Filter): string {
switch (filter) {
case Filter.People:
return _t("People");
return _t("common|people");
case Filter.PublicRooms:
return _t("Public rooms");
case Filter.PublicSpaces:
@ -751,7 +751,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
role="group"
aria-labelledby="mx_SpotlightDialog_section_suggestions"
>
<h4 id="mx_SpotlightDialog_section_suggestions">{_t("Suggestions")}</h4>
<h4 id="mx_SpotlightDialog_section_suggestions">{_t("common|suggestions")}</h4>
<div>{results[Section.Suggestions].slice(0, SECTION_LIMIT).map(resultMapper)}</div>
</div>
);
@ -807,7 +807,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
aria-labelledby="mx_SpotlightDialog_section_publicRooms"
>
<div className="mx_SpotlightDialog_sectionHeader">
<h4 id="mx_SpotlightDialog_section_publicRooms">{_t("Suggestions")}</h4>
<h4 id="mx_SpotlightDialog_section_publicRooms">{_t("common|suggestions")}</h4>
<div className="mx_SpotlightDialog_options">
<NetworkDropdown protocols={protocols} config={config ?? null} setConfig={setConfig} />
</div>

View file

@ -620,7 +620,7 @@ export default class AppTile extends React.Component<IProps, IState> {
const loadingElement = (
<div className="mx_AppTileBody_fadeInSpinner">
<Spinner message={_t("Loading…")} />
<Spinner message={_t("common|loading")} />
</div>
);

View file

@ -320,7 +320,7 @@ export default class Dropdown extends React.Component<DropdownProps, IState> {
if (!options?.length) {
return [
<li key="0" className="mx_Dropdown_option" role="option" aria-selected={false}>
{_t("No results")}
{_t("common|no_results")}
</li>,
];
}

View file

@ -531,7 +531,7 @@ export default class ImageView extends React.Component<IProps, IState> {
if (this.props.mxEvent?.getContent()) {
title = (
<div className="mx_ImageView_title">
{presentableTextForFile(this.props.mxEvent?.getContent(), _t("Image"), true)}
{presentableTextForFile(this.props.mxEvent?.getContent(), _t("common|image"), true)}
</div>
);
}

View file

@ -36,7 +36,7 @@ export default class InlineSpinner extends React.PureComponent<IProps> {
<div
className="mx_InlineSpinner_icon mx_Spinner_icon"
style={{ width: this.props.w, height: this.props.h }}
aria-label={_t("Loading…")}
aria-label={_t("common|loading")}
>
{this.props.children}
</div>

View file

@ -139,7 +139,7 @@ export const Pill: React.FC<PillProps> = ({ type: propType, url, inMessage, room
});
} else {
avatar = linkIcon;
pillText = _t("Message");
pillText = _t("common|message");
}
}
break;

View file

@ -43,7 +43,7 @@ export default class Spinner extends React.PureComponent<IProps> {
<div
className="mx_Spinner_icon"
style={{ width: w, height: h }}
aria-label={_t("Loading…")}
aria-label={_t("common|loading")}
role="progressbar"
data-testid="spinner"
/>

View file

@ -67,7 +67,7 @@ const EncryptionEvent = forwardRef<HTMLDivElement, IProps>(({ mxEvent, timestamp
return (
<EventTileBubble
className="mx_cryptoEvent mx_cryptoEvent_icon"
title={_t("Encryption enabled")}
title={_t("common|encryption_enabled")}
subtitle={subtitle}
timestamp={timestamp}
/>
@ -78,7 +78,7 @@ const EncryptionEvent = forwardRef<HTMLDivElement, IProps>(({ mxEvent, timestamp
return (
<EventTileBubble
className="mx_cryptoEvent mx_cryptoEvent_icon"
title={_t("Encryption enabled")}
title={_t("common|encryption_enabled")}
subtitle={_t("Ignored attempt to disable encryption")}
timestamp={timestamp}
/>

View file

@ -173,7 +173,7 @@ export default class MFileBody extends React.Component<IProps, IState> {
} catch (err) {
logger.warn("Unable to decrypt attachment: ", err);
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("Error decrypting attachment"),
});
}

View file

@ -395,7 +395,11 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
return null;
}
return <span className="mx_MImageBody_banner">{presentableTextForFile(content, _t("Image"), true, true)}</span>;
return (
<span className="mx_MImageBody_banner">
{presentableTextForFile(content, _t("common|image"), true, true)}
</span>
);
}
protected messageContent(

View file

@ -225,7 +225,7 @@ export default class ReactionsRow extends React.PureComponent<IProps, IState> {
}
return (
<div className="mx_ReactionsRow" role="toolbar" aria-label={_t("Reactions")}>
<div className="mx_ReactionsRow" role="toolbar" aria-label={_t("common|reactions")}>
{items}
{showAllButton}
{addReactionButton}

View file

@ -337,9 +337,9 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose })
return (
<BaseCard header={header} className="mx_RoomSummaryCard" onClose={onClose}>
<Group title={_t("About")} className="mx_RoomSummaryCard_aboutGroup">
<Group title={_t("common|about")} className="mx_RoomSummaryCard_aboutGroup">
<Button className="mx_RoomSummaryCard_icon_people" onClick={onRoomMembersClick}>
{_t("People")}
{_t("common|people")}
<span className="mx_BaseCard_Button_sublabel">{memberCount}</span>
</Button>
{!isVideoRoom && (

View file

@ -344,7 +344,7 @@ const MessageButton = ({ member }: { member: Member }): JSX.Element => {
className="mx_UserInfo_field"
disabled={busy}
>
{_t("Message")}
{_t("common|message")}
</AccessibleButton>
);
};
@ -845,7 +845,7 @@ export const BanToggleButton = ({
function (err) {
logger.error("Ban error: " + err);
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("Failed to ban user"),
});
},
@ -927,7 +927,7 @@ const MuteToggleButton: React.FC<IBaseRoomProps> = ({
function (err) {
logger.error("Mute error: " + err);
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("Failed to mute user"),
});
},
@ -941,7 +941,7 @@ const MuteToggleButton: React.FC<IBaseRoomProps> = ({
mx_UserInfo_destructive: !muted,
});
const muteLabel = muted ? _t("Unmute") : _t("Mute");
const muteLabel = muted ? _t("common|unmute") : _t("common|mute");
return (
<AccessibleButton kind="link" className={classes} onClick={onMuteToggle} disabled={isUpdating}>
{muteLabel}
@ -1159,7 +1159,7 @@ export const PowerLevelEditor: React.FC<{
function (err) {
logger.error("Failed to change power level " + err);
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("Failed to change power level"),
});
},
@ -1516,7 +1516,7 @@ const BasicUserInfo: React.FC<{
const securitySection = (
<div className="mx_UserInfo_container">
<h3>{_t("Security")}</h3>
<h3>{_t("common|security")}</h3>
<p>{text}</p>
{verifyButton}
{cryptoEnabled && (

View file

@ -353,7 +353,7 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
return (
<div className="mx_UserInfo_container">
<h3>{_t("Verification cancelled")}</h3>
<h3>{_t("common|verification_cancelled")}</h3>
<p>{text}</p>
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>

View file

@ -67,7 +67,7 @@ interface LiveContentSummaryWithCallProps {
export const LiveContentSummaryWithCall: FC<LiveContentSummaryWithCallProps> = ({ call }) => (
<LiveContentSummary
type={LiveContentType.Video}
text={_t("Video")}
text={_t("common|video")}
active={false}
participantCount={useParticipantCount(call)}
/>

View file

@ -259,7 +259,7 @@ function showStickersButton(props: IProps): ReactElement | null {
className="mx_MessageComposer_button"
iconClassName="mx_MessageComposer_stickers"
onClick={() => props.setStickerPickerOpen(!props.isStickerPickerOpen)}
title={props.isStickerPickerOpen ? _t("Hide stickers") : _t("Sticker")}
title={props.isStickerPickerOpen ? _t("Hide stickers") : _t("common|sticker")}
/>
) : null;
}

View file

@ -76,7 +76,7 @@ export default class PresenceLabel extends React.Component<IProps> {
} else {
if (presence === "online") return _t("Online");
if (presence === "unavailable") return _t("Idle"); // XXX: is this actually right?
if (presence === "offline") return _t("Offline");
if (presence === "offline") return _t("common|offline");
return _t("Unknown");
}
}

View file

@ -402,7 +402,7 @@ const TAG_AESTHETICS: TagAestheticsMap = {
defaultHidden: false,
},
[DefaultTagID.DM]: {
sectionLabel: _td("People"),
sectionLabel: _td("common|people"),
isInvite: false,
defaultHidden: false,
AuxButtonComponent: DmAuxButton,

View file

@ -333,7 +333,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
break;
}
case MessageCase.Loading: {
title = _t("Loading…");
title = _t("common|loading");
showSpinner = true;
break;
}

View file

@ -32,7 +32,7 @@ export const RoomTileCallSummary: FC<Props> = ({ call }) => {
switch (useConnectionState(call)) {
case ConnectionState.Disconnected:
text = _t("Video");
text = _t("common|video");
active = false;
break;
case ConnectionState.Connecting:

View file

@ -54,7 +54,7 @@ export const AddPrivilegedUsers: React.FC<AddPrivilegedUsersProps> = ({ room, de
// `RoomPowerLevels` event should exist, but technically it is not guaranteed.
if (powerLevelEvent === null) {
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("Failed to change power level"),
});
@ -67,7 +67,7 @@ export const AddPrivilegedUsers: React.FC<AddPrivilegedUsersProps> = ({ room, de
setPowerLevel(defaultUserLevel);
} catch (error) {
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("Failed to change power level"),
});
} finally {

View file

@ -68,7 +68,7 @@ export default class LayoutSwitcher extends React.Component<IProps, IState> {
});
return (
<SettingsSubsection heading={_t("Message layout")}>
<SettingsSubsection heading={_t("common|message_layout")}>
<div className="mx_LayoutSwitcher_RadioButtons">
<label className={ircClasses}>
<EventTilePreview
@ -103,7 +103,7 @@ export default class LayoutSwitcher extends React.Component<IProps, IState> {
checked={this.state.layout == Layout.Group}
onChange={this.onLayoutChange}
>
{_t("Modern")}
{_t("common|modern")}
</StyledRadioButton>
</label>
<label className={bubbleClasses}>

View file

@ -201,7 +201,7 @@ export default class PhoneNumbers extends React.Component<IProps, IState> {
logger.error("Unable to add phone number " + phoneNumber + " " + err);
this.setState({ verifying: false, continueDisabled: false, addTask: null });
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: extractErrorMessageFromError(err, _t("Operation failed")),
});
});

View file

@ -150,7 +150,7 @@ export const PeopleRoomSettingsTab: VFC<{ room: Room }> = ({ room }) => {
return (
<SettingsTab>
<SettingsSection heading={_t("People")}>
<SettingsSection heading={_t("common|people")}>
<SettingsFieldset legend={_t("Asking to join")}>
{knockMembers.length ? (
knockMembers.map((knockMember) => (

View file

@ -94,7 +94,7 @@ export class BannedUser extends React.Component<IBannedUserProps> {
this.context.unban(this.props.member.roomId, this.props.member.userId).catch((err) => {
logger.error("Failed to unban: " + err);
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
title: _t("common|error"),
description: _t("Failed to unban"),
});
});

View file

@ -309,7 +309,7 @@ export default class GeneralUserSettingsTab extends React.Component<IProps, ISta
const description = _t("Your password was successfully changed.");
// TODO: Figure out a design that doesn't involve replacing the current dialog
Modal.createDialog(ErrorDialog, {
title: _t("Success"),
title: _t("common|success"),
description,
});
};

View file

@ -319,7 +319,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
privacySection = (
<SettingsSection heading={_t("Privacy")}>
<SettingsSubsection
heading={_t("Analytics")}
heading={_t("common|analytics")}
description={_t(
"Share anonymous data to help us identify issues. Nothing personal. No third parties.",
)}

View file

@ -120,7 +120,7 @@ const SidebarUserSettingsTab: React.FC = () => {
>
<SettingsSubsectionText>
<MembersIcon />
{_t("People")}
{_t("common|people")}
</SettingsSubsectionText>
<SettingsSubsectionText>{_t("Group all your people in one place.")}</SettingsSubsectionText>
</StyledCheckbox>

View file

@ -107,7 +107,7 @@ const QuickSettingsButton: React.FC<{
onChange={onMetaSpaceChangeFactory(MetaSpace.People, "WebQuickSettingsPinToSidebarCheckbox")}
>
<MembersIcon className="mx_QuickSettingsButton_icon" />
{_t("People")}
{_t("common|people")}
</StyledCheckbox>
<AccessibleButton
className="mx_QuickSettingsButton_moreOptionsButton"
@ -138,7 +138,7 @@ const QuickSettingsButton: React.FC<{
forceHide={!isPanelCollapsed}
aria-expanded={!isPanelCollapsed}
>
{!isPanelCollapsed ? _t("Settings") : null}
{!isPanelCollapsed ? _t("common|settings") : null}
</AccessibleTooltipButton>
{contextMenu}

View file

@ -83,7 +83,7 @@ const SpecificChildrenPicker: React.FC<ISpecificChildrenPickerProps> = ({
);
})}
{filteredRooms.length < 1 ? (
<span className="mx_SpaceChildrenPicker_noResults">{_t("No results")}</span>
<span className="mx_SpaceChildrenPicker_noResults">{_t("common|no_results")}</span>
) : undefined}
</AutoHideScrollbar>
</div>