From 84dfe0f2c49c44799d6751ed2cda2aa6a6a6797c Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Mon, 14 Jul 2014 17:19:17 -0700 Subject: [PATCH] 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 --- CRM/Case/BAO/CaseType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.1