fix kick and update ban messages

This commit is contained in:
Midov 2022-03-30 00:42:24 +02:00 committed by q
parent 0eb26e5669
commit 41edb169c4
2 changed files with 40 additions and 0 deletions

View File

@ -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

37
fix_kick.sh Executable file
View File

@ -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