Create more action_*
common strings (#11438)
This commit is contained in:
parent
e79b03a2df
commit
d5cacff6c3
202 changed files with 2046 additions and 2105 deletions
|
@ -242,7 +242,7 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
|
|||
|
||||
<span className="mx_AddExistingToSpaceDialog_error">
|
||||
<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>
|
||||
|
||||
<AccessibleButton className="mx_AddExistingToSpaceDialog_retryButton" onClick={addRooms}>
|
||||
|
@ -267,7 +267,7 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
|
|||
if (!button || selectedToAdd.size > 0) {
|
||||
button = (
|
||||
<AccessibleButton kind="primary" disabled={selectedToAdd.size < 1} onClick={addRooms}>
|
||||
{_t("Add")}
|
||||
{_t("action|add")}
|
||||
</AccessibleButton>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ export default function AskInviteAnywayDialog({
|
|||
</div>
|
||||
|
||||
<div className="mx_Dialog_buttons">
|
||||
<button onClick={onGiveUpClicked}>{_t("Close")}</button>
|
||||
<button onClick={onGiveUpClicked}>{_t("action|close")}</button>
|
||||
<button onClick={onInviteNeverWarnClicked}>
|
||||
{inviteNeverWarnLabel ?? _t("Invite anyway and never warn me again")}
|
||||
</button>
|
||||
|
|
|
@ -119,7 +119,7 @@ export default class ChangelogDialog extends React.Component<IProps, State> {
|
|||
<QuestionDialog
|
||||
title={_t("Changelog")}
|
||||
description={content}
|
||||
button={_t("Update")}
|
||||
button={_t("action|update")}
|
||||
onFinished={this.props.onFinished}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -52,7 +52,7 @@ export default class ConfirmWipeDeviceDialog extends React.Component<IProps> {
|
|||
primaryButton={_t("Clear all data")}
|
||||
onPrimaryButtonClick={this.onConfirm}
|
||||
primaryButtonClass="danger"
|
||||
cancelButton={_t("Cancel")}
|
||||
cancelButton={_t("action|cancel")}
|
||||
onCancel={this.onDecline}
|
||||
/>
|
||||
</BaseDialog>
|
||||
|
|
|
@ -188,10 +188,10 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
|
|||
</div>
|
||||
|
||||
<AccessibleButton kind="primary_outline" disabled={busy} onClick={() => onFinished(false)}>
|
||||
{_t("Cancel")}
|
||||
{_t("action|cancel")}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton kind="primary" disabled={busy} onClick={onCreateSubspaceClick}>
|
||||
{busy ? _t("Adding…") : _t("Add")}
|
||||
{busy ? _t("Adding…") : _t("action|add")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
</MatrixClientContext.Provider>
|
||||
|
|
|
@ -34,12 +34,12 @@ const CryptoStoreTooNewDialog: React.FC<IProps> = (props: IProps) => {
|
|||
|
||||
const _onLogoutClicked = (): void => {
|
||||
Modal.createDialog(QuestionDialog, {
|
||||
title: _t("Sign out"),
|
||||
title: _t("action|sign_out"),
|
||||
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",
|
||||
{ brand },
|
||||
),
|
||||
button: _t("Sign out"),
|
||||
button: _t("action|sign_out"),
|
||||
focus: false,
|
||||
onFinished: (doLogout) => {
|
||||
if (doLogout) {
|
||||
|
@ -71,7 +71,7 @@ const CryptoStoreTooNewDialog: React.FC<IProps> = (props: IProps) => {
|
|||
hasCancel={false}
|
||||
onPrimaryButtonClick={() => props.onFinished(false)}
|
||||
>
|
||||
<button onClick={_onLogoutClicked}>{_t("Sign out")}</button>
|
||||
<button onClick={_onLogoutClicked}>{_t("action|sign_out")}</button>
|
||||
</DialogButtons>
|
||||
</BaseDialog>
|
||||
);
|
||||
|
|
|
@ -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>
|
||||
<DialogButtons
|
||||
primaryButton={_t("Stop")}
|
||||
primaryButton={_t("action|stop")}
|
||||
primaryButtonClass="danger"
|
||||
hasCancel={true}
|
||||
cancelButton={_t("action|continue")}
|
||||
|
@ -402,7 +402,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
|||
<Spinner w={24} h={24} />
|
||||
<p>{exportProgressText}</p>
|
||||
<DialogButtons
|
||||
primaryButton={_t("Cancel")}
|
||||
primaryButton={_t("action|cancel")}
|
||||
primaryButtonClass="danger"
|
||||
hasCancel={false}
|
||||
onPrimaryButtonClick={onCancel}
|
||||
|
|
|
@ -153,7 +153,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
{feedbackSection}
|
||||
</React.Fragment>
|
||||
}
|
||||
button={hasFeedback ? _t("Send feedback") : _t("Go back")}
|
||||
button={hasFeedback ? _t("Send feedback") : _t("action|go_back")}
|
||||
buttonDisabled={hasFeedback && !comment}
|
||||
onFinished={onFinished}
|
||||
/>
|
||||
|
|
|
@ -53,7 +53,7 @@ const GenericFeatureFeedbackDialog: React.FC<IProps> = ({
|
|||
Modal.createDialog(InfoDialog, {
|
||||
title,
|
||||
description: _t("Feedback sent! Thanks, we appreciate it!"),
|
||||
button: _t("Close"),
|
||||
button: _t("action|close"),
|
||||
hasCloseButton: false,
|
||||
fixedWidth: false,
|
||||
});
|
||||
|
|
|
@ -105,7 +105,7 @@ export default class InteractiveAuthDialog<T> extends React.Component<Interactiv
|
|||
[SSOAuthEntry.PHASE_POSTAUTH]: {
|
||||
title: _t("Confirm to continue"),
|
||||
body: _t("Click the button below to confirm your identity."),
|
||||
continueText: _t("Confirm"),
|
||||
continueText: _t("action|confirm"),
|
||||
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>
|
||||
<br />
|
||||
<AccessibleButton onClick={this.onDismissClick} className="mx_GeneralButton" autoFocus={true}>
|
||||
{_t("Dismiss")}
|
||||
{_t("action|dismiss")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
autoComplete="off"
|
||||
placeholder={hasPlaceholder ? _t("Search") : undefined}
|
||||
placeholder={hasPlaceholder ? _t("action|search") : undefined}
|
||||
data-testid="invite-dialog-input"
|
||||
/>
|
||||
);
|
||||
|
@ -1419,7 +1419,7 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
|
|||
onClick={this.onCancel}
|
||||
className="mx_InviteDialog_transferConsultConnect_pushRight"
|
||||
>
|
||||
{_t("Cancel")}
|
||||
{_t("action|cancel")}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton
|
||||
kind="primary"
|
||||
|
|
|
@ -202,9 +202,9 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
|
|||
return (
|
||||
<QuestionDialog
|
||||
hasCancelButton={true}
|
||||
title={_t("Sign out")}
|
||||
title={_t("action|sign_out")}
|
||||
description={_t("Are you sure you want to sign out?")}
|
||||
button={_t("Sign out")}
|
||||
button={_t("action|sign_out")}
|
||||
onFinished={this.onFinished}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -237,10 +237,10 @@ const ManageRestrictedJoinRuleDialog: React.FC<IProps> = ({ room, selected = [],
|
|||
{inviteOnlyWarning}
|
||||
<div className="mx_ManageRestrictedJoinRuleDialog_footer_buttons">
|
||||
<AccessibleButton kind="primary_outline" onClick={() => onFinished()}>
|
||||
{_t("Cancel")}
|
||||
{_t("action|cancel")}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton kind="primary" onClick={() => onFinished(Array.from(newSelected))}>
|
||||
{_t("Confirm")}
|
||||
{_t("action|confirm")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -173,9 +173,9 @@ export default class RoomUpgradeWarningDialog extends React.Component<IProps, IS
|
|||
} else {
|
||||
footer = (
|
||||
<DialogButtons
|
||||
primaryButton={_t("Upgrade")}
|
||||
primaryButton={_t("action|upgrade")}
|
||||
onPrimaryButtonClick={this.onContinue}
|
||||
cancelButton={_t("Cancel")}
|
||||
cancelButton={_t("action|cancel")}
|
||||
onCancel={this.onCancel}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -104,7 +104,7 @@ export default abstract class ScrollableBaseModal<
|
|||
<div className="mx_CompoundDialog_content">{this.renderContent()}</div>
|
||||
<div className="mx_CompoundDialog_footer">
|
||||
<AccessibleButton onClick={this.onCancel} kind="primary_outline">
|
||||
{this.state.cancelLabel ?? _t("Cancel")}
|
||||
{this.state.cancelLabel ?? _t("action|cancel")}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton
|
||||
onClick={this.onSubmit}
|
||||
|
|
|
@ -64,7 +64,7 @@ export default class ServerOfflineDialog extends React.PureComponent<IProps> {
|
|||
if (t.status === TransactionStatus.Error) {
|
||||
button = (
|
||||
<AccessibleButton kind="link" onClick={() => t.run()}>
|
||||
{_t("Resend")}
|
||||
{_t("action|resend")}
|
||||
</AccessibleButton>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ export default class SeshatResetDialog extends React.PureComponent<Props> {
|
|||
primaryButton={_t("Reset event store")}
|
||||
onPrimaryButtonClick={this.props.onFinished.bind(null, true)}
|
||||
primaryButtonClass="danger"
|
||||
cancelButton={_t("Cancel")}
|
||||
cancelButton={_t("action|cancel")}
|
||||
onCancel={this.props.onFinished.bind(null, false)}
|
||||
/>
|
||||
</BaseDialog>
|
||||
|
|
|
@ -40,9 +40,9 @@ export default class SessionRestoreErrorDialog extends React.Component<IProps> {
|
|||
|
||||
private onClearStorageClick = (): void => {
|
||||
Modal.createDialog(QuestionDialog, {
|
||||
title: _t("Sign out"),
|
||||
title: _t("action|sign_out"),
|
||||
description: <div>{_t("Sign out and remove encryption keys?")}</div>,
|
||||
button: _t("Sign out"),
|
||||
button: _t("action|sign_out"),
|
||||
danger: true,
|
||||
onFinished: this.props.onFinished,
|
||||
});
|
||||
|
|
|
@ -179,7 +179,7 @@ export default class SetEmailDialog extends React.Component<IProps, IState> {
|
|||
value={_t("action|continue")}
|
||||
onClick={this.onSubmit}
|
||||
/>
|
||||
<input type="submit" value={_t("Skip")} onClick={this.onCancelled} />
|
||||
<input type="submit" value={_t("action|skip")} onClick={this.onCancelled} />
|
||||
</div>
|
||||
</BaseDialog>
|
||||
);
|
||||
|
|
|
@ -73,7 +73,7 @@ export default class StorageEvictedDialog extends React.Component<IProps> {
|
|||
</p>
|
||||
</div>
|
||||
<DialogButtons
|
||||
primaryButton={_t("Sign out")}
|
||||
primaryButton={_t("action|sign_out")}
|
||||
onPrimaryButtonClick={this.onSignOutClick}
|
||||
focus={true}
|
||||
hasCancel={false}
|
||||
|
|
|
@ -205,7 +205,7 @@ export default class TermsDialog extends React.PureComponent<ITermsDialogProps,
|
|||
<th>{_t("Service")}</th>
|
||||
<th>{_t("Summary")}</th>
|
||||
<th>{_t("Document")}</th>
|
||||
<th>{_t("Accept")}</th>
|
||||
<th>{_t("action|accept")}</th>
|
||||
</tr>
|
||||
{rows}
|
||||
</tbody>
|
||||
|
|
|
@ -123,7 +123,7 @@ export default class UploadConfirmDialog extends React.Component<IProps> {
|
|||
</div>
|
||||
|
||||
<DialogButtons
|
||||
primaryButton={_t("Upload")}
|
||||
primaryButton={_t("action|upload")}
|
||||
hasCancel={false}
|
||||
onPrimaryButtonClick={this.onUploadClick}
|
||||
focus={true}
|
||||
|
|
|
@ -77,7 +77,7 @@ const BaseTool: React.FC<XOR<IMinProps, IProps>> = ({
|
|||
<div className={classNames("mx_DevTools_content", className)}>{children}</div>
|
||||
<div className="mx_Dialog_buttons">
|
||||
{extraButton}
|
||||
<button onClick={onBackClick}>{_t("Back")}</button>
|
||||
<button onClick={onBackClick}>{_t("action|back")}</button>
|
||||
{actionButton}
|
||||
</div>
|
||||
</>
|
||||
|
|
|
@ -43,19 +43,19 @@ export const OidcLogoutDialog: React.FC<OidcLogoutDialogProps> = ({
|
|||
const logoutUrl = getOidcLogoutUrl(delegatedAuthAccountUrl, deviceId);
|
||||
|
||||
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">
|
||||
{_t("You will be redirected to your server's authentication provider to complete sign out.")}
|
||||
</div>
|
||||
<div className="mx_Dialog_buttons">
|
||||
{hasOpenedLogoutLink ? (
|
||||
<AccessibleButton kind="primary" onClick={() => onFinished(true)}>
|
||||
{_t("Close")}
|
||||
{_t("action|close")}
|
||||
</AccessibleButton>
|
||||
) : (
|
||||
<>
|
||||
<AccessibleButton kind="secondary" onClick={() => onFinished(false)}>
|
||||
{_t("Cancel")}
|
||||
{_t("action|cancel")}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton
|
||||
element="a"
|
||||
|
|
|
@ -309,7 +309,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
|||
)}
|
||||
</p>
|
||||
<DialogButtons
|
||||
primaryButton={_t("Reset")}
|
||||
primaryButton={_t("action|reset")}
|
||||
onPrimaryButtonClick={this.onConfirmResetAllClick}
|
||||
hasCancel={true}
|
||||
onCancel={this.onCancel}
|
||||
|
@ -426,7 +426,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
|||
onChange={this.onRecoveryKeyFileChange}
|
||||
/>
|
||||
<AccessibleButton kind="primary" onClick={this.onRecoveryKeyFileUploadClick}>
|
||||
{_t("Upload")}
|
||||
{_t("action|upload")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -435,7 +435,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
|||
primaryButton={_t("action|continue")}
|
||||
onPrimaryButtonClick={this.onRecoveryKeyNext}
|
||||
hasCancel={true}
|
||||
cancelButton={_t("Go Back")}
|
||||
cancelButton={_t("action|go_back")}
|
||||
cancelButtonClass="danger"
|
||||
onCancel={this.onCancel}
|
||||
focus={false}
|
||||
|
|
|
@ -52,7 +52,7 @@ export default class ConfirmDestroyCrossSigningDialog extends React.Component<IP
|
|||
primaryButton={_t("Clear cross-signing keys")}
|
||||
onPrimaryButtonClick={this.onConfirm}
|
||||
primaryButtonClass="danger"
|
||||
cancelButton={_t("Cancel")}
|
||||
cancelButton={_t("action|cancel")}
|
||||
onCancel={this.onDecline}
|
||||
/>
|
||||
</BaseDialog>
|
||||
|
|
|
@ -120,7 +120,7 @@ export default class CreateCrossSigningDialog extends React.PureComponent<IProps
|
|||
[SSOAuthEntry.PHASE_POSTAUTH]: {
|
||||
title: _t("Confirm encryption setup"),
|
||||
body: _t("Click the button below to confirm setting up encryption."),
|
||||
continueText: _t("Confirm"),
|
||||
continueText: _t("action|confirm"),
|
||||
continueKind: "primary",
|
||||
},
|
||||
};
|
||||
|
|
|
@ -687,7 +687,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
|
|||
onClick={listener}
|
||||
tabIndex={-1}
|
||||
>
|
||||
{showViewButton ? _t("View") : _t("Join")}
|
||||
{showViewButton ? _t("action|view") : _t("action|join")}
|
||||
</AccessibleButton>
|
||||
}
|
||||
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"
|
||||
autoCorrect="off"
|
||||
spellCheck="false"
|
||||
placeholder={_t("Search")}
|
||||
placeholder={_t("action|search")}
|
||||
value={query}
|
||||
onChange={setQuery}
|
||||
onKeyDown={onKeyDown}
|
||||
aria-owns="mx_SpotlightDialog_content"
|
||||
aria-activedescendant={activeDescendant}
|
||||
aria-label={_t("Search")}
|
||||
aria-label={_t("action|search")}
|
||||
aria-describedby="mx_SpotlightDialog_keyboardPrompt"
|
||||
/>
|
||||
{(publicRoomsLoading || peopleLoading || profileLoading) && <Spinner w={24} h={24} />}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue