Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb committed Dec 4, 2017
1 parent 05752ee commit 44f6941
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CRM/Admin/Form/Preferences/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ public function preProcess() {
'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.'),
),
),
);
Expand Down
14 changes: 11 additions & 3 deletions ang/crmMailing/EditRecipCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44f6941

Please sign in to comment.