From: Dave Greenberg Date: Tue, 15 Jul 2014 00:19:17 +0000 (-0700) Subject: CRM-14789 - Translate and tweak the error message when attempting to delete case... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=84dfe0f2c49c44799d6751ed2cda2aa6a6a6797c;p=civicrm-core.git CRM-14789 - Translate and tweak the error message when attempting to delete case type which is in use. ---------------------------------------- * CRM-14789: https://issues.civicrm.org/jira/browse/CRM-14789 --- diff --git a/CRM/Case/BAO/CaseType.php b/CRM/Case/BAO/CaseType.php index e7f56f9525..ff2979ead1 100644 --- a/CRM/Case/BAO/CaseType.php +++ b/CRM/Case/BAO/CaseType.php @@ -314,7 +314,7 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType { $refCounts = $caseType->getReferenceCounts(); $total = array_sum(CRM_Utils_Array::collect('count', $refCounts)); if ($total) { - throw new CRM_Core_Exception("Cannot delete case type -- {$total} record(s) depend on it"); + throw new CRM_Core_Exception(ts("You can not delete this case type -- it is assigned to %1 existing case record(s). If you do not want this case type to be used going forward, consider disabling it instead.", array(1 => $total))); } $result = $caseType->delete(); CRM_Case_XMLRepository::singleton(TRUE);