From f6977209a0d18121f977e592e20840fd8cc22ee0 Mon Sep 17 00:00:00 2001 From: Audrey Lambert Date: Thu, 16 Mar 2023 18:45:12 +0100 Subject: [PATCH 1/3] Change labels personalMessages and People --- patches/patches.json | 20 +++-- .../matrix-react-sdk+3.63.0.patch | 75 +++++++++++++++++++ .../matrix-react-sdk+3.63.0.patch | 14 ---- src/i18n/strings/tchap_translations.json | 5 -- 4 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch delete mode 100644 patches/use-the-term-person-not-message-direct/matrix-react-sdk+3.63.0.patch diff --git a/patches/patches.json b/patches/patches.json index 44ffacb025..37b50fedc4 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -131,14 +131,6 @@ "res/css/views/elements/_TooltipButton.pcss" ] }, - "use-the-term-person-not-message-direct": { - "comments" : "add RoomContextMenu and SpacePreferencesDialog under the same patch (same update)", - "github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/365", - "package": "matrix-react-sdk", - "files": [ - "src/components/views/right_panel/RoomSummaryCard.tsx" - ] - }, "cross-signing-ui": { "comments": "reword cross-signing dialogs and remove confirmation dialog", "github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/406", @@ -214,5 +206,17 @@ "files": [ "src/components/views/dialogs/security/AccessSecretStorageDialog.tsx" ] + }, + "use-the-term-people-not-direct-messages": { + "github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/448", + "package": "matrix-react-sdk", + "files": [ + "src/components/views/dialogs/SpacePreferencesDialog.tsx", + "src/components/views/context_menus/RoomContextMenu.tsx", + "src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx", + "src/components/views/spaces/QuickSettingsButton.tsx", + "src/stores/spaces/index.ts", + "src/components/views/dialogs/spotlight/SpotlightDialog.tsx" + ] } } diff --git a/patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch b/patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch new file mode 100644 index 0000000000..c01701348d --- /dev/null +++ b/patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch @@ -0,0 +1,75 @@ +diff --git a/node_modules/matrix-react-sdk/src/components/views/context_menus/RoomContextMenu.tsx b/node_modules/matrix-react-sdk/src/components/views/context_menus/RoomContextMenu.tsx +index c4a3c2a..5d6d1df 100644 +--- a/node_modules/matrix-react-sdk/src/components/views/context_menus/RoomContextMenu.tsx ++++ b/node_modules/matrix-react-sdk/src/components/views/context_menus/RoomContextMenu.tsx +@@ -222,7 +222,8 @@ const RoomContextMenu = ({ room, onFinished, ...props }: IProps) => { + onFinished(); + PosthogTrackers.trackInteraction("WebRoomHeaderContextMenuPeopleItem", ev); + }} +- label={_t("People")} ++ // label={TCHAP: change label _t("People")} ++ label={_t("Direct Messages") /* end TCHAP */} + iconClassName="mx_RoomTile_iconPeople" + > + {room.getJoinedMemberCount()} +diff --git a/node_modules/matrix-react-sdk/src/components/views/dialogs/SpacePreferencesDialog.tsx b/node_modules/matrix-react-sdk/src/components/views/dialogs/SpacePreferencesDialog.tsx +index 61c9de1..5833e76 100644 +--- a/node_modules/matrix-react-sdk/src/components/views/dialogs/SpacePreferencesDialog.tsx ++++ b/node_modules/matrix-react-sdk/src/components/views/dialogs/SpacePreferencesDialog.tsx +@@ -52,7 +52,9 @@ const SpacePreferencesAppearanceTab = ({ space }: Pick) => { + ); + }} + > +- {_t("People")} ++ {/* TCHAP: change label {_t("People")} */} ++ {_t("Direct Messages")} ++ {/* end TCHAP */} + +

+ {_t( +diff --git a/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx b/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx +index 4518fcf..845641a 100644 +--- a/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx ++++ b/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx +@@ -105,7 +105,9 @@ const SidebarUserSettingsTab = () => { + onChange={onMetaSpaceChangeFactory(MetaSpace.People, "WebSettingsSidebarTabSpacesCheckbox")} + className="mx_SidebarUserSettingsTab_peopleCheckbox" + > +- {_t("People")} ++ {/* TCHAP: change label {_t("People")} */} ++ {_t("Direct Messages")} ++ {/* end TCHAP */} + +

+ {_t("Group all your people in one place.")} +diff --git a/node_modules/matrix-react-sdk/src/components/views/spaces/QuickSettingsButton.tsx b/node_modules/matrix-react-sdk/src/components/views/spaces/QuickSettingsButton.tsx +index 2402907..6b81b41 100644 +--- a/node_modules/matrix-react-sdk/src/components/views/spaces/QuickSettingsButton.tsx ++++ b/node_modules/matrix-react-sdk/src/components/views/spaces/QuickSettingsButton.tsx +@@ -103,7 +103,9 @@ const QuickSettingsButton = ({ isPanelCollapsed = false }) => { + onChange={onMetaSpaceChangeFactory(MetaSpace.People, "WebQuickSettingsPinToSidebarCheckbox")} + > + +- {_t("People")} ++ {/* TCHAP: change label {_t("People")} */} ++ {_t("Direct Messages")} ++ {/* end TCHAP */} + + = ({ room, onClose }) => { - - - - {!isVideoRoom && ( diff --git a/src/i18n/strings/tchap_translations.json b/src/i18n/strings/tchap_translations.json index 207ed2f189..ea765055f8 100644 --- a/src/i18n/strings/tchap_translations.json +++ b/src/i18n/strings/tchap_translations.json @@ -534,11 +534,6 @@ "en": "Ban from space", "fr": "Interdire l’accès à l'espace (définitif)" }, - "People": { - "comments" : "in element, People label is used to title direct messages room and sometimes room members, use Room Members label in this case)", - "en": "Direct messages", - "fr": "Messages directs" - }, "Group all your people in one place.": { "en":"Group all your direct message room in one place.", "fr":"Regroupe tous vos salons de message directs au même endroit." From f3fcb3130a546be9149d99942f2b1cb8fe3379b7 Mon Sep 17 00:00:00 2001 From: Audrey Lambert Date: Thu, 16 Mar 2023 18:54:44 +0100 Subject: [PATCH 2/3] Remove SpotlightDialog file from patches.json --- patches/patches.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/patches/patches.json b/patches/patches.json index 37b50fedc4..348218c42b 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -215,8 +215,7 @@ "src/components/views/context_menus/RoomContextMenu.tsx", "src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx", "src/components/views/spaces/QuickSettingsButton.tsx", - "src/stores/spaces/index.ts", - "src/components/views/dialogs/spotlight/SpotlightDialog.tsx" + "src/stores/spaces/index.ts" ] } } From f04ecf1ed4886449fec95dfa18619467c8b716f2 Mon Sep 17 00:00:00 2001 From: Audrey Lambert Date: Fri, 17 Mar 2023 10:37:31 +0100 Subject: [PATCH 3/3] Change missing Message Direct label --- patches/patches.json | 1 + .../matrix-react-sdk+3.63.0.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/patches/patches.json b/patches/patches.json index 348218c42b..52f18b9c78 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -215,6 +215,7 @@ "src/components/views/context_menus/RoomContextMenu.tsx", "src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx", "src/components/views/spaces/QuickSettingsButton.tsx", + "src/components/views/rooms/RoomList.tsx", "src/stores/spaces/index.ts" ] } diff --git a/patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch b/patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch index c01701348d..d87b9f5836 100644 --- a/patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch +++ b/patches/use-the-term-people-not-direct-messages/matrix-react-sdk+3.63.0.patch @@ -27,6 +27,19 @@ index 61c9de1..5833e76 100644

{_t( +diff --git a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomList.tsx b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomList.tsx +index 90c53d5..cffe6f9 100644 +--- a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomList.tsx ++++ b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomList.tsx +@@ -397,7 +397,7 @@ const TAG_AESTHETICS: ITagAestheticsMap = { + defaultHidden: false, + }, + [DefaultTagID.DM]: { +- sectionLabel: _td("People"), ++ sectionLabel: _td("Direct Messages"), + isInvite: false, + defaultHidden: false, + AuxButtonComponent: DmAuxButton, diff --git a/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx b/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx index 4518fcf..845641a 100644 --- a/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SidebarUserSettingsTab.tsx