From 00a69b996dd90b85fd58f18dc737128090929eff Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 2 Sep 2019 15:53:13 +0100 Subject: [PATCH] Clarify invite error text This fixes a typo in the message (valide) and also has better handling of error codes, because in some cases, we don't get one. Fixes https://github.com/vector-im/riot-web/issues/10683 --- src/components/views/rooms/RoomPreviewBar.js | 6 ++++-- src/i18n/strings/en_EN.json | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index 7715bd9339..f2573d46b8 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -337,8 +337,10 @@ module.exports = React.createClass({ title = _t("Something went wrong with your invite to %(roomName)s", {roomName: this._roomName()}); const joinRule = this._joinRule(); - const errCodeMessage = _t("%(errcode)s was returned while trying to valide your invite. You could try to pass this information on to a room admin.", - {errcode: this.state.threePidFetchError.errcode}, + const errCodeMessage = _t( + "An error (%(errcode)s) was returned while trying to validate your " + + "invite. You could try to pass this information on to a room admin.", + {errcode: this.state.threePidFetchError.errcode || _t("unknown error code")}, ); switch (joinRule) { case "invite": diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index d88484c283..8bfc918ada 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -892,7 +892,8 @@ "Re-join": "Re-join", "You were banned from %(roomName)s by %(memberName)s": "You were banned from %(roomName)s by %(memberName)s", "Something went wrong with your invite to %(roomName)s": "Something went wrong with your invite to %(roomName)s", - "%(errcode)s was returned while trying to valide your invite. You could try to pass this information on to a room admin.": "%(errcode)s was returned while trying to valide your invite. You could try to pass this information on to a room admin.", + "An error (%(errcode)s) was returned while trying to validate your invite. You could try to pass this information on to a room admin.": "An error (%(errcode)s) was returned while trying to validate your invite. You could try to pass this information on to a room admin.", + "unknown error code": "unknown error code", "You can only join it with a working invite.": "You can only join it with a working invite.", "You can still join it because this is a public room.": "You can still join it because this is a public room.", "Join the discussion": "Join the discussion", @@ -1399,7 +1400,6 @@ "Collapse Reply Thread": "Collapse Reply Thread", "End-to-end encryption information": "End-to-end encryption information", "Failed to set Direct Message status of room": "Failed to set Direct Message status of room", - "unknown error code": "unknown error code", "Failed to forget room %(errCode)s": "Failed to forget room %(errCode)s", "All messages (noisy)": "All messages (noisy)", "All messages": "All messages",