replace 2 error messages with keys

This commit is contained in:
barisusakli
2014-04-10 12:47:48 -04:00
parent a345302454
commit 14d0081fdf
2 changed files with 5 additions and 17 deletions

View File

@@ -63,5 +63,7 @@
"invalid-file": "Invalid File",
"uploads-are-disabled": "Uploads are disabled",
"signature-too-long" : "Signature can't be longer than %1 characters!"
"signature-too-long" : "Signature can't be longer than %1 characters!",
"cant-chat-with-yourself": "You can't chat with yourself!",
}

View File

@@ -320,25 +320,11 @@ var socket,
app.openChat = function (username, touid) {
if (username === app.username) {
app.alert({
type: 'warning',
title: 'Invalid Chat',
message: "You can't chat with yourself!",
timeout: 5000
});
return;
return app.alertError('[[error:cant-chat-with-yourself]]');
}
if (!app.uid) {
app.alert({
type: 'danger',
title: 'Not Logged In',
message: 'Please log in to chat with <strong>' + username + '</strong>',
timeout: 5000
});
return;
return app.alertError('[[error:not-logged-in]]');
}
require(['chat'], function (chat) {