From 6cac4882b531f8fafdd5024cb5d7ee0f4bbe1084 Mon Sep 17 00:00:00 2001 From: Marc Michalsky forumZFD Date: Tue, 2 Mar 2021 10:50:29 +0100 Subject: [PATCH] do not translate log messages --- CRM/TwingleCampaign/BAO/CustomField.php | 14 ++++++-------- CRM/TwingleCampaign/BAO/CustomGroup.php | 9 ++++----- CRM/TwingleCampaign/BAO/OptionValue.php | 11 +++++------ 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/CRM/TwingleCampaign/BAO/CustomField.php b/CRM/TwingleCampaign/BAO/CustomField.php index 6eeb440..b393e24 100644 --- a/CRM/TwingleCampaign/BAO/CustomField.php +++ b/CRM/TwingleCampaign/BAO/CustomField.php @@ -105,25 +105,23 @@ class CRM_TwingleCampaign_BAO_CustomField { ->error("$this->extensionName could not create new custom field \"$this->name\" for group \"$this->custom_group_id\": $this->result['error_message']"); - CRM_Utils_System::setUFMessage(ts("Creation of custom field '%1' - failed. Find more information in the logs.", - $this->name)); + CRM_Utils_System::setUFMessage("Creation of custom field '$this->name' + failed. Find more information in the logs."); } // If there is not enough information: log simple error message else { Civi::log() ->error("$this->extensionName could not create new custom field: $this->result['error_message']"); - CRM_Utils_System::setUFMessage(ts("Creation of custom field - failed. Find more information in the logs.")); + CRM_Utils_System::setUFMessage("Creation of custom field + failed. Find more information in the logs."); } } } else { - CRM_Utils_System::setUFMessage(ts("Creation of custom field '%1' + CRM_Utils_System::setUFMessage("Creation of custom field '$this->name' failed, because a custom field with that name already exists. - Find more information in the logs.", - $this->name)); + Find more information in the logs."); Civi::log() ->error("$this->extensionName could not create new custom field \"$this->name\" for group \"$this->custom_group_id\" because a diff --git a/CRM/TwingleCampaign/BAO/CustomGroup.php b/CRM/TwingleCampaign/BAO/CustomGroup.php index 272a341..3b92099 100644 --- a/CRM/TwingleCampaign/BAO/CustomGroup.php +++ b/CRM/TwingleCampaign/BAO/CustomGroup.php @@ -74,15 +74,14 @@ class CRM_TwingleCampaign_BAO_CustomGroup { Civi::log()->error("$this->extensionName could not create new custom group for \"$this->name\": $this->results['error_message']" ); - CRM_Utils_System::setUFMessage(ts("Creation of custom group '%1' - failed. Find more information in the logs.", - $this->name)); + CRM_Utils_System::setUFMessage("Creation of custom group '$this->name' + failed. Find more information in the logs."); } else { Civi::log()->error("$this->extensionName could not create new custom group: $this->results['error_message']"); - CRM_Utils_System::setUFMessage(ts("Creation of custom group - failed. Find more information in the logs.")); + CRM_Utils_System::setUFMessage("Creation of custom group + failed. Find more information in the logs."); } } diff --git a/CRM/TwingleCampaign/BAO/OptionValue.php b/CRM/TwingleCampaign/BAO/OptionValue.php index 90d3fdf..e5144d3 100644 --- a/CRM/TwingleCampaign/BAO/OptionValue.php +++ b/CRM/TwingleCampaign/BAO/OptionValue.php @@ -79,9 +79,8 @@ class CRM_TwingleCampaign_BAO_OptionValue { } // If the option value could not get created: log error else { - CRM_Utils_System::setUFMessage(ts("Creation of custom value '%1' - failed. Find more information in the logs.", - $this->name)); + CRM_Utils_System::setUFMessage("Creation of custom value '$this->name)' + failed. Find more information in the logs."); if ($this->label && $this->option_group_id) { Civi::log() ->error("$this->extensionName could not create new option value @@ -97,10 +96,10 @@ class CRM_TwingleCampaign_BAO_OptionValue { } } else { - CRM_Utils_System::setUFMessage(ts("Creation of custom value '%1' + CRM_Utils_System::setUFMessage("Creation of custom value '$this->name' failed, because a custom value with that name already exists. - Find more information in the logs.", - $this->name)); + Find more information in the logs." + ); Civi::log() ->error("$this->extensionName could not create new custom value \"$this->name\" for group \"$this->option_group_id\" because a