Update text in RoomUpgradeWarningBar to match suggestions

This commit is contained in:
Travis Ralston 2019-03-15 16:00:34 -06:00
parent 92b851b26c
commit f6e3437944
3 changed files with 34 additions and 37 deletions

View file

@ -16,7 +16,7 @@ limitations under the License.
.mx_RoomUpgradeWarningBar {
text-align: center;
height: 176px;
height: 235px;
background-color: $event-selected-color;
align-items: center;
flex-direction: column;

View file

@ -37,47 +37,43 @@ module.exports = React.createClass({
render: function() {
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
let upgradeText = (
<div>
<div className="mx_RoomUpgradeWarningBar_body">
{_t("This room is using an unstable room version. If you aren't expecting " +
"this, please upgrade the room.")}
</div>
<p className="mx_RoomUpgradeWarningBar_upgradelink">
<AccessibleButton onClick={this.onUpgradeClick}>
{_t("Click here to upgrade to the latest room version.")}
</AccessibleButton>
</p>
</div>
);
if (this.props.recommendation.urgent) {
upgradeText = (
<div>
<div className="mx_RoomUpgradeWarningBar_header">
{_t("There is a known vulnerability affecting this room.")}
</div>
<div className="mx_RoomUpgradeWarningBar_body">
{_t("This room version is vulnerable to malicious modification of room state.")}
</div>
<p className="mx_RoomUpgradeWarningBar_upgradelink">
<AccessibleButton onClick={this.onUpgradeClick}>
{_t("Click here to upgrade to the latest room version and ensure room integrity " +
"is protected.")}
</AccessibleButton>
</p>
</div>
);
}
return (
<div className="mx_RoomUpgradeWarningBar">
{upgradeText}
<div className="mx_RoomUpgradeWarningBar_body">
<div className="mx_RoomUpgradeWarningBar_header">
{_t(
"Members of the room will be required to click a link to join the " +
"new room. No one will be automatically joined or invited to the new room.",
"This room is running room version <roomVersion />, which this homeserver has " +
"marked as <i>unstable</i>.",
{},
{
"roomVersion": () => <code>{this.props.room.getVersion()}</code>,
"i": (sub) => <i>{sub}</i>,
},
)}
</div>
<div className="mx_RoomUpgradeWarningBar_body">
<p>
{_t(
"Upgrading this room will shut down the current instance of the room and create " +
"an upgraded room with the same name.",
)}
</p>
<p>
{_t(
"<b>Warning</b>: Upgrading a room will <i>not automatically migrate room members " +
"to the new version of the room.</i> We'll post a link to the new room in the old " +
"version of the room - room members will have to click this link to join the new room.",
{}, {
"b": (sub) => <b>{sub}</b>,
"i": (sub) => <i>{sub}</i>,
},
)}
</p>
</div>
<p className="mx_RoomUpgradeWarningBar_upgradelink">
<AccessibleButton onClick={this.onUpgradeClick}>
{_t("Upgrade this room to the recommended room version")}
</AccessibleButton>
</p>
<div className="mx_RoomUpgradeWarningBar_small">
{_t("Only room administrators will see this warning")}
</div>

View file

@ -812,7 +812,8 @@
"Click here to upgrade to the latest room version.": "Click here to upgrade to the latest room version.",
"There is a known vulnerability affecting this room.": "There is a known vulnerability affecting this room.",
"This room version is vulnerable to malicious modification of room state.": "This room version is vulnerable to malicious modification of room state.",
"Click here to upgrade to the latest room version and ensure room integrity is protected.": "Click here to upgrade to the latest room version and ensure room integrity is protected.",
"This room is running room version <roomVersion/>, which this homeserver has marked as <i>unstable</i>.": "This room is running room version <roomVersion/>, which this homeserver has marked as <i>unstable</i>.",
"Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.": "Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.",
"Only room administrators will see this warning": "Only room administrators will see this warning",
"This Room": "This Room",
"All Rooms": "All Rooms",