diff --git a/ajax/dropdownUsers.php b/ajax/dropdownUsers.php index d26a3c3..b57a0b9 100644 --- a/ajax/dropdownUsers.php +++ b/ajax/dropdownUsers.php @@ -99,7 +99,7 @@ if ($_REQUEST['page'] == 1 && empty($_REQUEST['searchText'])) { if (count($users)) { foreach ($users as $ID => $output) { - $title = sprintf(__('%1$s - %2$s'), $output, $logins[$ID]); + $title = sprintf('%1$s - %2$s', $output, $logins[$ID]); array_push($datas, array('id' => $ID, 'text' => $output, diff --git a/ajax/task_users.php b/ajax/task_users.php index add1883..658cf8b 100644 --- a/ajax/task_users.php +++ b/ajax/task_users.php @@ -22,7 +22,7 @@ $PM_DB = new PluginProcessmakerDB; $rand = rand(); echo "
"; -echo $LANG['processmaker']['item']['reassigncase']." "; +echo __('Re-assign task to', 'processmaker')." "; echo ""; echo ""; echo ""; @@ -42,6 +42,6 @@ PluginProcessmakerUser::dropdown( array('name' => 'users_id_recipient', 'width' => '', 'specific_tags' => array('taskGuid' => $_REQUEST['taskGuid']))); echo "  "; -echo ""; +echo ""; Html::closeForm(true); diff --git a/front/case.form.php b/front/case.form.php index e2611dd..5798cbf 100644 --- a/front/case.form.php +++ b/front/case.form.php @@ -32,9 +32,9 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'route' && isset( $_REQ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') { // delete case from case table, this will also delete the tasks if ($locCase->getFromDB($_POST['cases_id']) && $locCase->deleteCase()) { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['deleted'], true, INFO); + Session::addMessageAfterRedirect(__('Case has been deleted!', 'processmaker'), true, INFO); } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errordeleted'], true, ERROR); + Session::addMessageAfterRedirect(__('Unable to delete case!', 'processmaker'), true, ERROR); } // will redirect to item or to list if no item $locCase->redirectToList(); @@ -47,12 +47,12 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'cancel') { $resultPM = $PM_SOAP->cancelCase($locCase->fields['case_guid']); if ($resultPM->status_code === 0) { if ($locCase->cancelCase()) { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['cancelled'], true, INFO); + Session::addMessageAfterRedirect(__('Case has been cancelled!', 'processmaker'), true, INFO); } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errorcancelled'], true, ERROR); + Session::addMessageAfterRedirect(__('Unable to cancel case!', 'processmaker'), true, ERROR); } } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errorcancelled'], true, ERROR); + Session::addMessageAfterRedirect(__('Unable to cancel case!', 'processmaker'), true, ERROR); } Html::back(); } else @@ -78,12 +78,15 @@ if (isset($_REQUEST['id']) && $_REQUEST['id'] > 0) { Html::header(__('Process cases', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases"); } - if ($locCase->getFromDB($_REQUEST['id'])) { - - $locCase->display($_REQUEST); - - Html::footer(); + if (!$PM_SOAP->config->fields['maintenance']) { + if ($locCase->getFromDB($_REQUEST['id'])) { + $locCase->display($_REQUEST); + } + } else { + PluginProcessmakerProcessmaker::showUnderMaintenance(); } + + Html::footer(); } diff --git a/front/case.front.php b/front/case.front.php deleted file mode 100644 index d036ef4..0000000 --- a/front/case.front.php +++ /dev/null @@ -1,39 +0,0 @@ -getFromGUID($_REQUEST['APP_UID'])) { -// //$PM_SOAP = new PluginProcessmakerProcessmaker(); -// //$PM_SOAP->login( ); - -// if (isset( $_REQUEST['form'] )) { -// $PM_SOAP->derivateCase($myCase, $_REQUEST); //, $_SERVER['HTTP_COOKIE'] ) ; -// } -// } - -//} else -// if (isset( $_REQUEST['form'] ) && isset( $_REQUEST['form']['BTN_CATCH'] ) && isset( $_REQUEST['form']['APP_UID'])) { -// // Claim task management -// // here we are in a Claim request -// $myCase = new PluginProcessmakerCase; -// if ($myCase->getFromGUID( $_REQUEST['form']['APP_UID'] )) { -// //$PM_SOAP = new PluginProcessmakerProcessmaker(); -// //$PM_SOAP->login( ); - -// $pmClaimCase = $PM_SOAP->claimCase($myCase->fields['case_guid'], $_REQUEST['DEL_INDEX'] ); - -// // now manage tasks associated with item -// $PM_SOAP->claimTask($myCase->getID(), $_REQUEST['DEL_INDEX']); -// } -//} - -//// now redirect to item form page -//$config = $PM_SOAP->config; // PluginProcessmakerConfig::getInstance(); -//echo ""; \ No newline at end of file diff --git a/front/case.php b/front/case.php index 277496f..7542690 100644 --- a/front/case.php +++ b/front/case.php @@ -2,22 +2,17 @@ include_once ("../../../inc/includes.php"); -Html::header($LANG['processmaker']['title'][1], $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases"); - -if (Session::haveRightsOr("plugin_processmaker_config", [READ, UPDATE])) { - //$process=new PluginProcessmakerProcess(); - - //if (isset( $_REQUEST['refresh'] ) && Session::haveRight("plugin_processmaker_config", UPDATE)) { - // $process->refresh(); - // Html::back(); - //} - - //$process->title(); - - Search::show('PluginProcessmakerCase'); +Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases"); +if (!$PM_SOAP->config->fields['maintenance']) { + if (Session::haveRightsOr("plugin_processmaker_config", [READ, UPDATE])) { + Search::show('PluginProcessmakerCase'); + } else { + Html::displayRightError(); + } } else { - Html::displayRightError(); + PluginProcessmakerProcessmaker::showUnderMaintenance(); } + Html::footer(); diff --git a/front/caselink.form.php b/front/caselink.form.php index e426fc1..4cd65d6 100644 --- a/front/caselink.form.php +++ b/front/caselink.form.php @@ -24,7 +24,7 @@ if (isset($_REQUEST["update"])) { $PluginCaselink->redirectToList(); } else { - Html::header($LANG['processmaker']['title'][1], $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "caselinks"); + Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "caselinks"); $PluginCaselink->display($_REQUEST); diff --git a/front/caselink.php b/front/caselink.php index 3b48186..fb11f5c 100644 --- a/front/caselink.php +++ b/front/caselink.php @@ -2,7 +2,7 @@ include_once ("../../../inc/includes.php"); -Html::header($LANG['processmaker']['title'][1], $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "caselinks"); +Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "caselinks"); if (Session::haveRightsOr("plugin_processmaker_config", [READ, UPDATE])) { diff --git a/front/process.form.php b/front/process.form.php index c25cbfb..6592c2b 100644 --- a/front/process.form.php +++ b/front/process.form.php @@ -22,7 +22,7 @@ if (isset($_REQUEST["update"])) { } else { - Html::header($LANG['processmaker']['title'][1], $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "processes"); + Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "processes"); $PluginProcess->display($_REQUEST); diff --git a/front/process.php b/front/process.php index da454c4..4b8a84a 100644 --- a/front/process.php +++ b/front/process.php @@ -2,7 +2,7 @@ include_once ("../../../inc/includes.php"); -Html::header($LANG['processmaker']['title'][1], $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "processes"); +Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "processes"); if (Session::haveRightsOr("plugin_processmaker_config", [READ, UPDATE])) { $process=new PluginProcessmakerProcess(); diff --git a/front/processmaker.form.php b/front/processmaker.form.php index 849f478..1c5ca5f 100644 --- a/front/processmaker.form.php +++ b/front/processmaker.form.php @@ -24,16 +24,16 @@ switch ($_POST["action"]) { $item = new $_POST['itemtype']; $item->getFromDB($_POST['items_id']); unset($_SERVER['REQUEST_URI']); // to prevent use of processmaker.form.php in NavigateList - Session::initNavigateListItems('PluginProcessmakerCase', + Session::initNavigateListItems('PluginProcessmakerCase', //TRANS : %1$s is the itemtype name, // %2$s is the name of the item (used for headings of a list) - sprintf(__('%1$s = %2$s'), + sprintf('%1$s = %2$s', $_POST['itemtype']::getTypeName(1), $item->fields["name"])); Html::redirect($link); } Html::back(); } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['error'][$resultCase->status_code]."
".$resultCase->message." (".$resultCase->status_code.")", true, ERROR); + Session::addMessageAfterRedirect( PluginProcessmakerProcessmaker::getPMErrorMessage($resultCase->status_code)."
".$resultCase->message." (".$resultCase->status_code.")", true, ERROR); } } else { Html::back(); @@ -52,7 +52,7 @@ switch ($_POST["action"]) { Html::redirect($CFG_GLPI['root_doc']."/plugins/processmaker/front/processmaker.helpdesk.form.php?processes_id=".$_POST['plugin_processmaker_processes_id']."&case_guid=".$resultCase->caseId."&rand=$rand&itilcategories_id=".$_POST["itilcategories_id"]."&type=".$_REQUEST["type"]."&entities_id=".$_REQUEST['entities_id']); } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['error'][$resultCase->status_code]."
$resultCase->message ($resultCase->status_code)", true, ERROR); //echo "Error creating case: $resultCase->message \n"; + Session::addMessageAfterRedirect( PluginProcessmakerProcessmaker::getPMErrorMessage($resultCase->status_code)."
$resultCase->message ($resultCase->status_code)", true, ERROR); Html::redirect($CFG_GLPI["root_doc"]."/front/helpdesk.public.php?create_ticket=1"); } @@ -82,12 +82,12 @@ switch ($_POST["action"]) { $_POST['users_id'], $_POST['users_id_recipient']); if ($pmResponse) { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['reassigned'], true, INFO); + Session::addMessageAfterRedirect(__('Task re-assigned!', 'processmaker'), true, INFO); } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['notreassigned'].$pmResponse->message, true, ERROR); + Session::addMessageAfterRedirect(__('Error re-assigning task: ', 'processmaker').$pmResponse->message, true, ERROR); } } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['assignedtoyou'], true, ERROR); // Html::back(); + Session::addMessageAfterRedirect(__('Task already assigned to this person!','processmaker'), true, ERROR); } //} else if (isset($_POST['delete'])) { // // delete case from case table, this will also delete the tasks @@ -106,35 +106,35 @@ switch ($_POST["action"]) { // } else { // Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errordeleted'], true, ERROR); // } - } else if (isset($_POST['cancel'])) { - // cancel case from PM - $locCase = new PluginProcessmakerCase; - $locCase->getFromDB($_POST['cases_id']); - $resultPM = $PM_SOAP->cancelCase($locCase->fields['case_guid']); //, $_POST['plugin_processmaker_del_index'], $_POST['plugin_processmaker_users_id'] ) ; - if ($resultPM->status_code === 0) { - //$locCase = new PluginProcessmakerCase; - //$locCase->getFromDB($_POST['cases_id']); - if ($locCase->cancelCase()) { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['cancelled'], true, INFO); - } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errorcancelled'], true, ERROR); - } - } else { - if ($resultPM->status_code == 100 && $locCase->deleteCase()) { // case is draft then delete it - // request delete from pm itself - $PM_SOAP->login(true); + //} else if (isset($_POST['cancel'])) { + // // cancel case from PM + // $locCase = new PluginProcessmakerCase; + // $locCase->getFromDB($_POST['cases_id']); + // $resultPM = $PM_SOAP->cancelCase($locCase->fields['case_guid']); //, $_POST['plugin_processmaker_del_index'], $_POST['plugin_processmaker_users_id'] ) ; + // if ($resultPM->status_code === 0) { + // //$locCase = new PluginProcessmakerCase; + // //$locCase->getFromDB($_POST['cases_id']); + // if ($locCase->cancelCase()) { + // Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['cancelled'], true, INFO); + // } else { + // Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errorcancelled'], true, ERROR); + // } + // } else { + // if ($resultPM->status_code == 100 && $locCase->deleteCase()) { // case is draft then delete it + // // request delete from pm itself + // $PM_SOAP->login(true); - $resultPM = $PM_SOAP->deleteCase($locCase->fields['case_guid']); + // $resultPM = $PM_SOAP->deleteCase($locCase->fields['case_guid']); - if ($resultPM->status_code == 0) { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['deleted'], true, INFO); - } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errordeleted'], true, ERROR); - } - } else { - Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errorcancelled']. " " . $resultPM->message, true, ERROR); - } - } + // if ($resultPM->status_code == 0) { + // Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['deleted'], true, INFO); + // } else { + // Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errordeleted'], true, ERROR); + // } + // } else { + // Session::addMessageAfterRedirect($LANG['processmaker']['item']['case']['errorcancelled']. " " . $resultPM->message, true, ERROR); + // } + // } } break; diff --git a/front/processmaker.helpdesk.form.php b/front/processmaker.helpdesk.form.php index 5e4b145..884622d 100644 --- a/front/processmaker.helpdesk.form.php +++ b/front/processmaker.helpdesk.form.php @@ -4,12 +4,12 @@ include_once ("../../../inc/includes.php"); /** * Summary of processMakerShowProcessList - * @param mixed $ID - * @param mixed $from_helpdesk + * @param mixed $ID + * @param mixed $from_helpdesk * @return boolean */ function processMakerShowProcessList ($ID, $from_helpdesk) { - global $DB, $CFG_GLPI, $LANG, $_SESSION; + global $DB, $CFG_GLPI, $_SESSION; if (!Session::haveRight("ticket", CREATE)) { return false; @@ -18,10 +18,10 @@ function processMakerShowProcessList ($ID, $from_helpdesk) { $rand = rand(); echo ""; echo "
"; - echo ""; + echo ""; echo ""; - if (count($caseInfo->currentUsers) > 0) { + if (property_exists($caseInfo, 'currentUsers') && count($caseInfo->currentUsers) > 0) { echo " - - - - + + + + "; foreach($caseInfo->currentUsers as $currentTask) { @@ -354,6 +353,10 @@ class PluginProcessmakerCase extends CommonDBTM { } + static private function localSortTasks ($a, $b) { + return $a->delIndex - $b->delIndex; + } + /** * Summary of sortTasks * @param mixed $tasks is the array of tasks from a getCaseInfo->currentUsers @@ -362,10 +365,6 @@ class PluginProcessmakerCase extends CommonDBTM { */ public function sortTasks($tasks, $GLPICurrentPMUserId) { - function localSortTasks ($a, $b) { - return $a->delIndex - $b->delIndex; - }; - $tbctasks = []; $utasks = []; $infotasks = []; @@ -383,9 +382,9 @@ class PluginProcessmakerCase extends CommonDBTM { // order task by "current user", then by "to be claimed", and then push to end "tasks assigned to another user" // then by delindex ASC in these three parts - usort($utasks, 'localSortTasks'); - usort($tbctasks, 'localSortTasks'); - usort($infotasks, 'localSortTasks'); + usort($utasks, 'self::localSortTasks'); + usort($tbctasks, 'self::localSortTasks'); + usort($infotasks, 'self::localSortTasks'); return array_merge($utasks, $tbctasks, $infotasks); } @@ -403,19 +402,16 @@ class PluginProcessmakerCase extends CommonDBTM { echo "
".$LANG['processmaker']['item']['tab']."
".__('Process - Case','processmaker')."
"; - echo $LANG['processmaker']['item']['selectprocess']." "; + _e('Select the process you want to add', 'processmaker'); echo ""; echo ""; echo ""; @@ -41,8 +41,8 @@ function processMakerShowProcessList ($ID, $from_helpdesk) { /** * Summary of processMakerShowCase - * @param mixed $ID - * @param mixed $from_helpdesk + * @param mixed $ID + * @param mixed $from_helpdesk */ function processMakerShowCase( $ID, $from_helpdesk ) { global $CFG_GLPI, $PM_SOAP; diff --git a/hook.php b/hook.php index 5dbb141..922a66e 100644 --- a/hook.php +++ b/hook.php @@ -25,17 +25,15 @@ if (!function_exists('arFieldExists')) { } function plugin_processmaker_MassiveActions($type) { - global $LANG; - switch ($type) { case 'PluginProcessmakerProcess' : if (plugin_processmaker_haveRight('config', UPDATE)) { - return array('plugin_processmaker_taskrefresh' => $LANG['processmaker']['config']['refreshtasklist']); + return array('plugin_processmaker_taskrefresh' => __('Synchronize Task List', 'processmaker')); } break; case 'PluginProcessmakerProcess_Profile' : if (plugin_processmaker_haveRight('config', UPDATE)) { - return array('purge' => $LANG['processmaker']['process']['profile']); + return array('purge' => __('Delete permanently')); } break; //case 'PluginProcessmakerCase' : @@ -48,66 +46,65 @@ function plugin_processmaker_MassiveActions($type) { } -function plugin_processmaker_MassiveActionsDisplay($options) { - global $LANG; +//function plugin_processmaker_MassiveActionsDisplay($options) { - switch ($options['itemtype']) { - case 'PluginProcessmakerProcess' : - //case 'PluginProcessmakerCase' : - switch ($options['action']) { - case "plugin_processmaker_taskrefresh" : - //case "plugin_processmaker_purgecase" : - echo ""; - break; +// switch ($options['itemtype']) { +// case 'PluginProcessmakerProcess' : +// //case 'PluginProcessmakerCase' : +// switch ($options['action']) { +// case "plugin_processmaker_taskrefresh" : +// //case "plugin_processmaker_purgecase" : +// echo ""; +// break; - } - break; - } - return ""; -} +// } +// break; +// } +// return ""; +//} -function plugin_processmaker_MassiveActionsProcess($data) { +//function plugin_processmaker_MassiveActionsProcess($data) { - switch ($data['action']) { +// switch ($data['action']) { - case "plugin_processmaker_taskrefresh" : - if ($data['itemtype'] == 'PluginProcessmakerProcess') { - foreach ($data["item"] as $key => $val) { - if ($val == 1) { - $process = new PluginProcessmakerProcess; - $process->refreshTasks( array( 'id' => $key ) ); +// case "plugin_processmaker_taskrefresh" : +// if ($data['itemtype'] == 'PluginProcessmakerProcess') { +// foreach ($data["item"] as $key => $val) { +// if ($val == 1) { +// $process = new PluginProcessmakerProcess; +// $process->refreshTasks( array( 'id' => $key ) ); - } - } - } - break; - //case "plugin_processmaker_purgecase": - // if ($data['itemtype'] == 'PluginProcessmakerCase') { - // foreach ($data["item"] as $key => $val) { - // if ($val == 1) { - // $locCase= new PluginProcessmakerCase; - // //$locCase->( array( 'id' => $key ) ); +// } +// } +// } +// break; +// //case "plugin_processmaker_purgecase": +// // if ($data['itemtype'] == 'PluginProcessmakerCase') { +// // foreach ($data["item"] as $key => $val) { +// // if ($val == 1) { +// // $locCase= new PluginProcessmakerCase; +// // //$locCase->( array( 'id' => $key ) ); - // } - // } - // } - // break; - //case 'plugin_processmaker_process_profile_delete' : - // if ($data['itemtype'] == 'PluginProcessmakerProcess_Profile') { - // foreach ($data["item"] as $key => $val) { - // if ($val == 1) { - // $process_profile = new PluginProcessmakerProcess_Profile; - // $process_profile->delete( array( 'id' => $key ), true ); +// // } +// // } +// // } +// // break; +// //case 'plugin_processmaker_process_profile_delete' : +// // if ($data['itemtype'] == 'PluginProcessmakerProcess_Profile') { +// // foreach ($data["item"] as $key => $val) { +// // if ($val == 1) { +// // $process_profile = new PluginProcessmakerProcess_Profile; +// // $process_profile->delete( array( 'id' => $key ), true ); - // } - // } - // } - // break; +// // } +// // } +// // } +// // break; - } -} +// } +//} /** * Summary of plugin_processmaker_install @@ -116,7 +113,6 @@ function plugin_processmaker_MassiveActionsProcess($data) { * @return true or die! */ function plugin_processmaker_install() { - global $DB; if (!arTableExists("glpi_plugin_processmaker_cases")) { // new installation @@ -143,7 +139,6 @@ function plugin_processmaker_install() { } function plugin_processmaker_uninstall() { - //global $DB; CronTask::Unregister('PluginProcessmakerProcessmaker'); @@ -152,8 +147,7 @@ function plugin_processmaker_uninstall() { function plugin_processmaker_getAddSearchOptions($itemtype) { - global $LANG; - + $sopt = array(); // TODO add Change and Problem + other fields to the search if ($itemtype == 'Ticket') { @@ -161,7 +155,7 @@ function plugin_processmaker_getAddSearchOptions($itemtype) { $sopt[10001]['field'] = 'case_status'; //$sopt[1001]['linkfield'] = 'id'; $sopt[10001]['massiveaction'] = false; - $sopt[10001]['name'] = $LANG['processmaker']['search']['case'].' - '.$LANG['processmaker']['search']['status']; + $sopt[10001]['name'] = __('Case', 'processmaker').' - '.__('Status', 'processmaker'); $sopt[10001]['datatype'] = 'text'; $sopt[10001]['forcegroupby'] = true; //$sopt[10001]['searchtype'] = 'equals'; @@ -265,18 +259,11 @@ function plugin_pre_item_update_processmaker(CommonITILObject $parm) { * @param mixed $parm is the object */ function plugin_item_update_processmaker_satisfaction($parm) { - global $DB, $GLOBALS; $locCase = new PluginProcessmakerCase; if ($locCase->getFromItem( 'Ticket', $parm->fields['tickets_id'] )) { // case is existing for this item - - $locPM = new PluginProcessmakerProcessmaker; - $locPM->login(); - - $pmResponse = $locPM->sendVariables( $locCase->getID(), array( - 'GLPI_SATISFACTION_QUALITY' => $parm->fields['satisfaction'] - )); + $locCase->sendVariables( ['GLPI_SATISFACTION_QUALITY' => $parm->fields['satisfaction']] ); } } @@ -330,14 +317,14 @@ function plugin_item_purge_processmaker($parm) { // and we must find all tasks assigned to this former user and re-assigned them to new user (if any :))! //$caseInfo = $locPM->getCaseInfo( $locCase->getID() ); - $caseInfo = $locCase->getCaseInfo( $locCase->getID() ); + $caseInfo = $locCase->getCaseInfo( ); if ($caseInfo !== false) { //$locPM->sendVariables( $locCase->getID( ), $locVars ); - $locCase->sendVariables( $locCase->getID( ), $locVars); + $locCase->sendVariables( $locVars); // need to get info on the thread of the GLPI current user // we must retreive currentGLPI user from this array $GLPICurrentPMUserId = PluginProcessmakerUser::getPMUserId( $parm->fields['users_id'] ); - if (isset( $caseInfo->currentUsers ) && is_array( $caseInfo->currentUsers )) { + if (property_exists($caseInfo, 'currentUsers') && is_array( $caseInfo->currentUsers )) { foreach ($caseInfo->currentUsers as $caseUser) { if ($caseUser->userId == $GLPICurrentPMUserId && in_array( $caseUser->delThreadStatus, array('DRAFT', 'OPEN', 'PAUSE' ) )) { diff --git a/inc/case.class.php b/inc/case.class.php index d6041a8..8e7f654 100644 --- a/inc/case.class.php +++ b/inc/case.class.php @@ -20,7 +20,7 @@ class PluginProcessmakerCase extends CommonDBTM { const CANCELLED = 'CANCELLED'; static function getTypeName($nb=0) { - return _n('Process case', 'Process cases', $nb); + return _n('Process case', 'Process cases', $nb, 'processmaker'); } //static function canCreate() { @@ -72,10 +72,9 @@ class PluginProcessmakerCase extends CommonDBTM { * @return array os strings */ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { - global $LANG; if ($item->getType() == __CLASS__) { // get tab name for a case itself - return [ __CLASS__ => __('Case')." ".$LANG['processmaker']['case']['statuses'][$item->fields['case_status']].""]; + return [ __CLASS__ => __('Case', 'processmaker')." ".self::getStatus($item->fields['case_status']).""]; } else { $items_id = $item->getID(); $itemtype = $item->getType(); @@ -323,12 +322,12 @@ class PluginProcessmakerCase extends CommonDBTM { echo "
".__('Current task(s) properties', 'processmaker')."
".__('Task', 'processmaker')."".__('Task guid', 'processmaker')."".__('Current user', 'processmaker')."".__('Task delegation date', 'processmaker')."".__('Task', 'processmaker')."".__('Task guid', 'processmaker')."".__('Current user', 'processmaker')."".__('Task delegation date', 'processmaker')."
"; - echo ""; - $itemtype = $case->fields['itemtype']; - $item = new $itemtype; - $item->getFromDB($case->fields['items_id']); - echo ""; -// echo ""; - echo ""; + + echo ""; + + Ticket::commonListHeader(Search::HTML_OUTPUT); + + $itemtype::showShort($case->fields['items_id']); echo "
".__('Case item', 'processmaker')."
".$itemtype::getTypeName(1)."".$item->getID()."".$item->getLink(['forceid' => 1])."
".__('Case item', 'processmaker')." > ".$itemtype::getTypeName(1)."
"; - //echo "
"; - // show case properties $case->showCaseProperties(); @@ -435,7 +431,7 @@ class PluginProcessmakerCase extends CommonDBTM { echo ""; echo ""; echo ""; - echo ""; + echo ""; echo ""; Html::closeForm(); @@ -477,7 +473,7 @@ class PluginProcessmakerCase extends CommonDBTM { * @param CommonITILObject $item */ static function showForItem(CommonITILObject $item) { - global $DB, $CFG_GLPI, $LANG; + global $DB, $CFG_GLPI; $items_id = $item->getField('id'); $itemtype = $item->getType(); @@ -508,10 +504,10 @@ class PluginProcessmakerCase extends CommonDBTM { } } - $columns = array('pname' => 'Process', - 'name' => 'Name', - 'status' => 'Status', - 'sub' => 'Subcase of' + $columns = array('pname' => __('Process', 'processmaker'), + 'name' => __('Title', 'processmaker'), + 'status' => __('Status', 'processmaker'), + 'sub' => __('Subcase of', 'processmaker') ); // check if item is not solved nor closed @@ -526,10 +522,10 @@ class PluginProcessmakerCase extends CommonDBTM { echo ""; echo ""; - echo ""; + echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; @@ -140,11 +138,9 @@ class PluginProcessmakerCaselink extends CommonDBTM { * @return mixed */ function getSearchOptions() { - global $LANG; - $tab = array(); - $tab['common'] = $LANG['processmaker']['title'][1]; + $tab['common'] = __('ProcessMaker', 'processmaker'); $tab[1]['table'] = $this->getTable(); $tab[1]['field'] = 'name'; @@ -166,55 +162,55 @@ class PluginProcessmakerCaselink extends CommonDBTM { $tab[10]['table'] = $this->getTable(); $tab[10]['field'] = 'is_externaldata'; - $tab[10]['name'] = __('External data'); + $tab[10]['name'] = __('External data', 'processmaker'); $tab[10]['massiveaction'] = false; $tab[10]['datatype'] = 'bool'; $tab[11]['table'] = $this->getTable(); $tab[11]['field'] = 'is_self'; - $tab[11]['name'] = __('Self'); + $tab[11]['name'] = __('Self', 'processmaker'); $tab[11]['massiveaction'] = false; $tab[11]['datatype'] = 'bool'; $tab[12]['table'] = $this->getTable(); $tab[12]['field'] = 'is_targettoclaim'; - $tab[12]['name'] = __('Claim target task'); + $tab[12]['name'] = __('Claim target task', 'processmaker'); $tab[12]['massiveaction'] = false; $tab[12]['datatype'] = 'bool'; $tab[13]['table'] = $this->getTable(); $tab[13]['field'] = 'externalapplication'; - $tab[13]['name'] = __('External application JSON config'); + $tab[13]['name'] = __('External application JSON config', 'processmaker'); $tab[13]['massiveaction'] = false; $tab[13]['datatype'] = 'text'; $tab[14]['table'] = $this->getTable(); $tab[14]['field'] = 'sourcetask_guid'; - $tab[14]['name'] = __('Source task GUID'); + $tab[14]['name'] = __('Source task GUID', 'processmaker'); $tab[14]['massiveaction'] = false; $tab[14]['datatype'] = 'text'; $tab[15]['table'] = $this->getTable(); $tab[15]['field'] = 'targettask_guid'; - $tab[15]['name'] = __('Target task GUID'); + $tab[15]['name'] = __('Target task GUID', 'processmaker'); $tab[15]['massiveaction'] = false; $tab[15]['datatype'] = 'text'; $tab[16]['table'] = $this->getTable(); $tab[16]['field'] = 'targetdynaform_guid'; - $tab[16]['name'] = __('Target dynaform GUID'); + $tab[16]['name'] = __('Target dynaform GUID', 'processmaker'); $tab[16]['massiveaction'] = false; $tab[16]['datatype'] = 'text'; $tab[17]['table'] = $this->getTable(); $tab[17]['field'] = 'targetprocess_guid'; - $tab[17]['name'] = __('Target process GUID'); + $tab[17]['name'] = __('Target process GUID', 'processmaker'); $tab[17]['massiveaction'] = false; $tab[17]['datatype'] = 'text'; $tab[18]['table'] = $this->getTable(); $tab[18]['field'] = 'sourcecondition'; - $tab[18]['name'] = __('Source condition'); + $tab[18]['name'] = __('Source condition', 'processmaker'); $tab[18]['massiveaction'] = false; $tab[18]['datatype'] = 'text'; diff --git a/inc/casemap.class.php b/inc/casemap.class.php index 5f7be24..2b2c53a 100644 --- a/inc/casemap.class.php +++ b/inc/casemap.class.php @@ -28,10 +28,10 @@ class PluginProcessmakerCasemap extends CommonDBTM { echo ""; //?rand=$rand' - $iframe = ""; @@ -40,8 +40,7 @@ class PluginProcessmakerCasemap extends CommonDBTM { } function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){ - global $LANG; - return $LANG['processmaker']['item']['case']['viewcasemap']; + return __('Map', 'processmaker'); } } \ No newline at end of file diff --git a/inc/config.class.php b/inc/config.class.php index 64f7ca7..3b0c1d9 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -38,9 +38,7 @@ class PluginProcessmakerConfig extends CommonDBTM { * @return mixed */ static function getTypeName($nb=0) { - global $LANG; - - return $LANG['processmaker']['config']['setup']; + return __('ProcessMaker setup', 'processmaker'); } /** @@ -49,9 +47,7 @@ class PluginProcessmakerConfig extends CommonDBTM { * @return mixed */ function getName($with_comment=0) { - global $LANG; - - return $LANG['processmaker']['title'][1]; + return __('ProcessMaker', 'processmaker'); } /** @@ -143,7 +139,7 @@ class PluginProcessmakerConfig extends CommonDBTM { * @return boolean */ static function showConfigForm($item) { - global $LANG, $PM_DB, $CFG_GLPI, $PM_SOAP; + global $PM_DB, $CFG_GLPI, $PM_SOAP; $setup_ok = false; @@ -157,12 +153,12 @@ class PluginProcessmakerConfig extends CommonDBTM { $config->showFormHeader(['colspan' => 4]); echo ""; - echo "\n"; echo ""; - echo ""; + echo ""; echo "\n"; echo ""; - echo "\n"; echo ""; - echo ""; + echo ""; echo "\n"; echo ""; - echo ""; + echo ""; echo "\n"; echo ""; - echo "\n"; - echo ""; + echo ""; echo ""; - echo ""; + echo ""; echo "\n"; echo ""; - echo ""; + echo ""; echo "\n"; echo ""; - echo ""; + echo ""; echo "\n"; echo ""; - echo ""; + echo ""; echo "\n"; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo "\n"; echo ""; - echo "\n"; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; + echo ""; if ($setup_ok) { // $info = $pm->systemInformation( ); $info = $PM_SOAP->systemInformation( ); - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; } else { - echo ''; + echo ''; } $config->showFormButtons(array('candel'=>false)); @@ -347,10 +343,8 @@ class PluginProcessmakerConfig extends CommonDBTM { function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { - global $LANG; - if ($item->getType()=='Config') { - return $LANG['processmaker']['title'][1]; + return __('ProcessMaker', 'processmaker'); } return ''; } diff --git a/inc/process.class.php b/inc/process.class.php index 1fb0828..871a985 100644 --- a/inc/process.class.php +++ b/inc/process.class.php @@ -14,6 +14,9 @@ if (!defined('GLPI_ROOT')) { */ class PluginProcessmakerProcess extends CommonDBTM { + const CLASSIC = 'classic'; + const BPMN = 'bpmn'; + static $rightname = 'plugin_processmaker_config'; @@ -341,15 +344,15 @@ class PluginProcessmakerProcess extends CommonDBTM { * @return void (display) **/ function title() { - global $LANG, $CFG_GLPI; + global $CFG_GLPI; $buttons = array(); - $title = $LANG['processmaker']['config']['refreshprocesslist']; + $title = __('Synchronize Process List', 'processmaker'); if ($this->canCreate()) { - $buttons["process.php?refresh=1"] = $LANG['processmaker']['config']['refreshprocesslist']; + $buttons["process.php?refresh=1"] = $title; $title = ""; - Html::displayTitle($CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png", $LANG['processmaker']['config']['refreshprocesslist'], $title, + Html::displayTitle($CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png", $title, '', $buttons); } @@ -385,11 +388,9 @@ class PluginProcessmakerProcess extends CommonDBTM { * @return mixed */ function getSearchOptions() { - global $LANG; - $tab = array(); - $tab['common'] = $LANG['processmaker']['title'][1]; + $tab['common'] = __('ProcessMaker', 'processmaker'); $tab[1]['table'] = 'glpi_plugin_processmaker_processes'; $tab[1]['field'] = 'name'; @@ -423,25 +424,25 @@ class PluginProcessmakerProcess extends CommonDBTM { $tab[10]['table'] = 'glpi_plugin_processmaker_processes'; $tab[10]['field'] = 'process_guid'; - $tab[10]['name'] = $LANG['processmaker']['process']['process_guid']; + $tab[10]['name'] = __('Process GUID', 'processmaker'); $tab[10]['massiveaction'] = false; $tab[10]['datatype'] = 'text'; $tab[11]['table'] = 'glpi_plugin_processmaker_processes'; $tab[11]['field'] = 'project_type'; - $tab[11]['name'] = $LANG['processmaker']['process']['project_type_short']; + $tab[11]['name'] = __('Project type', 'processmaker'); $tab[11]['massiveaction'] = false; $tab[11]['datatype'] = 'specific'; $tab[12]['table'] = 'glpi_plugin_processmaker_processes'; $tab[12]['field'] = 'hide_case_num_title'; - $tab[12]['name'] = $LANG['processmaker']['process']['hide_case_num_title_short']; + $tab[12]['name'] = __('Hide case number and title', 'processmaker'); $tab[12]['massiveaction'] = true; $tab[12]['datatype'] = 'bool'; $tab[13]['table'] = 'glpi_plugin_processmaker_processes'; $tab[13]['field'] = 'insert_task_comment'; - $tab[13]['name'] = $LANG['processmaker']['process']['insert_task_comment_short']; + $tab[13]['name'] = __('Insert Task Category', 'processmaker'); $tab[13]['massiveaction'] = true; $tab[13]['datatype'] = 'bool'; @@ -453,7 +454,7 @@ class PluginProcessmakerProcess extends CommonDBTM { $tab[15]['table'] = 'glpi_plugin_processmaker_processes'; $tab[15]['field'] = 'type'; - $tab[15]['name'] = $LANG['processmaker']['process']['type']; + $tab[15]['name'] = __('Ticket type (self-service)', 'processmaker'); $tab[15]['searchtype'] = 'equals'; $tab[15]['datatype'] = 'specific'; $tab[15]['massiveaction'] = false; @@ -470,15 +471,13 @@ class PluginProcessmakerProcess extends CommonDBTM { * @param $options array **/ static function getSpecificValueToDisplay($field, $values, array $options=array()) { - global $LANG; - if (!is_array($values)) { $values = array($field => $values); } switch ($field) { case 'project_type': - return $LANG['processmaker']['process']['project_type_'.$values[$field]]; + return self::getProcessTypeName($values[$field]); case 'type': return Ticket::getTicketTypeName($values[$field]); @@ -487,13 +486,42 @@ class PluginProcessmakerProcess extends CommonDBTM { } - static function getTypeName($nb=0) { - global $LANG; + /** + * Summary of getAllTypeArray + * @return string[] + */ + static function getAllTypeArray() { + $tab = array(self::CLASSIC => _x('process_type', 'Classic', 'processmaker'), + self::BPMN => _x('process_type', 'BPMN', 'processmaker')); + + return $tab; + } + + + /** + * Summary of getProcessTypeName + * @param mixed $value + * @return mixed + */ + static function getProcessTypeName($value) { + + $tab = static::getAllTypeArray(true); + // Return $value if not defined + return (isset($tab[$value]) ? $tab[$value] : $value); + } + + + /** + * Summary of getTypeName + * @param mixed $nb + * @return mixed + */ + static function getTypeName($nb=0) { if ($nb>1) { - return $LANG['processmaker']['title'][5]; + return __('Processes', 'processmaker'); } - return $LANG['processmaker']['title'][2]; + return __('Process', 'processmaker'); } function defineTabs($options=array()) { @@ -512,7 +540,7 @@ class PluginProcessmakerProcess extends CommonDBTM { } function showForm ($ID, $options=array('candel'=>false)) { - global $DB, $CFG_GLPI, $LANG; + global $DB, $CFG_GLPI; //if ($ID > 0) { // $this->check($ID,READ); @@ -525,36 +553,36 @@ class PluginProcessmakerProcess extends CommonDBTM { $this->showFormHeader($options); echo ""; - echo ""; - echo ""; + echo ""; echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; - echo ""; echo ""; - echo ""; echo ""; - echo ""; diff --git a/inc/process_profile.class.php b/inc/process_profile.class.php index 6e9706a..6be5844 100644 --- a/inc/process_profile.class.php +++ b/inc/process_profile.class.php @@ -23,13 +23,12 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM } function getTabNameForItem( CommonGLPI $item, $withtemplate=0) { - global $LANG; - return $LANG['processmaker']['title'][4]; + return __('Authorizations', 'processmaker'); } static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { - global $DB,$CFG_GLPI, $LANG; + global $DB; $ID = $item->getField('id'); @@ -43,7 +42,7 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM echo ""; echo "
".__('Add a new case')."
".__('Add a new case', 'processmaker')."
"; - echo $LANG['processmaker']['item']['selectprocess']." "; + _e('Select the process you want to add', 'processmaker'); echo ""; PluginProcessmakerProcess::dropdown(array( 'value' => 0, 'entity' => $item->fields['entities_id'], 'name' => 'plugin_processmaker_processes_id', 'condition' => "is_active=1")); echo ""; @@ -632,7 +628,7 @@ class PluginProcessmakerCase extends CommonDBTM { * @param mixed $withtemplate */ static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { - global $LANG, $DB, $CFG_GLPI, $PM_SOAP; + global $PM_SOAP; if ($item->getType() == __CLASS__) { // we are in a case viewing the main tab @@ -641,398 +637,16 @@ class PluginProcessmakerCase extends CommonDBTM { } else { - // the idea is to show a list of cases attached to the $item ITIL object - // TODO give possibility to start a new case if needed - self::showForItem($item); - } - } - - /** - * Summary of displayTabContentForItem - * @param CommonGLPI $item is the item - * @param mixed $tabnum is the tab num - * @param mixed $withtemplate has template - * @return mixed - */ - static function displayTabContentForItem_old(CommonGLPI $item, $tabnum=1, $withtemplate=0) { - global $LANG, $DB, $CFG_GLPI, $PM_SOAP; - - $config = $PM_SOAP->config; //PluginProcessmakerConfig::getInstance(); - - if ($config->fields['maintenance'] == 0) { - - $items_id = $item->getID(); - $itemtype = $item->getType(); - - $rand = rand(); - echo ""; - echo "
"; - echo Html::scriptBlock("$('#processmakercasemenu').css('max-width', 'none');"); - echo ""; - - $pmCaseUser = false; // initial value: no user - // first search for the case - $locCase = new self; - if ($locCase->getFromItem($itemtype, $items_id)) { - $GLPICurrentPMUserId=0; - $paramsURL=''; - $caseInfo = $locCase->getCaseInfo(); - if ($caseInfo->caseStatus != 'CANCELLED' && $caseInfo->caseStatus != 'COMPLETED') { - // need to get info on the thread of the GLPI current user - // we must retreive currentGLPI user from this array - $GLPICurrentPMUserId = PluginProcessmakerUser::getPMUserId(Session::getLoginUserID()); - $pmCaseUser = $caseInfo->currentUsers[0]; // by default currently manage only one task at a time, must define tab management for several tasks - foreach ($caseInfo->currentUsers as $caseUser) { - if ($caseUser->userId == $GLPICurrentPMUserId) { - $pmCaseUser = $caseUser; - break; - } - } - } - $locDelIndex = 1; // by default - switch ($caseInfo->caseStatus) { - case "CANCELLED" : - echo ""; - $paramsURL = "DEL_INDEX=1"; - // echo "" ; - break; - - case "DRAFT" : - case "TO_DO" : - - $paramsURL = "DEL_INDEX=".$pmCaseUser->delIndex."&action=".$caseInfo->caseStatus; - $locDelIndex = $pmCaseUser->delIndex; - if ($pmCaseUser->userId != '') { - echo ""; - - if ($GLPICurrentPMUserId == $pmCaseUser->userId) { - // then propose a button to cancel case only when assigned user is == to glpi current user - echo ""; - } - - if ($caseInfo->caseStatus == "DRAFT" || (plugin_processmaker_haveRight("case", DELETE) && $_SESSION['glpiactiveprofile']['interface'] == 'central')) { - // then propose a button to delete case - echo ""; - - } - - echo ""; - - echo ""; - } - - break; - case "COMPLETED" : - echo ""; - $paramsURL = "DEL_INDEX="; // DEL_INDEX is not set to tell PM to show the current task i.e.: the last one - break; - } - - $proj = new PluginProcessmakerProcess; - $proj->getFromGUID( $caseInfo->processId ); - $project_type = $proj->fields['project_type']; - - echo "
".$LANG['processmaker']['item']['tab']."
".$LANG['processmaker']['item']['cancelledcase']."
"; - echo $LANG['processmaker']['item']['cancelcase']; - echo ""; - echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - echo ""; - echo $LANG['processmaker']['item']['deletecase']; - echo ""; - echo ""; - //echo ""; - echo ""; - - echo ""; - - echo "
".$LANG['processmaker']['item']['completedcase']."
"; - echo ""; //?rand=$rand' - - // processmakertabpaneltable is used to align the tabs - echo ""; - echo Html::scriptBlock("$('#processmakertabpaneltable').css('max-width', 'none');"); - echo ""; - echo ""; - + // show the list of cases attached to the $item ITIL object + if (!$PM_SOAP->config->fields['maintenance']) { + self::showForItem($item); } else { - - //******************************** - // no running case for this ticket - // propose to start one - //******************************** - echo ""; - - echo ""; - } else { - echo ""; - } + PluginProcessmakerProcessmaker::showUnderMaintenance(); } - - echo "
"; - - ////////////////////////// - // Processmaker tab panels - // need to have a global variable which contains tab id - // used only one time for activated panel - ////////////////////////// - $arrayProcessmakerTabPanel = array(); - echo "
"; - - ////////////// - // Define tabs - ////////////// - echo "
    "; - //echo "
  • Nunc tincidunt
  • "; - //$arrayProcessmakerTabPanel[] = "tabs-1"; - $arrayProcessmakerTabPanel = []; - if ($pmCaseUser) { - foreach ($caseInfo->currentUsers as $caseUser) { - $title = $LANG['processmaker']['item']['task']['task'].$caseUser->taskName; - echo "
  • ". ($caseUser->userId != $GLPICurrentPMUserId ? "$title" : $title) ."
  • "; - $arrayProcessmakerTabPanel[] = "task-".$caseUser->delIndex; - } - } else { - // no user means CANCELLED or COMPLETED - // then create artificial panel to host case infos - echo "
  • ".$LANG['processmaker']['item']['case']['caseinfo']."
  • "; - $arrayProcessmakerTabPanel[] = "caseInfo"; - } - // add default panels: map, history, log and dynaforms - $defaultTabs = ['caseMap' => 'viewcasemap', 'caseHistory' => 'viewcasehistory', 'caseChangeLogHistory' => 'viewcasechangeloghistory', 'historyDynaformPage' => 'viewdynaforms' ]; - foreach ($defaultTabs as $tab => $tabText) { - echo "
  • ".$LANG['processmaker']['item']['case'][$tabText]."
  • "; - } - - echo "
"; - - //////////////// - // Define panels - //////////////// - if ($pmCaseUser) { - $csrf = Session::getNewCSRFToken(); - foreach ($caseInfo->currentUsers as $caseUser) { - // for each task, if task is to be claimed, we need to verify that current user can claim it by checking if he/she is in the group assigned to the task - $hide_claim_button=false; // by default - if (!$caseUser->userId) { - // current task is to claimed - // get task user list - $query = "SELECT items_id, itemtype FROM glpi_plugin_processmaker_tasks WHERE plugin_processmaker_cases_id = '".$locCase->getID()."' AND del_index =".$caseUser->delIndex; - foreach ($DB->request($query) as $row) { - // normally there is only one task - $task = getItemForItemtype( $row['itemtype'] ); - $task->getFromDB( $row['items_id'] ); - // check if this group can be found in the current user's groups - if (!isset($_SESSION['glpigroups']) || !in_array( $task->fields['groups_id_tech'], $_SESSION['glpigroups'] )) { - $hide_claim_button=true; - } - } - } - echo "
"; - // to load users for task re-assign only when task is not to be 'claimed' - if ($caseUser->userId) { - echo "
Loading...
"; - echo ""; - } - echo "
"; - } - } else { - // no user means CANCELLED or COMPLETED - // then create artificial panel to host case infos - echo "
"; - $url = $PM_SOAP->serverURL."/cases/cases_Open?sid=".$PM_SOAP->getPMSessionID()."&APP_UID=".$caseInfo->caseId."&".$paramsURL."&action=TO_DO"; - echo "
"; - } - // default panels - // map, history, log and dynaforms - // will be added dynamically by the addTabPanel function - - - echo "
"; - // end of tabs/panels - - echo "
"; - if ($pmCaseUser) { - $activePanel = 'task-'.$pmCaseUser->delIndex; - } else { - $activePanel = 'caseInfo'; - } - $caseMapUrl = $PM_SOAP->serverURL.($project_type=='bpmn' ? "/designer?prj_uid=".$caseInfo->processId."&prj_readonly=true&app_uid=".$caseInfo->caseId : "/cases/ajaxListener?action=processMap&rand=$rand")."&glpi_domain={$config->fields['domain']}"; - echo ""; - - echo "
".$LANG['processmaker']['item']['nocase']; - - // check if item is not solved nor closed - if ($item->fields['status'] != 'solved' && $item->fields['status'] != 'closed' && $_SESSION['glpiactiveprofile']['interface'] != 'helpdesk') { - // propose case start - echo " - ".$LANG['processmaker']['item']['startone']; - echo "
"; - echo $LANG['processmaker']['item']['selectprocess']." "; - echo ""; - echo ""; - echo ""; - PluginProcessmakerProcess::dropdown(array( 'value' => 0, 'entity' => $item->fields['entities_id'], 'name' => 'plugin_processmaker_processes_id', 'condition' => "is_active=1")); - echo ""; - echo ""; - echo "
"; - Html::closeForm(true ); - //echo ""; - - } else { - // under maintenance - echo $LANG['processmaker']['config']['undermaintenance']; } - - return true; } + /** * Summary of deleteTasks * will delete all tasks associated with this case from the item @@ -1053,22 +667,22 @@ class PluginProcessmakerCase extends CommonDBTM { } - /** - * Summary of deleteCase - * will delete case and all tasks associated with this case from the item - * @return true if case and tasks have been deleted from associated item and from case table - */ + /** + * Summary of deleteCase + * will delete case and all tasks associated with this case from the item + * @return true if case and tasks have been deleted from associated item and from case table + */ function deleteCase( ) { return $this->delete(['id' => $this->getID()]); } - /** - * Summary of cancelTasks - * will mark as information all to_do tasks - * BEWARE that this will only be done when case is in TO_DO status - * @return true if tasks have been deleted from associated item and from case table - */ + /** + * Summary of cancelTasks + * will mark as information all to_do tasks + * BEWARE that this will only be done when case is in TO_DO status + * @return true if tasks have been deleted from associated item and from case table + */ private function cancelTasks( ) { global $DB; $ret = false; @@ -1117,7 +731,7 @@ class PluginProcessmakerCase extends CommonDBTM { if ($myCase->getFromItem( $item['item']->getType(), $item['item']->getID() )) { $pmVar = $myCase->getVariables(['GLPI_ITEM_CAN_BE_SOLVED']); // TODO also manage sub-cases - if ($myCase->fields['case_status'] != 'COMPLETED' && $myCase->fields['case_status'] != 'CANCELLED' && (!isset($pmVar['GLPI_ITEM_CAN_BE_SOLVED']) || $pmVar['GLPI_ITEM_CAN_BE_SOLVED'] != 1)) { + if ($myCase->fields['case_status'] != self::COMPLETED && $myCase->fields['case_status'] != self::CANCELLED && (!isset($pmVar['GLPI_ITEM_CAN_BE_SOLVED']) || $pmVar['GLPI_ITEM_CAN_BE_SOLVED'] != 1)) { // then item can't be solved return false; } @@ -1185,9 +799,14 @@ class PluginProcessmakerCase extends CommonDBTM { return $menu; } + /** + * Summary of getSpecificValueToDisplay + * @param mixed $field + * @param mixed $values + * @param array $options + * @return mixed + */ static function getSpecificValueToDisplay($field, $values, array $options=array()) { - global $LANG; - if (!is_array($values)) { $values = array($field => $values); } @@ -1217,7 +836,7 @@ class PluginProcessmakerCase extends CommonDBTM { } case 'case_status': - return $LANG['processmaker']['case']['statuses'][$values['case_status']]; + return self::getStatus($values['case_status']); default: return parent::getSpecificValueToDisplay($field, $values, $options); @@ -1277,18 +896,11 @@ class PluginProcessmakerCase extends CommonDBTM { static function getAllStatusArray($withmetaforsearch=false) { - $tab = array(self::DRAFT => _x('case_status', 'Draft'), - self::TO_DO => _x('case_status', 'To do'), - self::COMPLETED => _x('case_status', 'Completed'), - self::CANCELLED => _x('case_status', 'Cancelled')); + $tab = array(self::DRAFT => _x('case_status', 'Draft', 'processmaker'), + self::TO_DO => _x('case_status', 'To do', 'processmaker'), + self::COMPLETED => _x('case_status', 'Completed', 'processmaker'), + self::CANCELLED => _x('case_status', 'Cancelled', 'processmaker')); - //if ($withmetaforsearch) { - // $tab['notold'] = _x('status', 'Not solved'); - // $tab['notclosed'] = _x('status', 'Not closed'); - // $tab['process'] = __('Processing'); - // $tab['old'] = _x('status', 'Solved + Closed'); - // $tab['all'] = __('All'); - //} return $tab; } @@ -1305,11 +917,9 @@ class PluginProcessmakerCase extends CommonDBTM { * @return mixed */ function getSearchOptions() { - global $LANG; - $tab = array(); - $tab['common'] = __('Process cases', 'processmaker'); //$LANG['processmaker']['title'][1]; + $tab['common'] = __('Process cases', 'processmaker'); $tab[1]['table'] = self::getTable(); $tab[1]['field'] = 'id'; @@ -1365,13 +975,12 @@ class PluginProcessmakerCase extends CommonDBTM { $tab[14]['datatype'] = 'itemlink'; $tab[14]['massiveaction'] = false; - return $tab; } function showForm ($ID, $options=array('candel'=>false)) { - global $DB, $CFG_GLPI, $LANG; + //global $DB, $CFG_GLPI, $LANG; $options['candel'] = true; @@ -1449,6 +1058,12 @@ class PluginProcessmakerCase extends CommonDBTM { } + + /** + * Summary of defineTabs + * @param mixed $options + * @return array + */ function defineTabs($options=array()) { // $ong = array('empty' => $this->getTypeName(1)); @@ -1467,11 +1082,6 @@ class PluginProcessmakerCase extends CommonDBTM { $this->addStandardTab('PluginProcessmakerCasedynaform', $ong, $options); - //$this->addStandardTab('Ticket', $ong, $options); - //$this->addStandardTab('Log', $ong, $options); - - //TODO we are going to add tabs like tasks, map, history, dynaform... - return $ong; } diff --git a/inc/casechangelog.class.php b/inc/casechangelog.class.php index c8a24ee..9d10ce7 100644 --- a/inc/casechangelog.class.php +++ b/inc/casechangelog.class.php @@ -14,15 +14,15 @@ class PluginProcessmakerCasechangelog extends CommonDBTM { global $CFG_GLPI, $PM_SOAP; $rand = rand(); - - $caseHistoryURL = $PM_SOAP->serverURL."/cases/ajaxListener?action=changeLogHistory&rand=$rand"; + + $caseHistoryURL = $PM_SOAP->serverURL."/cases/ajaxListener?action=changeLogHistory&rand=$rand"; echo ""; //?rand=$rand' - $iframe = ""; @@ -32,7 +32,6 @@ class PluginProcessmakerCasechangelog extends CommonDBTM { } function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){ - global $LANG; - return $LANG['processmaker']['item']['case']['changelog']; + return __('Change log', 'processmaker'); } } \ No newline at end of file diff --git a/inc/casedynaform.class.php b/inc/casedynaform.class.php index 9ec2cab..90006f7 100644 --- a/inc/casedynaform.class.php +++ b/inc/casedynaform.class.php @@ -11,7 +11,7 @@ class PluginProcessmakerCasedynaform extends CommonDBTM { static function displayTabContentForItem(CommonGLPI $case, $tabnum=1, $withtemplate=0) { - global $CFG_GLPI, $PM_SOAP, $LANG; + global $CFG_GLPI, $PM_SOAP; $config = $PM_SOAP->config; $rand = rand(); @@ -77,8 +77,7 @@ class PluginProcessmakerCasedynaform extends CommonDBTM { } function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){ - global $LANG; - return $LANG['processmaker']['item']['case']['viewdynaforms']; + return __('Dynaforms', 'processmaker'); } } \ No newline at end of file diff --git a/inc/casehistory.class.php b/inc/casehistory.class.php index ebdb9b2..e83394e 100644 --- a/inc/casehistory.class.php +++ b/inc/casehistory.class.php @@ -15,7 +15,7 @@ class PluginProcessmakerCasehistory extends CommonDBTM { $rand = rand(); $caseHistoryURL = $PM_SOAP->serverURL - ."/cases/ajaxListener?action=caseHistory&rand=$rand"; + ."/cases/ajaxListener?action=caseHistory&rand=$rand"; echo ""; @@ -32,7 +32,6 @@ class PluginProcessmakerCasehistory extends CommonDBTM { } function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){ - global $LANG; - return $LANG['processmaker']['item']['case']['viewcasehistory']; + return __('History', 'processmaker'); } } \ No newline at end of file diff --git a/inc/caselink.class.php b/inc/caselink.class.php index c66fb5f..eb1701f 100644 --- a/inc/caselink.class.php +++ b/inc/caselink.class.php @@ -47,16 +47,14 @@ class PluginProcessmakerCaselink extends CommonDBTM { } static function getTypeName($nb=0) { - global $LANG; - if ($nb>1) { - return $LANG['processmaker']['title'][7]; + return __('Case-links', 'processmaker'); } - return $LANG['processmaker']['title'][6]; + return __('Case-link', 'processmaker'); } function showForm ($ID, $options=array('candel'=>false)) { - global $DB, $CFG_GLPI, $LANG; + global $DB, $CFG_GLPI; $options['candel'] = true; @@ -64,27 +62,27 @@ class PluginProcessmakerCaselink extends CommonDBTM { $this->showFormHeader($options); echo "
".__("Name").""; + echo "".__('Name').""; echo ""; echo "
".__("Active").""; + echo "".__('Active').""; Dropdown::showYesNo("is_active", $this->fields["is_active"]); echo "
".__("External data").""; + echo "".__('External data', 'processmaker').""; Dropdown::showYesNo("is_externaldata", $this->fields["is_externaldata"]); echo "
".__("Self").""; + echo "".__('Self', 'processmaker').""; Dropdown::showYesNo("is_self", $this->fields["is_self"]); echo "
".__("Source task GUID").""; + echo "".__('Source task GUID', 'processmaker').""; //PluginProcessmakerTaskCategory::dropdown(array('name' => 'plugin_processmaker_taskcategories_id_source', // 'display_emptychoice' => false, // 'value' => $this->fields['plugin_processmaker_taskcategories_id_source'])); @@ -92,7 +90,7 @@ class PluginProcessmakerCaselink extends CommonDBTM { echo "
".__("Target task GUID").""; + echo "".__('Target task GUID', 'processmaker').""; //PluginProcessmakerTaskCategory::dropdown(array('name' => 'plugin_processmaker_taskcategories_id_target', // 'display_emptychoice' => false, // 'value' => $this->fields['plugin_processmaker_taskcategories_id_target'])); @@ -100,7 +98,7 @@ class PluginProcessmakerCaselink extends CommonDBTM { echo "
".__("Target process GUID").""; + echo "".__('Target process GUID', 'processmaker').""; //Dropdown::show( 'PluginProcessmakerProcess', array('name' => 'plugin_processmaker_processes_id', // 'display_emptychoice' => true, // 'value' => $this->fields['plugin_processmaker_processes_id'], @@ -109,23 +107,23 @@ class PluginProcessmakerCaselink extends CommonDBTM { echo "
".__("Target dynaform GUID").""; + echo "".__('Target dynaform GUID', 'processmaker').""; echo ""; echo "
".__("Source condition").""; + echo "".__('Source condition', 'processmaker').""; //echo ""; echo ""; echo "
".__("Claim target task").""; + echo "".__('Claim target task', 'processmaker').""; Dropdown::showYesNo("is_targettoclaim", $this->fields["is_targettoclaim"]); echo "
".__("External application JSON config").""; + echo "".__('External application JSON config', 'processmaker').""; echo ""; echo "
".$LANG['processmaker']['config']['URL'].""; + echo "".__('Server URL (must be in same domain than GLPI)', 'processmaker').""; echo ""; echo "
" . $LANG['processmaker']['config']['domain'] . "".__('Common domain with GLPI', 'processmaker')."
".$config->fields['domain']."
"; echo Html::scriptBlock(" @@ -191,7 +187,7 @@ class PluginProcessmakerConfig extends CommonDBTM { return; } } catch(ex) {} - $('div[name=domain]').text('".$LANG['processmaker']['config']['domain-error']."') ; + $('div[name=domain]').text('".__('None!', 'processmaker')."') ; $('div[name=domain]').parent().attr('color', 'red'); }; $('input[name=pm_server_URL]').on('keyup', setCommonDomain ) ; @@ -200,23 +196,23 @@ class PluginProcessmakerConfig extends CommonDBTM { echo "
".$LANG['processmaker']['config']['workspace'].""; + echo "".__('Workspace Name', 'processmaker').""; echo ""; echo "
" . $LANG['processmaker']['config']['admin']['user'] . "".__('Server administrator name', 'processmaker').""; echo "
" . $LANG['processmaker']['config']['admin']['password'] . "".__('Server administrator password', 'processmaker').""; echo "  ".__('Clear'); echo "
".$LANG['processmaker']['config']['connectionstatus'].""; + echo "".__('Connection status', 'processmaker').""; //$pm = new PluginProcessmakerProcessmaker; if ($config->fields['pm_server_URL'] != '' @@ -232,31 +228,31 @@ class PluginProcessmakerConfig extends CommonDBTM { } echo "
".$LANG['processmaker']['config']['mysql']."
".__('SQL server setup', 'processmaker')."
" . __('SQL server (MariaDB or MySQL)') . "" . __('SQL server (MariaDB or MySQL)', 'processmaker') . ""; echo "
" . __('Database name') . "" . __('Database name', 'processmaker') . ""; echo "
" . __('SQL user') . "" . __('SQL user', 'processmaker') . ""; echo "
" . __('SQL password') . "" . __('SQL password', 'processmaker') . ""; echo "  ".__('Clear'); echo "
".$LANG['processmaker']['config']['connectionstatus'].""; + echo "".__('Connection status', 'processmaker').""; if ($PM_DB->connected && isset($PM_DB->dbdefault) && $PM_DB->dbdefault != '') { echo "".__('Test successful'); } else { @@ -267,20 +263,20 @@ class PluginProcessmakerConfig extends CommonDBTM { echo "
".__('Settings')."
".$LANG['processmaker']['config']['theme'].""; + echo "".__('Theme Name', 'processmaker').""; Dropdown::showFromArray('pm_theme', $ui_theme, array('value' => $config->fields['pm_theme'])); echo "
".$LANG['processmaker']['config']['main_task_category'].""; + echo "".__('Main Task Category (edit to change name)', 'processmaker').""; TaskCategory::dropdown(array('name' => 'taskcategories_id', 'display_emptychoice' => true, 'value' => $config->fields['taskcategories_id'])); echo "
".$LANG['processmaker']['config']['taskwriter'].""; + echo "".__('Task Writer (edit to change name)', 'processmaker').""; $rand = mt_rand(); User::dropdown(array('name' => 'users_id', 'display_emptychoice' => true, @@ -300,7 +296,7 @@ class PluginProcessmakerConfig extends CommonDBTM { echo "
".$LANG['processmaker']['config']['pm_group_name'].""; + echo "".__('Group in ProcessMaker which will contain all GLPI users', 'processmaker').""; $pmGroups = array( 0 => Dropdown::EMPTY_VALUE ); $query = "SELECT DISTINCT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='GRP_TITLE' ORDER BY CON_VALUE;"; @@ -318,27 +314,27 @@ class PluginProcessmakerConfig extends CommonDBTM { echo "
".__('Maintenance')."
".$LANG['processmaker']['config']['maintenance'].""; + echo "".__('Maintenance mode').""; Dropdown::showYesNo("maintenance", $config->fields['maintenance']); echo "
".__('Processmaker system information')."
".__('Processmaker system information', 'processmaker')."
'._('Version').''.$info->version.'
'._('Web server').''.$info->webServer.'
'._('Server name').''.$info->serverName.'
'._('PHP version').''.$info->phpVersion.'
'._('DB version').''.$info->databaseVersion.'
'._('DB server IP').''.$info->databaseServerIp.'
'._('DB name').''.$info->databaseName.'
'._('User browser').''.$info->userBrowser.'
'._('User IP').''.$info->userIp.'
'.__('Version', 'processmaker').''.$info->version.'
'.__('Web server', 'processmaker').''.$info->webServer.'
'.__('Server name', 'processmaker').''.$info->serverName.'
'.__('PHP version', 'processmaker').''.$info->phpVersion.'
'.__('DB version', 'processmaker').''.$info->databaseVersion.'
'.__('DB server IP', 'processmaker').''.$info->databaseServerIp.'
'.__('DB name', 'processmaker').''.$info->databaseName.'
'.__('User browser', 'processmaker').''.$info->userBrowser.'
'.__('User IP', 'processmaker').''.$info->userIp.'
'._('Version').''.__('Not yet!').'
'.__('Version', 'processmaker').''.__('Not yet!', 'processmaker').'
".__("Name")." :"; + echo "".__("Name").""; //Html::autocompletionTextField($this, "name"); echo $this->fields["name"]; echo "".__("Comments")." :".__("Comments")."
".$LANG['processmaker']['process']['process_guid']." :"; + echo "".__('Process GUID', 'processmaker').""; echo $this->fields["process_guid"]; echo "
".__("Active")." :"; + echo "".__("Active").""; Dropdown::showYesNo("is_active", $this->fields["is_active"]); echo "
".$LANG['processmaker']['process']['hide_case_num_title']." :"; + echo "".__('Hide case number and title in task descriptions', 'processmaker').""; Dropdown::showYesNo("hide_case_num_title", $this->fields["hide_case_num_title"]); echo "
".$LANG['processmaker']['process']['insert_task_comment']." :"; + echo "".__('Insert Task Category comments in Task Description', 'processmaker').""; Dropdown::showYesNo("insert_task_comment", $this->fields["insert_task_comment"]); echo "
".$LANG['processmaker']['process']['type']." :"; + echo "".__('Ticket type (self-service)', 'processmaker').""; if (true) { // $canupdate || !$ID $idticketcategorysearch = mt_rand(); $opt = array('value' => $this->fields["type"]); $rand = Ticket::dropdownType('type', $opt, array(), array('toupdate' => "search_".$idticketcategorysearch )); @@ -572,7 +600,7 @@ class PluginProcessmakerProcess extends CommonDBTM { } echo "".$LANG['processmaker']['process']['itilcategory']." :"; + echo "".__('ITIL Category (self-service)', 'processmaker').""; if (true) { // $canupdate || !$ID || $canupdate_descr $opt = array('value' => $this->fields["itilcategories_id"]); @@ -601,12 +629,12 @@ class PluginProcessmakerProcess extends CommonDBTM { echo "
".$LANG['processmaker']['process']['project_type']." :"; - Dropdown::showFromArray( 'project_type', array( 'classic' => $LANG['processmaker']['process']['project_type_classic'], 'bpmn' => $LANG['processmaker']['process']['project_type_bpmn'] ), array( 'value' => $this->fields["project_type"] ) ); + echo "".__('Project type (to be changed if not up-to-date)', 'processmaker').""; + Dropdown::showFromArray( 'project_type', self::getAllTypeArray(), array( 'value' => $this->fields["project_type"] ) ); echo "
".__("Last update")." :"; + echo "".__("Last update").""; echo Html::convDateTime($this->fields["date_mod"]); echo "
"; - echo ""; + echo ""; echo ""; - $header_end .= ""; echo $header_begin.$header_top.$header_end; @@ -119,7 +118,7 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM $link = $data["completename"]; if ($_SESSION["glpiis_ids_visible"]) { - $link = sprintf(__('%1$s (%2$s)'), $link, $data["entities_id"]); + $link = sprintf('%1$s (%2$s)', $link, $data["entities_id"]); } if ($canshowentity) { @@ -137,12 +136,12 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM } if ($data["is_recursive"]) { - $entname = sprintf(__('%1$s %2$s'), $entname, "("); + $entname = sprintf('%1$s %2$s', $entname, "("); if ($data["is_recursive"]) { //TRANS: letter 'R' for Recursive - $entname = sprintf(__('%1$s%2$s'), $entname, __('R')); + $entname = sprintf('%1$s%2$s', $entname, __('R')); } - $entname = sprintf(__('%1$s%2$s'), $entname, ")"); + $entname = sprintf('%1$s%2$s', $entname, ")"); } echo ""; echo ""; diff --git a/inc/processmaker.class.php b/inc/processmaker.class.php index 2fb5193..6ffbe4c 100644 --- a/inc/processmaker.class.php +++ b/inc/processmaker.class.php @@ -91,6 +91,10 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { static $rightname = ''; + const ERROR_CREATING_CASE = 11; + const ERROR_NO_RIGHTS = 14; + const ERROR_CREATING_CASE2 = 100; + ///** //* Return the table used to store this object @@ -102,6 +106,34 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { return "glpi_plugin_processmaker_processes"; } + + /** + * Summary of getAllTypeArray + * @return string[] + */ + static function getAllPMErrorArray() { + + $tab = array(self::ERROR_CREATING_CASE => _x('errors', 'Error creating case!', 'processmaker'), + self::ERROR_NO_RIGHTS => _x('errors', 'Can\'t create case: no rights for it!', 'processmaker'), + self::ERROR_CREATING_CASE2 => _x('errors', 'Error creating case!', 'processmaker')); + + return $tab; + } + + + /** + * Summary of getProcessTypeName + * @param mixed $value + * @return mixed + */ + static function getPMErrorMessage($value) { + + $tab = static::getAllPMErrorArray(); + // Return $value if not defined + return (isset($tab[$value]) ? $tab[$value] : $value); + } + + /** * Summary of addTicketFollowup * @param mixed $itemId @@ -285,17 +317,19 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { function getCaseInfo($caseGuid, $delIndex='') { try { $pmCaseInfo = $this->pmSoapClient->getCaseInfo( array( 'sessionId' => $this->getPMSessionID(), 'caseId' => $caseGuid, 'delIndex' => $delIndex) ); - switch ($pmCaseInfo->caseStatus) { - case 'DRAFT' : - case 'TO_DO': - // case 'CANCELLED' : - if (is_object( $pmCaseInfo->currentUsers )) { - $pmCaseInfo->currentUsers = array( 0 => $pmCaseInfo->currentUsers ); - } - if ($pmCaseInfo->currentUsers[0]->delThreadStatus == 'PAUSE') { - $pmCaseInfo->caseStatus = "PAUSED"; - } - break; + if (property_exists($pmCaseInfo, 'currentUsers')) { + switch ($pmCaseInfo->caseStatus) { + case 'DRAFT' : + case 'TO_DO': + // case 'CANCELLED' : + if (is_object( $pmCaseInfo->currentUsers )) { + $pmCaseInfo->currentUsers = array( 0 => $pmCaseInfo->currentUsers ); + } + if ($pmCaseInfo->currentUsers[0]->delThreadStatus == 'PAUSE') { + $pmCaseInfo->caseStatus = "PAUSED"; + } + break; + } } return $pmCaseInfo; } catch (Exception $e) { @@ -945,15 +979,13 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { * @return array of strings */ static function cronInfo($name) { - global $LANG; - switch ($name) { case 'pmusers' : - return array('description' => $LANG['processmaker']['cron']['pmusers'] ); + return array('description' => __('Syncs GLPI users and groups into ProcessMaker.', 'processmaker')); case 'pmorphancases' : - return array('description' => $LANG['processmaker']['cron']['pmorphancases']['description'], 'parameter' => $LANG['processmaker']['cron']['pmorphancases']['parameter'] ); + return array('description' => __('Cleaning of orphan cases.', 'processmaker'), 'parameter' => __('Number of days to keep orphan cases', 'processmaker')); case 'pmtaskactions' : - return array('description' => $LANG['processmaker']['cron']['pmtaskactions'] ); + return array('description' => __('To apply task actions between cases.', 'processmaker')); } return array(); } @@ -1566,7 +1598,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { * @return */ public function addTask($cases_id, $itemtype, $items_id, $caseInfo, $delIndex, $techId, $groupId, $pmTaskId, $delThread, $options=array() ) { - global $DB, $PM_DB, $LANG, $_SESSION; + global $DB, $PM_DB, $_SESSION; $default_options = array( 'txtTaskContent' => '', @@ -1655,16 +1687,16 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { $input['content'] = ""; // by default empty :) if ($pmProcess->fields["insert_task_comment"]) { - $input['content'] .= $LANG['processmaker']['item']['task']['comment']."\n"; + $input['content'] .= "##processmaker.taskcomment##\n"; } if ($options['txtTaskContent'] != '') { $input['content'] .= $options['txtTaskContent']."\n"; } else if (!$pmProcess->fields["hide_case_num_title"]) { - $input['content'] .= $LANG['processmaker']['item']['task']['case'].$caseInfo->caseName."\n"; + $input['content'] .= __('Case title: ', 'processmaker').$caseInfo->caseName."\n"; } - $input['content'] .= $LANG['processmaker']['item']['task']['manage']; + $input['content'] .= "##processmakercase.url##"; $input['is_private'] = 0; $input['actiontime'] = 0; @@ -2112,7 +2144,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { Session::initNavigateListItems('PluginProcessmakerCase', //TRANS : %1$s is the itemtype name, // %2$s is the name of the item (used for headings of a list) - sprintf(__('%1$s = %2$s'), + sprintf('%1$s = %2$s', $params['options']['parent']->getTypeName(1), $params['options']['parent']->fields["name"])); } } @@ -2124,7 +2156,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { * @return void */ static function pre_show_tab_processmaker($params) { - global $LANG, $pmHideSolution; + global $pmHideSolution; $plugin = new Plugin(); $itemtype = $params['item']->getType(); switch ($itemtype) { @@ -2143,8 +2175,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { if (!$pmCanSolve) { // don't display message if arbehaviours is install if (!($plugin->isInstalled('arbehaviours') && $plugin->isActivated('arbehaviours'))) { - $messageOne = $LANG['processmaker']['item']['preventsolution'][1]; - $messageTwo = $LANG['processmaker']['item']['preventsolution'][2]; + $messageOne = __('A \'Case\' is running!', 'processmaker'); + $messageTwo = __('You must manage it first (see \'Process - Case\' tab)!', 'processmaker'); // output explicit message to explain why it's not possible to add solution $message = "
@@ -2344,12 +2376,12 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { * This workaround will artificially load cases_Open page to force * initialization of those SESSION variables to prevent mix of values * when viewing tabs like map, change log, history, and dynaforms - * + * * it will also manage the glpi_domain parameter - * + * * @param mixed $currentCase array that contains APP_UID, DEL_INDEX * @param mixed $iFrameUrl string which is the url of the tab panel - * @param mixed $rand integer + * @param mixed $rand integer */ public function initCaseAndShowTab($currentCase, $iFrameUrl, $rand) { $iFrameUrl = urlencode($iFrameUrl); @@ -2385,13 +2417,15 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { global $_SESSION, $CFG_GLPI; if (isset( $item->datas ) && isset( $item->datas['tasks'] )) { foreach ($item->datas['tasks'] as &$task) { // we must check if task category is PM task category or not, if yes then we add task category comment to datas - $task['##task.description##'] = str_replace( '##processmaker.taskcomment##', $task['##task.categorycomment##'], $task['##task.description##'] ); $pmtask_itemtype = $item->obj->getType().'Task'; $pmtask_items_id = $task['##task.id##']; $pmtask = new PluginProcessmakerTask($pmtask_itemtype); - $pmtask->getFromDBByQuery("WHERE itemtype = '$pmtask_itemtype' AND items_id = $pmtask_items_id"); - $caseurl = urldecode($CFG_GLPI["url_base"]."/index.php?redirect=PluginProcessmakerCase_".$pmtask->fields['plugin_processmaker_cases_id']); - $task['##task.description##'] = str_replace('##processmakercase.url##', $caseurl, $task['##task.description##']); + if ($pmtask->getFromDBByQuery("WHERE itemtype = '$pmtask_itemtype' AND items_id = $pmtask_items_id")) { + $task['##task.description##'] = str_replace( '##processmaker.taskcomment##', $task['##task.categorycomment##'], $task['##task.description##'] ); + $pmtask->getFromDBByQuery("WHERE itemtype = '$pmtask_itemtype' AND items_id = $pmtask_items_id"); + $caseurl = urldecode($CFG_GLPI["url_base"]."/index.php?redirect=PluginProcessmakerCase_".$pmtask->fields['plugin_processmaker_cases_id']); + $task['##task.description##'] = str_replace('##processmakercase.url##', $caseurl, $task['##task.description##']); + } } } @@ -2992,4 +3026,17 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { echo Html::scriptBlock($scriptblock); } + /** + * Summary of underMaintenance + * Shows a nice(?) under maintenance message + */ + static function showUnderMaintenance() { + global $CFG_GLPI; + echo "
"; + echo Html::image($CFG_GLPI['root_doc'].'/plugins/processmaker/pics/under_maintenance.png'); + echo "

"; + _e('ProcessMaker plugin is under maintenance, please retry later, thank you.', 'processmaker'); + echo "

"; + echo "
"; + } } diff --git a/inc/profile.class.php b/inc/profile.class.php index d85baa7..a506f38 100644 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -12,15 +12,13 @@ class PluginProcessmakerProfile extends CommonDBTM { * @return array[] */ static function getAllRights() { - global $LANG; - $rights = array( array('itemtype' => 'PluginProcessmakerConfig', - 'label' => $LANG['processmaker']['profile']['process_config'], + 'label' => __('Process configuration', 'processmaker'), 'field' => 'plugin_processmaker_config', 'rights' => array(READ => __('Read'), UPDATE => __('Update'))), array('itemtype' => 'PluginProcessmakerConfig', - 'label' => $LANG['processmaker']['profile']['case'], + 'label' => __('Cases', 'processmaker'), 'field' => 'plugin_processmaker_case', 'rights' => array(READ => __('Read'), CANCEL => __('Cancel', 'processmaker'), DELETE => __('Delete'))) ); @@ -37,7 +35,6 @@ class PluginProcessmakerProfile extends CommonDBTM { * @return bool */ function showForm($ID=0, $openform=TRUE, $closeform=TRUE) { - global $LANG; if (!Session::haveRight("profile", READ)) { return false; @@ -52,7 +49,7 @@ class PluginProcessmakerProfile extends CommonDBTM { $rights = $this->getAllRights(); $prof->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', - 'title' => $LANG['processmaker']['title'][1])); + 'title' => __('ProcessMaker', 'processmaker'))); if ($canedit && $closeform) { echo "
"; @@ -64,6 +61,7 @@ class PluginProcessmakerProfile extends CommonDBTM { Html::closeForm(); + return true; } /** @@ -81,10 +79,8 @@ class PluginProcessmakerProfile extends CommonDBTM { * @return string|string[] */ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { - global $LANG; - if ($item->getType()=='Profile') { - return $LANG['processmaker']['title'][1]; + return __('ProcessMaker', 'processmaker'); } return ''; } diff --git a/inc/task.class.php b/inc/task.class.php index bb710e4..7cecddf 100644 --- a/inc/task.class.php +++ b/inc/task.class.php @@ -22,8 +22,7 @@ class PluginProcessmakerTask extends CommonITILTask * @param $nb : number of item in the type (default 0) **/ static function getTypeName($nb=0) { - return _n('Process case task', 'Process case tasks', $nb); - + return _n('Process case task', 'Process case tasks', $nb, 'processmaker'); } function getItilObjectItemType() { @@ -71,7 +70,7 @@ class PluginProcessmakerTask extends CommonITILTask $query = "SELECT glpi_tickettasks.id as taskID from $itemTypeTaskTable INNER JOIN $selfTable on $selfTable.items_id=$itemTypeTaskTable.id - WHERE $itemTypeTaskTable.state=1 and $selfTable.case_id='$case_id';"; + WHERE $itemTypeTaskTable.state=1 and $selfTable.plugin_processmaker_cases_id='$case_id';"; foreach ($DB->request($query) as $row) { $ret[$row['taskID']]=$row['taskID']; } @@ -130,7 +129,9 @@ class PluginProcessmakerTask extends CommonITILTask function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){ - global $DB, $LANG; + global $DB; + + $tab = []; $caseInfo = $case->getCaseInfo(); @@ -156,7 +157,6 @@ class PluginProcessmakerTask extends CommonITILTask $caseInfo->currentUsers = $case->sortTasks($caseInfo->currentUsers, $GLPICurrentPMUserId); - $tab = []; foreach ($caseInfo->currentUsers as $key => $caseUser) { $title = $caseUser->taskName; if (isset($tasks[$caseUser->delIndex])) { diff --git a/inc/taskcategory.class.php b/inc/taskcategory.class.php index 1683504..18cd738 100644 --- a/inc/taskcategory.class.php +++ b/inc/taskcategory.class.php @@ -18,26 +18,24 @@ class PluginProcessmakerTaskCategory extends CommonDBTM { function getTabNameForItem( CommonGLPI $item, $withtemplate=0) { - global $LANG; - return $LANG['processmaker']['title'][3]; + return __('Task List', 'processmaker'); } static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { - - global $LANG, $DB, $CFG_GLPI; + global $DB, $CFG_GLPI; self::title($item); echo "

".$LANG['processmaker']['title'][4]."
".__('Authorizations', 'processmaker')."
"; echo ""; @@ -99,7 +98,7 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM $header_end .= ""; } $header_end .= ""._n('Entity', 'Entities', Session::getPluralNumber())."".sprintf(__('%1$s (%2$s)'), Profile::getTypeName(Session::getPluralNumber()), + $header_end .= "".sprintf('%1$s (%2$s)', Profile::getTypeName(Session::getPluralNumber()), __('D=Dynamic, R=Recursive')); $header_end .= "
".$entname."
"; - echo ""; - echo "". - "" . - "" . - "" . - "" . - "" . - "" . + echo ""; + echo "". + "" . + "" . + "" . + "" . + "" . + "" . ""; $query = "SELECT pm.pm_task_guid, pm.taskcategories_id, pm.`is_start`, gl.name, gl.completename, gl.`comment`, pm.is_active, pm.is_subprocess FROM glpi_plugin_processmaker_taskcategories AS pm @@ -48,18 +46,18 @@ class PluginProcessmakerTaskCategory extends CommonDBTM echo ""; echo ""; - echo ""; + echo ""; echo ""; @@ -70,14 +68,14 @@ class PluginProcessmakerTaskCategory extends CommonDBTM echo ""; echo ""; @@ -94,15 +92,14 @@ class PluginProcessmakerTaskCategory extends CommonDBTM * @return nothing (display) **/ static function title(CommonGLPI $item) { - global $LANG, $CFG_GLPI; + global $CFG_GLPI; $buttons = array(); - $title = $LANG['processmaker']['config']['refreshtasklist']; + $title = __('Synchronize Task List', 'processmaker'); if (Session::haveRight('plugin_processmaker_config', UPDATE)) { - $buttons["process.form.php?refreshtask=1&id=".$item->getID()] = $LANG['processmaker']['config']['refreshtasklist']; - $title = ""; - Html::displayTitle($CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png", $LANG['processmaker']['config']['refreshtasklist'], $title, + $buttons["process.form.php?refreshtask=1&id=".$item->getID()] = $title; + Html::displayTitle($CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png", $title, "", $buttons); } } diff --git a/locales/cs_CZ.php b/locales/cs_CZ.php deleted file mode 100644 index f2cae50..0000000 --- a/locales/cs_CZ.php +++ /dev/null @@ -1,122 +0,0 @@ -=2 && n<=4) ? 1 : 3;\n" +"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n" +"X-Crowdin-Project: processmaker-plugin\n" +"X-Crowdin-Language: cs\n" +"X-Crowdin-File: /3.3.0/source.po\n" +"X-Poedit-SearchPath-0: ajax\n" +"X-Poedit-SearchPath-1: front\n" +"X-Poedit-SearchPath-2: inc\n" +"X-Poedit-SearchPath-3: install\n" +"X-Poedit-SearchPath-4: js\n" +"X-Poedit-SearchPath-5: hook.php\n" +"X-Poedit-SearchPath-6: setup.php\n" + +#: ajax/task_users.php:25 +msgid "Re-assign task to" +msgstr "Znovu přiřadit úkol" + +#: ajax/task_users.php:45 +msgid "Re-assign" +msgstr "Znovu přiřadit" + +#: front/case.form.php:35 +msgid "Case has been deleted!" +msgstr "Případ byl smazán!" + +#: front/case.form.php:37 +msgid "Unable to delete case!" +msgstr "Případ se nedaří smazat!" + +#: front/case.form.php:50 +msgid "Case has been cancelled!" +msgstr "Případ byl zrušen!" + +#: front/case.form.php:52 front/case.form.php:55 +msgid "Unable to cancel case!" +msgstr "Případ se nedaří zrušit!" + +#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:922 +msgid "Process cases" +msgstr "" + +#: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5 +#: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143 +#: inc/config.class.php:50 inc/config.class.php:347 inc/process.class.php:393 +#: inc/profile.class.php:52 inc/profile.class.php:83 +msgid "ProcessMaker" +msgstr "ProcessMaker" + +#: front/case.php:14 inc/case.class.php:644 +msgid "ProcessMaker plugin is under maintenance, please retry later, thank you." +msgstr "" + +#: front/processmaker.form.php:85 +msgid "Task re-assigned!" +msgstr "Úkol znovu přiřazen!" + +#: front/processmaker.form.php:87 +msgid "Error re-assigning task: " +msgstr "Chyba při opětovném přiřazování úkolu: " + +#: front/processmaker.form.php:90 +msgid "Task already assigned to this person!" +msgstr "Úkol už je této osobě přiřazen!" + +#: front/processmaker.helpdesk.form.php:21 +msgid "Process - Case" +msgstr "Proces – případ" + +#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:528 +msgid "Select the process you want to add" +msgstr "Vyberte proces který chcete spustit" + +#: hook.php:31 inc/taskcategory.class.php:98 +msgid "Synchronize Task List" +msgstr "Synchronizovat seznam úkolů" + +#: hook.php:158 inc/case.class.php:77 +msgid "Case" +msgstr "Případ" + +#: hook.php:158 inc/case.class.php:509 inc/case.class.php:966 +msgid "Status" +msgstr "Stav" + +#: inc/case.class.php:23 inc/case.class.php:85 inc/case.class.php:87 +msgid "Process case" +msgid_plural "Process cases" +msgstr[0] "Process case" +msgstr[1] "Process cases" +msgstr[2] "" +msgstr[3] "" + +#: inc/case.class.php:285 +msgid "Case properties" +msgstr "" + +#: inc/case.class.php:287 inc/case.class.php:507 inc/case.class.php:940 +#: inc/process.class.php:524 +msgid "Process" +msgstr "Proces" + +#: inc/case.class.php:290 +msgid "Case title" +msgstr "" + +#: inc/case.class.php:293 +msgid "Case number" +msgstr "" + +#: inc/case.class.php:296 +msgid "Case status" +msgstr "" + +#: inc/case.class.php:299 +msgid "Case guid" +msgstr "" + +#: inc/case.class.php:302 +msgid "Creator" +msgstr "" + +#: inc/case.class.php:305 +msgid "Creation date" +msgstr "" + +#: inc/case.class.php:308 +msgid "Last update" +msgstr "" + +#: inc/case.class.php:323 +msgid "Current task(s) properties" +msgstr "" + +#: inc/case.class.php:327 +msgid "Task" +msgstr "" + +#: inc/case.class.php:328 +msgid "Task guid" +msgstr "" + +#: inc/case.class.php:329 +msgid "Current user" +msgstr "" + +#: inc/case.class.php:330 +msgid "Task delegation date" +msgstr "" + +#: inc/case.class.php:338 +msgid "To be claimed" +msgstr "" + +#: inc/case.class.php:407 +msgid "Case item" +msgstr "" + +#: inc/case.class.php:429 +msgid "Case cancellation" +msgstr "" + +#: inc/case.class.php:430 +msgid "Cancel case" +msgstr "" + +#: inc/case.class.php:434 +msgid "Confirm cancellation?" +msgstr "" + +#: inc/case.class.php:434 inc/profile.class.php:23 +msgid "Cancel" +msgstr "Storno" + +#: inc/case.class.php:455 +msgid "Case deletion" +msgstr "" + +#: inc/case.class.php:456 +msgid "Delete case" +msgstr "" + +#: inc/case.class.php:508 inc/case.class.php:933 +msgid "Title" +msgstr "" + +#: inc/case.class.php:510 inc/case.class.php:974 +msgid "Subcase of" +msgstr "" + +#: inc/case.class.php:525 +msgid "Add a new case" +msgstr "" + +#: inc/case.class.php:899 +msgctxt "case_status" +msgid "Draft" +msgstr "Koncept" + +#: inc/case.class.php:900 +msgctxt "case_status" +msgid "To do" +msgstr "Dodělat" + +#: inc/case.class.php:901 +msgctxt "case_status" +msgid "Completed" +msgstr "Dokončeno" + +#: inc/case.class.php:902 +msgctxt "case_status" +msgid "Cancelled" +msgstr "Zrušeno" + +#: inc/case.class.php:926 +msgid "ID" +msgstr "" + +#: inc/case.class.php:953 +msgid "Item" +msgstr "" + +#: inc/case.class.php:960 +msgid "Item entity" +msgstr "" + +#: inc/casechangelog.class.php:35 +msgid "Change log" +msgstr "Zobrazit: záznam změn" + +#: inc/casedynaform.class.php:80 +msgid "Dynaforms" +msgstr "Zobrazit: dynamické formuláře" + +#: inc/casehistory.class.php:35 +msgid "History" +msgstr "Zobrazit: historie případu" + +#: inc/caselink.class.php:51 +msgid "Case-links" +msgstr "Propojení případů" + +#: inc/caselink.class.php:53 +msgid "Case-link" +msgstr "Propojení případu" + +#: inc/caselink.class.php:75 inc/caselink.class.php:165 +msgid "External data" +msgstr "" + +#: inc/caselink.class.php:80 inc/caselink.class.php:171 +msgid "Self" +msgstr "" + +#: inc/caselink.class.php:85 inc/caselink.class.php:189 +msgid "Source task GUID" +msgstr "" + +#: inc/caselink.class.php:93 inc/caselink.class.php:195 +msgid "Target task GUID" +msgstr "" + +#: inc/caselink.class.php:101 inc/caselink.class.php:207 +msgid "Target process GUID" +msgstr "" + +#: inc/caselink.class.php:110 inc/caselink.class.php:201 +msgid "Target dynaform GUID" +msgstr "" + +#: inc/caselink.class.php:115 inc/caselink.class.php:213 +msgid "Source condition" +msgstr "" + +#: inc/caselink.class.php:121 inc/caselink.class.php:177 +msgid "Claim target task" +msgstr "" + +#: inc/caselink.class.php:126 inc/caselink.class.php:183 +msgid "External application JSON config" +msgstr "" + +#: inc/casemap.class.php:43 +msgid "Map" +msgstr "Zobrazit: mapa případu" + +#: inc/config.class.php:41 +msgid "ProcessMaker setup" +msgstr "Nastavení ProcessMaker" + +#: inc/config.class.php:156 +msgid "Server URL (must be in same domain than GLPI)" +msgstr "URL adresa serveru (je třeba, aby byla ze stejné domény jako GLPI)" + +#: inc/config.class.php:161 +msgid "Common domain with GLPI" +msgstr "Společná doména s GLPI" + +#: inc/config.class.php:190 +msgid "None!" +msgstr "Žádná!" + +#: inc/config.class.php:199 +msgid "Workspace Name" +msgstr "Název pracovního prostoru" + +#: inc/config.class.php:204 +msgid "Server administrator name" +msgstr "Uživatelské jméno správce serveru" + +#: inc/config.class.php:209 +msgid "Server administrator password" +msgstr "Heslo správce serveru" + +#: inc/config.class.php:215 inc/config.class.php:255 +msgid "Connection status" +msgstr "Stav spojení" + +#: inc/config.class.php:231 +msgid "SQL server setup" +msgstr "Nastavení SQL serveru" + +#: inc/config.class.php:234 +msgid "SQL server (MariaDB or MySQL)" +msgstr "" + +#: inc/config.class.php:239 +msgid "Database name" +msgstr "" + +#: inc/config.class.php:244 +msgid "SQL user" +msgstr "" + +#: inc/config.class.php:249 +msgid "SQL password" +msgstr "" + +#: inc/config.class.php:266 +msgid "Theme Name" +msgstr "Název motivu vzhledu" + +#: inc/config.class.php:272 +msgid "Main Task Category (edit to change name)" +msgstr "Hlavní kategorie úkolu (pro změnu názvu upravte)" + +#: inc/config.class.php:279 +msgid "Task Writer (edit to change name)" +msgstr "Úkol zapsal (pro změnu jména upravte)" + +#: inc/config.class.php:299 +msgid "Group in ProcessMaker which will contain all GLPI users" +msgstr "Skupina v ProcessMaker která bude obsahovat všechny uživatele z GLPI" + +#: inc/config.class.php:323 +msgid "Processmaker system information" +msgstr "" + +#: inc/config.class.php:327 inc/config.class.php:337 +msgid "Version" +msgstr "" + +#: inc/config.class.php:328 +msgid "Web server" +msgstr "" + +#: inc/config.class.php:329 +msgid "Server name" +msgstr "" + +#: inc/config.class.php:330 +msgid "PHP version" +msgstr "" + +#: inc/config.class.php:331 +msgid "DB version" +msgstr "" + +#: inc/config.class.php:332 +msgid "DB server IP" +msgstr "" + +#: inc/config.class.php:333 +msgid "DB name" +msgstr "" + +#: inc/config.class.php:334 +msgid "User browser" +msgstr "" + +#: inc/config.class.php:335 +msgid "User IP" +msgstr "" + +#: inc/config.class.php:337 +msgid "Not yet!" +msgstr "" + +#: inc/process.class.php:350 +msgid "Synchronize Process List" +msgstr "Synchronizovat seznam procesů" + +#: inc/process.class.php:427 inc/process.class.php:565 +msgid "Process GUID" +msgstr "Nikde se neopakující identifikátor procesu" + +#: inc/process.class.php:433 +msgid "Project type" +msgstr "Typ projektu" + +#: inc/process.class.php:439 +msgid "Hide case number and title" +msgstr "Skrýt číslo a titulek případu" + +#: inc/process.class.php:445 +msgid "Insert Task Category" +msgstr "Vložit kategorii úkolu" + +#: inc/process.class.php:457 inc/process.class.php:585 +msgid "Ticket type (self-service)" +msgstr "Typ požadavku (samoobslužné)" + +#: inc/process.class.php:495 +msgctxt "process_type" +msgid "Classic" +msgstr "Klasický" + +#: inc/process.class.php:496 +msgctxt "process_type" +msgid "BPMN" +msgstr "BPMN" + +#: inc/process.class.php:522 +msgid "Processes" +msgstr "Procesy" + +#: inc/process.class.php:575 +msgid "Hide case number and title in task descriptions" +msgstr "V popisech úkolů skrýt číslo a titulek" + +#: inc/process.class.php:580 +msgid "Insert Task Category comments in Task Description" +msgstr "Vložit komentáře kategorie úkolu do jeho popisu" + +#: inc/process.class.php:603 +msgid "ITIL Category (self-service)" +msgstr "ITIL kategorie (samoobslužné)" + +#: inc/process.class.php:632 +msgid "Project type (to be changed if not up-to-date)" +msgstr "Typ projektu (pokud není aktuální, bude změněno)" + +#: inc/process_profile.class.php:26 inc/process_profile.class.php:45 +msgid "Authorizations" +msgstr "Pověření" + +#: inc/process_profile.class.php:179 +msgid "Authorization not added: already existing!" +msgstr "" + +#: inc/processmaker.class.php:116 inc/processmaker.class.php:118 +msgctxt "errors" +msgid "Error creating case!" +msgstr "Chyba při vytváření případu!" + +#: inc/processmaker.class.php:117 +msgctxt "errors" +msgid "Can't create case: no rights for it!" +msgstr "Případ se nedaří vytvořit: nedostatečná oprávnění!" + +#: inc/processmaker.class.php:984 +msgid "Syncs GLPI users and groups into ProcessMaker." +msgstr "Synchronizuje uživatele a skupiny z GLPI do ProcessMaker." + +#: inc/processmaker.class.php:986 +msgid "Cleaning of orphan cases." +msgstr "Čištění osiřelých případů." + +#: inc/processmaker.class.php:986 +msgid "Number of days to keep orphan cases" +msgstr "Po kolik dnů ponechávat osiřelé případy" + +#: inc/processmaker.class.php:988 +msgid "To apply task actions between cases." +msgstr "Pro uplatnění akcí úkolu mezi případy." + +#: inc/processmaker.class.php:1696 +msgid "Case title: " +msgstr "Titulek případu: " + +#: inc/processmaker.class.php:2178 +msgid "A 'Case' is running!" +msgstr "Případ je v běhu!" + +#: inc/processmaker.class.php:2179 +msgid "You must manage it first (see 'Process - Case' tab)!" +msgstr "Nejprve je třeba toto spravovat (viz panel „Proces – případ“)!" + +#: inc/profile.class.php:17 +msgid "Process configuration" +msgstr "Nastavení procesu" + +#: inc/profile.class.php:21 +msgid "Cases" +msgstr "" + +#: inc/task.class.php:25 +msgid "Process case task" +msgid_plural "Process case tasks" +msgstr[0] "Process case task" +msgstr[1] "Process case tasks" +msgstr[2] "" +msgstr[3] "" + +#: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31 +msgid "Task List" +msgstr "Seznam úkolů" + +#: inc/taskcategory.class.php:32 +msgid "Task name" +msgstr "Název úkolu" + +#: inc/taskcategory.class.php:34 inc/taskcategory.class.php:60 +msgid "Start" +msgstr "Spustit" + +#: inc/taskcategory.class.php:35 +msgid "Task GUID" +msgstr "Nikde se neopakující identifikátor úkolu" + +#: inc/taskcategory.class.php:38 inc/taskcategory.class.php:78 +msgid "Sub-process" +msgstr "" + +#~ msgid "Plugin is under maintenance, please retry later, thank you." +#~ msgstr "Plugin is under maintenance, please retry later, thank you." diff --git a/locales/en_GB.php b/locales/en_GB.php deleted file mode 100644 index bb3d5a1..0000000 --- a/locales/en_GB.php +++ /dev/null @@ -1,122 +0,0 @@ - 1);\n" +"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;" +"_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n" +"X-Crowdin-Project: processmaker-plugin\n" +"X-Crowdin-Language: fr\n" +"X-Crowdin-File: /3.3.0/source.po\n" +"X-Poedit-SearchPath-0: ajax\n" +"X-Poedit-SearchPath-1: front\n" +"X-Poedit-SearchPath-2: inc\n" +"X-Poedit-SearchPath-3: install\n" +"X-Poedit-SearchPath-4: js\n" +"X-Poedit-SearchPath-5: hook.php\n" +"X-Poedit-SearchPath-6: setup.php\n" + +#: ajax/task_users.php:25 +msgid "Re-assign task to" +msgstr "Ré-affecter tâche à" + +#: ajax/task_users.php:45 +msgid "Re-assign" +msgstr "Ré-affecter" + +#: front/case.form.php:35 +msgid "Case has been deleted!" +msgstr "Le cas a été effacé !" + +#: front/case.form.php:37 +msgid "Unable to delete case!" +msgstr "Impossible d'effacer le cas !" + +#: front/case.form.php:50 +msgid "Case has been cancelled!" +msgstr "Le cas a été annulé !" + +#: front/case.form.php:52 front/case.form.php:55 +msgid "Unable to cancel case!" +msgstr "Impossible d'annuler le cas !" + +#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:922 +msgid "Process cases" +msgstr "Cas des processus" + +#: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5 +#: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143 +#: inc/config.class.php:50 inc/config.class.php:347 inc/process.class.php:393 +#: inc/profile.class.php:52 inc/profile.class.php:83 +msgid "ProcessMaker" +msgstr "ProcessMaker" + +#: front/case.php:14 inc/case.class.php:644 +msgid "" +"ProcessMaker plugin is under maintenance, please retry later, thank you." +msgstr "" +"Le plugin ProcessMaker est en maintenance, veuillez ré-essayer plus tard, " +"merci." + +#: front/processmaker.form.php:85 +msgid "Task re-assigned!" +msgstr "Tâche ré-affectée !" + +#: front/processmaker.form.php:87 +msgid "Error re-assigning task: " +msgstr "Impossible de re-affecter cette tâche : " + +#: front/processmaker.form.php:90 +msgid "Task already assigned to this person!" +msgstr "Tâche déjà affectée à cette personne !" + +#: front/processmaker.helpdesk.form.php:21 +msgid "Process - Case" +msgstr "Processus - Cas" + +#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:528 +msgid "Select the process you want to add" +msgstr "Choisir le processus à démarrer" + +#: hook.php:31 inc/taskcategory.class.php:98 +msgid "Synchronize Task List" +msgstr "Synchroniser la liste des Tâches" + +#: hook.php:158 inc/case.class.php:77 +msgid "Case" +msgstr "Cas" + +#: hook.php:158 inc/case.class.php:509 inc/case.class.php:966 +msgid "Status" +msgstr "Statut" + +#: inc/case.class.php:23 inc/case.class.php:85 inc/case.class.php:87 +msgid "Process case" +msgid_plural "Process cases" +msgstr[0] "Cas du processus" +msgstr[1] "Cas des processus" + +#: inc/case.class.php:285 +msgid "Case properties" +msgstr "Propriétés du cas" + +#: inc/case.class.php:287 inc/case.class.php:507 inc/case.class.php:940 +#: inc/process.class.php:524 +msgid "Process" +msgstr "Processus" + +#: inc/case.class.php:290 +msgid "Case title" +msgstr "Titre du cas" + +#: inc/case.class.php:293 +msgid "Case number" +msgstr "Numéro du cas" + +#: inc/case.class.php:296 +msgid "Case status" +msgstr "Statut du cas" + +#: inc/case.class.php:299 +msgid "Case guid" +msgstr "Guid du cas" + +#: inc/case.class.php:302 +msgid "Creator" +msgstr "Créateur" + +#: inc/case.class.php:305 +msgid "Creation date" +msgstr "Date de création" + +#: inc/case.class.php:308 +msgid "Last update" +msgstr "Dernière mise à jour" + +#: inc/case.class.php:323 +msgid "Current task(s) properties" +msgstr "Propriétés des tâches en cours" + +#: inc/case.class.php:327 +msgid "Task" +msgstr "Tâche" + +#: inc/case.class.php:328 +msgid "Task guid" +msgstr "Guid de la tâche" + +#: inc/case.class.php:329 +msgid "Current user" +msgstr "Utilisateur actuel" + +#: inc/case.class.php:330 +msgid "Task delegation date" +msgstr "Date de délégation de tâche" + +#: inc/case.class.php:338 +msgid "To be claimed" +msgstr "A réclamer" + +#: inc/case.class.php:407 +msgid "Case item" +msgstr "Item du cas" + +#: inc/case.class.php:429 +msgid "Case cancellation" +msgstr "Annulation du cas" + +#: inc/case.class.php:430 +msgid "Cancel case" +msgstr "Annuler cas" + +#: inc/case.class.php:434 +msgid "Confirm cancellation?" +msgstr "Confirmer l’annulation ?" + +#: inc/case.class.php:434 inc/profile.class.php:23 +msgid "Cancel" +msgstr "Annuler" + +#: inc/case.class.php:455 +msgid "Case deletion" +msgstr "Suppression du cas" + +#: inc/case.class.php:456 +msgid "Delete case" +msgstr "Supprimer le cas" + +#: inc/case.class.php:508 inc/case.class.php:933 +msgid "Title" +msgstr "Titre" + +#: inc/case.class.php:510 inc/case.class.php:974 +msgid "Subcase of" +msgstr "Sous-cas de" + +#: inc/case.class.php:525 +msgid "Add a new case" +msgstr "Ajouter un nouveau cas" + +#: inc/case.class.php:899 +msgctxt "case_status" +msgid "Draft" +msgstr "Brouillon" + +#: inc/case.class.php:900 +msgctxt "case_status" +msgid "To do" +msgstr "A faire" + +#: inc/case.class.php:901 +msgctxt "case_status" +msgid "Completed" +msgstr "Terminé" + +#: inc/case.class.php:902 +msgctxt "case_status" +msgid "Cancelled" +msgstr "Annulé" + +#: inc/case.class.php:926 +msgid "ID" +msgstr "ID" + +#: inc/case.class.php:953 +msgid "Item" +msgstr "Item" + +#: inc/case.class.php:960 +msgid "Item entity" +msgstr "Entité de l'item" + +#: inc/casechangelog.class.php:35 +msgid "Change log" +msgstr "Evolution" + +#: inc/casedynaform.class.php:80 +msgid "Dynaforms" +msgstr "DynaForms" + +#: inc/casehistory.class.php:35 +msgid "History" +msgstr "Historique" + +#: inc/caselink.class.php:51 +msgid "Case-links" +msgstr "Liens-cas" + +#: inc/caselink.class.php:53 +msgid "Case-link" +msgstr "Lien-cas" + +#: inc/caselink.class.php:75 inc/caselink.class.php:165 +msgid "External data" +msgstr "Données externes" + +#: inc/caselink.class.php:80 inc/caselink.class.php:171 +msgid "Self" +msgstr "Self" + +#: inc/caselink.class.php:85 inc/caselink.class.php:189 +msgid "Source task GUID" +msgstr "GUID de la tâche source" + +#: inc/caselink.class.php:93 inc/caselink.class.php:195 +msgid "Target task GUID" +msgstr "GUID de la tâche cible" + +#: inc/caselink.class.php:101 inc/caselink.class.php:207 +msgid "Target process GUID" +msgstr "GUID du Processus cible" + +#: inc/caselink.class.php:110 inc/caselink.class.php:201 +msgid "Target dynaform GUID" +msgstr "GUID du dynaform cible" + +#: inc/caselink.class.php:115 inc/caselink.class.php:213 +msgid "Source condition" +msgstr "Condition d'activation du lien" + +#: inc/caselink.class.php:121 inc/caselink.class.php:177 +msgid "Claim target task" +msgstr "Tâche cible 'à réclamer'" + +#: inc/caselink.class.php:126 inc/caselink.class.php:183 +msgid "External application JSON config" +msgstr "Configuration JSON de l'application externe" + +#: inc/casemap.class.php:43 +msgid "Map" +msgstr "Carte" + +#: inc/config.class.php:41 +msgid "ProcessMaker setup" +msgstr "Configuration du serveur ProcessMaker" + +#: inc/config.class.php:156 +msgid "Server URL (must be in same domain than GLPI)" +msgstr "URL du serveur (doit être dans le même domaine que GLPI)" + +#: inc/config.class.php:161 +msgid "Common domain with GLPI" +msgstr "Domaine commun avec GLPI" + +#: inc/config.class.php:190 +msgid "None!" +msgstr "Aucun !" + +#: inc/config.class.php:199 +msgid "Workspace Name" +msgstr "Nom du Workspace" + +#: inc/config.class.php:204 +msgid "Server administrator name" +msgstr "Non de l'administreur du server ProcessMaker" + +#: inc/config.class.php:209 +msgid "Server administrator password" +msgstr "Mot de passe de l'administrateur du serveur ProcessMaker" + +#: inc/config.class.php:215 inc/config.class.php:255 +msgid "Connection status" +msgstr "Status de la connexion" + +#: inc/config.class.php:231 +msgid "SQL server setup" +msgstr "Configuration du serveur SQL" + +#: inc/config.class.php:234 +msgid "SQL server (MariaDB or MySQL)" +msgstr "SQL server (MariaDB ou MySQL)" + +#: inc/config.class.php:239 +msgid "Database name" +msgstr "Nom de la base de données" + +#: inc/config.class.php:244 +msgid "SQL user" +msgstr "Utilisateur SQL" + +#: inc/config.class.php:249 +msgid "SQL password" +msgstr "Mot de passe SQL" + +#: inc/config.class.php:266 +msgid "Theme Name" +msgstr "Nom du thème" + +#: inc/config.class.php:272 +msgid "Main Task Category (edit to change name)" +msgstr "Catégorie principale des tâches (éditer pour changer le nom)" + +#: inc/config.class.php:279 +msgid "Task Writer (edit to change name)" +msgstr "Auteur des tâches (éditer pour changer le nom)" + +#: inc/config.class.php:299 +msgid "Group in ProcessMaker which will contain all GLPI users" +msgstr "Groupe dans ProcessMaker qui contiendra les utilisateurs de GLPI" + +#: inc/config.class.php:323 +msgid "Processmaker system information" +msgstr "Informations système du serveur ProcessMaker" + +#: inc/config.class.php:327 inc/config.class.php:337 +msgid "Version" +msgstr "Version" + +#: inc/config.class.php:328 +msgid "Web server" +msgstr "Serveur web" + +#: inc/config.class.php:329 +msgid "Server name" +msgstr "Nom du serveur" + +#: inc/config.class.php:330 +msgid "PHP version" +msgstr "Version de PHP" + +#: inc/config.class.php:331 +msgid "DB version" +msgstr "Version de la Db" + +#: inc/config.class.php:332 +msgid "DB server IP" +msgstr "IP du serveur DB" + +#: inc/config.class.php:333 +msgid "DB name" +msgstr "Nom de la BD" + +#: inc/config.class.php:334 +msgid "User browser" +msgstr "Navigateur de l’utilisateur" + +#: inc/config.class.php:335 +msgid "User IP" +msgstr "IP de l'utilisateur" + +#: inc/config.class.php:337 +msgid "Not yet!" +msgstr "Pas encore !" + +#: inc/process.class.php:350 +msgid "Synchronize Process List" +msgstr "Synchroniser la liste des processus" + +#: inc/process.class.php:427 inc/process.class.php:565 +msgid "Process GUID" +msgstr "GUID du Processus" + +#: inc/process.class.php:433 +msgid "Project type" +msgstr "Type de projet" + +#: inc/process.class.php:439 +msgid "Hide case number and title" +msgstr "Masquer numéro et titre des cas" + +#: inc/process.class.php:445 +msgid "Insert Task Category" +msgstr "Insérer la catégorie des tâches" + +#: inc/process.class.php:457 inc/process.class.php:585 +msgid "Ticket type (self-service)" +msgstr "Type de ticket (self-service)" + +#: inc/process.class.php:495 +msgctxt "process_type" +msgid "Classic" +msgstr "Classique" + +#: inc/process.class.php:496 +msgctxt "process_type" +msgid "BPMN" +msgstr "BPMN" + +#: inc/process.class.php:522 +msgid "Processes" +msgstr "Processus" + +#: inc/process.class.php:575 +msgid "Hide case number and title in task descriptions" +msgstr "Masquer numéro et titre des cas dans les descriptions des tâches" + +#: inc/process.class.php:580 +msgid "Insert Task Category comments in Task Description" +msgstr "" +"Insérer les commentaires des Catégories de Tâches dans les descriptions des " +"Tâches" + +#: inc/process.class.php:603 +msgid "ITIL Category (self-service)" +msgstr "Catégorie ITIL (self-service)" + +#: inc/process.class.php:632 +msgid "Project type (to be changed if not up-to-date)" +msgstr "Type de projet (à modifier si pas à jour)" + +#: inc/process_profile.class.php:26 inc/process_profile.class.php:45 +msgid "Authorizations" +msgstr "Autorisations" + +#: inc/process_profile.class.php:179 +msgid "Authorization not added: already existing!" +msgstr "Autorisation non ajoutée : déjà existante !" + +#: inc/processmaker.class.php:116 inc/processmaker.class.php:118 +msgctxt "errors" +msgid "Error creating case!" +msgstr "Erreur à la création du cas !" + +#: inc/processmaker.class.php:117 +msgctxt "errors" +msgid "Can't create case: no rights for it!" +msgstr "Impossible de créer le cas : pas de droits pour cela !" + +#: inc/processmaker.class.php:984 +msgid "Syncs GLPI users and groups into ProcessMaker." +msgstr "Synchronisation des utilisateurs GLPI et des groups avec ProcessMaker." + +#: inc/processmaker.class.php:986 +msgid "Cleaning of orphan cases." +msgstr "Nettoyage des cas orphelins." + +#: inc/processmaker.class.php:986 +msgid "Number of days to keep orphan cases" +msgstr "Nombre de jours avant nettoyage des cas orphelins" + +#: inc/processmaker.class.php:988 +msgid "To apply task actions between cases." +msgstr "Pour appliquer des actions de tâches entre cas." + +#: inc/processmaker.class.php:1696 +msgid "Case title: " +msgstr "Titre du cas : " + +#: inc/processmaker.class.php:2178 +msgid "A 'Case' is running!" +msgstr "Un 'Cas' est en cours !" + +#: inc/processmaker.class.php:2179 +msgid "You must manage it first (see 'Process - Case' tab)!" +msgstr "Vous devez d'abord le terminer (voir onglet 'Processus - Cas') !" + +#: inc/profile.class.php:17 +msgid "Process configuration" +msgstr "Configuration des Processus" + +#: inc/profile.class.php:21 +msgid "Cases" +msgstr "Cas" + +#: inc/task.class.php:25 +msgid "Process case task" +msgid_plural "Process case tasks" +msgstr[0] "Tâche d'un cas" +msgstr[1] "Tâches d'un cas" + +#: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31 +msgid "Task List" +msgstr "Liste des tâches" + +#: inc/taskcategory.class.php:32 +msgid "Task name" +msgstr "Nom de la Tâche" + +#: inc/taskcategory.class.php:34 inc/taskcategory.class.php:60 +msgid "Start" +msgstr "Démarrer" + +#: inc/taskcategory.class.php:35 +msgid "Task GUID" +msgstr "GUID de la Tâche" + +#: inc/taskcategory.class.php:38 inc/taskcategory.class.php:78 +msgid "Sub-process" +msgstr "Sous-processus" + +#~ msgid "Plugin is under maintenance, please retry later, thank you." +#~ msgstr "Plugin is under maintenance, please retry later, thank you." diff --git a/locales/source.po b/locales/source.po new file mode 100644 index 0000000..5ccfbe0 --- /dev/null +++ b/locales/source.po @@ -0,0 +1,544 @@ +msgid "" +msgstr "" +"Project-Id-Version: Processmaker plugin 3.3.0\n" +"POT-Creation-Date: 2018-08-02 14:42+0200\n" +"PO-Revision-Date: 2018-08-02 16:56+0200\n" +"Last-Translator: tomolimo\n" +"Language-Team: en_GB\n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.1.1\n" +"X-Poedit-Basepath: ..\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;" +"_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n" +"X-Poedit-SearchPath-0: ajax\n" +"X-Poedit-SearchPath-1: front\n" +"X-Poedit-SearchPath-2: inc\n" +"X-Poedit-SearchPath-3: install\n" +"X-Poedit-SearchPath-4: js\n" +"X-Poedit-SearchPath-5: hook.php\n" +"X-Poedit-SearchPath-6: setup.php\n" + +#: ajax/task_users.php:25 +msgid "Re-assign task to" +msgstr "Re-assign task to" + +#: ajax/task_users.php:45 +msgid "Re-assign" +msgstr "Re-assign" + +#: front/case.form.php:35 +msgid "Case has been deleted!" +msgstr "Case has been deleted!" + +#: front/case.form.php:37 +msgid "Unable to delete case!" +msgstr "Unable to delete case!" + +#: front/case.form.php:50 +msgid "Case has been cancelled!" +msgstr "Case has been cancelled!" + +#: front/case.form.php:52 front/case.form.php:55 +msgid "Unable to cancel case!" +msgstr "Unable to cancel case!" + +#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:922 +msgid "Process cases" +msgstr "Process cases" + +#: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5 +#: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143 +#: inc/config.class.php:50 inc/config.class.php:347 inc/process.class.php:393 +#: inc/profile.class.php:52 inc/profile.class.php:83 +msgid "ProcessMaker" +msgstr "ProcessMaker" + +#: front/case.php:14 inc/case.class.php:644 +msgid "" +"ProcessMaker plugin is under maintenance, please retry later, thank you." +msgstr "" +"ProcessMaker plugin is under maintenance, please retry later, thank you." + +#: front/processmaker.form.php:85 +msgid "Task re-assigned!" +msgstr "Task re-assigned!" + +#: front/processmaker.form.php:87 +msgid "Error re-assigning task: " +msgstr "Error re-assigning task: " + +#: front/processmaker.form.php:90 +msgid "Task already assigned to this person!" +msgstr "Task already assigned to this person!" + +#: front/processmaker.helpdesk.form.php:21 +msgid "Process - Case" +msgstr "Process - Case" + +#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:528 +msgid "Select the process you want to add" +msgstr "Select the process you want to add" + +#: hook.php:31 inc/taskcategory.class.php:98 +msgid "Synchronize Task List" +msgstr "Synchronize Task List" + +#: hook.php:158 inc/case.class.php:77 +msgid "Case" +msgstr "Case" + +#: hook.php:158 inc/case.class.php:509 inc/case.class.php:966 +msgid "Status" +msgstr "Status" + +#: inc/case.class.php:23 inc/case.class.php:85 inc/case.class.php:87 +msgid "Process case" +msgid_plural "Process cases" +msgstr[0] "Process case" +msgstr[1] "Process cases" + +#: inc/case.class.php:285 +msgid "Case properties" +msgstr "Case properties" + +#: inc/case.class.php:287 inc/case.class.php:507 inc/case.class.php:940 +#: inc/process.class.php:524 +msgid "Process" +msgstr "Process" + +#: inc/case.class.php:290 +msgid "Case title" +msgstr "Case title" + +#: inc/case.class.php:293 +msgid "Case number" +msgstr "Case number" + +#: inc/case.class.php:296 +msgid "Case status" +msgstr "Case status" + +#: inc/case.class.php:299 +msgid "Case guid" +msgstr "Case guid" + +#: inc/case.class.php:302 +msgid "Creator" +msgstr "Creator" + +#: inc/case.class.php:305 +msgid "Creation date" +msgstr "Creation date" + +#: inc/case.class.php:308 +msgid "Last update" +msgstr "Last update" + +#: inc/case.class.php:323 +msgid "Current task(s) properties" +msgstr "Current task(s) properties" + +#: inc/case.class.php:327 +msgid "Task" +msgstr "Task" + +#: inc/case.class.php:328 +msgid "Task guid" +msgstr "Task guid" + +#: inc/case.class.php:329 +msgid "Current user" +msgstr "Current user" + +#: inc/case.class.php:330 +msgid "Task delegation date" +msgstr "Task delegation date" + +#: inc/case.class.php:338 +msgid "To be claimed" +msgstr "To be claimed" + +#: inc/case.class.php:407 +msgid "Case item" +msgstr "Case item" + +#: inc/case.class.php:429 +msgid "Case cancellation" +msgstr "Case cancellation" + +#: inc/case.class.php:430 +msgid "Cancel case" +msgstr "Cancel case" + +#: inc/case.class.php:434 +msgid "Confirm cancellation?" +msgstr "Confirm cancellation?" + +#: inc/case.class.php:434 inc/profile.class.php:23 +msgid "Cancel" +msgstr "Cancel" + +#: inc/case.class.php:455 +msgid "Case deletion" +msgstr "Case deletion" + +#: inc/case.class.php:456 +msgid "Delete case" +msgstr "Delete case" + +#: inc/case.class.php:508 inc/case.class.php:933 +msgid "Title" +msgstr "Title" + +#: inc/case.class.php:510 inc/case.class.php:974 +msgid "Subcase of" +msgstr "Subcase of" + +#: inc/case.class.php:525 +msgid "Add a new case" +msgstr "Add a new case" + +#: inc/case.class.php:899 +msgctxt "case_status" +msgid "Draft" +msgstr "Draft" + +#: inc/case.class.php:900 +msgctxt "case_status" +msgid "To do" +msgstr "To do" + +#: inc/case.class.php:901 +msgctxt "case_status" +msgid "Completed" +msgstr "Completed" + +#: inc/case.class.php:902 +msgctxt "case_status" +msgid "Cancelled" +msgstr "Cancelled" + +#: inc/case.class.php:926 +msgid "ID" +msgstr "ID" + +#: inc/case.class.php:953 +msgid "Item" +msgstr "Item" + +#: inc/case.class.php:960 +msgid "Item entity" +msgstr "Item entity" + +#: inc/casechangelog.class.php:35 +msgid "Change log" +msgstr "Change log" + +#: inc/casedynaform.class.php:80 +msgid "Dynaforms" +msgstr "Dynaforms" + +#: inc/casehistory.class.php:35 +msgid "History" +msgstr "History" + +#: inc/caselink.class.php:51 +msgid "Case-links" +msgstr "Case-links" + +#: inc/caselink.class.php:53 +msgid "Case-link" +msgstr "Case-link" + +#: inc/caselink.class.php:75 inc/caselink.class.php:165 +msgid "External data" +msgstr "External data" + +#: inc/caselink.class.php:80 inc/caselink.class.php:171 +msgid "Self" +msgstr "Self" + +#: inc/caselink.class.php:85 inc/caselink.class.php:189 +msgid "Source task GUID" +msgstr "Source task GUID" + +#: inc/caselink.class.php:93 inc/caselink.class.php:195 +msgid "Target task GUID" +msgstr "Target task GUID" + +#: inc/caselink.class.php:101 inc/caselink.class.php:207 +msgid "Target process GUID" +msgstr "Target process GUID" + +#: inc/caselink.class.php:110 inc/caselink.class.php:201 +msgid "Target dynaform GUID" +msgstr "Target dynaform GUID" + +#: inc/caselink.class.php:115 inc/caselink.class.php:213 +msgid "Source condition" +msgstr "Source condition" + +#: inc/caselink.class.php:121 inc/caselink.class.php:177 +msgid "Claim target task" +msgstr "Claim target task" + +#: inc/caselink.class.php:126 inc/caselink.class.php:183 +msgid "External application JSON config" +msgstr "External application JSON config" + +#: inc/casemap.class.php:43 +msgid "Map" +msgstr "Map" + +#: inc/config.class.php:41 +msgid "ProcessMaker setup" +msgstr "ProcessMaker setup" + +#: inc/config.class.php:156 +msgid "Server URL (must be in same domain than GLPI)" +msgstr "Server URL (must be in same domain than GLPI)" + +#: inc/config.class.php:161 +msgid "Common domain with GLPI" +msgstr "Common domain with GLPI" + +#: inc/config.class.php:190 +msgid "None!" +msgstr "None!" + +#: inc/config.class.php:199 +msgid "Workspace Name" +msgstr "Workspace Name" + +#: inc/config.class.php:204 +msgid "Server administrator name" +msgstr "Server administrator name" + +#: inc/config.class.php:209 +msgid "Server administrator password" +msgstr "Server administrator password" + +#: inc/config.class.php:215 inc/config.class.php:255 +msgid "Connection status" +msgstr "Connection status" + +#: inc/config.class.php:231 +msgid "SQL server setup" +msgstr "SQL server setup" + +#: inc/config.class.php:234 +msgid "SQL server (MariaDB or MySQL)" +msgstr "SQL server (MariaDB or MySQL)" + +#: inc/config.class.php:239 +msgid "Database name" +msgstr "Database name" + +#: inc/config.class.php:244 +msgid "SQL user" +msgstr "SQL user" + +#: inc/config.class.php:249 +msgid "SQL password" +msgstr "SQL password" + +#: inc/config.class.php:266 +msgid "Theme Name" +msgstr "Theme Name" + +#: inc/config.class.php:272 +msgid "Main Task Category (edit to change name)" +msgstr "Main Task Category (edit to change name)" + +#: inc/config.class.php:279 +msgid "Task Writer (edit to change name)" +msgstr "Task Writer (edit to change name)" + +#: inc/config.class.php:299 +msgid "Group in ProcessMaker which will contain all GLPI users" +msgstr "Group in ProcessMaker which will contain all GLPI users" + +#: inc/config.class.php:323 +msgid "Processmaker system information" +msgstr "Processmaker system information" + +#: inc/config.class.php:327 inc/config.class.php:337 +msgid "Version" +msgstr "Version" + +#: inc/config.class.php:328 +msgid "Web server" +msgstr "Web server" + +#: inc/config.class.php:329 +msgid "Server name" +msgstr "Server name" + +#: inc/config.class.php:330 +msgid "PHP version" +msgstr "PHP version" + +#: inc/config.class.php:331 +msgid "DB version" +msgstr "DB version" + +#: inc/config.class.php:332 +msgid "DB server IP" +msgstr "DB server IP" + +#: inc/config.class.php:333 +msgid "DB name" +msgstr "DB name" + +#: inc/config.class.php:334 +msgid "User browser" +msgstr "User browser" + +#: inc/config.class.php:335 +msgid "User IP" +msgstr "User IP" + +#: inc/config.class.php:337 +msgid "Not yet!" +msgstr "Not yet!" + +#: inc/process.class.php:350 +msgid "Synchronize Process List" +msgstr "Synchronize Process List" + +#: inc/process.class.php:427 inc/process.class.php:565 +msgid "Process GUID" +msgstr "Process GUID" + +#: inc/process.class.php:433 +msgid "Project type" +msgstr "Project type" + +#: inc/process.class.php:439 +msgid "Hide case number and title" +msgstr "Hide case number and title" + +#: inc/process.class.php:445 +msgid "Insert Task Category" +msgstr "Insert Task Category" + +#: inc/process.class.php:457 inc/process.class.php:585 +msgid "Ticket type (self-service)" +msgstr "Ticket type (self-service)" + +#: inc/process.class.php:495 +msgctxt "process_type" +msgid "Classic" +msgstr "Classic" + +#: inc/process.class.php:496 +msgctxt "process_type" +msgid "BPMN" +msgstr "BPMN" + +#: inc/process.class.php:522 +msgid "Processes" +msgstr "Processes" + +#: inc/process.class.php:575 +msgid "Hide case number and title in task descriptions" +msgstr "Hide case number and title in task descriptions" + +#: inc/process.class.php:580 +msgid "Insert Task Category comments in Task Description" +msgstr "Insert Task Category comments in Task Description" + +#: inc/process.class.php:603 +msgid "ITIL Category (self-service)" +msgstr "ITIL Category (self-service)" + +#: inc/process.class.php:632 +msgid "Project type (to be changed if not up-to-date)" +msgstr "Project type (to be changed if not up-to-date)" + +#: inc/process_profile.class.php:26 inc/process_profile.class.php:45 +msgid "Authorizations" +msgstr "Authorizations" + +#: inc/process_profile.class.php:179 +msgid "Authorization not added: already existing!" +msgstr "Authorization not added: already existing!" + +#: inc/processmaker.class.php:116 inc/processmaker.class.php:118 +msgctxt "errors" +msgid "Error creating case!" +msgstr "Error creating case!" + +#: inc/processmaker.class.php:117 +msgctxt "errors" +msgid "Can't create case: no rights for it!" +msgstr "Can't create case: no rights for it!" + +#: inc/processmaker.class.php:984 +msgid "Syncs GLPI users and groups into ProcessMaker." +msgstr "Syncs GLPI users and groups into ProcessMaker." + +#: inc/processmaker.class.php:986 +msgid "Cleaning of orphan cases." +msgstr "Cleaning of orphan cases." + +#: inc/processmaker.class.php:986 +msgid "Number of days to keep orphan cases" +msgstr "Number of days to keep orphan cases" + +#: inc/processmaker.class.php:988 +msgid "To apply task actions between cases." +msgstr "To apply task actions between cases." + +#: inc/processmaker.class.php:1696 +msgid "Case title: " +msgstr "Case title: " + +#: inc/processmaker.class.php:2178 +msgid "A 'Case' is running!" +msgstr "A 'Case' is running!" + +#: inc/processmaker.class.php:2179 +msgid "You must manage it first (see 'Process - Case' tab)!" +msgstr "You must manage it first (see 'Process - Case' tab)!" + +#: inc/profile.class.php:17 +msgid "Process configuration" +msgstr "Process configuration" + +#: inc/profile.class.php:21 +msgid "Cases" +msgstr "Cases" + +#: inc/task.class.php:25 +msgid "Process case task" +msgid_plural "Process case tasks" +msgstr[0] "Process case task" +msgstr[1] "Process case tasks" + +#: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31 +msgid "Task List" +msgstr "Task List" + +#: inc/taskcategory.class.php:32 +msgid "Task name" +msgstr "Task name" + +#: inc/taskcategory.class.php:34 inc/taskcategory.class.php:60 +msgid "Start" +msgstr "Start" + +#: inc/taskcategory.class.php:35 +msgid "Task GUID" +msgstr "Task GUID" + +#: inc/taskcategory.class.php:38 inc/taskcategory.class.php:78 +msgid "Sub-process" +msgstr "Sub-process" + +#~ msgid "Plugin is under maintenance, please retry later, thank you." +#~ msgstr "Plugin is under maintenance, please retry later, thank you." diff --git a/pics/under_maintenance.png b/pics/under_maintenance.png new file mode 100644 index 0000000..ba1f7f8 Binary files /dev/null and b/pics/under_maintenance.png differ diff --git a/setup.php b/setup.php index 64677f2..bdd6255 100644 --- a/setup.php +++ b/setup.php @@ -123,8 +123,6 @@ function plugin_init_processmaker() { // Get the name and the version of the plugin - Needed function plugin_version_processmaker() { - global $LANG; - return array ('name' => 'Process Maker', 'version' => '3.3.0', 'author' => 'Olivier Moron',
".$LANG['processmaker']['title'][3]."
".$LANG['processmaker']['process']['taskcategories']['name']."".$LANG['processmaker']['process']['taskcategories']['completename']."".$LANG['processmaker']['process']['taskcategories']['is_start']."".$LANG['processmaker']['process']['taskcategories']['guid']."".$LANG['processmaker']['process']['taskcategories']['comment']."".$LANG['processmaker']['process']['taskcategories']['is_active']."".$LANG['processmaker']['process']['taskcategories']['is_subprocess']."
".__('Task List', 'processmaker')."
".__('Task name', 'processmaker')."".__('Complete name')."".__('Start', 'processmaker')."".__('Task GUID', 'processmaker')."".__('Comments')."".__('Active')."".__('Sub-process', 'processmaker')."
" . $taskCat['name']; + Toolbox::getItemTypeFormURL('TaskCategory') . "?id=" . $taskCat['taskcategories_id'] . "'>" . $taskCat['name']; if ($_SESSION["glpiis_ids_visible"]) { echo " (" . $taskCat['taskcategories_id'] . ")"; } echo "" . $taskCat['completename'] . "" . $taskCat['completename'] . ""; if ($taskCat['is_start']) { echo "\""."; + __('Start', 'processmaker')."\">"; } echo ""; if ($taskCat['is_active']) { echo "\""."; + __('Active')."\">"; } echo ""; if ($taskCat['is_subprocess']) { echo "\""."; + __('Sub-process', 'processmaker')."\">"; } echo "