mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-1293: Add type notations to comments; switch arguments to more obvious strings.
This commit is contained in:
@@ -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;
|
||||
},
|
||||
{}
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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",
|
||||
|
Reference in New Issue
Block a user