diff --git a/guacamole/src/main/frontend/src/app/client/directives/guacClientMessage.js b/guacamole/src/main/frontend/src/app/client/directives/guacClientMessage.js index 840ca40df..7bc4b6b6a 100644 --- a/guacamole/src/main/frontend/src/app/client/directives/guacClientMessage.js +++ b/guacamole/src/main/frontend/src/app/client/directives/guacClientMessage.js @@ -62,7 +62,7 @@ angular.module('client').directive('guacClientMessage', [function guacClientMess /** * Returns a set of key/value object pairs that represent the * 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 * 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() { return $scope.message.args.reduce( function(acc, value, index) { - acc[`ARGS[${index}]`] = value; + acc[`ARGS_${index}`] = value; return acc; }, {} diff --git a/guacamole/src/main/frontend/src/app/client/types/ManagedClientMessage.js b/guacamole/src/main/frontend/src/app/client/types/ManagedClientMessage.js index 9a7c2e18a..646a6d70a 100644 --- a/guacamole/src/main/frontend/src/app/client/types/ManagedClientMessage.js +++ b/guacamole/src/main/frontend/src/app/client/types/ManagedClientMessage.js @@ -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 * message within the Guacamole translation framework. + * + * @type Number */ this.msgcode = template.msgcode; /** * Any arguments that should be passed through the translation system * and displayed as part of the message. + * + * @type String[] */ this.args = template.args; diff --git a/guacamole/src/main/frontend/src/translations/en.json b/guacamole/src/main/frontend/src/translations/en.json index c19fed13d..f30b67382 100644 --- a/guacamole/src/main/frontend/src/translations/en.json +++ b/guacamole/src/main/frontend/src/translations/en.json @@ -73,8 +73,8 @@ "ACTION_UPLOAD_FILES" : "Upload Files", "CLIENT_MESSAGE_DEFAULT" : "", - "CLIENT_MESSAGE_JOINED" : "User {ARGS[0]} has joined the connection.", - "CLIENT_MESSAGE_LEFT" : "User {ARGS[0]} has left the connection.", + "CLIENT_MESSAGE_JOINED" : "User {ARGS_0} has joined the connection.", + "CLIENT_MESSAGE_LEFT" : "User {ARGS_0} has left the connection.", "DIALOG_HEADER_CONNECTING" : "Connecting", "DIALOG_HEADER_CONNECTION_ERROR" : "Connection Error",