Make error messages translatable.
authorBradley Taylor <hello@brad-taylor.co.uk>
Fri, 22 Oct 2021 20:33:11 +0000 (21:33 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Fri, 22 Oct 2021 20:33:11 +0000 (21:33 +0100)
CRM/Contact/Form/Task/AddToGroup.php
CRM/Event/Form/Task/AddToGroup.php

index 633985629bd9bd3e020700c6109f7f39015c0a47..462df635db9b48f27af01fc1ee4f36f9716175b9 100644 (file)
@@ -166,10 +166,10 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task {
     $errors = [];
 
     if (!empty($params['group_option']) && empty($params['title'])) {
-      $errors['title'] = "Group Name is a required field";
+      $errors['title'] = ts('Group Name is a required field');
     }
     elseif (empty($params['group_option']) && empty($params['group_id'])) {
-      $errors['group_id'] = "Select Group is a required field.";
+      $errors['group_id'] = ts('Select Group is a required field.');
     }
 
     return empty($errors) ? TRUE : $errors;
index ac41fd7faa701b584612321fb135b0cf12fb9d3c..33d97448c9dd2915eef2ebb5190bb3e594910413 100644 (file)
@@ -170,10 +170,10 @@ class CRM_Event_Form_Task_AddToGroup extends CRM_Event_Form_Task {
     $errors = [];
 
     if (!empty($params['group_option']) && empty($params['title'])) {
-      $errors['title'] = "Group Name is a required field";
+      $errors['title'] = ts('Group Name is a required field');
     }
     elseif (empty($params['group_option']) && empty($params['group_id'])) {
-      $errors['group_id'] = "Select Group is a required field.";
+      $errors['group_id'] = ts('Select Group is a required field.');
     }
 
     return empty($errors) ? TRUE : $errors;