김대욱

chat.js 수정_1

......@@ -144,20 +144,20 @@ var connect = function() {
case 'success':
document.getElementById('send').childNodes[0].nodeValue = 'Send';
updateBar('mdi-content-send', 'Enter your message here', false);
updateBar('mdi-content-send', 'Enter키를 눌러 메세지를 입력하세요.', false);
connected = true;
settings.name = username;
localStorage.settings = JSON.stringify(settings);
break;
case 'update':
showChat('info', null, data.user.oldun + ' changed its name to ' + data.user.un);
showChat('info', null, data.user.oldun + '님이 아이디를 ' + data.user.un + '로 바꿨습니다.');
clients[data.user.id] = data.user;
break;
case 'connection':
var userip = data.user.ip ? ' [' + data.user.ip + ']' : '';
showChat('info', null, data.user.un + userip + ' connected to the server');
showChat('info', null, data.user.un + userip + '님이 서버에 입장했습니다.');
clients[data.user.id] = data.user;
document.getElementById('users').innerHTML = Object.keys(clients).length + ' USERS';
......@@ -167,7 +167,7 @@ var connect = function() {
var userip = data.user.ip ? ' [' + data.user.ip + ']' : '';
if(data.user.un != null) {
showChat('info', null, data.user.un + userip + ' disconnected from the server');
showChat('info', null, data.user.un + userip + '님이 서버에서 퇴장했습니다.');
}
delete clients[data.user.id];
......@@ -175,7 +175,7 @@ var connect = function() {
break;
case 'spam':
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');
showChat('global', null, 'Warning :: 메세지를 1초 뒤에 입력해주세요. 계속해서 도배하면 강퇴당합니다. 5회 중 ' + data.warn + '회 경고');
break;
case 'clients':
......@@ -433,7 +433,7 @@ function handleInput() {
break;
default:
showChat('light', 'Error', 'Unknown command, use /help to get a list of the available commands');
showChat('light', 'Error', '알 수 없는 명령어 입니다, /help를 입력하여 사용가능한 명령어를 확인하세요.');
break;
}
} else {
......@@ -683,7 +683,7 @@ if(Notification) {
if('speechSynthesis' in window) {
$('#toggle-synthesis').show();
textToSpeech = new SpeechSynthesisUtterance();
textToSpeech.lang = 'en';
textToSpeech.lang = 'ko';
}
if('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) {
......@@ -691,7 +691,7 @@ if('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) {
var speechToText = new webkitSpeechRecognition();
speechToText.interimResults = true;
speechToText.continuous = true;
speechToText.lang = 'en-US';
speechToText.lang = 'ko-KR';
}
if(speechToText) {
......@@ -701,7 +701,7 @@ if(speechToText) {
for (var i = event.resultIndex; i < event.results.length; ++i) {
if (event.results[i].isFinal) {
$('#message').val(event.results[i][0].transcript);
updateBar('mdi-content-send', 'Enter your message here', false);
updateBar('mdi-content-send', 'Enter키를 눌러 메세지를 입력하세요.', false);
speechToText.stop();
handleInput();
} else {
......@@ -712,7 +712,7 @@ if(speechToText) {
}
speechToText.onerror = function(event) {
updateBar('mdi-content-send', 'Enter your message here', false);
updateBar('mdi-content-send', 'Enter키를 눌러 메세지를 입력하세요.', false);
}
}
......