Skip to content

Commit

Permalink
hindi added in languages
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshuNegi755 committed Nov 26, 2020
1 parent 656165b commit c70024d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Chat/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const Chat = ({ location, user }) => {
const typingFun = () => {
socket.emit('typing', 'typing...');
clearTimeout(typingTimeout);
typingTimeout = setTimeout(function() { socket.emit('typing', ''); }, 2000);
typingTimeout = setTimeout(function() { socket.emit('typing', ''); }, 1000);
}

if(!loggedIn) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Messages/Message/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReactEmoji from 'react-emoji';
const Message = ({ message: { text, user, replyUser, replyText, replyMsgId }, name, mutedUsersList, sendReply, id, room, scrollToMsg, report }) => {

//state array for storing joined msg in different language for chat ui
const [joinedInDiffLang] = useState(['joined' /*english*/, 'आला' /*marathi*/, 'சேர்ந்துகொண்டார்'/*tamil*/, 'ਸ਼ਾਮਲ ਹੋ ਗਿਆ ਹੈ' /*punjabi*/]);
const [joinedInDiffLang] = useState(['joined' /*english*/, 'शामिल' /*hindi*/, 'आला' /*marathi*/, 'சேர்ந்துகொண்டார்'/*tamil*/, 'ਸ਼ਾਮਲ ਹੋ ਗਿਆ ਹੈ' /*punjabi*/]);

var myTimeout;
const start = () => myTimeout = setTimeout(function() { report(user, text); }, 1000);
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ io.on('connect', (socket) => {
socketJoinFun(user.roomId, `${user.name}, welcome to room ${user.room}.`, `${user.name} has joined!`);
break;
case 'hindi':
socketJoinFun(user.roomId, `${user.name}, welcome to room ${user.room}.`, `${user.name} has joined!`);
socketJoinFun(user.roomId, `${user.name}, आपका रूम ${user.room} मे स्वागत है`, `${user.name} रूम मे शामिल हो गए है`);
break;
case 'spanish':
socketJoinFun(user.roomId, `${user.name}, welcome to room ${user.room}.`, `${user.name} has joined!`);
Expand Down Expand Up @@ -303,7 +303,7 @@ io.on('connect', (socket) => {
socketDisconnectFun(user.roomId, `${user.name} has left.`);
break;
case 'hindi':
socketDisconnectFun(user.roomId, `${user.name} has left.`);
socketDisconnectFun(user.roomId, `${user.name} ने रूम छोड़ दिया है`);
break;
case 'spanish':
socketDisconnectFun(user.roomId, `${user.name} has left.`);
Expand Down

0 comments on commit c70024d

Please sign in to comment.