mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
replace 2 error messages with keys
This commit is contained in:
@@ -63,5 +63,7 @@
|
|||||||
"invalid-file": "Invalid File",
|
"invalid-file": "Invalid File",
|
||||||
"uploads-are-disabled": "Uploads are disabled",
|
"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) {
|
app.openChat = function (username, touid) {
|
||||||
if (username === app.username) {
|
if (username === app.username) {
|
||||||
app.alert({
|
return app.alertError('[[error:cant-chat-with-yourself]]');
|
||||||
type: 'warning',
|
|
||||||
title: 'Invalid Chat',
|
|
||||||
message: "You can't chat with yourself!",
|
|
||||||
timeout: 5000
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!app.uid) {
|
if (!app.uid) {
|
||||||
app.alert({
|
return app.alertError('[[error:not-logged-in]]');
|
||||||
type: 'danger',
|
|
||||||
title: 'Not Logged In',
|
|
||||||
message: 'Please log in to chat with <strong>' + username + '</strong>',
|
|
||||||
timeout: 5000
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require(['chat'], function (chat) {
|
require(['chat'], function (chat) {
|
||||||
|
|||||||
Reference in New Issue
Block a user