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

@ -63,7 +63,7 @@ const BaseCard: React.FC<IProps> = forwardRef<HTMLDivElement, IProps>(
onBack?.(ev);
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} />;
}
@ -74,7 +74,7 @@ const BaseCard: React.FC<IProps> = forwardRef<HTMLDivElement, IProps>(
data-testid="base-card-close-button"
className="mx_BaseCard_close"
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) {
pinTitle = _t("You can only pin up to %(count)s widgets", { count: MAX_PINNED });
} else {
pinTitle = isPinned ? _t("Unpin") : _t("Pin");
pinTitle = isPinned ? _t("action|unpin") : _t("action|pin");
}
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);
};
const maximiseTitle = isMaximised ? _t("Close") : _t("Maximise");
const maximiseTitle = isMaximised ? _t("action|close") : _t("Maximise");
let openTitle = "";
if (isPinned) {

View file

@ -387,7 +387,7 @@ export const UserOptionsSection: React.FC<{
)}
</div>
),
button: _t("Ignore"),
button: _t("action|ignore"),
});
const [confirmed] = await finished;
@ -407,7 +407,7 @@ export const UserOptionsSection: React.FC<{
kind="link"
className={classNames("mx_UserInfo_field", { mx_UserInfo_destructive: !isIgnored })}
>
{isIgnored ? _t("Unignore") : _t("Ignore")}
{isIgnored ? _t("Unignore") : _t("action|ignore")}
</AccessibleButton>
);
@ -1483,7 +1483,7 @@ const BasicUserInfo: React.FC<{
}
}}
>
{_t("Verify")}
{_t("action|verify")}
</AccessibleButton>
</div>
);
@ -1716,7 +1716,7 @@ const UserInfo: React.FC<IProps> = ({ user, room, onClose, phase = RightPanelPha
if (phase === RightPanelPhases.EncryptionPanel) {
const verificationRequest = (props as React.ComponentProps<typeof EncryptionPanel>).verificationRequest;
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} />
{text ? <p>{text}</p> : null}
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
{_t("Got it")}
{_t("action|got_it")}
</AccessibleButton>
</div>
);
@ -357,7 +357,7 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
<p>{text}</p>
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
{_t("Got it")}
{_t("action|got_it")}
</AccessibleButton>
</div>
);