diff --git a/mail/base/content/ABSearchDialog.js b/mail/base/content/ABSearchDialog.js index e29a5158ed2a..edbcc6961d66 100644 --- a/mail/base/content/ABSearchDialog.js +++ b/mail/base/content/ABSearchDialog.js @@ -58,7 +58,15 @@ var gSearchAbViewListener = { onSelectionChanged: function() { }, onCountChanged: function(total) { - var statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + if (total == 0) + var statusText = gAddressBookBundle.getString("noMatchFound"); + else + { + if (total == 1) + var statusText = gAddressBookBundle.getString("matchFound"); + else + var statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + } gStatusText.setAttribute("label", statusText); } }; diff --git a/mail/components/addrbook/content/addressbook.js b/mail/components/addrbook/content/addressbook.js index 6a74cff08f98..4ab395be683f 100644 --- a/mail/components/addrbook/content/addressbook.js +++ b/mail/components/addrbook/content/addressbook.js @@ -575,8 +575,17 @@ function SetStatusText(total) try { var statusText; - if (gSearchInput.value) - statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + if (gSearchInput.value) { + if (total == 0) + statusText = gAddressBookBundle.getString("noMatchFound"); + else + { + if (total == 1) + statusText = gAddressBookBundle.getString("matchFound"); + else + statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + } + } else statusText = gAddressBookBundle.getFormattedString("totalCardStatus", [gAbView.directory.dirName, total]); diff --git a/mailnews/addrbook/resources/content/addressbook.js b/mailnews/addrbook/resources/content/addressbook.js index 49ed57b3dd93..f8f1bc0db7be 100644 --- a/mailnews/addrbook/resources/content/addressbook.js +++ b/mailnews/addrbook/resources/content/addressbook.js @@ -564,8 +564,17 @@ function SetStatusText(total) try { var statusText; - if (gSearchInput.value) - statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + if (gSearchInput.value) { + if (total == 0) + statusText = gAddressBookBundle.getString("noMatchFound"); + else + { + if (total == 1) + statusText = gAddressBookBundle.getString("matchFound"); + else + statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + } + } else statusText = gAddressBookBundle.getFormattedString("totalCardStatus", [gAbView.directory.dirName, total]); diff --git a/mailnews/addrbook/resources/locale/en-US/addressBook.properties b/mailnews/addrbook/resources/locale/en-US/addressBook.properties index 14655e4280e1..f3715b616d07 100644 --- a/mailnews/addrbook/resources/locale/en-US/addressBook.properties +++ b/mailnews/addrbook/resources/locale/en-US/addressBook.properties @@ -95,6 +95,8 @@ ldap_2.servers.history.description=Collected Addresses ## %1$S is address book name, %2$S is card count totalCardStatus=Total Cards in %1$S: %2$S ## LOCALIZATION NOTE (matchesFound): do not localize %S +noMatchFound=No matches found +matchFound=1 match found matchesFound=%S matches found cardsCopied=%S cards copied cardCopied=1 card copied diff --git a/mailnews/base/search/resources/content/ABSearchDialog.js b/mailnews/base/search/resources/content/ABSearchDialog.js index 0bc4f87a8cbb..e8d97cd2f357 100644 --- a/mailnews/base/search/resources/content/ABSearchDialog.js +++ b/mailnews/base/search/resources/content/ABSearchDialog.js @@ -58,7 +58,15 @@ var gSearchAbViewListener = { onSelectionChanged: function() { }, onCountChanged: function(total) { - var statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + if (total == 0) + var statusText = gAddressBookBundle.getString("noMatchFound"); + else + { + if (total == 1) + var statusText = gAddressBookBundle.getString("matchFound"); + else + var statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); + } gStatusText.setAttribute("label", statusText); } };