diff --git a/public/locales/en/chat.json b/public/locales/en/chat.json index cd8cd1ee..d3ffe957 100644 --- a/public/locales/en/chat.json +++ b/public/locales/en/chat.json @@ -46,5 +46,10 @@ "file": "file", "image": "image", "forward": "forward", - "voice": "Voice Chat" + "voice": "Voice Chat", + "deafen": "Deafen", + "undeafen": "Undeafen", + "mute": "Mute", + "unmute": "Unmute", + "leave_voice": "Leave Voice Chat" } diff --git a/public/locales/zh/chat.json b/public/locales/zh/chat.json index dc173cd1..ebf25a68 100644 --- a/public/locales/zh/chat.json +++ b/public/locales/zh/chat.json @@ -47,5 +47,10 @@ "file": "文件", "image": "图片", "forward": "转发", - "voice": "音频通话" + "voice": "音频通话", + "deafen": "静默", + "undeafen": "取消静默", + "mute": "静音", + "unmute": "取消静音", + "leave_voice": "离开" } diff --git a/src/routes/chat/RTCWidget.tsx b/src/routes/chat/RTCWidget.tsx index 84e529db..13712e37 100644 --- a/src/routes/chat/RTCWidget.tsx +++ b/src/routes/chat/RTCWidget.tsx @@ -1,13 +1,15 @@ -import React from 'react'; +// import React from 'react'; import { useAppSelector } from '../../app/store'; import User from '../../common/component/User'; import IconMic from '../../assets/icons/mic.on.svg'; import IconMicOff from '../../assets/icons/mic.off.svg'; -import IconCallOff from '../../assets/icons/call.off.svg'; +import IconCallOff from '../../assets/icons/headphone.svg'; import IconSoundOn from '../../assets/icons/sound.on.svg'; import IconSoundOff from '../../assets/icons/sound.off.svg'; import { useVoice } from '../../common/component/Voice'; import Signal from '../../common/component/Signal'; +import Tooltip from '../../common/component/Tooltip'; +import { useTranslation } from 'react-i18next'; type Props = { id: number, @@ -15,6 +17,7 @@ type Props = { } const RTCWidget = ({ id, context = "channel" }: Props) => { + const { t } = useTranslation("chat"); const { leave, voicingInfo, setMute, setDeafen } = useVoice({ context, id }); const { loginUser, channelData, userData } = useAppSelector(store => { return { @@ -33,28 +36,34 @@ const RTCWidget = ({ id, context = "channel" }: Props) => {