김대욱

chat.js 수정_1

...@@ -144,20 +144,20 @@ var connect = function() { ...@@ -144,20 +144,20 @@ var connect = function() {
144 144
145 case 'success': 145 case 'success':
146 document.getElementById('send').childNodes[0].nodeValue = 'Send'; 146 document.getElementById('send').childNodes[0].nodeValue = 'Send';
147 - updateBar('mdi-content-send', 'Enter your message here', false); 147 + updateBar('mdi-content-send', 'Enter키를 눌러 메세지를 입력하세요.', false);
148 connected = true; 148 connected = true;
149 settings.name = username; 149 settings.name = username;
150 localStorage.settings = JSON.stringify(settings); 150 localStorage.settings = JSON.stringify(settings);
151 break; 151 break;
152 152
153 case 'update': 153 case 'update':
154 - showChat('info', null, data.user.oldun + ' changed its name to ' + data.user.un); 154 + showChat('info', null, data.user.oldun + '님이 아이디를 ' + data.user.un + '로 바꿨습니다.');
155 clients[data.user.id] = data.user; 155 clients[data.user.id] = data.user;
156 break; 156 break;
157 157
158 case 'connection': 158 case 'connection':
159 var userip = data.user.ip ? ' [' + data.user.ip + ']' : ''; 159 var userip = data.user.ip ? ' [' + data.user.ip + ']' : '';
160 - showChat('info', null, data.user.un + userip + ' connected to the server'); 160 + showChat('info', null, data.user.un + userip + '님이 서버에 입장했습니다.');
161 161
162 clients[data.user.id] = data.user; 162 clients[data.user.id] = data.user;
163 document.getElementById('users').innerHTML = Object.keys(clients).length + ' USERS'; 163 document.getElementById('users').innerHTML = Object.keys(clients).length + ' USERS';
...@@ -167,7 +167,7 @@ var connect = function() { ...@@ -167,7 +167,7 @@ var connect = function() {
167 var userip = data.user.ip ? ' [' + data.user.ip + ']' : ''; 167 var userip = data.user.ip ? ' [' + data.user.ip + ']' : '';
168 168
169 if(data.user.un != null) { 169 if(data.user.un != null) {
170 - showChat('info', null, data.user.un + userip + ' disconnected from the server'); 170 + showChat('info', null, data.user.un + userip + '님이 서버에서 퇴장했습니다.');
171 } 171 }
172 172
173 delete clients[data.user.id]; 173 delete clients[data.user.id];
...@@ -175,7 +175,7 @@ var connect = function() { ...@@ -175,7 +175,7 @@ var connect = function() {
175 break; 175 break;
176 176
177 case 'spam': 177 case 'spam':
178 - showChat('global', null, 'You have to wait 1 second between messages. Continuing on spamming the servers may get you banned. Warning ' + data.warn + ' of 5'); 178 + showChat('global', null, 'Warning :: 메세지를 1초 뒤에 입력해주세요. 계속해서 도배하면 강퇴당합니다. 5회 중 ' + data.warn + '회 경고');
179 break; 179 break;
180 180
181 case 'clients': 181 case 'clients':
...@@ -433,7 +433,7 @@ function handleInput() { ...@@ -433,7 +433,7 @@ function handleInput() {
433 break; 433 break;
434 434
435 default: 435 default:
436 - showChat('light', 'Error', 'Unknown command, use /help to get a list of the available commands'); 436 + showChat('light', 'Error', '알 수 없는 명령어 입니다, /help를 입력하여 사용가능한 명령어를 확인하세요.');
437 break; 437 break;
438 } 438 }
439 } else { 439 } else {
...@@ -683,7 +683,7 @@ if(Notification) { ...@@ -683,7 +683,7 @@ if(Notification) {
683 if('speechSynthesis' in window) { 683 if('speechSynthesis' in window) {
684 $('#toggle-synthesis').show(); 684 $('#toggle-synthesis').show();
685 textToSpeech = new SpeechSynthesisUtterance(); 685 textToSpeech = new SpeechSynthesisUtterance();
686 - textToSpeech.lang = 'en'; 686 + textToSpeech.lang = 'ko';
687 } 687 }
688 688
689 if('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) { 689 if('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) {
...@@ -691,7 +691,7 @@ if('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) { ...@@ -691,7 +691,7 @@ if('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) {
691 var speechToText = new webkitSpeechRecognition(); 691 var speechToText = new webkitSpeechRecognition();
692 speechToText.interimResults = true; 692 speechToText.interimResults = true;
693 speechToText.continuous = true; 693 speechToText.continuous = true;
694 - speechToText.lang = 'en-US'; 694 + speechToText.lang = 'ko-KR';
695 } 695 }
696 696
697 if(speechToText) { 697 if(speechToText) {
...@@ -701,7 +701,7 @@ if(speechToText) { ...@@ -701,7 +701,7 @@ if(speechToText) {
701 for (var i = event.resultIndex; i < event.results.length; ++i) { 701 for (var i = event.resultIndex; i < event.results.length; ++i) {
702 if (event.results[i].isFinal) { 702 if (event.results[i].isFinal) {
703 $('#message').val(event.results[i][0].transcript); 703 $('#message').val(event.results[i][0].transcript);
704 - updateBar('mdi-content-send', 'Enter your message here', false); 704 + updateBar('mdi-content-send', 'Enter키를 눌러 메세지를 입력하세요.', false);
705 speechToText.stop(); 705 speechToText.stop();
706 handleInput(); 706 handleInput();
707 } else { 707 } else {
...@@ -712,7 +712,7 @@ if(speechToText) { ...@@ -712,7 +712,7 @@ if(speechToText) {
712 } 712 }
713 713
714 speechToText.onerror = function(event) { 714 speechToText.onerror = function(event) {
715 - updateBar('mdi-content-send', 'Enter your message here', false); 715 + updateBar('mdi-content-send', 'Enter키를 눌러 메세지를 입력하세요.', false);
716 } 716 }
717 717
718 } 718 }
......