From 0ec881a6f9abf872d13c27fed6150fed9ea661c0 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Fri, 17 May 2013 20:56:29 +0000 Subject: [PATCH] FIX_SIMPLIFIED_UI "Traducciones faltantes." SOLVED - Se han agragado traducciones faltantes en directorio: templates/home/ y los archivos: home.php, Users.php, AppNotes.php y appProxy.php * Available from version ProcessMaker-2.0.47 (2.5.1) --- workflow/engine/classes/model/AppNotes.php | 8 ++++---- workflow/engine/classes/model/Users.php | 15 +++++++-------- workflow/engine/controllers/appProxy.php | 2 +- workflow/engine/templates/home/appList.html | 13 ++++++------- workflow/engine/templates/home/appListSearch.html | 12 ++++++------ workflow/engine/templates/home/index.html | 6 +++--- workflow/engine/templates/home/indexSingle.html | 1 - workflow/engine/templates/home/login_ie.html | 2 +- .../engine/templates/home/login_standard.html | 2 +- 9 files changed, 29 insertions(+), 32 deletions(-) diff --git a/workflow/engine/classes/model/AppNotes.php b/workflow/engine/classes/model/AppNotes.php index 451c2b4c6..b990db426 100755 --- a/workflow/engine/classes/model/AppNotes.php +++ b/workflow/engine/classes/model/AppNotes.php @@ -106,7 +106,7 @@ class AppNotes extends BaseAppNotes $response['message'] = $msg; } else { $response['success'] = G::LoadTranslation("ID_SUCCESS"); - $response['message'] = G::LoadTranslation("ID_SAVEDS"); + $response['message'] = G::LoadTranslation("ID_SAVED2"); } if ($notify) { @@ -134,16 +134,16 @@ class AppNotes extends BaseAppNotes $oConfiguration = new Configuration(); $sDelimiter = DBAdapter::getStringDelimiter(); $oCriteria = new Criteria( 'workflow' ); - $oCriteria->add( ConfigurationPeer::CFG_UID, G::LoadTranslation("ID_EMAILSS")); + $oCriteria->add( ConfigurationPeer::CFG_UID, 'Emails' ); $oCriteria->add( ConfigurationPeer::OBJ_UID, '' ); $oCriteria->add( ConfigurationPeer::PRO_UID, '' ); $oCriteria->add( ConfigurationPeer::USR_UID, '' ); $oCriteria->add( ConfigurationPeer::APP_UID, '' ); if (ConfigurationPeer::doCount( $oCriteria ) == 0) { - $oConfiguration->create( array ('CFG_UID' => G::LoadTranslation("ID_EMAILSS"), 'OBJ_UID' => '','CFG_VALUE' => '','PRO_UID' => '','USR_UID' => '','APP_UID' => '') ); + $oConfiguration->create( array ('CFG_UID' => 'Emails', 'OBJ_UID' => '','CFG_VALUE' => '','PRO_UID' => '','USR_UID' => '','APP_UID' => '') ); $aConfiguration = array (); } else { - $aConfiguration = $oConfiguration->load( G::LoadTranslation("ID_EMAILSS"), '', '', '', '' ); + $aConfiguration = $oConfiguration->load('Emails', '', '', '', '' ); if ($aConfiguration['CFG_VALUE'] != '') { $aConfiguration = unserialize( $aConfiguration['CFG_VALUE'] ); $passwd = $aConfiguration['MESS_PASSWORD']; diff --git a/workflow/engine/classes/model/Users.php b/workflow/engine/classes/model/Users.php index 2624049ee..e8b82eff7 100755 --- a/workflow/engine/classes/model/Users.php +++ b/workflow/engine/classes/model/Users.php @@ -52,7 +52,7 @@ class Users extends BaseUsers if ($this->validate()) { $result = $this->save(); } else { - $e = new Exception( G::LoadTranslation("ID_FAILED_VALIDATION_CLASS") . get_class( $this ) . "." ); + $e = new Exception(G::LoadTranslation("ID_FAILED_VALIDATION_IN_CLASS1", SYS_LANG, array("CLASS" => get_class($this)))); $e->aValidationFailures = $this->getValidationFailures(); throw ($e); } @@ -88,13 +88,12 @@ class Users extends BaseUsers $this->setNew( false ); return $aFields; } else { - throw (new Exception( G::LoadTranslation("ID_THE_ROW") ." '" . $UsrUid . "' ". G::LoadTranslation("ID_TABLE_USER_DOESNT_EXIST"))); + throw (new Exception(G::LoadTranslation("ID_USER_UID_DOESNT_EXIST", SYS_LANG, array("USR_UID" => $UsrUid)))); } } catch (PropelException $e) { //capture invalid birthday date and replace by null $msg = $e->getMessage(); - //if (strpos( 'Unable to parse value of [usr_birthday]', $msg ) != - 1) { - if (strpos( G::LoadTranslation("ID_UNABLE_PARSE_VALUE_URS_BIRTHDAY"), $msg ) != - 1) { + if (strpos( 'Unable to parse value of [usr_birthday]', $msg ) != - 1) { $oRow->setUsrBirthday( null ); $oRow->save(); return $this->load( $UsrUid ); @@ -116,8 +115,8 @@ class Users extends BaseUsers $result['USR_EMAIL'] = $oUser->getUsrEmail(); return $result; } else { - // return $result; - throw (new Exception( G::LoadTranslation("ID_THE_ROW") ." '" . $UsrUid . "' ". G::LoadTranslation("ID_TABLE_USER_DOESNT_EXIST"))); + // return $result; + throw (new Exception(G::LoadTranslation("ID_USER_UID_DOESNT_EXIST", SYS_LANG, array("USR_UID" => $UsrUid)))); } } catch (Exception $oError) { throw ($oError); @@ -153,7 +152,7 @@ class Users extends BaseUsers return $result; } else { //return $result; - throw (new Exception( G::LoadTranslation("ID_THE_ROW") ." '" . $UsrUid . "' ". G::LoadTranslation("ID_TABLE_USER_DOESNT_EXIST"))); + throw (new Exception(G::LoadTranslation("ID_USER_UID_DOESNT_EXIST", SYS_LANG, array("USR_UID" => $UsrUid)))); } } catch (Exception $oError) { throw ($oError); @@ -173,7 +172,7 @@ class Users extends BaseUsers return $result; } else { $con->rollback(); - throw (new Exception(G::LoadTranslation("ID_FAILED_VALIDATION_IN_CLASS") . get_class( $this ) . "." )); + throw (new Exception(G::LoadTranslation("ID_FAILED_VALIDATION_IN_CLASS1", SYS_LANG, array("CLASS" => get_class($this))))); } } catch (Exception $e) { $con->rollback(); diff --git a/workflow/engine/controllers/appProxy.php b/workflow/engine/controllers/appProxy.php index 86f067f24..48a3cf960 100644 --- a/workflow/engine/controllers/appProxy.php +++ b/workflow/engine/controllers/appProxy.php @@ -100,7 +100,7 @@ class AppProxy extends HttpProxyController } if (! isset( $appUid )) { - throw new Exception(G::LoadTranslation("ID_CANT_RESOLVE_APLICATION")); + throw new Exception(G::LoadTranslation("ID_CANT_RESOLVE_APPLICATION")); } $usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : ""; diff --git a/workflow/engine/templates/home/appList.html b/workflow/engine/templates/home/appList.html index 9a3f02f8f..0d3e77c0c 100644 --- a/workflow/engine/templates/home/appList.html +++ b/workflow/engine/templates/home/appList.html @@ -54,7 +54,7 @@ d.hide('slow'); } else { - d.show({/literal}"{translate label="ID_SLOW"}"{literal}); + d.show('slow'); } } @@ -84,7 +84,7 @@ {/literal}"{translate label="ID_ADD_NOTE"}"{literal}: function() { var sendMail = document.getElementById('chkSendMail').checked; sendMail = (sendMail == true) ? '1' : '0'; - $(this).dialog({/literal}"{translate label="ID_CLOSE"}"{literal}); + $(this).dialog("close"); $.post( '../appProxy/postNote', {appUid : appUid, @@ -96,9 +96,8 @@ ); //redirect('home/startCase?id='+id); }, - Cancel: function() { - //$(this).dialog( "close" ); - $(this).dialog({/literal}"{translate label="ID_CLOSE"}"{literal}); + {/literal}"{translate label="ID_CANCEL"}"{literal}: function() { + $(this).dialog( "close" ); } } }); @@ -134,7 +133,7 @@ $('#n_'+appUid).show('slow'); } d = $('#m_'+appUid); - d.show({/literal}"{translate label="ID_SLOW"}"{literal}); + d.show('slow'); } ); return true; @@ -153,7 +152,7 @@ $('#loadmorebutton').html( {/literal}"{translate label="ID_LOAD_MORE"}"{literal} ); } else { - $('#loadmorebutton').replaceWith({/literal}"
{translate label="ID_NO_MORE_APPLICATIONS"}
"{literal}); + $('#loadmorebutton').replaceWith(
{/literal}"{translate label="ID_NO_MORE_APPLICATIONS"}"{literal}
); } } }); diff --git a/workflow/engine/templates/home/appListSearch.html b/workflow/engine/templates/home/appListSearch.html index e52c271ea..e926cea41 100644 --- a/workflow/engine/templates/home/appListSearch.html +++ b/workflow/engine/templates/home/appListSearch.html @@ -121,7 +121,7 @@ d.hide('slow'); } else { - d.show({/literal}"{translate label="ID_SLOW"}"{literal}); + d.show('slow'); } } @@ -153,7 +153,7 @@ {/literal}"{translate label="ID_ADD_NOTE"}"{literal}: function() { var sendMail = document.getElementById('chkSendMail').checked; sendMail = (sendMail == true) ? '1' : '0'; - $(this).dialog({/literal}"{translate label="ID_CLOSE"}"{literal}); + $(this).dialog( "close" ); $.post( '../appProxy/postNote', {appUid : appUid, @@ -165,8 +165,8 @@ ); //redirect('home/startCase?id='+id); }, - Cancel: function() { - $(this).dialog({/literal}"{translate label="ID_CLOSE"}"{literal}); + {/literal}"{translate label="ID_CANCEL"}"{literal}: function() { + $(this).dialog("close"); } } }); @@ -226,7 +226,7 @@ $('#n_'+appUid).show('slow'); } d = $('#m_'+appUid); - d.show({/literal}"{translate label="ID_SLOW"}"{literal}); + d.show('slow'); } ); return true; @@ -245,7 +245,7 @@ $('#loadmorebutton').html( {/literal}"{translate label="ID_LOAD_MORE"}"{literal} ); } else { - $('#loadmorebutton').replaceWith({/literal}"
{translate label="ID_NO_MORE_APPLICATIONS"}
"{literal}); + $('#loadmorebutton').replaceWith(
{/literal}"{translate label="ID_NO_MORE_APPLICATIONS"}"{literal}
); } } }); diff --git a/workflow/engine/templates/home/index.html b/workflow/engine/templates/home/index.html index 361738770..7a9cbe86f 100644 --- a/workflow/engine/templates/home/index.html +++ b/workflow/engine/templates/home/index.html @@ -49,12 +49,12 @@ modal: true, buttons: { {/literal}"{translate label="ID_CASE_START"}"{literal}: function() { - $(this).dialog({/literal}"{translate label="ID_CLOSE"}"{literal}); + $( this ).dialog( "close" ); redirect('home/startCase?id='+id); }, - Cancel: function() { - $(this).dialog({/literal}"{translate label="ID_CLOSE"}"{literal}); + {/literal}"{translate label="ID_CANCEL"}"{literal}: function() { + $( this ).dialog( "close" ); } } }); diff --git a/workflow/engine/templates/home/indexSingle.html b/workflow/engine/templates/home/indexSingle.html index f0aadfeae..8b495c801 100644 --- a/workflow/engine/templates/home/indexSingle.html +++ b/workflow/engine/templates/home/indexSingle.html @@ -68,7 +68,6 @@ - diff --git a/workflow/engine/templates/home/login_ie.html b/workflow/engine/templates/home/login_ie.html index 5c6fc467c..fab880a6e 100644 --- a/workflow/engine/templates/home/login_ie.html +++ b/workflow/engine/templates/home/login_ie.html @@ -58,7 +58,7 @@
- + diff --git a/workflow/engine/templates/home/login_standard.html b/workflow/engine/templates/home/login_standard.html index 9a05b6351..0efcedd32 100644 --- a/workflow/engine/templates/home/login_standard.html +++ b/workflow/engine/templates/home/login_standard.html @@ -87,7 +87,7 @@ - +