From b604d7ec90778c3b7bcf11800cf8dbcf0bc0d951 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 5 Dec 2015 13:08:38 -0500 Subject: [PATCH] Remove unnecessarily translated strings --- CRM/Upgrade/Form.php | 2 +- CRM/Upgrade/Incremental/php/FourFive.php | 6 +++--- CRM/Upgrade/Incremental/php/FourFour.php | 4 ++-- CRM/Upgrade/Incremental/php/FourOne.php | 5 ++--- CRM/Upgrade/Incremental/php/FourSeven.php | 4 ++-- CRM/Upgrade/Incremental/php/FourSix.php | 4 ++-- CRM/Upgrade/Incremental/php/FourThree.php | 2 +- CRM/Upgrade/Incremental/php/FourTwo.php | 22 +++++++++++----------- 8 files changed, 24 insertions(+), 25 deletions(-) diff --git a/CRM/Upgrade/Form.php b/CRM/Upgrade/Form.php index 2edfbe6753..2e4f4db597 100644 --- a/CRM/Upgrade/Form.php +++ b/CRM/Upgrade/Form.php @@ -349,7 +349,7 @@ SET version = '$version' foreach ($sqlFiles as $file) { if (preg_match($sqlFilePattern, $file, $matches)) { if ($matches[2] == '4.0') { - CRM_Core_Error::fatal(ts("4.0.x upgrade files shouldn't exist. Contact Lobo to discuss this. This is related to the issue CRM-7731.")); + CRM_Core_Error::fatal("4.0.x upgrade files shouldn't exist. Contact Lobo to discuss this. This is related to the issue CRM-7731."); } if (!in_array($matches[1], $revList)) { $revList[] = $matches[1]; diff --git a/CRM/Upgrade/Incremental/php/FourFive.php b/CRM/Upgrade/Incremental/php/FourFive.php index d9fef968e1..d96b886385 100755 --- a/CRM/Upgrade/Incremental/php/FourFive.php +++ b/CRM/Upgrade/Incremental/php/FourFive.php @@ -59,9 +59,9 @@ class CRM_Upgrade_Incremental_php_FourFive extends CRM_Upgrade_Incremental_Base */ public function upgrade_4_5_alpha1($rev) { // task to process sql - $this->addTask(ts('Migrate honoree information to module_data'), 'migrateHonoreeInfo'); + $this->addTask('Migrate honoree information to module_data', 'migrateHonoreeInfo'); $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => '4.5.alpha1')), 'runSql', $rev); - $this->addTask(ts('Set default for Individual name fields configuration'), 'addNameFieldOptions'); + $this->addTask('Set default for Individual name fields configuration', 'addNameFieldOptions'); // CRM-14522 - The below schema checking is done as foreign key name // for pdf_format_id column varies for different databases @@ -290,7 +290,7 @@ DROP KEY `{$dao->CONSTRAINT_NAME}`"; */ public function upgrade_4_5_9($rev) { // Task to process sql. - $this->addTask(ts('Upgrade DB to 4.5.9: Fix saved searches consisting of multi-choice custom field(s)'), 'updateSavedSearch'); + $this->addTask('Upgrade DB to 4.5.9: Fix saved searches consisting of multi-choice custom field(s)', 'updateSavedSearch'); return TRUE; } diff --git a/CRM/Upgrade/Incremental/php/FourFour.php b/CRM/Upgrade/Incremental/php/FourFour.php index 3ede081998..1a1a95f865 100644 --- a/CRM/Upgrade/Incremental/php/FourFour.php +++ b/CRM/Upgrade/Incremental/php/FourFour.php @@ -345,7 +345,7 @@ ALTER TABLE civicrm_dashboard $maxId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(max(id),0) FROM civicrm_contact WHERE image_URL IS NOT NULL'); for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) { $endId = $startId + self::BATCH_SIZE - 1; - $title = ts('Upgrade image_urls (%1 => %2)', array(1 => $startId, 2 => $endId)); + $title = "Upgrade image_urls ($startId => $endId)"; $this->addTask($title, 'upgradeImageUrls', $startId, $endId); } } @@ -366,7 +366,7 @@ ALTER TABLE civicrm_dashboard $maxId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(max(id),0) FROM civicrm_contact WHERE image_URL IS NOT NULL'); for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) { $endId = $startId + self::BATCH_SIZE - 1; - $title = ts('Upgrade image_urls (%1 => %2)', array(1 => $startId, 2 => $endId)); + $title = "Upgrade image_urls ($startId => $endId)"; $this->addTask($title, 'cleanupBackendImageUrls', $startId, $endId); } } diff --git a/CRM/Upgrade/Incremental/php/FourOne.php b/CRM/Upgrade/Incremental/php/FourOne.php index d5bbd49ebb..ae92660900 100644 --- a/CRM/Upgrade/Incremental/php/FourOne.php +++ b/CRM/Upgrade/Incremental/php/FourOne.php @@ -45,7 +45,7 @@ class CRM_Upgrade_Incremental_php_FourOne { $config = CRM_Core_Config::singleton(); if (in_array('CiviCase', $config->enableComponents)) { if (!CRM_Core_DAO::checkTriggerViewPermission(TRUE, FALSE)) { - $errors[] = ts('CiviCase now requires CREATE VIEW and DROP VIEW permissions for the database user.'); + $errors[] = 'CiviCase now requires CREATE VIEW and DROP VIEW permissions for the database user.'; return FALSE; } } @@ -68,8 +68,7 @@ class CRM_Upgrade_Incremental_php_FourOne { $postUpgradeMessage .= '
' . ts('The CiviCRM Administration menu structure has been re-organized during this upgrade to make it easier to find things and reduce the number of keystrokes. If you have customized this portion of the navigation menu - you should take a few minutes to review the changes. You may need to reimplement or move your customizations.'); - $postUpgradeMessage .= '
' . - ts('Yahoo recently discontinued their geocoding and mapping API service. If you previously used Yahoo, you will need to select and configure an alternate service in order to continue using geocoding/mapping tools.'); + $postUpgradeMessage .= '
Yahoo recently discontinued their geocoding and mapping API service. If you previously used Yahoo, you will need to select and configure an alternate service in order to continue using geocoding/mapping tools.'; $postUpgradeMessage .= '
' . ts('We have integrated KCFinder with CKEditor and TinyMCE, which enables user to upload images. Note that all the images uploaded using KCFinder will be public.'); diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index e0d14c17f0..b5aba5cb83 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -107,10 +107,10 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base * @param string $rev */ public function upgrade_4_7_alpha1($rev) { - $this->addTask(ts('Migrate \'on behalf of\' information to module_data'), 'migrateOnBehalfOfInfo'); + $this->addTask('Migrate \'on behalf of\' information to module_data', 'migrateOnBehalfOfInfo'); $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev); $this->addTask(ts('Migrate Settings to %1', array(1 => $rev)), 'migrateSettings', $rev); - $this->addTask(ts('Add Getting Started dashlet to %1: SQL', array(1 => $rev)), 'addGettingStartedDashlet', $rev); + $this->addTask('Add Getting Started dashlet', 'addGettingStartedDashlet', $rev); } /** diff --git a/CRM/Upgrade/Incremental/php/FourSix.php b/CRM/Upgrade/Incremental/php/FourSix.php index 8e5f2f9e17..de085ac4f0 100644 --- a/CRM/Upgrade/Incremental/php/FourSix.php +++ b/CRM/Upgrade/Incremental/php/FourSix.php @@ -58,7 +58,7 @@ class CRM_Upgrade_Incremental_php_FourSix extends CRM_Upgrade_Incremental_Base { */ public function upgrade_4_6_alpha3($rev) { // Task to process sql. - $this->addTask(ts('Add and update reference_date column for Schedule Reminders'), 'updateReferenceDate'); + $this->addTask('Add and update reference_date column for Schedule Reminders', 'updateReferenceDate'); } /** @@ -129,7 +129,7 @@ class CRM_Upgrade_Incremental_php_FourSix extends CRM_Upgrade_Incremental_Base { */ public function upgrade_4_6_1($rev) { // CRM-16289 - Fix invalid data in log_civicrm_case.case_type_id. - $this->addTask(ts('Cleanup case type id data in log table.'), 'fixCaseLog'); + $this->addTask('Cleanup case type id data in log table.', 'fixCaseLog'); } /** diff --git a/CRM/Upgrade/Incremental/php/FourThree.php b/CRM/Upgrade/Incremental/php/FourThree.php index 4252800659..4901e78420 100644 --- a/CRM/Upgrade/Incremental/php/FourThree.php +++ b/CRM/Upgrade/Incremental/php/FourThree.php @@ -255,7 +255,7 @@ WHERE ccp.financial_type_id IS NULL and cp.cost > 0'); $maxId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(max(id),0) FROM civicrm_contact'); for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) { $endId = $startId + self::BATCH_SIZE - 1; - $title = ts('Upgrade timestamps (%1 => %2)', array(1 => $startId, 2 => $endId)); + $title = "Upgrade timestamps ($startId => $endId)"; $this->addTask($title, 'convertTimestamps', $startId, $endId); } diff --git a/CRM/Upgrade/Incremental/php/FourTwo.php b/CRM/Upgrade/Incremental/php/FourTwo.php index 8811da71c0..021f539773 100644 --- a/CRM/Upgrade/Incremental/php/FourTwo.php +++ b/CRM/Upgrade/Incremental/php/FourTwo.php @@ -49,7 +49,7 @@ class CRM_Upgrade_Incremental_php_FourTwo extends CRM_Upgrade_Incremental_Base { if ($rev == '4.2.alpha1') { $tables = array('civicrm_contribution_page', 'civicrm_event', 'civicrm_group', 'civicrm_contact'); if (!CRM_Core_DAO::schemaRequiresRebuilding($tables)) { - $errors = ts("The upgrade has identified some schema integrity issues in the database. It seems some of your constraints are missing. You will have to rebuild your schema before re-trying the upgrade. Please refer to %1.", array(1 => CRM_Utils_System::docURL2("Ensuring Schema Integrity on Upgrades", FALSE, "Ensuring Schema Integrity on Upgrades", NULL, NULL, "wiki"))); + $errors = "The upgrade has identified some schema integrity issues in the database. It seems some of your constraints are missing. You will have to rebuild your schema before re-trying the upgrade. Please refer to " . CRM_Utils_System::docURL2("Ensuring Schema Integrity on Upgrades", FALSE, "Ensuring Schema Integrity on Upgrades", NULL, NULL, "wiki"); CRM_Core_Error::fatal($errors); return FALSE; } @@ -68,8 +68,7 @@ INNER JOIN civicrm_membership mem ON mem.id = mp.membership_id ORDER BY mp.contribution_id, mp.membership_id"; $invalidData = CRM_Core_DAO::executeQuery($query); if ($invalidData->N) { - $invalidDataMessage = "
" . ts('The upgrade is being aborted due to data integrity issues in your database. There are multiple membership records linked to the same contribution record. This is unexpected, and some of the membership records may be duplicates. The problem record sets are listed below. Refer to this wiki page for instructions on repairing your database so that you can run the upgrade successfully. - ', array(1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC42/Repair+database+script+for+4.2+upgrades')) . ""; + $invalidDataMessage = "
" . 'The upgrade is being aborted due to data integrity issues in your database. There are multiple membership records linked to the same contribution record. This is unexpected, and some of the membership records may be duplicates. The problem record sets are listed below. Refer to this wiki page for instructions on repairing your database so that you can run the upgrade successfully.' . ""; $membershipType = CRM_Member_PseudoConstant::membershipType(); $membershipStatus = CRM_Member_PseudoConstant::membershipStatus(); $invalidDataMessage .= ""; @@ -84,7 +83,8 @@ ORDER BY mp.contribution_id, mp.membership_id"; $invalidDataMessage .= ""; $invalidDataMessage .= ""; } - $invalidDataMessage .= "
Contact-IDContribution-IDMembership-IDMembership TypeStart DateEnd DateMembership Status
" . CRM_Utils_Array::value($invalidData->status_id, $membershipStatus) . "

" . ts('If you have reviewed the cleanup script documentation on the wiki and you are ready to run the cleanup now - click here.', array(1 => CRM_Utils_System::url('civicrm/upgrade/cleanup425', 'reset=1'))) . "

"; + $clickHere = CRM_Utils_System::url('civicrm/upgrade/cleanup425', 'reset=1'); + $invalidDataMessage .= "

If you have reviewed the cleanup script documentation on the wiki and you are ready to run the cleanup now - click here.

"; CRM_Core_Error::fatal($invalidDataMessage); return FALSE; } @@ -116,7 +116,7 @@ INNER JOIN civicrm_price_field cpf ON cpf.id = cpfv.price_field_id and cpf.id != INNER JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id AND cps.name <>'default_membership_type_amount' "; $dao = CRM_Core_DAO::executeQuery($query); if ($dao->N) { - $preUpgradeMessage .= "
" . ts('We have identified extraneous data in your database that a previous upgrade likely introduced. We STRONGLY recommend making a backup of your site before continuing. We also STRONGLY suggest fixing this issue with unneeded records BEFORE you upgrade. You can find more information about this issue and the way to fix it by visiting http://forum.civicrm.org/index.php/topic,26181.0.html.') . ""; + $preUpgradeMessage .= "
We have identified extraneous data in your database that a previous upgrade likely introduced. We STRONGLY recommend making a backup of your site before continuing. We also STRONGLY suggest fixing this issue with unneeded records BEFORE you upgrade. You can find more information about this issue and the way to fix it by visiting http://forum.civicrm.org/index.php/topic,26181.0.html."; } } @@ -125,7 +125,7 @@ INNER JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id AND cps.name <>'de $sql = "SELECT id FROM civicrm_option_group WHERE name LIKE 'civicrm_price_field.amount.%' LIMIT 1"; $dao = CRM_Core_DAO::executeQuery($sql); if ($dao->fetch()) { - $errors = ts("We found unexpected data values from an older version of CiviCRM in your database. The upgrade can not be run until this condition is corrected.

Details: One or more rows are present in the civicrm_option_group with name like 'civicrm_price_field.amount.%'. Check here for information on diagnosing and correcting this problem.", array(1 => 'http://forum.civicrm.org/index.php/topic,27744.msg118748.html#msg118748')); + $errors = "We found unexpected data values from an older version of CiviCRM in your database. The upgrade can not be run until this condition is corrected.

Details: One or more rows are present in the civicrm_option_group with name like 'civicrm_price_field.amount.%'. Check here for information on diagnosing and correcting this problem."; CRM_Core_Error::fatal($errors); return FALSE; } @@ -197,9 +197,9 @@ INNER JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id AND cps.name <>'de // Some steps take a long time, so we break them up into separate // tasks and enqueue them separately. $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => '4.2.alpha1')), 'runSql', $rev); - $this->addTask(ts('Upgrade DB to 4.2.alpha1: Price Sets'), 'task_4_2_alpha1_createPriceSets', $rev); + $this->addTask('Upgrade DB to 4.2.alpha1: Price Sets', 'task_4_2_alpha1_createPriceSets', $rev); self::convertContribution(); - $this->addTask(ts('Upgrade DB to 4.2.alpha1: Event Profile'), 'task_4_2_alpha1_eventProfile'); + $this->addTask('Upgrade DB to 4.2.alpha1: Event Profile', 'task_4_2_alpha1_eventProfile'); } /** @@ -226,7 +226,7 @@ INNER JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id AND cps.name <>'de for ($startId = $minParticipantId; $startId <= $maxParticipantId; $startId += self::BATCH_SIZE) { $endId = $startId + self::BATCH_SIZE - 1; - $title = ts('Upgrade DB to 4.2.alpha1: Participant (%1 => %2)', array(1 => $startId, 2 => $endId)); + $title = "Upgrade DB to 4.2.alpha1: Participant ($startId => $endId)"; $this->addTask($title, 'task_4_2_alpha1_convertParticipants', $startId, $endId); } } @@ -360,7 +360,7 @@ HAVING COUNT(cpse.price_set_id) > 1 AND MIN(cpse1.id) <> cpse.id "; $maxContributionId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(max(id),0) FROM civicrm_contribution'); for ($startId = $minContributionId; $startId <= $maxContributionId; $startId += self::BATCH_SIZE) { $endId = $startId + self::BATCH_SIZE - 1; - $title = ts('Upgrade DB to 4.2.alpha1: Contributions (%1 => %2)', array(1 => $startId, 2 => $endId)); + $title = "Upgrade DB to 4.2.alpha1: Contributions ($startId => $endId)"; $this->addTask($title, 'task_4_2_alpha1_convertContributions', $startId, $endId); } $minParticipantId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(min(id),0) FROM civicrm_participant'); @@ -368,7 +368,7 @@ HAVING COUNT(cpse.price_set_id) > 1 AND MIN(cpse1.id) <> cpse.id "; for ($startId = $minParticipantId; $startId <= $maxParticipantId; $startId += self::BATCH_SIZE) { $endId = $startId + self::BATCH_SIZE - 1; - $title = ts('Upgrade DB to 4.2.alpha1: Participant (%1 => %2)', array(1 => $startId, 2 => $endId)); + $title = "Upgrade DB to 4.2.alpha1: Participant ($startId => $endId)"; $this->addTask($title, 'task_4_2_alpha1_convertParticipants', $startId, $endId); } } -- 2.25.1