Skip to content

Commit

Permalink
Merge pull request #15858 from yashodha/translation
Browse files Browse the repository at this point in the history
translate strings
  • Loading branch information
eileenmcnaughton authored Nov 15, 2019
2 parents fbbb635 + 2108fe3 commit 36cf33c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CRM/Extension/Downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function download($key, $downloadUrl) {
$destDir = $this->containerDir . DIRECTORY_SEPARATOR . $key;

if (!$downloadUrl) {
CRM_Core_Error::fatal('Cannot install this extension - downloadUrl is not set!');
CRM_Core_Error::fatal(ts('Cannot install this extension - downloadUrl is not set!'));
}

if (!$this->fetch($downloadUrl, $filename)) {
Expand Down Expand Up @@ -213,7 +213,7 @@ public function validateFiles($key, $extractedZipPath) {
}

if ($newInfo->key != $key) {
CRM_Core_Error::fatal('Cannot install - there are differences between extdir XML file and archive XML file!');
CRM_Core_Error::fatal(ts('Cannot install - there are differences between extdir XML file and archive XML file!'));
}

return TRUE;
Expand Down
8 changes: 4 additions & 4 deletions CRM/Extension/Manager/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public function onPreInstall(CRM_Extension_Info $info) {
$paymentProcessorTypes = $this->_getAllPaymentProcessorTypes('class_name');

if (array_key_exists($info->key, $paymentProcessorTypes)) {
CRM_Core_Error::fatal('This payment processor type is already installed.');
CRM_Core_Error::fatal(ts('This payment processor type is already installed.'));
}

$ppByName = $this->_getAllPaymentProcessorTypes('name');
if (array_key_exists($info->name, $ppByName)) {
CRM_Core_Error::fatal('This payment processor type already exists.');
CRM_Core_Error::fatal(ts('This payment processor type already exists.'));
}

$dao = new CRM_Financial_DAO_PaymentProcessorType();
Expand Down Expand Up @@ -82,7 +82,7 @@ public function onPreInstall(CRM_Extension_Info $info) {
break;

default:
CRM_Core_Error::fatal('Billing mode in info file has wrong value.');
CRM_Core_Error::fatal(ts('Billing mode in info file has wrong value.'));
}

$dao->is_recur = trim($info->typeInfo['isRecur']);
Expand All @@ -108,7 +108,7 @@ public function onPostInstall(CRM_Extension_Info $info) {
public function onPreUninstall(CRM_Extension_Info $info) {
$paymentProcessorTypes = $this->_getAllPaymentProcessorTypes('class_name');
if (!array_key_exists($info->key, $paymentProcessorTypes)) {
CRM_Core_Error::fatal('This payment processor type is not registered.');
CRM_Core_Error::fatal(ts('This payment processor type is not registered.'));
}

$dao = new CRM_Financial_DAO_PaymentProcessor();
Expand Down
4 changes: 2 additions & 2 deletions CRM/Extension/Manager/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct() {
public function onPreInstall(CRM_Extension_Info $info) {
$customReports = $this->getCustomReportsByName();
if (array_key_exists($info->key, $customReports)) {
CRM_Core_Error::fatal('This report is already registered.');
CRM_Core_Error::fatal(ts('This report is already registered.'));
}

if ($info->typeInfo['component'] === 'Contact') {
Expand All @@ -48,7 +48,7 @@ public function onPreInstall(CRM_Extension_Info $info) {
$compId = $comp->componentID;
}
if (empty($compId)) {
CRM_Core_Error::fatal("Component for which you're trying to install the extension (" . $info->typeInfo['component'] . ") is currently disabled.");
CRM_Core_Error::fatal(ts('Component for which you are trying to install the extension (%1) is currently disabled.', [1 => $info->typeInfo['component']]));
}
$weight = CRM_Utils_Weight::getDefaultWeight('CRM_Core_DAO_OptionValue',
['option_group_id' => $this->groupId]
Expand Down
2 changes: 1 addition & 1 deletion CRM/Extension/Manager/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct() {
public function onPreInstall(CRM_Extension_Info $info) {
$customSearchesByName = $this->getCustomSearchesByName();
if (array_key_exists($info->key, $customSearchesByName)) {
CRM_Core_Error::fatal('This custom search is already registered.');
CRM_Core_Error::fatal(ts('This custom search is already registered.'));
}

$weight = CRM_Utils_Weight::getDefaultWeight('CRM_Core_DAO_OptionValue',
Expand Down

0 comments on commit 36cf33c

Please sign in to comment.