From 41edb169c4dcac24e74245701b94f66c3ac1a63e Mon Sep 17 00:00:00 2001 From: Midov Date: Wed, 30 Mar 2022 00:42:24 +0200 Subject: [PATCH] fix kick and update ban messages --- code_patches.sh | 3 +++ fix_kick.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 fix_kick.sh diff --git a/code_patches.sh b/code_patches.sh index 0ee2e48..803468f 100755 --- a/code_patches.sh +++ b/code_patches.sh @@ -47,3 +47,6 @@ echo running component index fix... cd ../node_modules/matrix-react-sdk yarn reskindex cd ../../element-web-patches + +echo running kick fix... +./fix_kick.sh diff --git a/fix_kick.sh b/fix_kick.sh new file mode 100755 index 0000000..7440b56 --- /dev/null +++ b/fix_kick.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# just to fix kick +sed -i -e 's/remove/holocaust/g' \ + -e 's/Removes/Holocausts/g' ../node_modules/matrix-react-sdk/src/SlashCommands.tsx +sed -i -e 's/senderName)s removed %(targetName/senderName)s holocausted %(targetName/g' ../node_modules/matrix-react-sdk/src/TextForEvent.tsx +sed -i -e 's/"Remove/"Holocaust/g' \ + -e 's/Failed to remove/Failed to holocaust/g' ../node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx +sed -i -e 's/removed/holocausted/g' ../node_modules/matrix-react-sdk/src/components/views/rooms/RoomPreviewBar.tsx +sed -i -e 's/Remove users/Holocaust users/g' ../node_modules/matrix-react-sdk/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx + +sed -i -e 's/Removes user/Holocausts user/g' \ + -e 's/)s removed %(tar/)s holocausted %(tar/g' \ + -e 's/"Remove,/"Holocaust,/g' \ + -e 's/You were removed/You were holocausted/g' \ + -e 's/Remove from/Holocaust from/g' \ + -e 's/removed %(count)s times"/holocausted %(count)s times"/g' \ + -e 's/removed"/holocausted"/g' \ + -e 's/"Remove recent messages"/"Holocaust recent messages"/g' ../node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json + +sed -i -e 's/removes/holocausts/g' ../node_modules/matrix-react-sdk/src/settings/Settings.tsx +sed -i -e 's/Remove/Holocaust/g' ../node_modules/matrix-react-sdk/src/widgets/CapabilityText.tsx + +# replace ban messages +sed -i -e 's/"Ban"/"Gas"/g' ../node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx + +sed -i -e 's/Bans user with given id",/Gasses user with given id",/g' \ + -e 's/"Ban from %(roomName)s",/"Gas from %(roomName)s",/g' \ + -e 's/"Ban"/"Gas"/g' \ + -e 's/"Banned by %(displayName)s",/"Gassed by %(displayName)s",/g' \ + -e 's/"Banned users",/"Gassed users",/g' \ + -e 's/was banned",/was gassed",/g' \ + -e 's/was banned %(count)s times",/was gassed %(count)s times",/g' \ + -e 's/were banned",/were gassed",/g' \ + -e 's/banned from %(roomName)s by %(memberName)s",/gassed from %(roomName)s by %(memberName)s",/g' \ + -e 's/were banned %(count)s times",/were gassed %(count)s times",/g' \ + -e 's/s banned %(targetName)s: %(reason)s",/s gassed %(targetName)s: %(reason)s",/g' \ + -e 's/s banned %(targetName)s",/s gassed %(targetName)s",/g' ../node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json