-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add translation for server error "You are not invited to this room" (#…
…515) * Add translation for server error "You are not invited to this room" * Add patch * Change translation for title and subtitle
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
patches/add-translations-for-server-errors/matrix-react-sdk+3.68.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/node_modules/matrix-react-sdk/src/stores/RoomViewStore.tsx b/node_modules/matrix-react-sdk/src/stores/RoomViewStore.tsx | ||
index 47bc9b9..05902fd 100644 | ||
--- a/node_modules/matrix-react-sdk/src/stores/RoomViewStore.tsx | ||
+++ b/node_modules/matrix-react-sdk/src/stores/RoomViewStore.tsx | ||
@@ -581,6 +581,12 @@ export class RoomViewStore extends EventEmitter { | ||
let description: ReactNode = err.message ? err.message : JSON.stringify(err); | ||
logger.log("Failed to join room:", description); | ||
|
||
+ /* :TCHAP: add this for a translation */ | ||
+ if (typeof description === 'string' && description.includes('You are not invited to this room')) { | ||
+ description = _t("Access possible only by invitation of a member of the room."); | ||
+ } | ||
+ /* end :TCHAP: */ | ||
+ | ||
if (err.name === "ConnectionError") { | ||
description = _t("There was an error joining."); | ||
} else if (err.errcode === "M_INCOMPATIBLE_ROOM_VERSION") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters