2014-09-18 12:21:07 -04:00
|
|
|
// The templating function only supports variables.
|
|
|
|
// Define a variable as so: {variable_name}
|
|
|
|
define({
|
2014-09-18 15:38:15 -04:00
|
|
|
motd: '\n\n' +
|
|
|
|
'▄████▄ ██▀███ ▓██ ██▓ ██▓███ ▄▄▄█████▓ ▄▄▄ ██▓ ██ ▄█▀ \n' +
|
|
|
|
'▒██▀ ▀█ ▓██ ▒ ██▒▒██ ██▒▓██░ ██▒▓ ██▒ ▓▒▒████▄ ▓██▒ ██▄█▒ \n'+
|
|
|
|
'▒▓█ ▄ ▓██ ░▄█ ▒ ▒██ ██░▓██░ ██▓▒▒ ▓██░ ▒░▒██ ▀█▄ ▒██░ ▓███▄░ \n'+
|
|
|
|
'▒▓▓▄ ▄██▒▒██▀▀█▄ ░ ▐██▓░▒██▄█▓▒ ▒░ ▓██▓ ░ ░██▄▄▄▄██ ▒██░ ▓██ █▄ \n'+
|
|
|
|
'▒ ▓███▀ ░░██▓ ▒██▒ ░ ██▒▓░▒██▒ ░ ░ ▒██▒ ░ ▓█ ▓██▒░██████▒▒██▒ █▄ \n'+
|
|
|
|
'░ ░▒ ▒ ░░ ▒▓ ░▒▓░ ██▒▒▒ ▒▓▒░ ░ ░ ▒ ░░ ▒▒ ▓▒█░░ ▒░▓ ░▒ ▒▒ ▓▒ \n'+
|
|
|
|
' ░ ▒ ░▒ ░ ▒░▓██ ░▒░ ░▒ ░ ░ ▒ ▒▒ ░░ ░ ▒ ░░ ░▒ ▒░ \n'+
|
|
|
|
'░ ░░ ░ ▒ ▒ ░░ ░░ ░ ░ ▒ ░ ░ ░ ░░ ░ \n'+
|
|
|
|
'░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ \n'+
|
|
|
|
'░ ░ ░ \n'+
|
|
|
|
' https://github.com/hexagon/cryptalk \n'+
|
|
|
|
' \n'+
|
|
|
|
' Tip of the day: /help \n'+
|
|
|
|
' \n'+
|
2014-09-18 15:55:36 -04:00
|
|
|
'----------------------------------------------------------------------',
|
2014-09-18 15:38:15 -04:00
|
|
|
|
2014-09-18 15:55:36 -04:00
|
|
|
help: ' \n' +
|
|
|
|
'Cryptalk, encrypted instant chat. \n' +
|
|
|
|
' \n' +
|
2014-09-18 15:38:15 -04:00
|
|
|
'---------------------------------------------------------------------- \n' +
|
2014-09-18 15:55:36 -04:00
|
|
|
' \n' +
|
|
|
|
'Available commands: \n' +
|
|
|
|
' /generate Generate random room \n' +
|
|
|
|
' /join RoomId Join a room \n' +
|
2014-09-19 13:25:16 -04:00
|
|
|
' /count Count participants of room \n' +
|
2014-09-18 15:55:36 -04:00
|
|
|
' /nick NickName Sets an optional nick \n' +
|
2014-09-21 08:20:25 -04:00
|
|
|
' /mute Toggle notification sounds \n' +
|
2014-09-18 15:55:36 -04:00
|
|
|
' /key OurStrongPassphrase Sets encryption key \n' +
|
2014-09-19 13:25:16 -04:00
|
|
|
' /leave Leave the room \n' +
|
2014-09-18 15:55:36 -04:00
|
|
|
' /clear Clear on-screen buffer \n' +
|
|
|
|
' /help This \n' +
|
|
|
|
' \n' +
|
|
|
|
' \n' +
|
2014-09-21 08:20:25 -04:00
|
|
|
'You can select any of the five last commands/messages with up/down key.\n' +
|
|
|
|
' \n' +
|
|
|
|
'Due to security reasons, /key command is not saved, and command \n' +
|
|
|
|
'history is automatically cleared after one minute of inactivity. \n' +
|
|
|
|
' \n' +
|
2014-09-18 15:55:36 -04:00
|
|
|
'<strong>It is highly recommended to use incognito mode while chatting, \n' +
|
|
|
|
'to prevent browsers from keeping history or cache.</strong> \n' +
|
|
|
|
' \n' +
|
2014-09-18 15:38:15 -04:00
|
|
|
'---------------------------------------------------------------------- \n' +
|
2014-09-18 15:55:36 -04:00
|
|
|
' ',
|
2014-09-18 12:21:07 -04:00
|
|
|
|
2014-09-18 13:17:41 -04:00
|
|
|
default_nick: 'Anonymous',
|
2014-09-18 13:48:17 -04:00
|
|
|
|
2014-09-21 15:09:08 -04:00
|
|
|
// All post templates will have access to the properties in the 'settings' module,
|
|
|
|
// along with the current nick, room, mute-status and of course the message ('text').
|
2014-09-18 12:21:07 -04:00
|
|
|
post: {
|
2014-09-18 15:38:15 -04:00
|
|
|
motd: '<li><i class="motd">{text}</i></li>',
|
2014-09-19 13:25:16 -04:00
|
|
|
info: '<li>INF> <i class="info">{text}</i></li>',
|
|
|
|
server: '<li>SRV> <i class="server">{text}</i></li>',
|
|
|
|
error: '<li>ERR> <i class="error">{text}</i></li>',
|
|
|
|
message: '<li><i class="nick">{nick}></i> <i class="message">{text}</i></li>'
|
2014-09-18 12:21:07 -04:00
|
|
|
},
|
|
|
|
|
2014-09-21 15:09:08 -04:00
|
|
|
// All message templates will have access to the properties in the 'settings' module,
|
|
|
|
// along with the current nick, room and mute-status.
|
2014-09-18 12:21:07 -04:00
|
|
|
messages: {
|
2014-09-21 15:09:08 -04:00
|
|
|
key_to_short: 'Hmm, that\'s a weak key, try again...',
|
|
|
|
key_to_long: 'Man that\'s a long key. Make it a tad short, \'kay?',
|
2014-09-18 12:21:07 -04:00
|
|
|
key_ok_ready: 'Key set, you can now start communicating.',
|
|
|
|
key_ok_but_no_room: 'Key set, you can now join a room and start communicating.',
|
2014-09-21 19:04:52 -04:00
|
|
|
key_no_host: 'You have to connect to a host before setting the key.',
|
|
|
|
|
|
|
|
join_no_host: 'You have to connect to a host before joining a room.',
|
2014-09-21 15:09:08 -04:00
|
|
|
|
|
|
|
nick_to_short: 'Nickname is too short, it has to be at least {nick_minLen} characters long. Try again.',
|
|
|
|
nick_to_long: 'Nickname is too long, it can be at most {nick_maxLen} characters long. Try again.',
|
|
|
|
nick_set: 'From now on, you\'re referred to as \'{nick}\'.',
|
|
|
|
|
2014-09-18 12:21:07 -04:00
|
|
|
msg_no_room: 'You have to join a room before sending messages. See /help.',
|
2014-09-19 13:25:16 -04:00
|
|
|
not_in_room: 'You have to be in a room to count participants...',
|
2014-09-18 12:21:07 -04:00
|
|
|
msg_no_key: 'You have to set an encryption key before sending a message. See /help.',
|
2014-09-18 13:17:41 -04:00
|
|
|
leave_from_nowhere: 'How are you supposed to leave, while being nowhere?',
|
2014-09-18 12:21:07 -04:00
|
|
|
|
2014-09-20 09:26:43 -04:00
|
|
|
// Sounds
|
2014-09-22 16:11:13 -04:00
|
|
|
muted: 'Notifications and sounds are now muted.',
|
|
|
|
unmuted: 'Notifications and sounds are now on.',
|
2014-09-20 09:26:43 -04:00
|
|
|
|
2014-09-21 15:09:08 -04:00
|
|
|
// Extra variables: 'commandName'
|
2014-09-18 12:21:07 -04:00
|
|
|
unrecognized_command: 'Unrecognized command: "{commandName}"',
|
|
|
|
|
2014-09-21 15:09:08 -04:00
|
|
|
joined_room: 'Joined room {room}',
|
|
|
|
left_room: 'Left room {room}',
|
|
|
|
already_in_room: 'You are already in a room ({room}), stoopid.',
|
2014-09-18 12:21:07 -04:00
|
|
|
|
2014-09-21 14:45:20 -04:00
|
|
|
unable_to_decrypt: 'Unabled to decrypt received message, keys does not match.',
|
|
|
|
|
|
|
|
socket_error: 'A network error has occurred. A restart may be required to bring back full functionality.<br>Examine the logs for more details.',
|
|
|
|
connecting: 'Connecting to host {host}...',
|
2014-09-21 19:04:52 -04:00
|
|
|
connected: 'A connection to the server has been established. Happy chatting!',
|
|
|
|
disconnected: 'Disconnected from host {host}.',
|
|
|
|
already_connected: 'You have to disconnect from {host} before joining another.',
|
|
|
|
reconnect_no_host: 'There is no host to reconnect with.',
|
|
|
|
|
|
|
|
host_available: '<span class="info">{index}</span> <span class="good">[AVAILABLE]</span> <span class="neutral">{name}</span>\n',
|
|
|
|
host_unavailable: '<span class="info">{index}</span> <span class="bad">[UNAVAILABLE]</span> <span class="neutral">{name}</span>\n'
|
2014-09-19 13:25:16 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
server: {
|
|
|
|
person_joined: 'A person joined this room.',
|
|
|
|
person_left: 'A person left this room.',
|
2014-09-21 08:55:24 -04:00
|
|
|
room_generated: 'Room {payload} generated.',
|
2014-09-19 13:25:16 -04:00
|
|
|
person_count: 'There is {payload} person(s) in this room, including you.',
|
|
|
|
command_failed: 'Server command failed, you\'re probably trying to du something bogus.',
|
|
|
|
bogus: 'Received a bogus message from server.',
|
2014-09-18 12:21:07 -04:00
|
|
|
}
|
|
|
|
});
|