1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Fix long lines

This commit is contained in:
J. Ryan Stinnett
2021-06-29 13:42:19 +01:00
parent fe123fc605
commit 0551becafd
6 changed files with 60 additions and 19 deletions

View File

@ -363,7 +363,10 @@ class FeaturedUser extends React.Component {
"Failed to remove a user from the summary of %(groupId)s", "Failed to remove a user from the summary of %(groupId)s",
{ groupId: this.props.groupId }, { groupId: this.props.groupId },
), ),
description: _t("The user '%(displayName)s' could not be removed from the summary.", { displayName }), description: _t(
"The user '%(displayName)s' could not be removed from the summary.",
{ displayName },
),
}, },
); );
}); });

View File

@ -1131,8 +1131,14 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
description: ( description: (
<span> <span>
{ isSpace { isSpace
? _t("Are you sure you want to leave the space '%(spaceName)s'?", { spaceName: roomToLeave.name }) ? _t(
: _t("Are you sure you want to leave the room '%(roomName)s'?", { roomName: roomToLeave.name }) } "Are you sure you want to leave the space '%(spaceName)s'?",
{ spaceName: roomToLeave.name },
)
: _t(
"Are you sure you want to leave the room '%(roomName)s'?",
{ roomName: roomToLeave.name },
)}
{ warnings } { warnings }
</span> </span>
), ),

View File

@ -487,7 +487,13 @@ export default class Registration extends React.Component<IProps, IState> {
fragmentAfterLogin={this.props.fragmentAfterLogin} fragmentAfterLogin={this.props.fragmentAfterLogin}
/> />
<h3 className="mx_AuthBody_centered"> <h3 className="mx_AuthBody_centered">
{ _t("%(ssoButtons)s Or %(usernamePassword)s", { ssoButtons: "", usernamePassword: "" }).trim() } {_t(
"%(ssoButtons)s Or %(usernamePassword)s",
{
ssoButtons: "",
usernamePassword: "",
},
).trim()}
</h3> </h3>
</React.Fragment>; </React.Fragment>;
} }

View File

@ -216,7 +216,9 @@ const NetworkDropdown = ({ onOptionChange, protocols = {}, selectedServerName, s
if (removableServers.has(server)) { if (removableServers.has(server)) {
const onClick = async () => { const onClick = async () => {
closeMenu(); closeMenu();
const { finished } = Modal.createTrackedDialog("Network Dropdown", "Remove server", QuestionDialog, { const { finished } = Modal.createTrackedDialog(
"Network Dropdown", "Remove server", QuestionDialog,
{
title: _t("Are you sure?"), title: _t("Are you sure?"),
description: _t("Are you sure you want to remove <b>%(serverName)s</b>", { description: _t("Are you sure you want to remove <b>%(serverName)s</b>", {
serverName: server, serverName: server,
@ -225,7 +227,9 @@ const NetworkDropdown = ({ onOptionChange, protocols = {}, selectedServerName, s
}), }),
button: _t("Remove"), button: _t("Remove"),
fixedWidth: false, fixedWidth: false,
}, "mx_NetworkDropdown_dialog"); },
"mx_NetworkDropdown_dialog",
);
const [ok] = await finished; const [ok] = await finished;
if (!ok) return; if (!ok) return;

View File

@ -131,7 +131,9 @@ export default class BridgeTile extends React.PureComponent<IProps> {
const networkName = network.displayname || network.id; const networkName = network.displayname || network.id;
let networkLink = <span>{networkName}</span>; let networkLink = <span>{networkName}</span>;
if (typeof network.external_url === "string" && isUrlPermitted(network.external_url)) { if (typeof network.external_url === "string" && isUrlPermitted(network.external_url)) {
networkLink = <a href={network.external_url} target="_blank" rel="noreferrer noopener">{networkName}</a>; networkLink = (
<a href={network.external_url} target="_blank" rel="noreferrer noopener">{networkName}</a>
);
} }
networkItem = _t("Workspace: <networkLink/>", {}, { networkItem = _t("Workspace: <networkLink/>", {}, {
networkLink: () => networkLink, networkLink: () => networkLink,

View File

@ -169,11 +169,21 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
this.setState({ joinRule, guestAccess }); this.setState({ joinRule, guestAccess });
const client = MatrixClientPeg.get(); const client = MatrixClientPeg.get();
client.sendStateEvent(this.props.roomId, "m.room.join_rules", { join_rule: joinRule }, "").catch((e) => { client.sendStateEvent(
this.props.roomId,
"m.room.join_rules",
{ join_rule: joinRule },
"",
).catch((e) => {
console.error(e); console.error(e);
this.setState({ joinRule: beforeJoinRule }); this.setState({ joinRule: beforeJoinRule });
}); });
client.sendStateEvent(this.props.roomId, "m.room.guest_access", { guest_access: guestAccess }, "").catch((e) => { client.sendStateEvent(
this.props.roomId,
"m.room.guest_access",
{ guest_access: guestAccess },
"",
).catch((e) => {
console.error(e); console.error(e);
this.setState({ guestAccess: beforeGuestAccess }); this.setState({ guestAccess: beforeGuestAccess });
}); });
@ -215,11 +225,21 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
this.setState({ joinRule, guestAccess }); this.setState({ joinRule, guestAccess });
const client = MatrixClientPeg.get(); const client = MatrixClientPeg.get();
client.sendStateEvent(this.props.roomId, "m.room.join_rules", { join_rule: joinRule }, "").catch((e) => { client.sendStateEvent(
this.props.roomId,
"m.room.join_rules",
{ join_rule: joinRule },
"",
).catch((e) => {
console.error(e); console.error(e);
this.setState({ joinRule: beforeJoinRule }); this.setState({ joinRule: beforeJoinRule });
}); });
client.sendStateEvent(this.props.roomId, "m.room.guest_access", { guest_access: guestAccess }, "").catch((e) => { client.sendStateEvent(
this.props.roomId,
"m.room.guest_access",
{ guest_access: guestAccess },
"",
).catch((e) => {
console.error(e); console.error(e);
this.setState({ guestAccess: beforeGuestAccess }); this.setState({ guestAccess: beforeGuestAccess });
}); });