Difference between revisions of "Translation"

From Complete Cyclos documentation wiki
Jump to: navigation, search
(General operation keys)
(Operation specific keys)
Line 363: Line 363:
 
| Security confirmation
 
| Security confirmation
 
| command.confirm.confirmation
 
| command.confirm.confirmation
| Texto de mensaje solicitando confirmacion para requerimiento de pago
+
| Message text requesting confirmation to a payment request
 
|  
 
|  
* {0} - Principal para miembro receptor del pago
+
* {0} - Principal for the member receiving the payment
* {1} - Nombre de usuario para miembro receptor del pago
+
* {1} - User name of the member receiving the payment
* {3} - Nombre del miembro receptor del pago
+
* {3} - Member name of the member receiving the payment
* {4} - Monto formateado
+
* {4} - Formatted amount
 
| {2} has requested you to pay {3}
 
| {2} has requested you to pay {3}
  
Line 374: Line 374:
 
| Security confirmation
 
| Security confirmation
 
| command.confirm.response.receiver
 
| command.confirm.response.receiver
| Confirmacion enviado al quien realizó un requerimiento de pago luego que el pago fue confirmado por el pagador
+
| Confirmation sent to the member issuing a payment request after the payment has been confirmed by the payer
 
|  
 
|  
* {0} - Monto formateado
+
* {0} - Formatted amount
* {1} - Número telefónico del miembro pagador
+
* {1} - Phone number of the payer member
* {2} - Nombre de usuario del miembrio pagador
+
* {2} - Name of the payer member
* {3} - Identificador de transaccion
+
* {3} - Transaction identifier
* {4} - Nuevo saldo disponible formateado (luego de realizado el pago)
+
* {4} - Formatted new available balance (after payment has been performed)
 
| You have received a payment of {0} from member {3} ({2}). Transaction ID: {4}. Your new account balance is : {5}
 
| You have received a payment of {0} from member {3} ({2}). Transaction ID: {4}. Your new account balance is : {5}
  
Line 386: Line 386:
 
| Security confirmation
 
| Security confirmation
 
| command.confirm.response.payer
 
| command.confirm.response.payer
| Notificación enviada a quien confirmó un requerimiento de pago
+
| Notification sent to the member confirming the payment request
 
|  
 
|  
* {0} - Monto formateado
+
* {0} - Formatted amount
* {1} - Número telefónico del miembro receptor del pago
+
* {1} - Phone number of the member receiving the payment
* {2} - Nombre de usuario del miembro receptor del pago
+
* {2} - User name of the member receiving the payment
* {3} - Nombre del miembro receptor del pago
+
* {3} - Member name of the member receiving the payment
* {4} - Identificador de transacción
+
* {4} - Transaction identifier
* {5} - Nuevo saldo disponible formateado (luego de realizado el pago)
+
* {5} - Formatted new available balance (after payment has been performed)
 
| You have made a payment of {0} to member: {3} ({2}). Transaction ID: {4}. New account balance: {5}
 
| You have made a payment of {0} to member: {3} ({2}). Transaction ID: {4}. New account balance: {5}
  
Line 399: Line 399:
 
| Security confirmation
 
| Security confirmation
 
| command.confirm.cancel.payer
 
| command.confirm.cancel.payer
| Notificación de cancelado de requerimiento de pago, enviada al pagador
+
| Notification for a canceled payment request, sent to the payer
 
|  
 
|  
* {0} - Monto formateado
+
* {0} - Formatted amount
* {1} - Número telefónico del miembro requirente (receptor) del pago
+
* {1} - Phone number of the member receiving the payment (issuing the payment request)
* {2} - Nombre de usuario del miembro requirente (Receptor) del pago
+
* {2} - User name of the member receiving the payment (issuing the payment request)
* {3} - Nombre del miembro requierente (Receptor) del pago
+
* {3} - Member name of the member receiving the payment (issuing the payment request)
* {4} - monto del requerimiento de pago cancelado
+
* {4} - Amount of the canceled payment
 
| Payment request from member {3} by {0} was canceled.
 
| Payment request from member {3} by {0} was canceled.
  
Line 411: Line 411:
 
| Security confirmation
 
| Security confirmation
 
| command.confirm.cancel.receiver
 
| command.confirm.cancel.receiver
| Notificación de cancelado de requerimiento de pago, enviada al requierente (receptor)
+
| Notification for a canceled payment request, sent to the payment request issuer (receiving member)
 
|  
 
|  
* {0} - Monto formateado
+
* {0} - Formatted amount
* {1} - Número telefónico del miembro pagador
+
* {1} - Phone number of the paying member
* {2} - Nombre de usuario del miembro pagador
+
* {2} - User name of the paying member
* {3} - Nombre del miembro requierente pagador
+
* {3} - Member name of the paying member
* {4} - monto del requerimiento de pago cancelado
+
* {4} - Amount of the canceled payment
 
| Payment request from member {3} by {0} was canceled.
 
| Payment request from member {3} by {0} was canceled.
  
Line 430: Line 430:
 
| Account details
 
| Account details
 
| command.accountDetails.response.withTx
 
| command.accountDetails.response.withTx
| Respuesta de comando Account details
+
| Response to command Account details
 
|  
 
|  
* {0} - Balance disponible
+
* {0} - Available balance
* {1} - Nombre (alias) mas largo de la moneda
+
* {1} - Longer name (alias) of the unit (currency)
* {2} - Lista de transacciones (items formateados con command.accountDetails.response.tx)
+
* {2} - Transaction list (items formatted with command.accountDetails.response.tx)
* {3} - command.accountDetails.response.next ("" si no existen transacciones mas antiguas que las mostradas)
+
* {3} - command.accountDetails.response.next ("" if no older transactions than the ones shown exist)
 
| Available balance: {0} {1}. Last transactions: {2} {3}
 
| Available balance: {0} {1}. Last transactions: {2} {3}
  
Line 441: Line 441:
 
| Account details
 
| Account details
 
| command.accountDetails.response.tx.dateFormat
 
| command.accountDetails.response.tx.dateFormat
| Formato de la fecha para cada transacción
+
| Date format for each transaction
 
| -
 
| -
 
| dd/MM/yyyy HH:mm
 
| dd/MM/yyyy HH:mm
Line 448: Line 448:
 
| Account details
 
| Account details
 
| command.accountDetails.response.tx
 
| command.accountDetails.response.tx
| Formato de cada item de transacción listado
+
| Format of each item listed in the transaction
 
|  
 
|  
* {0} - Secuencial de la transaccion (en la página)
+
* {0} - Sequential ID of the transaction (on the page)
* {1} - Fecha de la transaccion (formateada con command.accountDetails.response.tx.dateFormat)
+
* {1} - Transaction date (formatted as command.accountDetails.response.tx.dateFormat)
* {2} - Nombre del miembro complementario de la transaccion
+
* {2} - Name of the transaction counterpart member
* {3} - Nombre de usuario del miembro complementario de la transaccion
+
* {3} - User name of the transaction counterpart member
* {4} - Monto de la transacción
+
* {4} - Transaction amount
 
| {1} {3} {4}  
 
| {1} {3} {4}  
  
Line 460: Line 460:
 
| Account details
 
| Account details
 
| command.accountDetails.response.tx.separator  
 
| command.accountDetails.response.tx.separator  
| Caracteres separadores de cada items en el listado de transacciones
+
| Separator characters in each item listed in the transactions
 
| -
 
| -
 
| ::
 
| ::
Line 467: Line 467:
 
| Account details
 
| Account details
 
| command.accountDetails.response.withoutTx
 
| command.accountDetails.response.withoutTx
| Respuesta de comando Account details cuando no hay transacciones para listar
+
| Response to Account details command when there are no transactions to list
 
|  
 
|  
* {0} - Balance disponible
+
* {0} - Available balance
* {1} - Nombre (alias) mas largo de la moneda
+
* {1} - Longer name (alias) of the unit (currency)
* {2} - Número de página actual
+
* {2} - Current page number
 
| Available balance: {0} {1}. No transactions for page {2}  
 
| Available balance: {0} {1}. No transactions for page {2}  
  
Line 477: Line 477:
 
| Account details
 
| Account details
 
| command.accountDetails.response.next
 
| command.accountDetails.response.next
| Indicador de existencia de transacciones anteriores (existen mas páginas de transacciones para listar)
+
| Indicator of the existence of previous transactions (there are more transaction pages to list)
 
| -
 
| -
 
| +
 
| +
Line 491: Line 491:
 
| Help
 
| Help
 
| command.help.help
 
| command.help.help
| Ayuda general dentro de un cyclosInstance. Es devuelta al recibir un mensaje de comando Help sin parámetros
+
| General help inside a cyclosInstance. It is responded when receiving a Help command message without parameters
 
| -
 
| -
 
| For information about SMS operations. Send a message with the word help followed by one of the following operation commands: acinfo, pay, rq, reg, info
 
| For information about SMS operations. Send a message with the word help followed by one of the following operation commands: acinfo, pay, rq, reg, info
Line 505: Line 505:
 
| Direct payment
 
| Direct payment
 
| command.performPayment.response
 
| command.performPayment.response
| Confirmación (respuesta) de pago realizado.
+
| Confirmation (response) to a payment issued.
 
|  
 
|  
* {0} - Nombre completo del miembro receptor del pago
+
* {0} - Complete name of the member receiving payment
* {1} - UserName  (LoginName) del miembro receptor del pago
+
* {1} - UserName  (LoginName) of the member receiving payment
 
* {2} - Monto del pago formateado (incluye simbolo de moneda)
 
* {2} - Monto del pago formateado (incluye simbolo de moneda)
 
* {3} - Número de transaccion (en Cyclos)
 
* {3} - Número de transaccion (en Cyclos)

Revision as of 19:02, 24 November 2011

Introduction

The controller can be configured to work with multiple instances of cyclos, and each of them with a different language, text and message customization. To support these customizations a set of internationalization files exist.

Currently the versions of the SMS module include the texts necessary to operate in English and Spanish (the possibility to generate new internationalized languages is given).

The controller can generate response messages at the moment of interpreting a received SMS or when an error in the execution of a command occurs.

Internationalization files

The internationalization files can be found in the /WEB-INF/classes/i18n folder, following a naming convention:

<type>_<language>_<country>_<variant>.properties

The type is determined by the semantics of their content, which could be errors or cyclosInstance. The elements language, properties and variant are obtained from each cyclos instance configuration (see Cyclos instance). This way a cyclos instance with the following configuration:

<cyclosInstance name="c3u" language="es" country="UY" variant="C3">

entails that all messages which will be processed in that instance can generate messages with corresponding texts in the files /WEB-INF/classes/errors_es_UY_C3.properties or /WEB-INF/classes/cyclosInstance_es_UY_C3.properties. Response messages without customization in any of the files mentioned will take their text in the immediately preceding layer of the hierarchy. For example, in the case of a message key error.INVALID_AMOUNT_PARAMETER.401, generated for a received SMS message in the cyclos instance of the example above (cyclosInstance_es_UY_C3.properties), the text resolving sequence is as follows (the order is relevant)

  • 1. /WEB-INF/classes/errors_es_UY_C3.properties
  • 2. /WEB-INF/classes/errors_es_UY.properties
  • 3. /WEB-INF/classes/errors_es.properties
  • 4. /WEB-INF/classes/errors.properties

For more details about registered keys in the cyclosInstance.properties files see Operation specific key.

Error translation keys

Error keys are defined in the file errors.properties in the directory /WebContent/WEB-INF/classes/i18n/
If during message processing an error occurs and answering to the user is possible, an error message will be issued. Error messages consist of an error code and a description. In general the code identifies the command which produced the error. For reference consider the following table:

Operation Code range
Account detail operation 100-199
Security confirmation operation 200-299
Payment request operation 300-399
Direct Payment Operation 400-499
Register new user operation 500-599
Help operation 600-699


The keys defined in the internationalized error code files follow the following format:

error.<ERROR_TYPE>.<codeNumber>

There is a relationship between codeNumber and the operation which generates the latter. For example, an error of type INVALID_AMOUNT_PARAMETER generated during the processing of a Direct payment command, generates a response message stored in the error.INVALID_AMOUNT_PARAMETER.401 key (codeNumber 401 identifies the Direct payment command)

The significance of each ERROR_TYPE and the texts which can be used to substitute them are listed in the following table.


Error Descriptions

Error type Description substitutions Codes Sample
CAN_NOT_REGISTER Undefined error during member registration -

501 - Register new user

error.CAN_NOT_REGISTER.501=Register member failed.
INVALID_AMOUNT_PARAMETER Error in the amount parameter

{0} - Value received for the amount parameter

301 - Payment request
401 - Direct payment

error.INVALID_AMOUNT_PARAMETER.301=Invalid amount [{0}], cannot process the payment request command.
INVALID_CURRENCY_PARAMETER Error in the currency parameter

{0} - Value received for the parameter

103 - Account details
303 - Payment request
403 - Direct payment

error.INVALID_CURRENCY_PARAMETER.103=Invalid currency [{0}], cannot process account details command.
INVALID_GROUP_PARAMETER Error in the Group parameter.

{0} - Value received for the Group parameter

502 - Regiter new user

error.INVALID_GROUP_PARAMETER.503=Invalid group [{0}], cannot process the register
INVALID_PAGE_PARAMETER Error in the page parameter

{0} - Value received for the page parameter

102 - Account details

error.INVALID_PAGE_PARAMETER.102=Invalid page [{0}], could not execute the account detail command.
INVALID_PARAMETERS_COUNT Invalid amount of parameters (less than required amount or greater than required amount including all optional ones) -

101 - Account details
204 - Security confirmation
311 - Payment request
412 - Direct payment
502 - Register new user

error.INVALID_PARAMETERS_COUNT.101=Invalid message format, account details failed.
INVALID_PAYER_PARAMETER The payer is invalid (Not registered member or payment operations disabled)

{0} - (Primary) identification of payer

302 - Payment request

error.INVALID_PAYER_PARAMETER.302=The member (member [{0}]) cannot make SMS payments. Payment request failed.
INVALID_RECEIVER_PARAMETER The receiver of the payment is invalid (Not a registered member)

{0} - Parameter received as receiver

402 - Direct payment

error.INVALID_RECEIVER_PARAMETER.402=Invalid receiver (member [{0}]), payment failed.
ORIGINATE_MAX_DAILY_AMOUNT_EXCEEDED The member triggering the message has exceeded the daily allowance of transactions -

406 - Direct payment

error.ORIGINATE_MAX_DAILY_AMOUNT_EXCEEDED.406=You have exceeded your max daily transaction amount. Payment failed.
ORIGINATE_MEMBER_BLOCKED_CREDENTIALS The credentials (PIN) of the member triggering the message are blocked -

107 - Account details
202 - Security confirmation
408 - Direct payment

error.ORIGINATE_MEMBER_BLOCKED_CREDENTIALS.107=Your password is blocked, account details failed.
ORIGINATE_MEMBER_INVALID_CREDENTIALS The credentials (PIN) provided by the member originating the message are invalid -

106 - Account details
200 - Security confirmation
410 - Direct payment

error.ORIGINATE_MEMBER_INVALID_CREDENTIALS.106=Invalid password, account details failed.
ORIGINATE_NOT_ENOUGH_CREDITS The member triggering the message does not have enough credit for the transaction -

409 - Direct payment

error.ORIGINATE_NOT_ENOUGH_CREDITS.409=Insufficient balance, payment failed.
ORIGINATE_UPPER_CREDIT_LIMIT_REACHED The member triggering the message has reached the credit limit -

307 - Payment request

error.ORIGINATE_UPPER_CREDIT_LIMIT_REACHED.307=Payment request failed.
REQUEST_PAYMENT_COULD_NOT_BE_SENT The confirmation request to the payer could not be sent (this error does not have any error code but pertains to the process Security confirmation of a Payment request) - - error.REQUEST_PAYMENT_COULD_NOT_BE_SENT=Confirmation unsuccessful. Payment request failed.
SESSION_INVALID_ID_PARAMETER The received unique session id session identifier (OTP) is invalid

{0} - The received value of the session id parameter

203 - Security confirmation

error.SESSION_INVALID_ID_PARAMETER.203=The session ID [{0}] is invalid. Confirmation failed.
TRANSACTION INVALID PARAMETER The combination of transaction parameters is not valid (for example, a payment to the same originating member for a Direct payment) -

310 - Payment request
411 - Direct payment

error.TRANSACTION_INVALID_PARAMETERS.310=Invalid command, payment request failed.
TRANSACTION_PAYER_INVALID_CHANNEL The payer is not allowed to operate on the SMS channel (property not selected) -

308 - Payment request

error.TRANSACTION_PAYER_INVALID_CHANNEL.308=The member cannot operate by SMS, payment request failed.


TRANSACTION_PAYER_MAX_DAILY_AMOUNT_EXCEEDED The paying member has exceeded the daily maximum transaction amount -

306 - Payment request

error.TRANSACTION_PAYER_MAX_DAILY_AMOUNT_EXCEEDED.306=Payment request failed.
TRANSACTION_RECEIVER_UPPER_CREDIT_LIMIT_REACHED The member receiving a payment has reached the maximum credit limit -

407 - Direct payment

error.TRANSACTION_RECEIVER_UPPER_CREDIT_LIMIT_REACHED.407=Payment failed.


UNKNOWN_COMMAND_ERROR An unknown error occurred while processing the command -

108 - Account details
312 - Payment request
413 - Direct payment

error.UNKNOWN_COMMAND_ERROR.108=Account details failed.



Error texts in runtime

The following URL will display a complete table of errors in runtime, codes and texts: http://<cyclos_sms_server>:<cyclos_sms_port>/<sms_controller_application>/jsp/errorCodes.jsp. This table is constructed from the internationalization text file (see Internacionalization files), corresponding to a selected instance of Cyclos (see [Cyclos instances], keys language, country, and variant).

Operations translation keys

Operation keys are all translatable message that can be send via SMS. The operation keys are defined in the file cyclosInstance.properties (see Internationalization files)

General operation keys

Key Description Substitutions Sample value
command.<commandName>.regularExpression Regular expression used to match against a message received by the controller (its value has to be unique for a single route defined in confix.xml->controller->driverInstances->criverInstance->cyclosRouting->route, or for all those routes not defining usingPrefix) -

(\\s*)(acinfo|accountinfo)(\\s+.*)*$

command.<commandName>.confirmation Text sent to the member to request confirmation of the <commandName> operation (see Security confirmation). {0} - The text of the message passed by the member (Command to be confirmed) Please confirm request for account details: {0}
command.<commandName>.help.withoutConf Response text for a help request message for the command <commandName>. It is used when the command is configured without security confirmation message (see Security confirmation) {0} - The shortest alias for <commandName> For account details. Send a message with: {0} password page number (page number is optional)
command.<commandName>.help.withConf Response text for a help request message for the command <commandName>. It is used when the command is configured with security confirmation message (see Security confirmation) {0} - The shortest alias for <commandName> For account details. Send a message with: {0} page number (page number is optional)
command.memberNotRegistered Response in case the mobile phone number of the origin of a message is not registered in the cyclos instance (processing the message) - You are not a registered member. In order to register, please send a message with the text: register loginname password fullname
error.template Message format for a response in case an error occurred with error code
  • {0} - Error code
  • {1} - Error description. This parameter is substituted by the value obtained for the key in error.prooperties
Error {0}: {1}
error.templateWithoutErrorCode Message format for a response in case an error occurred without error code
  • {0} - Error description
Error: {0}
confirmation.template.onlyOTP Confirmation request without using credentials (PIN). Used for Register new user
  • {0} - Text obtained for the key command.<commandName>.confirmation
  • {1} - (OTP) Session id session identifier
{0}. Please confirm operation by sending: cf {1}
confirmation.template.withPIN Confirmation request
  • {0} - Text obtained for the key command.<commandName>.confirmation
  • {1} - (OTP) Session id session identifier
{0}. Please confirm operation by sending: cf {1} password


Operation specific keys

Operation Key (Security confirmation operation) Description Substitutions Sample value
Security confirmation command.confirm.confirmation Message text requesting confirmation to a payment request
  • {0} - Principal for the member receiving the payment
  • {1} - User name of the member receiving the payment
  • {3} - Member name of the member receiving the payment
  • {4} - Formatted amount
{2} has requested you to pay {3}
Security confirmation command.confirm.response.receiver Confirmation sent to the member issuing a payment request after the payment has been confirmed by the payer
  • {0} - Formatted amount
  • {1} - Phone number of the payer member
  • {2} - Name of the payer member
  • {3} - Transaction identifier
  • {4} - Formatted new available balance (after payment has been performed)
You have received a payment of {0} from member {3} ({2}). Transaction ID: {4}. Your new account balance is : {5}
Security confirmation command.confirm.response.payer Notification sent to the member confirming the payment request
  • {0} - Formatted amount
  • {1} - Phone number of the member receiving the payment
  • {2} - User name of the member receiving the payment
  • {3} - Member name of the member receiving the payment
  • {4} - Transaction identifier
  • {5} - Formatted new available balance (after payment has been performed)
You have made a payment of {0} to member: {3} ({2}). Transaction ID: {4}. New account balance: {5}
Security confirmation command.confirm.cancel.payer Notification for a canceled payment request, sent to the payer
  • {0} - Formatted amount
  • {1} - Phone number of the member receiving the payment (issuing the payment request)
  • {2} - User name of the member receiving the payment (issuing the payment request)
  • {3} - Member name of the member receiving the payment (issuing the payment request)
  • {4} - Amount of the canceled payment
Payment request from member {3} by {0} was canceled.
Security confirmation command.confirm.cancel.receiver Notification for a canceled payment request, sent to the payment request issuer (receiving member)
  • {0} - Formatted amount
  • {1} - Phone number of the paying member
  • {2} - User name of the paying member
  • {3} - Member name of the paying member
  • {4} - Amount of the canceled payment
Payment request from member {3} by {0} was canceled.
Operation Key (Account details operation) Description Substitutions Basic value
Account details command.accountDetails.response.withTx Response to command Account details
  • {0} - Available balance
  • {1} - Longer name (alias) of the unit (currency)
  • {2} - Transaction list (items formatted with command.accountDetails.response.tx)
  • {3} - command.accountDetails.response.next ("" if no older transactions than the ones shown exist)
Available balance: {0} {1}. Last transactions: {2} {3}
Account details command.accountDetails.response.tx.dateFormat Date format for each transaction - dd/MM/yyyy HH:mm
Account details command.accountDetails.response.tx Format of each item listed in the transaction
  • {0} - Sequential ID of the transaction (on the page)
  • {1} - Transaction date (formatted as command.accountDetails.response.tx.dateFormat)
  • {2} - Name of the transaction counterpart member
  • {3} - User name of the transaction counterpart member
  • {4} - Transaction amount
{1} {3} {4}
Account details command.accountDetails.response.tx.separator Separator characters in each item listed in the transactions - ::
Account details command.accountDetails.response.withoutTx Response to Account details command when there are no transactions to list
  • {0} - Available balance
  • {1} - Longer name (alias) of the unit (currency)
  • {2} - Current page number
Available balance: {0} {1}. No transactions for page {2}
Account details command.accountDetails.response.next Indicator of the existence of previous transactions (there are more transaction pages to list) - +
Operation Key (Help operation) Description Substitutions Basic value
Help command.help.help General help inside a cyclosInstance. It is responded when receiving a Help command message without parameters - For information about SMS operations. Send a message with the word help followed by one of the following operation commands: acinfo, pay, rq, reg, info
Operation Key (Direct payment operation) Description Substitutions Basic value
Direct payment command.performPayment.response Confirmation (response) to a payment issued.
  • {0} - Complete name of the member receiving payment
  • {1} - UserName (LoginName) of the member receiving payment
  • {2} - Monto del pago formateado (incluye simbolo de moneda)
  • {3} - Número de transaccion (en Cyclos)
  • {4} - Balance (saldo disponible) del pagador luego de ejecutado el pago.
You have made a payment of {2} to member: {1}. Transaction ID: {3}. Your new account balance is {4}
Operation Key (Register new user operation) Description Substitutions Basic value
Register new user command.registration.response Confirmación (respuesta) de registro realizado.
  • {0} - Nombre de la instancia de cyclos en la cual se realizó el registro
  • {1} - UserName (LoginName) del miembro registrado
  • {2} - Mobile phone number del miembro registrado
You have been registered with mobile number {2} and login name {1}.