diff --git a/src/components/views/messages/MPollEndBody.tsx b/src/components/views/messages/MPollEndBody.tsx index 2ae6a73e86f..bf8272a58f7 100644 --- a/src/components/views/messages/MPollEndBody.tsx +++ b/src/components/views/messages/MPollEndBody.tsx @@ -21,7 +21,9 @@ import { logger } from "matrix-js-sdk/src/logger"; import { Icon as PollIcon } from "../../../../res/img/element-icons/room/composer/poll.svg"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; +import { _t } from "../../../languageHandler"; import { textForEvent } from "../../../TextForEvent"; +import { Caption } from "../typography/Caption"; import { IBodyProps } from "./IBodyProps"; import MPollBody from "./MPollBody"; @@ -105,5 +107,10 @@ export const MPollEndBody = React.forwardRef(({ mxEvent, ...pro ); } - return ; + return ( +
+ {_t("Ended a poll")} + +
+ ); }); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index c2a7b5e1f23..6e190b6dab2 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2413,6 +2413,7 @@ "Based on %(count)s votes|other": "Based on %(count)s votes", "Based on %(count)s votes|one": "Based on %(count)s vote", "edited": "edited", + "Ended a poll": "Ended a poll", "Error decrypting video": "Error decrypting video", "Error processing voice message": "Error processing voice message", "Add reaction": "Add reaction", diff --git a/test/components/views/messages/__snapshots__/MPollEndBody-test.tsx.snap b/test/components/views/messages/__snapshots__/MPollEndBody-test.tsx.snap index e98ec1f4fcc..bad7c2d129d 100644 --- a/test/components/views/messages/__snapshots__/MPollEndBody-test.tsx.snap +++ b/test/components/views/messages/__snapshots__/MPollEndBody-test.tsx.snap @@ -10,99 +10,106 @@ exports[` when poll start event does not exist in current timeli exports[` when poll start event exists in current timeline renders an ended poll 1`] = `
-
-

+ - Question? -

+ Ended a poll +
+

+ Question? +

- Socks -
-
- 0 votes +
+ Socks +
+
+ 0 votes +
-
-
+ class="mx_PollOption_popularityBackground" + > +
+
-
-
- Shoes +
+ Shoes +
+
+ 0 votes +
+
+
- 0 votes -
+ class="mx_PollOption_popularityAmount" + style="width: 0%;" + />
+
+
+ Final result based on 0 votes
-
- Final result based on 0 votes -
-
-
-
`;