CRM-14789 - Translate and tweak the error message when attempting to delete case...
authorDave Greenberg <dave@civicrm.org>
Tue, 15 Jul 2014 00:19:17 +0000 (17:19 -0700)
committerDave Greenberg <dave@civicrm.org>
Tue, 15 Jul 2014 00:19:17 +0000 (17:19 -0700)
----------------------------------------
* CRM-14789:
  https://issues.civicrm.org/jira/browse/CRM-14789

CRM/Case/BAO/CaseType.php

index e7f56f95255e70fb5be42c0a47f214845cc4ec67..ff2979ead13003cbdcb40b2193a0936a53e9d17d 100644 (file)
@@ -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);