-
-
Notifications
You must be signed in to change notification settings - Fork 570
Strings
Jakub T. Jankiewicz edited this page Dec 18, 2023
·
2 revisions
You can customize the strings used by the library. You can translate them to a different language or just change it. You can do this by modifying the default options object: $.terminal.defaults.strings
or using the strings option:
$('body').terminal({
hello(message) {
this.echo(message);
}
}, {
strings: {
commandNotFound: "Invalid command '%s'!"
}
});
Here is a list of strings:
strings: {
comletionParameters: 'From version 1.0.0 completion function need to' +
' have two arguments',
wrongPasswordTryAgain: 'Wrong username or password try again!',
wrongPassword: 'Wrong username or password!',
ajaxAbortError: 'Error while aborting ajax call!',
wrongArity: "Wrong number of arguments. Function '%s' expects %s got" +
' %s!',
commandNotFound: "Command '%s' Not Found!",
oneRPCWithIgnore: 'You can use only one rpc with describe == false ' +
'or rpc without system.describe',
oneInterpreterFunction: "You can't use more than one function (rpc " +
'without system.describe or with option describe == false count' +
's as one)',
loginFunctionMissing: "You didn't specify a login function",
noTokenError: 'Access denied (no token)',
serverResponse: 'Server responded',
wrongGreetings: 'Wrong value of greetings parameter',
notWhileLogin: "You can't call `%s' function while in login",
loginIsNotAFunction: 'Authenticate must be a function',
canExitError: "You can't exit from main interpreter",
invalidCompletion: 'Invalid completion',
invalidSelector: 'Sorry, but terminal said that you use invalid ' +
'selector!',
invalidTerminalId: 'Invalid Terminal ID',
login: 'login',
password: 'password',
recursiveLoop: 'Recursive loop in echo detected, skip',
notAString: '%s function: argument is not a string',
redrawError: 'Internal error, wrong position in cmd redraw',
invalidStrings: 'Command %s have unclosed strings',
invalidMask: 'Invalid mask used only string or boolean allowed',
defunctTerminal: "You can't call method on terminal that was destroyed"
}
Library for Web-Based Terminal in JavaScript, (jQuery Terminal: git repo)
Copyright (c) 2011-2023 Jakub T. Jankiewicz