Correccion de label añadiendo TRANSLATIONS

This commit is contained in:
Brayan Osmar Pereyra Suxo
2014-05-29 15:33:27 -04:00
parent 7c0747ffa9
commit db6c8fb6f8
8 changed files with 73 additions and 73 deletions

View File

@@ -25,7 +25,7 @@ class Cases
{
Validator::isArray($dataList, '$dataList');
if (!isset($dataList["userId"])) {
throw (new \Exception("The user with userId: '' does not exist."));
throw (new \Exception(\G::LoadTranslation("ID_USER_NOT_EXIST", array('userId',''))));
} else {
Validator::usrUid($dataList["userId"], "userId");
}
@@ -53,7 +53,7 @@ class Cases
$valuesCorrect = array('todo', 'draft', 'paused', 'sent', 'selfservice', 'unassigned', 'search');
if (!in_array($action, $valuesCorrect)) {
throw (new \Exception('The value for $action is incorrect.'));
throw (new \Exception(\G::LoadTranslation("ID_INCORRECT_VALUE_ACTION")));
}
$start = (int)$start;
@@ -669,7 +669,7 @@ class Cases
$case = new \Cases();
$fields = $case->loadCase($app_uid);
if ($fields['APP_STATUS'] == 'CANCELLED') {
throw (new \Exception("The case '$app_uid' is already canceled"));
throw (new \Exception(\G::LoadTranslation("ID_CASE_ALREADY_CANCELED", array($app_uid))));
}
$case->cancelCase( $app_uid, $del_index, $usr_uid );
}
@@ -697,7 +697,7 @@ class Cases
$case = new \Cases();
$fields = $case->loadCase($app_uid);
if ($fields['APP_STATUS'] == 'CANCELLED') {
throw (new \Exception("The case '$app_uid' is canceled"));
throw (new \Exception(\G::LoadTranslation("ID_CASE_IS_CANCELED", array($app_uid))));
}
if ($del_index === false) {
@@ -1413,7 +1413,7 @@ class Cases
$respView = $case->getAllObjectsFrom( $pro_uid, $app_uid, $tas_uid, $usr_uid, 'VIEW' );
$respBlock = $case->getAllObjectsFrom( $pro_uid, $app_uid, $tas_uid, $usr_uid, 'BLOCK' );
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
throw (new \Exception("You do not have permission to cases notes."));
throw (new \Exception(\G::LoadTranslation("ID_CASES_NOTES_NO_PERMISSIONS")));
}
if ($sort != 'APP_NOTE.NOTE_DATE') {
@@ -1496,7 +1496,7 @@ class Cases
Validator::isString($note_content, '$note_content');
if (strlen($note_content) > 500) {
throw (new \Exception("Invalid value for '$note_content', the permitted maximum length of 500 characters."));
throw (new \Exception(\G::LoadTranslation("ID_INVALID_MAX_PERMITTED", array($note_content,'500'))));
}
Validator::isBoolean($send_mail, '$send_mail');
@@ -1508,7 +1508,7 @@ class Cases
$respView = $case->getAllObjectsFrom( $pro_uid, $app_uid, $tas_uid, $usr_uid, 'VIEW' );
$respBlock = $case->getAllObjectsFrom( $pro_uid, $app_uid, $tas_uid, $usr_uid, 'BLOCK' );
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
throw (new \Exception("You do not have permission to cases notes."));
throw (new \Exception(\G::LoadTranslation("ID_CASES_NOTES_NO_PERMISSIONS")));
}
$note_content = addslashes($note_content);