🇩🇪 add German translation

This commit is contained in:
Marc Michalsky forumZFD 2021-04-13 00:19:15 +02:00
parent 34e2e77d83
commit 7b30a75014
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
6 changed files with 1475 additions and 43 deletions

View file

@ -108,16 +108,14 @@ 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("Creation of custom field '$this->name'
failed. Find more information in the logs.");
CRM_Utils_System::setUFMessage(E::ts('Creation of custom field \'%1\' failed. Find more information in the logs.', [1 => $this->name]));
}
// 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("Creation of custom field
failed. Find more information in the logs.");
CRM_Utils_System::setUFMessage(E::ts("Creation of custom field failed. Find more information in the logs."));
}
}
}

View file

@ -77,14 +77,12 @@ 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("Creation of custom group '$this->name'
failed. Find more information in the logs.");
CRM_Utils_System::setUFMessage(E::ts('Creation of custom group \'%1\' failed. Find more information in the logs.', [1 => $this->name]));
}
else {
Civi::log()->error("$this->extensionName could not create new
custom group: $this->results['error_message']");
CRM_Utils_System::setUFMessage("Creation of custom group
failed. Find more information in the logs.");
CRM_Utils_System::setUFMessage(E::ts('Creation of custom group failed. Find more information in the logs.'));
}
}

View file

@ -144,10 +144,9 @@ class CRM_TwingleCampaign_BAO_OptionValue {
if (!$name) {
$result = [];
// Get json file with all custom fields for this extension
$json_file = file_get_contents(E::path() .
'/CRM/TwingleCampaign/resources/option_values.json');
$option_values = json_decode($json_file, TRUE);
// Get all custom fields for this extension from option_values.php
$option_values =
include(E::path() . '/CRM/TwingleCampaign/resources/option_values.php');
// Log an error and throw an exception if the file cannot get read
if (!$option_values) {