mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 15:26:07 +00:00
Bug #132159 --> Quick Search: Status text "1 matches found" is grammatically incorrect
patch by stephen walker r=neil sr=mscott
This commit is contained in:
parent
baf2466161
commit
1767cd52d8
@ -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);
|
||||
}
|
||||
};
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user