GUACAMOLE-1293: Add type notations to comments; switch arguments to more obvious strings.

This commit is contained in:
Virtually Nick
2022-07-25 22:03:39 -04:00
parent 773a03a7d9
commit 22e8ba66ea
3 changed files with 8 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ angular.module('client').directive('guacClientMessage', [function guacClientMess
/** /**
* Returns a set of key/value object pairs that represent the * Returns a set of key/value object pairs that represent the
* arguments provided as part of the message in the form * arguments provided as part of the message in the form
* ARGS[0] = value. Guacamole's translation system relies on * "ARGS_0 = value". Guacamole's translation system relies on
* the arguments being available in this format in order to be able * the arguments being available in this format in order to be able
* to handle substituting values for an arbitrary list of arguments. * to handle substituting values for an arbitrary list of arguments.
* *
@@ -71,7 +71,7 @@ angular.module('client').directive('guacClientMessage', [function guacClientMess
$scope.getMessageArgs = function getMessageArgs() { $scope.getMessageArgs = function getMessageArgs() {
return $scope.message.args.reduce( return $scope.message.args.reduce(
function(acc, value, index) { function(acc, value, index) {
acc[`ARGS[${index}]`] = value; acc[`ARGS_${index}`] = value;
return acc; return acc;
}, },
{} {}

View File

@@ -39,12 +39,16 @@ angular.module('client').factory('ManagedClientMessage', [function defineManaged
/** /**
* The message code sent by the server that will be used to locate the * The message code sent by the server that will be used to locate the
* message within the Guacamole translation framework. * message within the Guacamole translation framework.
*
* @type Number
*/ */
this.msgcode = template.msgcode; this.msgcode = template.msgcode;
/** /**
* Any arguments that should be passed through the translation system * Any arguments that should be passed through the translation system
* and displayed as part of the message. * and displayed as part of the message.
*
* @type String[]
*/ */
this.args = template.args; this.args = template.args;

View File

@@ -73,8 +73,8 @@
"ACTION_UPLOAD_FILES" : "Upload Files", "ACTION_UPLOAD_FILES" : "Upload Files",
"CLIENT_MESSAGE_DEFAULT" : "", "CLIENT_MESSAGE_DEFAULT" : "",
"CLIENT_MESSAGE_JOINED" : "User {ARGS[0]} has joined the connection.", "CLIENT_MESSAGE_JOINED" : "User {ARGS_0} has joined the connection.",
"CLIENT_MESSAGE_LEFT" : "User {ARGS[0]} has left the connection.", "CLIENT_MESSAGE_LEFT" : "User {ARGS_0} has left the connection.",
"DIALOG_HEADER_CONNECTING" : "Connecting", "DIALOG_HEADER_CONNECTING" : "Connecting",
"DIALOG_HEADER_CONNECTION_ERROR" : "Connection Error", "DIALOG_HEADER_CONNECTION_ERROR" : "Connection Error",