From 6eda1fa6e22419f42299ea23b96910eb1596c54e Mon Sep 17 00:00:00 2001 From: Kerry Date: Wed, 29 Mar 2023 11:13:51 +1300 Subject: [PATCH] replace `Polls history` strings with `Poll history` (#10454) Co-authored-by: Michael Weimann --- cypress/e2e/polls/pollHistory.spec.ts | 2 +- src/components/views/dialogs/RoomSettingsDialog.tsx | 2 +- src/components/views/polls/pollHistory/PollHistory.tsx | 2 +- src/components/views/right_panel/RoomSummaryCard.tsx | 2 +- src/i18n/strings/en_EN.json | 2 +- test/components/views/dialogs/RoomSettingsDialog-test.tsx | 2 +- .../dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap | 4 ++-- .../components/views/polls/pollHistory/PollHistory-test.tsx | 6 +++--- .../pollHistory/__snapshots__/PollHistory-test.tsx.snap | 2 +- test/components/views/right_panel/RoomSummaryCard-test.tsx | 4 ++-- .../right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cypress/e2e/polls/pollHistory.spec.ts b/cypress/e2e/polls/pollHistory.spec.ts index 4ead781b07..2491f9f159 100644 --- a/cypress/e2e/polls/pollHistory.spec.ts +++ b/cypress/e2e/polls/pollHistory.spec.ts @@ -77,7 +77,7 @@ describe("Poll history", () => { function openPollHistory(): void { cy.get('.mx_HeaderButtons [aria-label="Room info"]').click(); cy.get(".mx_RoomSummaryCard").within(() => { - cy.contains("Polls history").click(); + cy.contains("Poll history").click(); }); } diff --git a/src/components/views/dialogs/RoomSettingsDialog.tsx b/src/components/views/dialogs/RoomSettingsDialog.tsx index cb733c831a..8c5de0b579 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.tsx +++ b/src/components/views/dialogs/RoomSettingsDialog.tsx @@ -167,7 +167,7 @@ export default class RoomSettingsDialog extends React.Component tabs.push( new Tab( ROOM_POLL_HISTORY_TAB, - _td("Polls history"), + _td("Poll history"), "mx_RoomSettingsDialog_pollsIcon", this.props.onFinished(true)} />, ), diff --git a/src/components/views/polls/pollHistory/PollHistory.tsx b/src/components/views/polls/pollHistory/PollHistory.tsx index 15fbba13bc..dd1d4a071e 100644 --- a/src/components/views/polls/pollHistory/PollHistory.tsx +++ b/src/components/views/polls/pollHistory/PollHistory.tsx @@ -63,7 +63,7 @@ export const PollHistory: React.FC = ({ room, matrixClient, pe const title = focusedPoll ? ( setFocusedPollId(null)} /> ) : ( - _t("Polls history") + _t("Poll history") ); return ( diff --git a/src/components/views/right_panel/RoomSummaryCard.tsx b/src/components/views/right_panel/RoomSummaryCard.tsx index 0b9b65e702..a32d8da047 100644 --- a/src/components/views/right_panel/RoomSummaryCard.tsx +++ b/src/components/views/right_panel/RoomSummaryCard.tsx @@ -343,7 +343,7 @@ const RoomSummaryCard: React.FC = ({ room, permalinkCreator, onClose }) )} {!isVideoRoom && ( )} {pinningEnabled && !isVideoRoom && ( diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 66c5f18102..48c1b62956 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2237,7 +2237,7 @@ "Not encrypted": "Not encrypted", "About": "About", "Files": "Files", - "Polls history": "Polls history", + "Poll history": "Poll history", "Pinned": "Pinned", "Export chat": "Export chat", "Share room": "Share room", diff --git a/test/components/views/dialogs/RoomSettingsDialog-test.tsx b/test/components/views/dialogs/RoomSettingsDialog-test.tsx index 76ff04588e..5a4356cb33 100644 --- a/test/components/views/dialogs/RoomSettingsDialog-test.tsx +++ b/test/components/views/dialogs/RoomSettingsDialog-test.tsx @@ -99,7 +99,7 @@ describe("", () => { it("displays poll history when tab clicked", () => { const { container } = getComponent(); - fireEvent.click(screen.getByText("Polls history")); + fireEvent.click(screen.getByText("Poll history")); expect(container.querySelector(".mx_SettingsTab")).toMatchSnapshot(); }); diff --git a/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap b/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap index 70aa1fc1fd..5bbdf72ffc 100644 --- a/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap +++ b/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap @@ -74,7 +74,7 @@ NodeList [ - Polls history + Poll history , ] @@ -90,7 +90,7 @@ exports[` poll history displays poll history when tab clic

- Polls history + Poll history

", () => { fireEvent.click(getByText("Question?")); - expect(queryByText("Polls history")).not.toBeInTheDocument(); + expect(queryByText("Poll history")).not.toBeInTheDocument(); // elements from MPollBody expect(getByText("Question?")).toMatchSnapshot(); expect(getByText("Socks")).toBeInTheDocument(); @@ -394,13 +394,13 @@ describe("", () => { expect(getByText("Question?")).toBeInTheDocument(); // header not shown - expect(queryByText("Polls history")).not.toBeInTheDocument(); + expect(queryByText("Poll history")).not.toBeInTheDocument(); expect(getByText("Active polls")).toMatchSnapshot(); fireEvent.click(getByText("Active polls")); // main list header displayed again - expect(getByText("Polls history")).toBeInTheDocument(); + expect(getByText("Poll history")).toBeInTheDocument(); // active filter still active expect(getByTestId("filter-tab-PollHistory_filter-ACTIVE").firstElementChild).toBeChecked(); // list displayed diff --git a/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap b/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap index 566cca5bb5..49762b1bbc 100644 --- a/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap +++ b/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap @@ -37,7 +37,7 @@ exports[` renders a list of active polls when there are polls in

- Polls history + Poll history

", () => { it("renders poll history option", () => { const { getByText } = getComponent(); - expect(getByText("Polls history")).toBeInTheDocument(); + expect(getByText("Poll history")).toBeInTheDocument(); }); it("opens poll history dialog on button click", () => { const { getByText } = getComponent(); - fireEvent.click(getByText("Polls history")); + fireEvent.click(getByText("Poll history")); expect(modalSpy).toHaveBeenCalledWith(PollHistoryDialog, { room, diff --git a/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap b/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap index 6128ecdd73..23f6e60087 100644 --- a/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap +++ b/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap @@ -88,7 +88,7 @@ exports[` renders the room summary 1`] = ` role="button" tabindex="0" > - Polls history + Poll history