From 2b82e455684b51e109260cf13ad66922a58a95a2 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Mon, 16 May 2022 12:46:55 -0400 Subject: [PATCH] Fix Schema System Check translation --- CRM/Utils/Check/Component/Schema.php | 30 +++++++++++----------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/CRM/Utils/Check/Component/Schema.php b/CRM/Utils/Check/Component/Schema.php index 0fc536184fd4..46f3ef9d0840 100644 --- a/CRM/Utils/Check/Component/Schema.php +++ b/CRM/Utils/Check/Component/Schema.php @@ -145,34 +145,28 @@ public function checkSmartGroupCustomFieldCriteria() { $customField = civicrm_api3('CustomField', 'getsingle', [ 'sequential' => 1, 'id' => $field['cfid'], - ]); - $fieldName = ts(' %2 ', [ - 1 => CRM_Utils_System::url('civicrm/admin/custom/group/field/update', - "action=update&reset=1&gid={$customField['custom_group_id']}&id={$field['cfid']}", TRUE - ), - 2 => $customField['label'], - ]); + ]); + $url = CRM_Utils_System::url('civicrm/admin/custom/group/field/update', "action=update&reset=1&gid={$customField['custom_group_id']}&id={$field['cfid']}", TRUE); + $fieldName = '' . $customField['label'] . ''; } catch (CiviCRM_API3_Exception $e) { - $fieldName = ' - Deleted - '; + $fieldName = '' . ts('Deleted') . ' - ' . ts('Field ID %1', [1 => $field['cfid']]) . ' '; } } - $groupEdit = ' '; - $groupConfig = ' '; + $groupEdit = ' '; + $groupConfig = ' '; $html .= "{$id} - {$field['title']} {$groupEdit} {$groupConfig}{$fieldName}"; } - $message = "

The following smart groups include custom fields which are disabled/deleted from the database. This may cause errors on group page. - You might need to edit their search criteria and update them to clean outdated fields from saved search OR disable them in order to fix the error.

-

- - $html -
GroupCustom Field

- "; + $message = "

" . ts('The following smart groups include custom fields which are disabled/deleted from the database. This may cause errors on group page. You might need to edit their search criteria and update them to clean outdated fields from saved search OR disable them in order to fix the error.') . '

' + . '

' + . '' + . $html + . '
' . ts('Group') . '' . ts('Custom Field') . '

'; $msg = new CRM_Utils_Check_Message( __FUNCTION__, - ts($message), + $message, ts('Disabled/Deleted fields on Smart Groups'), \Psr\Log\LogLevel::WARNING, 'fa-server'