зеркало из https://github.com/mozilla/pjs.git
Follow up to bug 293303 rework - if statements into a switch r=neil.parkwaycc.co.uk,sr=bienvenu
This commit is contained in:
Родитель
713b429f0a
Коммит
0e913e97be
|
@ -60,14 +60,16 @@ var gSearchAbViewListener = {
|
|||
},
|
||||
onCountChanged: function(total) {
|
||||
var statusText;
|
||||
if (total == 0)
|
||||
statusText = gAddressBookBundle.getString("noMatchFound");
|
||||
else
|
||||
{
|
||||
if (total == 1)
|
||||
switch (total) {
|
||||
case 0:
|
||||
statusText = gAddressBookBundle.getString("noMatchFound");
|
||||
break;
|
||||
case 1:
|
||||
statusText = gAddressBookBundle.getString("matchFound");
|
||||
else
|
||||
break;
|
||||
default:
|
||||
statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]);
|
||||
break;
|
||||
}
|
||||
gStatusText.setAttribute("label", statusText);
|
||||
}
|
||||
|
|
|
@ -60,14 +60,16 @@ var gSearchAbViewListener = {
|
|||
},
|
||||
onCountChanged: function(total) {
|
||||
var statusText;
|
||||
if (total == 0)
|
||||
statusText = gAddressBookBundle.getString("noMatchFound");
|
||||
else
|
||||
{
|
||||
if (total == 1)
|
||||
switch (total) {
|
||||
case 0:
|
||||
statusText = gAddressBookBundle.getString("noMatchFound");
|
||||
break;
|
||||
case 1:
|
||||
statusText = gAddressBookBundle.getString("matchFound");
|
||||
else
|
||||
break;
|
||||
default:
|
||||
statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]);
|
||||
break;
|
||||
}
|
||||
gStatusText.setAttribute("label", statusText);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче