Merged in luisfernandosl/processmaker/BUG-15973 (pull request #870)

BUG 15973 "Multilenguaje en los las variables..." SOLVED
This commit is contained in:
Julio Cesar Laura Avendaño
2014-10-08 14:42:35 -04:00
2 changed files with 14 additions and 0 deletions

View File

@@ -22,6 +22,11 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$arrayToTranslation = array(
"TRIGGER" => G::LoadTranslation("ID_TRIGGER_DB"),
"DERIVATION" => G::LoadTranslation("ID_DERIVATION_DB")
);
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
if ($actionAjax == 'messageHistoryGridList_JXP') {
@@ -110,6 +115,8 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
$r->data = $aProcesses;
$r->totalCount = $totalCount;
$r->data[0]["APP_MSG_TYPE"] = (array_key_exists($r->data[0]["APP_MSG_TYPE"], $arrayToTranslation))? $arrayToTranslation[$r->data[0]["APP_MSG_TYPE"]] : $r->data[0]["APP_MSG_TYPE"];
echo G::json_encode( $r );
}
if ($actionAjax == 'showHistoryMessage') {

View File

@@ -533,6 +533,12 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
G::LoadClass( "BasePeer" );
global $G_PUBLISH;
$arrayToTranslation = array(
"INPUT" => G::LoadTranslation("ID_INPUT_DB"),
"OUTPUT" => G::LoadTranslation("ID_OUTPUT_DB"),
"ATTACHED" => G::LoadTranslation("ID_ATTACHED_DB")
);
$oCase = new Cases();
$aProcesses = Array ();
$G_PUBLISH = new Publisher();
@@ -551,6 +557,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
$result = $rs->getRow();
$result["TYPE"] = (array_key_exists($result["TYPE"], $arrayToTranslation))? $arrayToTranslation[$result["TYPE"]] : $result["TYPE"];
$aProcesses[] = $result;
$rs->next();
$totalCount ++;