replace 2 error messages with keys

v1.18.x
barisusakli 11 years ago
parent a345302454
commit 14d0081fdf

@ -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!",
}

@ -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) {

Loading…
Cancel
Save