From 44f6941d4a8bf349e1c312ddf8be8dddcd7af56c Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Mon, 30 Oct 2017 22:55:28 +0530 Subject: [PATCH] minor fixes --- CRM/Admin/Form/Preferences/Mailing.php | 4 ++-- ang/crmMailing/EditRecipCtrl.js | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CRM/Admin/Form/Preferences/Mailing.php b/CRM/Admin/Form/Preferences/Mailing.php index 1abfbc26c7..74639b944d 100644 --- a/CRM/Admin/Form/Preferences/Mailing.php +++ b/CRM/Admin/Form/Preferences/Mailing.php @@ -106,13 +106,13 @@ class CRM_Admin_Form_Preferences_Mailing extends CRM_Admin_Form_Preferences { 'html_type' => 'checkbox', 'title' => ts('Hashed Mailing URL\'s'), 'weight' => 11, - 'description' => 'If enabled, a randomized hash key will be used to reference the mailing URL in the mailing.viewUrl token, instead of the mailing ID', + 'description' => ts('If enabled, a randomized hash key will be used to reference the mailing URL in the mailing.viewUrl token, instead of the mailing ID'), ), 'auto_recipient_rebuild' => array( 'html_type' => 'checkbox', 'title' => ts('Enable automatic CiviMail recipient count display'), 'weight' => 12, - 'description' => 'Enable this setting to rebuild recipient list automatically during composing mail. Disable will allow you to rebuild recipient manually.', + 'description' => ts('Enable this setting to rebuild recipient list automatically during composing mail. Disable will allow you to rebuild recipient manually.'), ), ), ); diff --git a/ang/crmMailing/EditRecipCtrl.js b/ang/crmMailing/EditRecipCtrl.js index 05d3e13c15..9fca637a73 100644 --- a/ang/crmMailing/EditRecipCtrl.js +++ b/ang/crmMailing/EditRecipCtrl.js @@ -35,10 +35,18 @@ $scope.getRecipientCount = function() { var ts = $scope.ts; - if ($scope.recipients === 0 || $scope.outdated) { - return $scope.permitRecipientRebuild ? ts('(unknown)') : ts('No Recipients'); + if ($scope.recipients === 0) { + return ts('No Recipients'); + } + else if ($scope.recipients > 0) { + return ts('~%1 recipients', {1 : $scope.recipients}); + } + else if ($scope.outdated) { + return ts('(unknown)'); + } + else { + return $scope.permitRecipientRebuild ? ts('(unknown)') : ts('Estimating...'); } - return ($scope.recipients === 1) ? ts('~1 recipient') : ts('~%1 recipients', {1 : $scope.recipients}); }; // We monitor four fields -- use debounce so that changes across the -- 2.25.1