Create more action_* common strings (#11438)

This commit is contained in:
Michael Telatynski 2023-08-23 11:57:22 +01:00 committed by GitHub
parent e79b03a2df
commit d5cacff6c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
202 changed files with 2046 additions and 2105 deletions

View file

@ -197,10 +197,10 @@ describe("Timeline", () => {
cy.get(".mx_GenericEventListSummary").within(() => { cy.get(".mx_GenericEventListSummary").within(() => {
// Click "expand" link button // Click "expand" link button
cy.findByRole("button", { name: "expand" }).click(); cy.findByRole("button", { name: "Expand" }).click();
// Assert that the "expand" link button worked // Assert that the "expand" link button worked
cy.findByRole("button", { name: "collapse" }).should("exist"); cy.findByRole("button", { name: "Collapse" }).should("exist");
}); });
cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on IRC layout", { percyCSS }); cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on IRC layout", { percyCSS });
@ -224,10 +224,10 @@ describe("Timeline", () => {
cy.get(".mx_GenericEventListSummary").within(() => { cy.get(".mx_GenericEventListSummary").within(() => {
// Click "expand" link button // Click "expand" link button
cy.findByRole("button", { name: "expand" }).click(); cy.findByRole("button", { name: "Expand" }).click();
// Assert that the "expand" link button worked // Assert that the "expand" link button worked
cy.findByRole("button", { name: "collapse" }).should("exist"); cy.findByRole("button", { name: "Collapse" }).should("exist");
}); });
cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on modern layout", { percyCSS }); cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on modern layout", { percyCSS });
@ -247,10 +247,10 @@ describe("Timeline", () => {
cy.get(".mx_GenericEventListSummary").within(() => { cy.get(".mx_GenericEventListSummary").within(() => {
// Click "expand" link button // Click "expand" link button
cy.findByRole("button", { name: "expand" }).click(); cy.findByRole("button", { name: "Expand" }).click();
// Assert that the "expand" link button worked // Assert that the "expand" link button worked
cy.findByRole("button", { name: "collapse" }).should("exist"); cy.findByRole("button", { name: "Collapse" }).should("exist");
}); });
// Make sure spacer is not visible on bubble layout // Make sure spacer is not visible on bubble layout
@ -270,10 +270,10 @@ describe("Timeline", () => {
.realHover() .realHover()
.findByRole("toolbar", { name: "Message Actions" }) .findByRole("toolbar", { name: "Message Actions" })
.should("be.visible"); .should("be.visible");
cy.findByRole("button", { name: "collapse" }).click(); cy.findByRole("button", { name: "Collapse" }).click();
// Assert that "collapse" link button worked // Assert that "collapse" link button worked
cy.findByRole("button", { name: "expand" }).should("exist"); cy.findByRole("button", { name: "Expand" }).should("exist");
}); });
// Save snapshot of collapsed generic event list summary on bubble layout // Save snapshot of collapsed generic event list summary on bubble layout
@ -292,7 +292,7 @@ describe("Timeline", () => {
}); });
// Click "expand" link button // Click "expand" link button
cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "expand" }).click(); cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "Expand" }).click();
// Check the event line has margin instead of inset property // Check the event line has margin instead of inset property
// cf. _EventTile.pcss // cf. _EventTile.pcss
@ -388,7 +388,7 @@ describe("Timeline", () => {
// 2. Alignment of expanded GELS and messages // 2. Alignment of expanded GELS and messages
// Click "expand" link button // Click "expand" link button
cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "expand" }).click(); cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "Expand" }).click();
// Check inline start spacing of info line on expanded GELS // Check inline start spacing of info line on expanded GELS
cy.get(".mx_EventTile[data-layout=irc].mx_EventTile_info:first-of-type .mx_EventTile_line") cy.get(".mx_EventTile[data-layout=irc].mx_EventTile_info:first-of-type .mx_EventTile_line")
// See: _EventTile.pcss // See: _EventTile.pcss

View file

@ -31,6 +31,11 @@ limitations under the License.
} }
} }
.mx_GenericEventListSummary_toggle {
// We reuse a title cased translation
text-transform: lowercase;
}
&[data-layout="irc"], &[data-layout="irc"],
&[data-layout="group"] { &[data-layout="group"] {
.mx_GenericEventListSummary_toggle { .mx_GenericEventListSummary_toggle {

View file

@ -226,7 +226,7 @@ export default class AddThreepid {
[SSOAuthEntry.PHASE_POSTAUTH]: { [SSOAuthEntry.PHASE_POSTAUTH]: {
title: _t("Confirm adding email"), title: _t("Confirm adding email"),
body: _t("Click the button below to confirm adding this email address."), body: _t("Click the button below to confirm adding this email address."),
continueText: _t("Confirm"), continueText: _t("action|confirm"),
continueKind: "primary", continueKind: "primary",
}, },
}; };
@ -329,7 +329,7 @@ export default class AddThreepid {
[SSOAuthEntry.PHASE_POSTAUTH]: { [SSOAuthEntry.PHASE_POSTAUTH]: {
title: _t("Confirm adding phone number"), title: _t("Confirm adding phone number"),
body: _t("Click the button below to confirm adding this phone number."), body: _t("Click the button below to confirm adding this phone number."),
continueText: _t("Confirm"), continueText: _t("action|confirm"),
continueKind: "primary", continueKind: "primary",
}, },
}; };

View file

@ -80,7 +80,7 @@ export default class AsyncWrapper extends React.Component<IProps, IState> {
<BaseDialog onFinished={this.props.onFinished} title={_t("common|error")}> <BaseDialog onFinished={this.props.onFinished} title={_t("common|error")}>
{_t("Unable to load! Check your network connectivity and try again.")} {_t("Unable to load! Check your network connectivity and try again.")}
<DialogButtons <DialogButtons
primaryButton={_t("Dismiss")} primaryButton={_t("action|dismiss")}
onPrimaryButtonClick={this.onWrapperCancelClick} onPrimaryButtonClick={this.onWrapperCancelClick}
hasCancel={false} hasCancel={false}
/> />

View file

@ -151,7 +151,7 @@ export default class IdentityAuthClient {
<p>{_t("Only continue if you trust the owner of the server.")}</p> <p>{_t("Only continue if you trust the owner of the server.")}</p>
</div> </div>
), ),
button: _t("Trust"), button: _t("action|trust"),
}); });
const [confirmed] = await finished; const [confirmed] = await finished;
if (confirmed) { if (confirmed) {

View file

@ -364,7 +364,7 @@ async function onFailedDelegatedAuthLogin(description: string | ReactNode, tryAg
Modal.createDialog(ErrorDialog, { Modal.createDialog(ErrorDialog, {
title: _t("We couldn't log you in"), title: _t("We couldn't log you in"),
description, description,
button: _t("Try again"), button: _t("action|try_again"),
// if we have a tryAgain callback, call it the primary 'try again' button was clicked in the dialog // if we have a tryAgain callback, call it the primary 'try again' button was clicked in the dialog
onFinished: tryAgain ? (shouldTryAgain?: boolean) => shouldTryAgain && tryAgain() : undefined, onFinished: tryAgain ? (shouldTryAgain?: boolean) => shouldTryAgain && tryAgain() : undefined,
}); });

View file

@ -212,7 +212,7 @@ class MatrixClientPegClass implements IMatrixClientPeg {
description: _t( description: _t(
"This may be caused by having the app open in multiple tabs or due to clearing browser data.", "This may be caused by having the app open in multiple tabs or due to clearing browser data.",
), ),
button: _t("Reload"), button: _t("action|reload"),
}); });
const [reload] = await finished; const [reload] = await finished;
if (!reload) return; if (!reload) return;

View file

@ -53,11 +53,11 @@ export async function startAnyRegistrationFlow(
const modal = Modal.createDialog(QuestionDialog, { const modal = Modal.createDialog(QuestionDialog, {
hasCancelButton: true, hasCancelButton: true,
quitOnly: true, quitOnly: true,
title: SettingsStore.getValue(UIFeature.Registration) ? _t("Sign In or Create Account") : _t("Sign In"), title: SettingsStore.getValue(UIFeature.Registration) ? _t("Sign In or Create Account") : _t("action|sign_in"),
description: SettingsStore.getValue(UIFeature.Registration) description: SettingsStore.getValue(UIFeature.Registration)
? _t("Use your account or create a new one to continue.") ? _t("Use your account or create a new one to continue.")
: _t("Use your account to continue."), : _t("Use your account to continue."),
button: _t("Sign In"), button: _t("action|sign_in"),
extraButtons: SettingsStore.getValue(UIFeature.Registration) extraButtons: SettingsStore.getValue(UIFeature.Registration)
? [ ? [
<button <button

View file

@ -75,8 +75,8 @@ async function confirmToDismiss(): Promise<boolean> {
title: _t("Cancel entering passphrase?"), title: _t("Cancel entering passphrase?"),
description: _t("Are you sure you want to cancel entering passphrase?"), description: _t("Are you sure you want to cancel entering passphrase?"),
danger: false, danger: false,
button: _t("Go Back"), button: _t("action|go_back"),
cancelButton: _t("Cancel"), cancelButton: _t("action|cancel"),
}).finished; }).finished;
return !sure; return !sure;
} }

View file

@ -309,7 +309,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
[SSOAuthEntry.PHASE_POSTAUTH]: { [SSOAuthEntry.PHASE_POSTAUTH]: {
title: _t("Confirm encryption setup"), title: _t("Confirm encryption setup"),
body: _t("Click the button below to confirm setting up encryption."), body: _t("Click the button below to confirm setting up encryption."),
continueText: _t("Confirm"), continueText: _t("action|confirm"),
continueKind: "primary", continueKind: "primary",
}, },
}; };
@ -621,7 +621,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
primaryDisabled={!!this.state.canUploadKeysWithPasswordOnly && !this.state.accountPassword} primaryDisabled={!!this.state.canUploadKeysWithPasswordOnly && !this.state.accountPassword}
> >
<button type="button" className="danger" onClick={this.onCancelClick}> <button type="button" className="danger" onClick={this.onCancelClick}>
{_t("Skip")} {_t("action|skip")}
</button> </button>
</DialogButtons> </DialogButtons>
</form> </form>
@ -660,7 +660,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
disabled={!this.state.passPhraseValid} disabled={!this.state.passPhraseValid}
> >
<button type="button" onClick={this.onCancelClick} className="danger"> <button type="button" onClick={this.onCancelClick} className="danger">
{_t("Cancel")} {_t("action|cancel")}
</button> </button>
</DialogButtons> </DialogButtons>
</form> </form>
@ -718,7 +718,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
disabled={this.state.passPhrase !== this.state.passPhraseConfirm} disabled={this.state.passPhrase !== this.state.passPhraseConfirm}
> >
<button type="button" onClick={this.onCancelClick} className="danger"> <button type="button" onClick={this.onCancelClick} className="danger">
{_t("Skip")} {_t("action|skip")}
</button> </button>
</DialogButtons> </DialogButtons>
</form> </form>
@ -763,7 +763,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
onClick={this.onDownloadClick} onClick={this.onDownloadClick}
disabled={this.state.phase === Phase.Storing} disabled={this.state.phase === Phase.Storing}
> >
{_t("Download")} {_t("action|download")}
</AccessibleButton> </AccessibleButton>
<span> <span>
{_t("%(downloadButton)s or %(copyButton)s", { {_t("%(downloadButton)s or %(copyButton)s", {
@ -832,12 +832,12 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
</p> </p>
<p>{_t("You can also set up Secure Backup & manage your keys in Settings.")}</p> <p>{_t("You can also set up Secure Backup & manage your keys in Settings.")}</p>
<DialogButtons <DialogButtons
primaryButton={_t("Go back")} primaryButton={_t("action|go_back")}
onPrimaryButtonClick={this.onGoBackClick} onPrimaryButtonClick={this.onGoBackClick}
hasCancel={false} hasCancel={false}
> >
<button type="button" className="danger" onClick={this.onCancel}> <button type="button" className="danger" onClick={this.onCancel}>
{_t("Cancel")} {_t("action|cancel")}
</button> </button>
</DialogButtons> </DialogButtons>
</div> </div>

View file

@ -220,7 +220,7 @@ export default class ExportE2eKeysDialog extends React.Component<IProps, IState>
disabled={disableForm} disabled={disableForm}
/> />
<button onClick={this.onCancelClick} disabled={disableForm}> <button onClick={this.onCancelClick} disabled={disableForm}>
{_t("Cancel")} {_t("action|cancel")}
</button> </button>
</div> </div>
</form> </form>

View file

@ -191,7 +191,7 @@ export default class ImportE2eKeysDialog extends React.Component<IProps, IState>
disabled={!this.state.enableSubmit || disableForm} disabled={!this.state.enableSubmit || disableForm}
/> />
<button onClick={this.onCancelClick} disabled={disableForm}> <button onClick={this.onCancelClick} disabled={disableForm}>
{_t("Cancel")} {_t("action|cancel")}
</button> </button>
</div> </div>
</form> </form>

View file

@ -1597,7 +1597,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
</div> </div>
), ),
button: _t("Review terms and conditions"), button: _t("Review terms and conditions"),
cancelButton: _t("Dismiss"), cancelButton: _t("action|dismiss"),
onFinished: (confirmed) => { onFinished: (confirmed) => {
if (confirmed) { if (confirmed) {
const wnd = window.open(consentUri, "_blank")!; const wnd = window.open(consentUri, "_blank")!;
@ -2098,7 +2098,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
<Spinner /> <Spinner />
<div className="mx_MatrixChat_splashButtons"> <div className="mx_MatrixChat_splashButtons">
<AccessibleButton kind="link_inline" onClick={this.onLogoutClick}> <AccessibleButton kind="link_inline" onClick={this.onLogoutClick}>
{_t("Logout")} {_t("action|logout")}
</AccessibleButton> </AccessibleButton>
</div> </div>
</div> </div>

View file

@ -72,7 +72,9 @@ export default class RoomSearch extends React.PureComponent<IProps> {
return ( return (
<AccessibleButton onClick={this.openSpotlight} className={classes}> <AccessibleButton onClick={this.openSpotlight} className={classes}>
{icon} {icon}
{!this.props.isMinimized && <div className="mx_RoomSearch_spotlightTriggerText">{_t("Search")}</div>} {!this.props.isMinimized && (
<div className="mx_RoomSearch_spotlightTriggerText">{_t("action|search")}</div>
)}
{shortcutPrompt} {shortcutPrompt}
</AccessibleButton> </AccessibleButton>
); );

View file

@ -163,13 +163,13 @@ const Tile: React.FC<ITileProps> = ({
onFocus={onFocus} onFocus={onFocus}
tabIndex={isActive ? 0 : -1} tabIndex={isActive ? 0 : -1}
> >
{_t("View")} {_t("action|view")}
</AccessibleButton> </AccessibleButton>
); );
} else { } else {
button = ( button = (
<AccessibleButton onClick={onJoinClick} kind="primary" onFocus={onFocus} tabIndex={isActive ? 0 : -1}> <AccessibleButton onClick={onJoinClick} kind="primary" onFocus={onFocus} tabIndex={isActive ? 0 : -1}>
{_t("Join")} {_t("action|join")}
</AccessibleButton> </AccessibleButton>
); );
} }

View file

@ -200,9 +200,9 @@ const SpaceLandingAddButton: React.FC<{ space: Room }> = ({ space }) => {
inputRef={handle} inputRef={handle}
onClick={openMenu} onClick={openMenu}
isExpanded={menuDisplayed} isExpanded={menuDisplayed}
label={_t("Add")} label={_t("action|add")}
> >
{_t("Add")} {_t("action|add")}
</ContextMenuButton> </ContextMenuButton>
{contextMenu} {contextMenu}
</> </>

View file

@ -366,7 +366,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
<IconizedContextMenuOption <IconizedContextMenuOption
className="mx_IconizedContextMenu_option_red" className="mx_IconizedContextMenu_option_red"
iconClassName="mx_UserMenu_iconSignOut" iconClassName="mx_UserMenu_iconSignOut"
label={_t("Sign out")} label={_t("action|sign_out")}
onClick={this.onSignOutClick} onClick={this.onSignOutClick}
/> />
</IconizedContextMenuOptionList> </IconizedContextMenuOptionList>

View file

@ -564,7 +564,7 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
<AuthHeader disableLanguageSelector={this.props.isSyncing || this.state.busyLoggingIn} /> <AuthHeader disableLanguageSelector={this.props.isSyncing || this.state.busyLoggingIn} />
<AuthBody> <AuthBody>
<h1> <h1>
{_t("Sign in")} {_t("action|sign_in")}
{loader} {loader}
</h1> </h1>
{errorTextSection} {errorTextSection}

View file

@ -609,7 +609,7 @@ export default class Registration extends React.Component<IProps, IState> {
if (this.state.doingUIAuth) { if (this.state.doingUIAuth) {
goBack = ( goBack = (
<AccessibleButton kind="link" className="mx_AuthBody_changeFlow" onClick={this.onGoToFormClicked}> <AccessibleButton kind="link" className="mx_AuthBody_changeFlow" onClick={this.onGoToFormClicked}>
{_t("Go back")} {_t("action|go_back")}
</AccessibleButton> </AccessibleButton>
); );
} }

View file

@ -262,7 +262,7 @@ export default class SetupEncryptionBody extends React.Component<IProps, IState>
{_t("I'll verify later")} {_t("I'll verify later")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton kind="primary" onClick={this.onSkipBackClick}> <AccessibleButton kind="primary" onClick={this.onSkipBackClick}>
{_t("Go Back")} {_t("action|go_back")}
</AccessibleButton> </AccessibleButton>
</div> </div>
</div> </div>
@ -286,7 +286,7 @@ export default class SetupEncryptionBody extends React.Component<IProps, IState>
{_t("Proceed with reset")} {_t("Proceed with reset")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton kind="primary" onClick={this.onResetBackClick}> <AccessibleButton kind="primary" onClick={this.onResetBackClick}>
{_t("Go Back")} {_t("action|go_back")}
</AccessibleButton> </AccessibleButton>
</div> </div>
</div> </div>

View file

@ -245,7 +245,7 @@ export default class SoftLogout extends React.Component<IProps, IState> {
type="submit" type="submit"
disabled={this.state.busy} disabled={this.state.busy}
> >
{_t("Sign In")} {_t("action|sign_in")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton onClick={this.onForgotPassword} kind="link"> <AccessibleButton onClick={this.onForgotPassword} kind="link">
{_t("Forgotten your password?")} {_t("Forgotten your password?")}
@ -340,7 +340,7 @@ export default class SoftLogout extends React.Component<IProps, IState> {
<AuthBody> <AuthBody>
<h1>{_t("You're signed out")}</h1> <h1>{_t("You're signed out")}</h1>
<h2>{_t("Sign in")}</h2> <h2>{_t("action|sign_in")}</h2>
<div>{this.renderSignInSection()}</div> <div>{this.renderSignInSection()}</div>
<h2>{_t("Clear personal data")}</h2> <h2>{_t("Clear personal data")}</h2>

View file

@ -76,7 +76,7 @@ export const CheckEmail: React.FC<CheckEmailProps> = ({
aria-describedby={tooltipVisible ? tooltipId : undefined} aria-describedby={tooltipVisible ? tooltipId : undefined}
> >
<RetryIcon className="mx_Icon mx_Icon_16" /> <RetryIcon className="mx_Icon mx_Icon_16" />
{_t("Resend")} {_t("action|resend")}
<Tooltip <Tooltip
id={tooltipId} id={tooltipId}
label={_t("Verification link email resent!")} label={_t("Verification link email resent!")}

View file

@ -73,7 +73,7 @@ export const VerifyEmailModal: React.FC<Props> = ({
aria-describedby={tooltipVisible ? tooltipId : undefined} aria-describedby={tooltipVisible ? tooltipId : undefined}
> >
<RetryIcon className="mx_Icon mx_Icon_16" /> <RetryIcon className="mx_Icon mx_Icon_16" />
{_t("Resend")} {_t("action|resend")}
<Tooltip <Tooltip
id={tooltipId} id={tooltipId}
label={_t("Verification link email resent!")} label={_t("Verification link email resent!")}

View file

@ -396,7 +396,7 @@ export class TermsAuthEntry extends React.Component<ITermsAuthEntryProps, ITerms
onClick={this.trySubmit} onClick={this.trySubmit}
disabled={!allChecked} disabled={!allChecked}
> >
{_t("Accept")} {_t("action|accept")}
</AccessibleButton> </AccessibleButton>
); );
} }
@ -508,7 +508,7 @@ export class EmailIdentityAuthEntry extends React.Component<
a: (text: string) => ( a: (text: string) => (
<AccessibleTooltipButton <AccessibleTooltipButton
kind="link_inline" kind="link_inline"
title={this.state.requested ? _t("Resent!") : _t("Resend")} title={this.state.requested ? _t("Resent!") : _t("action|resend")}
alignment={Alignment.Right} alignment={Alignment.Right}
onHideTooltip={ onHideTooltip={
this.state.requested this.state.requested
@ -868,7 +868,7 @@ export class SSOAuthEntry extends React.Component<ISSOAuthEntryProps, ISSOAuthEn
onClick={this.props.onCancel ?? null} onClick={this.props.onCancel ?? null}
kind={this.props.continueKind ? this.props.continueKind + "_outline" : "primary_outline"} kind={this.props.continueKind ? this.props.continueKind + "_outline" : "primary_outline"}
> >
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
); );
if (this.state.phase === SSOAuthEntry.PHASE_PREAUTH) { if (this.state.phase === SSOAuthEntry.PHASE_PREAUTH) {
@ -880,7 +880,7 @@ export class SSOAuthEntry extends React.Component<ISSOAuthEntryProps, ISSOAuthEn
} else { } else {
continueButton = ( continueButton = (
<AccessibleButton onClick={this.onConfirmClick} kind={this.props.continueKind || "primary"}> <AccessibleButton onClick={this.onConfirmClick} kind={this.props.continueKind || "primary"}>
{this.props.continueText || _t("Confirm")} {this.props.continueText || _t("action|confirm")}
</AccessibleButton> </AccessibleButton>
); );
} }

View file

@ -54,7 +54,7 @@ export default class LoginWithQRFlow extends React.Component<IProps> {
private cancelButton = (): JSX.Element => ( private cancelButton = (): JSX.Element => (
<AccessibleButton data-testid="cancel-button" kind="primary_outline" onClick={this.handleClick(Click.Cancel)}> <AccessibleButton data-testid="cancel-button" kind="primary_outline" onClick={this.handleClick(Click.Cancel)}>
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
); );
@ -124,7 +124,7 @@ export default class LoginWithQRFlow extends React.Component<IProps> {
kind="primary" kind="primary"
onClick={this.handleClick(Click.TryAgain)} onClick={this.handleClick(Click.TryAgain)}
> >
{_t("Try again")} {_t("action|try_again")}
</AccessibleButton> </AccessibleButton>
{this.cancelButton()} {this.cancelButton()}
</> </>
@ -156,7 +156,7 @@ export default class LoginWithQRFlow extends React.Component<IProps> {
kind="primary_outline" kind="primary_outline"
onClick={this.handleClick(Click.Decline)} onClick={this.handleClick(Click.Decline)}
> >
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton <AccessibleButton
data-testid="approve-login-button" data-testid="approve-login-button"

View file

@ -441,7 +441,7 @@ export default class PasswordLogin extends React.PureComponent<IProps, IState> {
<input <input
className="mx_Login_submit" className="mx_Login_submit"
type="submit" type="submit"
value={_t("Sign in")} value={_t("action|sign_in")}
disabled={this.props.disableSubmit} disabled={this.props.disableSubmit}
/> />
)} )}

View file

@ -166,7 +166,7 @@ const BeaconViewDialog: React.FC<IProps> = ({ initialFocusedBeacon, roomId, matr
onClick={onFinished} onClick={onFinished}
data-testid="beacon-view-dialog-fallback-close" data-testid="beacon-view-dialog-fallback-close"
> >
{_t("Close")} {_t("action|close")}
</AccessibleButton> </AccessibleButton>
</MapFallback> </MapFallback>
)} )}

View file

@ -65,7 +65,7 @@ const OwnBeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({ beacon,
className="mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton" className="mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton"
disabled={stoppingInProgress} disabled={stoppingInProgress}
> >
{_t("Stop")} {_t("action|stop")}
</AccessibleButton> </AccessibleButton>
)} )}
{hasLocationPublishError && ( {hasLocationPublishError && (

View file

@ -77,7 +77,7 @@ const RoomCallBannerInner: React.FC<RoomCallBannerProps> = ({ roomId, call }) =>
</div> </div>
<AccessibleButton onClick={connect} kind="primary" element="button" disabled={false}> <AccessibleButton onClick={connect} kind="primary" element="button" disabled={false}>
{_t("Join")} {_t("action|join")}
</AccessibleButton> </AccessibleButton>
</div> </div>
); );

View file

@ -111,7 +111,7 @@ const RoomLiveShareWarningInner: React.FC<RoomLiveShareWarningInnerProps> = ({ l
element="button" element="button"
disabled={stoppingInProgress} disabled={stoppingInProgress}
> >
{hasError ? _t("action|retry") : _t("Stop")} {hasError ? _t("action|retry") : _t("action|stop")}
</AccessibleButton> </AccessibleButton>
{hasLocationPublishError && ( {hasLocationPublishError && (
<AccessibleButton <AccessibleButton

View file

@ -467,7 +467,7 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
pinButton = ( pinButton = (
<IconizedContextMenuOption <IconizedContextMenuOption
iconClassName="mx_MessageContextMenu_iconPin" iconClassName="mx_MessageContextMenu_iconPin"
label={this.isPinned() ? _t("Unpin") : _t("Pin")} label={this.isPinned() ? _t("action|unpin") : _t("action|pin")}
onClick={this.onPinClick} onClick={this.onPinClick}
/> />
); );
@ -499,7 +499,7 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
<IconizedContextMenuOption <IconizedContextMenuOption
iconClassName="mx_MessageContextMenu_iconPermalink" iconClassName="mx_MessageContextMenu_iconPermalink"
onClick={this.onShareClick} onClick={this.onShareClick}
label={_t("Share")} label={_t("action|share")}
element="a" element="a"
{ {
// XXX: Typescript signature for AccessibleButton doesn't work properly for non-inputs like `a` // XXX: Typescript signature for AccessibleButton doesn't work properly for non-inputs like `a`

View file

@ -173,7 +173,7 @@ const SpaceContextMenu: React.FC<IProps> = ({ space, hideHeader, onFinished, ...
newRoomSection = ( newRoomSection = (
<> <>
<div data-testid="add-to-space-header" className="mx_SpacePanel_contextMenu_separatorLabel"> <div data-testid="add-to-space-header" className="mx_SpacePanel_contextMenu_separatorLabel">
{_t("Add")} {_t("action|add")}
</div> </div>
{canAddRooms && ( {canAddRooms && (
<IconizedContextMenuOption <IconizedContextMenuOption

View file

@ -242,7 +242,7 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
<span className="mx_AddExistingToSpaceDialog_error"> <span className="mx_AddExistingToSpaceDialog_error">
<div className="mx_AddExistingToSpaceDialog_errorHeading">{_t("Not all selected were added")}</div> <div className="mx_AddExistingToSpaceDialog_errorHeading">{_t("Not all selected were added")}</div>
<div className="mx_AddExistingToSpaceDialog_errorCaption">{_t("Try again")}</div> <div className="mx_AddExistingToSpaceDialog_errorCaption">{_t("action|try_again")}</div>
</span> </span>
<AccessibleButton className="mx_AddExistingToSpaceDialog_retryButton" onClick={addRooms}> <AccessibleButton className="mx_AddExistingToSpaceDialog_retryButton" onClick={addRooms}>
@ -267,7 +267,7 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
if (!button || selectedToAdd.size > 0) { if (!button || selectedToAdd.size > 0) {
button = ( button = (
<AccessibleButton kind="primary" disabled={selectedToAdd.size < 1} onClick={addRooms}> <AccessibleButton kind="primary" disabled={selectedToAdd.size < 1} onClick={addRooms}>
{_t("Add")} {_t("action|add")}
</AccessibleButton> </AccessibleButton>
); );
} }

View file

@ -87,7 +87,7 @@ export default function AskInviteAnywayDialog({
</div> </div>
<div className="mx_Dialog_buttons"> <div className="mx_Dialog_buttons">
<button onClick={onGiveUpClicked}>{_t("Close")}</button> <button onClick={onGiveUpClicked}>{_t("action|close")}</button>
<button onClick={onInviteNeverWarnClicked}> <button onClick={onInviteNeverWarnClicked}>
{inviteNeverWarnLabel ?? _t("Invite anyway and never warn me again")} {inviteNeverWarnLabel ?? _t("Invite anyway and never warn me again")}
</button> </button>

View file

@ -119,7 +119,7 @@ export default class ChangelogDialog extends React.Component<IProps, State> {
<QuestionDialog <QuestionDialog
title={_t("Changelog")} title={_t("Changelog")}
description={content} description={content}
button={_t("Update")} button={_t("action|update")}
onFinished={this.props.onFinished} onFinished={this.props.onFinished}
/> />
); );

View file

@ -52,7 +52,7 @@ export default class ConfirmWipeDeviceDialog extends React.Component<IProps> {
primaryButton={_t("Clear all data")} primaryButton={_t("Clear all data")}
onPrimaryButtonClick={this.onConfirm} onPrimaryButtonClick={this.onConfirm}
primaryButtonClass="danger" primaryButtonClass="danger"
cancelButton={_t("Cancel")} cancelButton={_t("action|cancel")}
onCancel={this.onDecline} onCancel={this.onDecline}
/> />
</BaseDialog> </BaseDialog>

View file

@ -188,10 +188,10 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
</div> </div>
<AccessibleButton kind="primary_outline" disabled={busy} onClick={() => onFinished(false)}> <AccessibleButton kind="primary_outline" disabled={busy} onClick={() => onFinished(false)}>
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton kind="primary" disabled={busy} onClick={onCreateSubspaceClick}> <AccessibleButton kind="primary" disabled={busy} onClick={onCreateSubspaceClick}>
{busy ? _t("Adding…") : _t("Add")} {busy ? _t("Adding…") : _t("action|add")}
</AccessibleButton> </AccessibleButton>
</div> </div>
</MatrixClientContext.Provider> </MatrixClientContext.Provider>

View file

@ -34,12 +34,12 @@ const CryptoStoreTooNewDialog: React.FC<IProps> = (props: IProps) => {
const _onLogoutClicked = (): void => { const _onLogoutClicked = (): void => {
Modal.createDialog(QuestionDialog, { Modal.createDialog(QuestionDialog, {
title: _t("Sign out"), title: _t("action|sign_out"),
description: _t( description: _t(
"To avoid losing your chat history, you must export your room keys before logging out. You will need to go back to the newer version of %(brand)s to do this", "To avoid losing your chat history, you must export your room keys before logging out. You will need to go back to the newer version of %(brand)s to do this",
{ brand }, { brand },
), ),
button: _t("Sign out"), button: _t("action|sign_out"),
focus: false, focus: false,
onFinished: (doLogout) => { onFinished: (doLogout) => {
if (doLogout) { if (doLogout) {
@ -71,7 +71,7 @@ const CryptoStoreTooNewDialog: React.FC<IProps> = (props: IProps) => {
hasCancel={false} hasCancel={false}
onPrimaryButtonClick={() => props.onFinished(false)} onPrimaryButtonClick={() => props.onFinished(false)}
> >
<button onClick={_onLogoutClicked}>{_t("Sign out")}</button> <button onClick={_onLogoutClicked}>{_t("action|sign_out")}</button>
</DialogButtons> </DialogButtons>
</BaseDialog> </BaseDialog>
); );

View file

@ -312,7 +312,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
> >
<p>{_t("Are you sure you want to stop exporting your data? If you do, you'll need to start over.")}</p> <p>{_t("Are you sure you want to stop exporting your data? If you do, you'll need to start over.")}</p>
<DialogButtons <DialogButtons
primaryButton={_t("Stop")} primaryButton={_t("action|stop")}
primaryButtonClass="danger" primaryButtonClass="danger"
hasCancel={true} hasCancel={true}
cancelButton={_t("action|continue")} cancelButton={_t("action|continue")}
@ -402,7 +402,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
<Spinner w={24} h={24} /> <Spinner w={24} h={24} />
<p>{exportProgressText}</p> <p>{exportProgressText}</p>
<DialogButtons <DialogButtons
primaryButton={_t("Cancel")} primaryButton={_t("action|cancel")}
primaryButtonClass="danger" primaryButtonClass="danger"
hasCancel={false} hasCancel={false}
onPrimaryButtonClick={onCancel} onPrimaryButtonClick={onCancel}

View file

@ -153,7 +153,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
{feedbackSection} {feedbackSection}
</React.Fragment> </React.Fragment>
} }
button={hasFeedback ? _t("Send feedback") : _t("Go back")} button={hasFeedback ? _t("Send feedback") : _t("action|go_back")}
buttonDisabled={hasFeedback && !comment} buttonDisabled={hasFeedback && !comment}
onFinished={onFinished} onFinished={onFinished}
/> />

View file

@ -53,7 +53,7 @@ const GenericFeatureFeedbackDialog: React.FC<IProps> = ({
Modal.createDialog(InfoDialog, { Modal.createDialog(InfoDialog, {
title, title,
description: _t("Feedback sent! Thanks, we appreciate it!"), description: _t("Feedback sent! Thanks, we appreciate it!"),
button: _t("Close"), button: _t("action|close"),
hasCloseButton: false, hasCloseButton: false,
fixedWidth: false, fixedWidth: false,
}); });

View file

@ -105,7 +105,7 @@ export default class InteractiveAuthDialog<T> extends React.Component<Interactiv
[SSOAuthEntry.PHASE_POSTAUTH]: { [SSOAuthEntry.PHASE_POSTAUTH]: {
title: _t("Confirm to continue"), title: _t("Confirm to continue"),
body: _t("Click the button below to confirm your identity."), body: _t("Click the button below to confirm your identity."),
continueText: _t("Confirm"), continueText: _t("action|confirm"),
continueKind: "primary", continueKind: "primary",
}, },
}; };
@ -171,7 +171,7 @@ export default class InteractiveAuthDialog<T> extends React.Component<Interactiv
<div role="alert">{this.state.authError.message || this.state.authError.toString()}</div> <div role="alert">{this.state.authError.message || this.state.authError.toString()}</div>
<br /> <br />
<AccessibleButton onClick={this.onDismissClick} className="mx_GeneralButton" autoFocus={true}> <AccessibleButton onClick={this.onDismissClick} className="mx_GeneralButton" autoFocus={true}>
{_t("Dismiss")} {_t("action|dismiss")}
</AccessibleButton> </AccessibleButton>
</div> </div>
); );

View file

@ -1107,7 +1107,7 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
this.state.busy || (this.props.kind == InviteKind.CallTransfer && this.state.targets.length > 0) this.state.busy || (this.props.kind == InviteKind.CallTransfer && this.state.targets.length > 0)
} }
autoComplete="off" autoComplete="off"
placeholder={hasPlaceholder ? _t("Search") : undefined} placeholder={hasPlaceholder ? _t("action|search") : undefined}
data-testid="invite-dialog-input" data-testid="invite-dialog-input"
/> />
); );
@ -1419,7 +1419,7 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
onClick={this.onCancel} onClick={this.onCancel}
className="mx_InviteDialog_transferConsultConnect_pushRight" className="mx_InviteDialog_transferConsultConnect_pushRight"
> >
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton <AccessibleButton
kind="primary" kind="primary"

View file

@ -202,9 +202,9 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
return ( return (
<QuestionDialog <QuestionDialog
hasCancelButton={true} hasCancelButton={true}
title={_t("Sign out")} title={_t("action|sign_out")}
description={_t("Are you sure you want to sign out?")} description={_t("Are you sure you want to sign out?")}
button={_t("Sign out")} button={_t("action|sign_out")}
onFinished={this.onFinished} onFinished={this.onFinished}
/> />
); );

View file

@ -237,10 +237,10 @@ const ManageRestrictedJoinRuleDialog: React.FC<IProps> = ({ room, selected = [],
{inviteOnlyWarning} {inviteOnlyWarning}
<div className="mx_ManageRestrictedJoinRuleDialog_footer_buttons"> <div className="mx_ManageRestrictedJoinRuleDialog_footer_buttons">
<AccessibleButton kind="primary_outline" onClick={() => onFinished()}> <AccessibleButton kind="primary_outline" onClick={() => onFinished()}>
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton kind="primary" onClick={() => onFinished(Array.from(newSelected))}> <AccessibleButton kind="primary" onClick={() => onFinished(Array.from(newSelected))}>
{_t("Confirm")} {_t("action|confirm")}
</AccessibleButton> </AccessibleButton>
</div> </div>
</div> </div>

View file

@ -173,9 +173,9 @@ export default class RoomUpgradeWarningDialog extends React.Component<IProps, IS
} else { } else {
footer = ( footer = (
<DialogButtons <DialogButtons
primaryButton={_t("Upgrade")} primaryButton={_t("action|upgrade")}
onPrimaryButtonClick={this.onContinue} onPrimaryButtonClick={this.onContinue}
cancelButton={_t("Cancel")} cancelButton={_t("action|cancel")}
onCancel={this.onCancel} onCancel={this.onCancel}
/> />
); );

View file

@ -104,7 +104,7 @@ export default abstract class ScrollableBaseModal<
<div className="mx_CompoundDialog_content">{this.renderContent()}</div> <div className="mx_CompoundDialog_content">{this.renderContent()}</div>
<div className="mx_CompoundDialog_footer"> <div className="mx_CompoundDialog_footer">
<AccessibleButton onClick={this.onCancel} kind="primary_outline"> <AccessibleButton onClick={this.onCancel} kind="primary_outline">
{this.state.cancelLabel ?? _t("Cancel")} {this.state.cancelLabel ?? _t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton <AccessibleButton
onClick={this.onSubmit} onClick={this.onSubmit}

View file

@ -64,7 +64,7 @@ export default class ServerOfflineDialog extends React.PureComponent<IProps> {
if (t.status === TransactionStatus.Error) { if (t.status === TransactionStatus.Error) {
button = ( button = (
<AccessibleButton kind="link" onClick={() => t.run()}> <AccessibleButton kind="link" onClick={() => t.run()}>
{_t("Resend")} {_t("action|resend")}
</AccessibleButton> </AccessibleButton>
); );
} }

View file

@ -45,7 +45,7 @@ export default class SeshatResetDialog extends React.PureComponent<Props> {
primaryButton={_t("Reset event store")} primaryButton={_t("Reset event store")}
onPrimaryButtonClick={this.props.onFinished.bind(null, true)} onPrimaryButtonClick={this.props.onFinished.bind(null, true)}
primaryButtonClass="danger" primaryButtonClass="danger"
cancelButton={_t("Cancel")} cancelButton={_t("action|cancel")}
onCancel={this.props.onFinished.bind(null, false)} onCancel={this.props.onFinished.bind(null, false)}
/> />
</BaseDialog> </BaseDialog>

View file

@ -40,9 +40,9 @@ export default class SessionRestoreErrorDialog extends React.Component<IProps> {
private onClearStorageClick = (): void => { private onClearStorageClick = (): void => {
Modal.createDialog(QuestionDialog, { Modal.createDialog(QuestionDialog, {
title: _t("Sign out"), title: _t("action|sign_out"),
description: <div>{_t("Sign out and remove encryption keys?")}</div>, description: <div>{_t("Sign out and remove encryption keys?")}</div>,
button: _t("Sign out"), button: _t("action|sign_out"),
danger: true, danger: true,
onFinished: this.props.onFinished, onFinished: this.props.onFinished,
}); });

View file

@ -179,7 +179,7 @@ export default class SetEmailDialog extends React.Component<IProps, IState> {
value={_t("action|continue")} value={_t("action|continue")}
onClick={this.onSubmit} onClick={this.onSubmit}
/> />
<input type="submit" value={_t("Skip")} onClick={this.onCancelled} /> <input type="submit" value={_t("action|skip")} onClick={this.onCancelled} />
</div> </div>
</BaseDialog> </BaseDialog>
); );

View file

@ -73,7 +73,7 @@ export default class StorageEvictedDialog extends React.Component<IProps> {
</p> </p>
</div> </div>
<DialogButtons <DialogButtons
primaryButton={_t("Sign out")} primaryButton={_t("action|sign_out")}
onPrimaryButtonClick={this.onSignOutClick} onPrimaryButtonClick={this.onSignOutClick}
focus={true} focus={true}
hasCancel={false} hasCancel={false}

View file

@ -205,7 +205,7 @@ export default class TermsDialog extends React.PureComponent<ITermsDialogProps,
<th>{_t("Service")}</th> <th>{_t("Service")}</th>
<th>{_t("Summary")}</th> <th>{_t("Summary")}</th>
<th>{_t("Document")}</th> <th>{_t("Document")}</th>
<th>{_t("Accept")}</th> <th>{_t("action|accept")}</th>
</tr> </tr>
{rows} {rows}
</tbody> </tbody>

View file

@ -123,7 +123,7 @@ export default class UploadConfirmDialog extends React.Component<IProps> {
</div> </div>
<DialogButtons <DialogButtons
primaryButton={_t("Upload")} primaryButton={_t("action|upload")}
hasCancel={false} hasCancel={false}
onPrimaryButtonClick={this.onUploadClick} onPrimaryButtonClick={this.onUploadClick}
focus={true} focus={true}

View file

@ -77,7 +77,7 @@ const BaseTool: React.FC<XOR<IMinProps, IProps>> = ({
<div className={classNames("mx_DevTools_content", className)}>{children}</div> <div className={classNames("mx_DevTools_content", className)}>{children}</div>
<div className="mx_Dialog_buttons"> <div className="mx_Dialog_buttons">
{extraButton} {extraButton}
<button onClick={onBackClick}>{_t("Back")}</button> <button onClick={onBackClick}>{_t("action|back")}</button>
{actionButton} {actionButton}
</div> </div>
</> </>

View file

@ -43,19 +43,19 @@ export const OidcLogoutDialog: React.FC<OidcLogoutDialogProps> = ({
const logoutUrl = getOidcLogoutUrl(delegatedAuthAccountUrl, deviceId); const logoutUrl = getOidcLogoutUrl(delegatedAuthAccountUrl, deviceId);
return ( return (
<BaseDialog onFinished={onFinished} title={_t("Sign out")} contentId="mx_Dialog_content"> <BaseDialog onFinished={onFinished} title={_t("action|sign_out")} contentId="mx_Dialog_content">
<div className="mx_Dialog_content" id="mx_Dialog_content"> <div className="mx_Dialog_content" id="mx_Dialog_content">
{_t("You will be redirected to your server's authentication provider to complete sign out.")} {_t("You will be redirected to your server's authentication provider to complete sign out.")}
</div> </div>
<div className="mx_Dialog_buttons"> <div className="mx_Dialog_buttons">
{hasOpenedLogoutLink ? ( {hasOpenedLogoutLink ? (
<AccessibleButton kind="primary" onClick={() => onFinished(true)}> <AccessibleButton kind="primary" onClick={() => onFinished(true)}>
{_t("Close")} {_t("action|close")}
</AccessibleButton> </AccessibleButton>
) : ( ) : (
<> <>
<AccessibleButton kind="secondary" onClick={() => onFinished(false)}> <AccessibleButton kind="secondary" onClick={() => onFinished(false)}>
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton <AccessibleButton
element="a" element="a"

View file

@ -309,7 +309,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
)} )}
</p> </p>
<DialogButtons <DialogButtons
primaryButton={_t("Reset")} primaryButton={_t("action|reset")}
onPrimaryButtonClick={this.onConfirmResetAllClick} onPrimaryButtonClick={this.onConfirmResetAllClick}
hasCancel={true} hasCancel={true}
onCancel={this.onCancel} onCancel={this.onCancel}
@ -426,7 +426,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
onChange={this.onRecoveryKeyFileChange} onChange={this.onRecoveryKeyFileChange}
/> />
<AccessibleButton kind="primary" onClick={this.onRecoveryKeyFileUploadClick}> <AccessibleButton kind="primary" onClick={this.onRecoveryKeyFileUploadClick}>
{_t("Upload")} {_t("action|upload")}
</AccessibleButton> </AccessibleButton>
</div> </div>
</div> </div>
@ -435,7 +435,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
primaryButton={_t("action|continue")} primaryButton={_t("action|continue")}
onPrimaryButtonClick={this.onRecoveryKeyNext} onPrimaryButtonClick={this.onRecoveryKeyNext}
hasCancel={true} hasCancel={true}
cancelButton={_t("Go Back")} cancelButton={_t("action|go_back")}
cancelButtonClass="danger" cancelButtonClass="danger"
onCancel={this.onCancel} onCancel={this.onCancel}
focus={false} focus={false}

View file

@ -52,7 +52,7 @@ export default class ConfirmDestroyCrossSigningDialog extends React.Component<IP
primaryButton={_t("Clear cross-signing keys")} primaryButton={_t("Clear cross-signing keys")}
onPrimaryButtonClick={this.onConfirm} onPrimaryButtonClick={this.onConfirm}
primaryButtonClass="danger" primaryButtonClass="danger"
cancelButton={_t("Cancel")} cancelButton={_t("action|cancel")}
onCancel={this.onDecline} onCancel={this.onDecline}
/> />
</BaseDialog> </BaseDialog>

View file

@ -120,7 +120,7 @@ export default class CreateCrossSigningDialog extends React.PureComponent<IProps
[SSOAuthEntry.PHASE_POSTAUTH]: { [SSOAuthEntry.PHASE_POSTAUTH]: {
title: _t("Confirm encryption setup"), title: _t("Confirm encryption setup"),
body: _t("Click the button below to confirm setting up encryption."), body: _t("Click the button below to confirm setting up encryption."),
continueText: _t("Confirm"), continueText: _t("action|confirm"),
continueKind: "primary", continueKind: "primary",
}, },
}; };

View file

@ -687,7 +687,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
onClick={listener} onClick={listener}
tabIndex={-1} tabIndex={-1}
> >
{showViewButton ? _t("View") : _t("Join")} {showViewButton ? _t("action|view") : _t("action|join")}
</AccessibleButton> </AccessibleButton>
} }
aria-labelledby={`mx_SpotlightDialog_button_result_${result.publicRoom.room_id}_name`} aria-labelledby={`mx_SpotlightDialog_button_result_${result.publicRoom.room_id}_name`}
@ -1236,13 +1236,13 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
autoCapitalize="off" autoCapitalize="off"
autoCorrect="off" autoCorrect="off"
spellCheck="false" spellCheck="false"
placeholder={_t("Search")} placeholder={_t("action|search")}
value={query} value={query}
onChange={setQuery} onChange={setQuery}
onKeyDown={onKeyDown} onKeyDown={onKeyDown}
aria-owns="mx_SpotlightDialog_content" aria-owns="mx_SpotlightDialog_content"
aria-activedescendant={activeDescendant} aria-activedescendant={activeDescendant}
aria-label={_t("Search")} aria-label={_t("action|search")}
aria-describedby="mx_SpotlightDialog_keyboardPrompt" aria-describedby="mx_SpotlightDialog_keyboardPrompt"
/> />
{(publicRoomsLoading || peopleLoading || profileLoading) && <Spinner w={24} h={24} />} {(publicRoomsLoading || peopleLoading || profileLoading) && <Spinner w={24} h={24} />}

View file

@ -193,7 +193,7 @@ export const NetworkDropdown: React.FC<IProps> = ({ protocols, config, setConfig
{ {
title: _t("Add a new server"), title: _t("Add a new server"),
description: _t("Enter the name of a new server you want to explore."), description: _t("Enter the name of a new server you want to explore."),
button: _t("Add"), button: _t("action|add"),
hasCancel: false, hasCancel: false,
placeholder: _t("Server name"), placeholder: _t("Server name"),
validator: validServer, validator: validServer,

View file

@ -166,7 +166,7 @@ export default class DesktopCapturerSourcePicker extends React.Component<PickerI
> >
<TabbedView tabs={tabs} tabLocation={TabLocation.TOP} onChange={this.onTabChange} /> <TabbedView tabs={tabs} tabLocation={TabLocation.TOP} onChange={this.onTabChange} />
<DialogButtons <DialogButtons
primaryButton={_t("Share")} primaryButton={_t("action|share")}
hasCancel={true} hasCancel={true}
onCancel={this.onCloseClick} onCancel={this.onCloseClick}
onPrimaryButtonClick={this.onShare} onPrimaryButtonClick={this.onShare}

View file

@ -90,7 +90,7 @@ export default class DialogButtons extends React.Component<IProps> {
className={this.props.cancelButtonClass} className={this.props.cancelButtonClass}
disabled={this.props.disabled} disabled={this.props.disabled}
> >
{this.props.cancelButton || _t("Cancel")} {this.props.cancelButton || _t("action|cancel")}
</button> </button>
); );
} }

View file

@ -147,7 +147,7 @@ export default class EditableItemList<P = {}> extends React.PureComponent<IProps
type="submit" type="submit"
disabled={!this.props.newItem} disabled={!this.props.newItem}
> >
{_t("Add")} {_t("action|add")}
</AccessibleButton> </AccessibleButton>
</form> </form>
); );

View file

@ -130,7 +130,7 @@ const GenericEventListSummary: React.FC<IProps> = ({
onClick={toggleExpanded} onClick={toggleExpanded}
aria-expanded={expanded} aria-expanded={expanded}
> >
{expanded ? _t("collapse") : _t("expand")} {expanded ? _t("action|collapse") : _t("action|expand")}
</AccessibleButton> </AccessibleButton>
{body} {body}
</li> </li>

View file

@ -515,14 +515,14 @@ export default class ImageView extends React.Component<IProps, IState> {
const zoomOutButton = ( const zoomOutButton = (
<AccessibleTooltipButton <AccessibleTooltipButton
className="mx_ImageView_button mx_ImageView_button_zoomOut" className="mx_ImageView_button mx_ImageView_button_zoomOut"
title={_t("Zoom out")} title={_t("action|zoom_out")}
onClick={this.onZoomOutClick} onClick={this.onZoomOutClick}
/> />
); );
const zoomInButton = ( const zoomInButton = (
<AccessibleTooltipButton <AccessibleTooltipButton
className="mx_ImageView_button mx_ImageView_button_zoomIn" className="mx_ImageView_button mx_ImageView_button_zoomIn"
title={_t("Zoom in")} title={_t("action|zoom_in")}
onClick={this.onZoomInClick} onClick={this.onZoomInClick}
/> />
); );
@ -565,13 +565,13 @@ export default class ImageView extends React.Component<IProps, IState> {
/> />
<AccessibleTooltipButton <AccessibleTooltipButton
className="mx_ImageView_button mx_ImageView_button_download" className="mx_ImageView_button mx_ImageView_button_download"
title={_t("Download")} title={_t("action|download")}
onClick={this.onDownloadClick} onClick={this.onDownloadClick}
/> />
{contextMenuButton} {contextMenuButton}
<AccessibleTooltipButton <AccessibleTooltipButton
className="mx_ImageView_button mx_ImageView_button_close" className="mx_ImageView_button mx_ImageView_button_close"
title={_t("Close")} title={_t("action|close")}
onClick={this.props.onFinished} onClick={this.props.onFinished}
/> />
{this.renderContextMenu()} {this.renderContextMenu()}

View file

@ -31,7 +31,7 @@ const LearnMore: React.FC<LearnMoreProps> = ({ title, description, ...rest }) =>
Modal.createDialog(InfoDialog, { Modal.createDialog(InfoDialog, {
title, title,
description, description,
button: _t("Got it"), button: _t("action|got_it"),
hasCloseButton: true, hasCloseButton: true,
}); });
}; };

View file

@ -177,8 +177,8 @@ export default class PollCreateDialog extends ScrollableBaseModal<IProps, IState
Modal.createDialog(QuestionDialog, { Modal.createDialog(QuestionDialog, {
title: _t("Failed to post poll"), title: _t("Failed to post poll"),
description: _t("Sorry, the poll you tried to create was not posted."), description: _t("Sorry, the poll you tried to create was not posted."),
button: _t("Try again"), button: _t("action|try_again"),
cancelButton: _t("Cancel"), cancelButton: _t("action|cancel"),
onFinished: (tryAgain: boolean) => { onFinished: (tryAgain: boolean) => {
if (!tryAgain) { if (!tryAgain) {
this.cancel(); this.cancel();

View file

@ -50,7 +50,7 @@ const onHelpClick = (): void => {
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.", "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.",
{ brand }, { brand },
), ),
button: _t("Dismiss"), button: _t("action|dismiss"),
hasCloseButton: false, hasCloseButton: false,
fixedWidth: false, fixedWidth: false,
}, },

View file

@ -85,7 +85,7 @@ export default class TagComposer extends React.PureComponent<IProps, IState> {
autoComplete="off" autoComplete="off"
/> />
<AccessibleButton onClick={this.onAdd} kind="primary" disabled={this.props.disabled}> <AccessibleButton onClick={this.onAdd} kind="primary" disabled={this.props.disabled}>
{_t("Add")} {_t("action|add")}
</AccessibleButton> </AccessibleButton>
</form> </form>
<div className="mx_TagComposer_tags" role="list"> <div className="mx_TagComposer_tags" role="list">

View file

@ -78,7 +78,7 @@ export function UseCaseSelection({ onFinished }: Props): JSX.Element {
</div> </div>
<div className="mx_UseCaseSelection_skip mx_UseCaseSelection_slideInDelayed"> <div className="mx_UseCaseSelection_skip mx_UseCaseSelection_slideInDelayed">
<AccessibleButton kind="link" onClick={async () => setSelected(UseCase.Skip)}> <AccessibleButton kind="link" onClick={async () => setSelected(UseCase.Skip)}>
{_t("Skip")} {_t("action|skip")}
</AccessibleButton> </AccessibleButton>
</div> </div>
</SplashPage> </SplashPage>

View file

@ -73,7 +73,7 @@ class Search extends React.PureComponent<IProps> {
<input <input
autoFocus autoFocus
type="text" type="text"
placeholder={_t("Search")} placeholder={_t("action|search")}
value={this.props.query} value={this.props.query}
onChange={(ev) => this.props.onChange(ev.target.value)} onChange={(ev) => this.props.onChange(ev.target.value)}
onKeyDown={this.onKeyDown} onKeyDown={this.onKeyDown}

View file

@ -34,7 +34,7 @@ const ShareDialogButtons: React.FC<Props> = ({ onBack, onCancel, displayBack })
<AccessibleButton <AccessibleButton
className="mx_ShareDialogButtons_button left" className="mx_ShareDialogButtons_button left"
data-testid="share-dialog-buttons-back" data-testid="share-dialog-buttons-back"
aria-label={_t("Back")} aria-label={_t("action|back")}
onClick={onBack} onClick={onBack}
element="button" element="button"
> >
@ -44,7 +44,7 @@ const ShareDialogButtons: React.FC<Props> = ({ onBack, onCancel, displayBack })
<AccessibleButton <AccessibleButton
className="mx_ShareDialogButtons_button right" className="mx_ShareDialogButtons_button right"
data-testid="share-dialog-buttons-cancel" data-testid="share-dialog-buttons-cancel"
aria-label={_t("Close")} aria-label={_t("action|close")}
onClick={onCancel} onClick={onCancel}
element="button" element="button"
> >

View file

@ -40,7 +40,7 @@ const ZoomButtons: React.FC<Props> = ({ map }) => {
<AccessibleButton <AccessibleButton
onClick={onZoomIn} onClick={onZoomIn}
data-testid="map-zoom-in-button" data-testid="map-zoom-in-button"
title={_t("Zoom in")} title={_t("action|zoom_in")}
className="mx_ZoomButtons_button" className="mx_ZoomButtons_button"
> >
<PlusIcon className="mx_ZoomButtons_icon" /> <PlusIcon className="mx_ZoomButtons_icon" />
@ -48,7 +48,7 @@ const ZoomButtons: React.FC<Props> = ({ map }) => {
<AccessibleButton <AccessibleButton
onClick={onZoomOut} onClick={onZoomOut}
data-testid="map-zoom-out-button" data-testid="map-zoom-out-button"
title={_t("Zoom out")} title={_t("action|zoom_out")}
className="mx_ZoomButtons_button" className="mx_ZoomButtons_button"
> >
<MinusIcon className="mx_ZoomButtons_icon" /> <MinusIcon className="mx_ZoomButtons_icon" />

View file

@ -86,8 +86,8 @@ const getDefaultErrorParams = (
description: _t("%(brand)s could not send your location. Please try again later.", { description: _t("%(brand)s could not send your location. Please try again later.", {
brand: SdkConfig.get().brand, brand: SdkConfig.get().brand,
}), }),
button: _t("Try again"), button: _t("action|try_again"),
cancelButton: _t("Cancel"), cancelButton: _t("action|cancel"),
onFinished: (tryAgain: boolean) => { onFinished: (tryAgain: boolean) => {
if (tryAgain) { if (tryAgain) {
openMenu(); openMenu();

View file

@ -129,9 +129,9 @@ const ActiveLoadedCallEvent = forwardRef<any, ActiveLoadedCallEventProps>(({ mxE
const [buttonText, buttonKind, onButtonClick] = useMemo(() => { const [buttonText, buttonKind, onButtonClick] = useMemo(() => {
switch (connectionState) { switch (connectionState) {
case ConnectionState.Disconnected: case ConnectionState.Disconnected:
return [_t("Join"), "primary", connect]; return [_t("action|join"), "primary", connect];
case ConnectionState.Connecting: case ConnectionState.Connecting:
return [_t("Join"), "primary", null]; return [_t("action|join"), "primary", null];
case ConnectionState.Connected: case ConnectionState.Connected:
return [_t("action|leave"), "danger", disconnect]; return [_t("action|leave"), "danger", disconnect];
case ConnectionState.Disconnecting: case ConnectionState.Disconnecting:
@ -189,7 +189,7 @@ export const CallEvent = forwardRef<any, CallEventProps>(({ mxEvent }, ref) => {
mxEvent={mxEvent} mxEvent={mxEvent}
call={null} call={null}
participatingMembers={[]} participatingMembers={[]}
buttonText={_t("Join")} buttonText={_t("action|join")}
buttonKind="primary" buttonKind="primary"
onButtonClick={null} onButtonClick={null}
/> />

View file

@ -95,7 +95,7 @@ export default class DownloadActionButton extends React.PureComponent<IProps, IS
return ( return (
<RovingAccessibleTooltipButton <RovingAccessibleTooltipButton
className={classes} className={classes}
title={spinner ? _t(this.state.tooltip) : _t("Download")} title={spinner ? _t(this.state.tooltip) : _t("action|download")}
onClick={this.onDownloadClick} onClick={this.onDownloadClick}
disabled={!!spinner} disabled={!!spinner}
> >

View file

@ -144,7 +144,7 @@ export default class LegacyCallEvent extends React.PureComponent<IProps, IState>
onClick={this.props.callEventGrouper.answerCall} onClick={this.props.callEventGrouper.answerCall}
kind="primary" kind="primary"
> >
<span> {_t("Accept")} </span> <span> {_t("action|accept")} </span>
</AccessibleButton> </AccessibleButton>
{this.props.timestamp} {this.props.timestamp}
</div> </div>

View file

@ -173,7 +173,7 @@ export default class MKeyVerificationRequest extends React.Component<IProps> {
{_t("action|decline")} {_t("action|decline")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton kind="primary" onClick={this.onAcceptClicked}> <AccessibleButton kind="primary" onClick={this.onAcceptClicked}>
{_t("Accept")} {_t("action|accept")}
</AccessibleButton> </AccessibleButton>
</div> </div>
); );

View file

@ -410,7 +410,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
const cancelSendingButton = ( const cancelSendingButton = (
<RovingAccessibleTooltipButton <RovingAccessibleTooltipButton
className="mx_MessageActionBar_iconButton" className="mx_MessageActionBar_iconButton"
title={_t("Delete")} title={_t("action|delete")}
onClick={this.onCancelClick} onClick={this.onCancelClick}
onContextMenu={this.onCancelClick} onContextMenu={this.onCancelClick}
key="cancel" key="cancel"

View file

@ -111,7 +111,7 @@ export const WidgetPip: FC<Props> = ({ widgetId, room, viewingRoom, onStartMovin
<RovingAccessibleButton <RovingAccessibleButton
onClick={onBackClick} onClick={onBackClick}
className="mx_WidgetPip_backButton" className="mx_WidgetPip_backButton"
aria-label={_t("Back")} aria-label={_t("action|back")}
> >
<BackIcon className="mx_Icon mx_Icon_16" /> <BackIcon className="mx_Icon mx_Icon_16" />
{roomName} {roomName}

View file

@ -63,7 +63,7 @@ const BaseCard: React.FC<IProps> = forwardRef<HTMLDivElement, IProps>(
onBack?.(ev); onBack?.(ev);
RightPanelStore.instance.popCard(); RightPanelStore.instance.popCard();
}; };
const label = backLabelForPhase(prevCard.phase) ?? _t("Back"); const label = backLabelForPhase(prevCard.phase) ?? _t("action|back");
backButton = <AccessibleButton className="mx_BaseCard_back" onClick={onBackClick} title={label} />; backButton = <AccessibleButton className="mx_BaseCard_back" onClick={onBackClick} title={label} />;
} }
@ -74,7 +74,7 @@ const BaseCard: React.FC<IProps> = forwardRef<HTMLDivElement, IProps>(
data-testid="base-card-close-button" data-testid="base-card-close-button"
className="mx_BaseCard_close" className="mx_BaseCard_close"
onClick={onClose} onClick={onClose}
title={closeLabel || _t("Close")} title={closeLabel || _t("action|close")}
/> />
); );
} }

View file

@ -150,7 +150,7 @@ const AppRow: React.FC<IAppRowProps> = ({ app, room }) => {
if (cannotPin) { if (cannotPin) {
pinTitle = _t("You can only pin up to %(count)s widgets", { count: MAX_PINNED }); pinTitle = _t("You can only pin up to %(count)s widgets", { count: MAX_PINNED });
} else { } else {
pinTitle = isPinned ? _t("Unpin") : _t("Pin"); pinTitle = isPinned ? _t("action|unpin") : _t("action|pin");
} }
const isMaximised = WidgetLayoutStore.instance.isInContainer(room, app, Container.Center); const isMaximised = WidgetLayoutStore.instance.isInContainer(room, app, Container.Center);
@ -162,7 +162,7 @@ const AppRow: React.FC<IAppRowProps> = ({ app, room }) => {
WidgetLayoutStore.instance.moveToContainer(room, app, Container.Center); WidgetLayoutStore.instance.moveToContainer(room, app, Container.Center);
}; };
const maximiseTitle = isMaximised ? _t("Close") : _t("Maximise"); const maximiseTitle = isMaximised ? _t("action|close") : _t("Maximise");
let openTitle = ""; let openTitle = "";
if (isPinned) { if (isPinned) {

View file

@ -387,7 +387,7 @@ export const UserOptionsSection: React.FC<{
)} )}
</div> </div>
), ),
button: _t("Ignore"), button: _t("action|ignore"),
}); });
const [confirmed] = await finished; const [confirmed] = await finished;
@ -407,7 +407,7 @@ export const UserOptionsSection: React.FC<{
kind="link" kind="link"
className={classNames("mx_UserInfo_field", { mx_UserInfo_destructive: !isIgnored })} className={classNames("mx_UserInfo_field", { mx_UserInfo_destructive: !isIgnored })}
> >
{isIgnored ? _t("Unignore") : _t("Ignore")} {isIgnored ? _t("Unignore") : _t("action|ignore")}
</AccessibleButton> </AccessibleButton>
); );
@ -1483,7 +1483,7 @@ const BasicUserInfo: React.FC<{
} }
}} }}
> >
{_t("Verify")} {_t("action|verify")}
</AccessibleButton> </AccessibleButton>
</div> </div>
); );
@ -1716,7 +1716,7 @@ const UserInfo: React.FC<IProps> = ({ user, room, onClose, phase = RightPanelPha
if (phase === RightPanelPhases.EncryptionPanel) { if (phase === RightPanelPhases.EncryptionPanel) {
const verificationRequest = (props as React.ComponentProps<typeof EncryptionPanel>).verificationRequest; const verificationRequest = (props as React.ComponentProps<typeof EncryptionPanel>).verificationRequest;
if (verificationRequest && verificationRequest.pending) { if (verificationRequest && verificationRequest.pending) {
closeLabel = _t("Cancel"); closeLabel = _t("action|cancel");
} }
} }

View file

@ -319,7 +319,7 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
<E2EIcon isUser={true} status={E2EState.Verified} size={128} hideTooltip={true} /> <E2EIcon isUser={true} status={E2EState.Verified} size={128} hideTooltip={true} />
{text ? <p>{text}</p> : null} {text ? <p>{text}</p> : null}
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}> <AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
{_t("Got it")} {_t("action|got_it")}
</AccessibleButton> </AccessibleButton>
</div> </div>
); );
@ -357,7 +357,7 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
<p>{text}</p> <p>{text}</p>
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}> <AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
{_t("Got it")} {_t("action|got_it")}
</AccessibleButton> </AccessibleButton>
</div> </div>
); );

View file

@ -70,7 +70,7 @@ class EditableAliasesList extends EditableItemList<IEditableAliasesListProps> {
roomId={this.props.roomId} roomId={this.props.roomId}
/> />
<AccessibleButton onClick={this.onAliasAdded} kind="primary"> <AccessibleButton onClick={this.onAliasAdded} kind="primary">
{_t("Add")} {_t("action|add")}
</AccessibleButton> </AccessibleButton>
</form> </form>
); );

View file

@ -226,7 +226,7 @@ export default class RoomProfileSettings extends React.Component<IProps, IState>
profileSettingsButtons = ( profileSettingsButtons = (
<div className="mx_ProfileSettings_buttons"> <div className="mx_ProfileSettings_buttons">
<AccessibleButton onClick={this.cancelProfileChanges} kind="link" disabled={!this.isSaveEnabled()}> <AccessibleButton onClick={this.cancelProfileChanges} kind="link" disabled={!this.isSaveEnabled()}>
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton onClick={this.saveProfile} kind="primary" disabled={!this.isSaveEnabled()}> <AccessibleButton onClick={this.saveProfile} kind="primary" disabled={!this.isSaveEnabled()}>
{_t("action|save")} {_t("action|save")}

View file

@ -487,7 +487,7 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
/> />
<div className="mx_EditMessageComposer_buttons"> <div className="mx_EditMessageComposer_buttons">
<AccessibleButton kind="secondary" onClick={this.cancelEdit}> <AccessibleButton kind="secondary" onClick={this.cancelEdit}>
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton kind="primary" onClick={this.sendEdit} disabled={this.state.saveDisabled}> <AccessibleButton kind="primary" onClick={this.sendEdit} disabled={this.state.saveDisabled}>
{_t("action|save")} {_t("action|save")}

View file

@ -606,7 +606,7 @@ export default class RoomHeader extends React.Component<IProps, IState> {
<AccessibleTooltipButton <AccessibleTooltipButton
className="mx_LegacyRoomHeader_button mx_LegacyRoomHeader_searchButton" className="mx_LegacyRoomHeader_button mx_LegacyRoomHeader_searchButton"
onClick={this.props.onSearchClick} onClick={this.props.onSearchClick}
title={_t("Search")} title={_t("action|search")}
alignment={Alignment.Bottom} alignment={Alignment.Bottom}
key="search" key="search"
/>, />,

View file

@ -58,7 +58,7 @@ const LinkPreviewGroup: React.FC<IProps> = ({ links, mxEvent, onCancelClick, onH
toggleButton = ( toggleButton = (
<AccessibleButton onClick={toggleExpanded}> <AccessibleButton onClick={toggleExpanded}>
{expanded {expanded
? _t("Collapse") ? _t("action|collapse")
: _t("Show %(count)s other previews", { count: previews.length - showPreviews.length })} : _t("Show %(count)s other previews", { count: previews.length - showPreviews.length })}
</AccessibleButton> </AccessibleButton>
); );

View file

@ -79,7 +79,7 @@ export default class PinnedEventTile extends React.Component<IProps> {
<AccessibleTooltipButton <AccessibleTooltipButton
onClick={this.props.onUnpinClicked} onClick={this.props.onUnpinClicked}
className="mx_PinnedEventTile_unpinButton" className="mx_PinnedEventTile_unpinButton"
title={_t("Unpin")} title={_t("action|unpin")}
/> />
); );
} }

View file

@ -428,7 +428,7 @@ const RoomListHeader: React.FC<IProps> = ({ onVisibilityChange }) => {
onClick={openPlusMenu} onClick={openPlusMenu}
isExpanded={plusMenuDisplayed} isExpanded={plusMenuDisplayed}
className="mx_RoomListHeader_plusButton" className="mx_RoomListHeader_plusButton"
title={_t("Add")} title={_t("action|add")}
/> />
)} )}

View file

@ -349,7 +349,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
} }
if (opts.canJoin) { if (opts.canJoin) {
title = _t("Join the room to participate"); title = _t("Join the room to participate");
primaryActionLabel = _t("Join"); primaryActionLabel = _t("action|join");
primaryActionHandler = () => { primaryActionHandler = () => {
ModuleRunner.instance.invoke(RoomViewLifecycle.JoinFromRoomPreview, this.props.roomId); ModuleRunner.instance.invoke(RoomViewLifecycle.JoinFromRoomPreview, this.props.roomId);
}; };
@ -359,7 +359,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
primaryActionLabel = _t("Sign Up"); primaryActionLabel = _t("Sign Up");
primaryActionHandler = this.onRegisterClick; primaryActionHandler = this.onRegisterClick;
} }
secondaryActionLabel = _t("Sign In"); secondaryActionLabel = _t("action|sign_in");
secondaryActionHandler = this.onLoginClick; secondaryActionHandler = this.onLoginClick;
} }
if (this.props.previewLoading) { if (this.props.previewLoading) {
@ -524,7 +524,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
} else { } else {
title = _t("Do you want to join %(roomName)s?", { roomName }); title = _t("Do you want to join %(roomName)s?", { roomName });
subTitle = [avatar, _t("<userName/> invited you", {}, { userName: () => inviterElement })]; subTitle = [avatar, _t("<userName/> invited you", {}, { userName: () => inviterElement })];
primaryActionLabel = _t("Accept"); primaryActionLabel = _t("action|accept");
} }
const myUserId = MatrixClientPeg.safeGet().getSafeUserId(); const myUserId = MatrixClientPeg.safeGet().getSafeUserId();
@ -541,7 +541,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
} }
primaryActionHandler = this.props.onJoinClick; primaryActionHandler = this.props.onJoinClick;
secondaryActionLabel = _t("Reject"); secondaryActionLabel = _t("action|reject");
secondaryActionHandler = this.props.onRejectClick; secondaryActionHandler = this.props.onRejectClick;
if (this.props.onRejectAndIgnoreClick) { if (this.props.onRejectAndIgnoreClick) {

View file

@ -121,7 +121,7 @@ const RoomPreviewCard: FC<IProps> = ({ room, onJoinButtonClicked, onRejectButton
onRejectButtonClicked(); onRejectButtonClicked();
}} }}
> >
{_t("Reject")} {_t("action|reject")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton <AccessibleButton
kind="primary" kind="primary"
@ -130,7 +130,7 @@ const RoomPreviewCard: FC<IProps> = ({ room, onJoinButtonClicked, onRejectButton
onJoinButtonClicked(); onJoinButtonClicked();
}} }}
> >
{_t("Accept")} {_t("action|accept")}
</AccessibleButton> </AccessibleButton>
</> </>
); );
@ -147,7 +147,7 @@ const RoomPreviewCard: FC<IProps> = ({ room, onJoinButtonClicked, onRejectButton
}} }}
disabled={cannotJoin} disabled={cannotJoin}
> >
{_t("Join")} {_t("action|join")}
</AccessibleButton> </AccessibleButton>
); );
} }

View file

@ -129,13 +129,13 @@ export default class SearchBar extends React.Component<IProps, IState> {
<AccessibleButton <AccessibleButton
className={searchButtonClasses} className={searchButtonClasses}
onClick={this.onSearch} onClick={this.onSearch}
aria-label={_t("Search")} aria-label={_t("action|search")}
/> />
</div> </div>
<AccessibleButton <AccessibleButton
className="mx_SearchBar_cancel" className="mx_SearchBar_cancel"
onClick={this.props.onCancelClick} onClick={this.props.onCancelClick}
aria-label={_t("Cancel")} aria-label={_t("action|cancel")}
/> />
</div> </div>
<SearchWarning isRoomEncrypted={this.props.isRoomEncrypted} kind={WarningKind.Search} /> <SearchWarning isRoomEncrypted={this.props.isRoomEncrypted} kind={WarningKind.Search} />

View file

@ -145,7 +145,11 @@ export default class ThirdPartyMemberInfo extends React.Component<IProps, IState
<div className="mx_MemberInfo" role="tabpanel"> <div className="mx_MemberInfo" role="tabpanel">
{scopeHeader} {scopeHeader}
<div className="mx_MemberInfo_name"> <div className="mx_MemberInfo_name">
<AccessibleButton className="mx_MemberInfo_cancel" onClick={this.onCancel} title={_t("Close")} /> <AccessibleButton
className="mx_MemberInfo_cancel"
onClick={this.onCancel}
title={_t("action|close")}
/>
<h2>{this.state.displayName}</h2> <h2>{this.state.displayName}</h2>
</div> </div>
<div className="mx_MemberInfo_container mx_MemberInfo_container--profile"> <div className="mx_MemberInfo_container mx_MemberInfo_container--profile">

View file

@ -294,7 +294,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
deleteButton = ( deleteButton = (
<AccessibleTooltipButton <AccessibleTooltipButton
className="mx_VoiceRecordComposerTile_delete" className="mx_VoiceRecordComposerTile_delete"
title={_t("Delete")} title={_t("action|delete")}
onClick={this.onCancel} onClick={this.onCancel}
/> />
); );

View file

@ -33,7 +33,7 @@ export function EditionButtons({
return ( return (
<div className="mx_EditWysiwygComposer_buttons"> <div className="mx_EditWysiwygComposer_buttons">
<AccessibleButton kind="secondary" onClick={onCancelClick}> <AccessibleButton kind="secondary" onClick={onCancelClick}>
{_t("Cancel")} {_t("action|cancel")}
</AccessibleButton> </AccessibleButton>
<AccessibleButton kind="primary" onClick={onSaveClick} disabled={isSaveDisabled}> <AccessibleButton kind="primary" onClick={onSaveClick} disabled={isSaveDisabled}>
{_t("action|save")} {_t("action|save")}

View file

@ -98,7 +98,7 @@ export const AddPrivilegedUsers: React.FC<AddPrivilegedUsersProps> = ({ room, de
onClick={null} onClick={null}
data-testid="add-privileged-users-submit-button" data-testid="add-privileged-users-submit-button"
> >
{_t("Apply")} {_t("action|apply")}
</AccessibleButton> </AccessibleButton>
</SettingsFieldset> </SettingsFieldset>
</form> </form>

View file

@ -94,7 +94,7 @@ const AvatarSetting: React.FC<IProps> = ({ avatarUrl, avatarAltText, avatarName,
{avatarElement} {avatarElement}
<div className="mx_AvatarSetting_hover" aria-hidden="true"> <div className="mx_AvatarSetting_hover" aria-hidden="true">
<div className="mx_AvatarSetting_hoverBg" /> <div className="mx_AvatarSetting_hoverBg" />
{uploadAvatar && <span id={a11yId.current}>{_t("Upload")}</span>} {uploadAvatar && <span id={a11yId.current}>{_t("action|upload")}</span>}
</div> </div>
{uploadAvatarBtn} {uploadAvatarBtn}
{removeAvatarBtn} {removeAvatarBtn}

Some files were not shown because too many files have changed in this diff Show more