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

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

View file

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

View file

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

View file

@ -79,7 +79,7 @@ export default class PinnedEventTile extends React.Component<IProps> {
<AccessibleTooltipButton
onClick={this.props.onUnpinClicked}
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}
isExpanded={plusMenuDisplayed}
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) {
title = _t("Join the room to participate");
primaryActionLabel = _t("Join");
primaryActionLabel = _t("action|join");
primaryActionHandler = () => {
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");
primaryActionHandler = this.onRegisterClick;
}
secondaryActionLabel = _t("Sign In");
secondaryActionLabel = _t("action|sign_in");
secondaryActionHandler = this.onLoginClick;
}
if (this.props.previewLoading) {
@ -524,7 +524,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
} else {
title = _t("Do you want to join %(roomName)s?", { roomName });
subTitle = [avatar, _t("<userName/> invited you", {}, { userName: () => inviterElement })];
primaryActionLabel = _t("Accept");
primaryActionLabel = _t("action|accept");
}
const myUserId = MatrixClientPeg.safeGet().getSafeUserId();
@ -541,7 +541,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
}
primaryActionHandler = this.props.onJoinClick;
secondaryActionLabel = _t("Reject");
secondaryActionLabel = _t("action|reject");
secondaryActionHandler = this.props.onRejectClick;
if (this.props.onRejectAndIgnoreClick) {

View file

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

View file

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

View file

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

View file

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