Closed Bug 293303 Opened 19 years ago Closed 19 years ago

In <ABSearchDialog.js>, "Warning: redeclaration of var statusText"

Categories

(MailNews Core :: Address Book, defect)

x86
All
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.9alpha1

People

(Reporter: sgautherie, Assigned: standard8)

References

Details

Attachments

(2 files)

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050503] (nightly) (W98SE)

{{
Warning: redeclaration of var statusText
Source File: chrome://messenger/content/ABSearchDialog.js
Line: 67, Column: 12
Source Code:
        var statusText = gAddressBookBundle.getString("matchFound");

Warning: redeclaration of var statusText
Source File: chrome://messenger/content/ABSearchDialog.js
Line: 69, Column: 12
Source Code:
        var statusText = gAddressBookBundle.getFormattedString("matchesFound",
[total]);
}}

Comes from
{{
1.12	scott%scott-macgregor.org	2004-01-27 09:32	 	Bug #132159 --> Quick Search:
Status text "1 matches found" is grammatically incorrect patch by stephen walker
r=neil sr=mscott
}}

http://lxr.mozilla.org/mozilla/source/mailnews/base/search/resources/content/ABSearchDialog.js#61
http://lxr.mozilla.org/mozilla/source/mail/base/content/ABSearchDialog.js#60

ThunderBird has the same bug !
Fixes coming up...
Assignee: mail → bugzilla
QA Contact: addressbook
Component: Address Book → MailNews: Address Book
Product: Mozilla Application Suite → Core
Simple patch to fix the warnings for both tb & sm.
Attachment #193205 - Flags: superreview?(bienvenu)
Attachment #193205 - Flags: review?(bienvenu)
Attachment #193205 - Flags: superreview?(bienvenu)
Attachment #193205 - Flags: superreview+
Attachment #193205 - Flags: review?(bienvenu)
Attachment #193205 - Flags: review+
Comment on attachment 193205 [details] [diff] [review]
Fix the warnings (checked in)

I would just have written one really big ?:?: ;-)
(In reply to comment #3)
> (From update of attachment 193205 [details] [diff] [review] [edit])
> I would just have written one really big ?:?: ;-)
> 
I don't mind short ones, just long ones can be a bit too much sometimes ;-)
Comment on attachment 193205 [details] [diff] [review]
Fix the warnings (checked in)

Just checked in:

/cvsroot/mozilla/mailnews/base/search/resources/content/ABSearchDialog.js,v 
<--  ABSearchDialog.js
new revision: 1.19; previous revision: 1.18
done
Checking in mail/base/content/ABSearchDialog.js;
/cvsroot/mozilla/mail/base/content/ABSearchDialog.js,v	<--  ABSearchDialog.js
new revision: 1.11; previous revision: 1.10
Attachment #193205 - Attachment description: Fix the warnings. → Fix the warnings (checked in)
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Follow up patch to change the if statements to a switch, requested by Neil.
Attachment #193330 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #193330 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #193330 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #193330 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #193330 - Flags: review+
Comment on attachment 193330 [details] [diff] [review]
Followup patch (checked in)

>+      default:
>+        break;

Nit: we could do without the break in the default case(s)...
IIRC Mozilla style specifies that the last case should always have a break too.
Attachment #193330 - Flags: superreview?(bienvenu)
Attachment #193330 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 193330 [details] [diff] [review]
Followup patch (checked in)

new revision: 1.20; previous revision: 1.19
done
Checking in mail/base/content/ABSearchDialog.js;
/cvsroot/mozilla/mail/base/content/ABSearchDialog.js,v	<--  ABSearchDialog.js
new revision: 1.12; previous revision: 1.11
Attachment #193330 - Attachment description: Followup patch → Followup patch (checked in)
Target Milestone: --- → mozilla1.9alpha
Verified FIXED using build 2005-09-10-05 on Windows XP SeaMonkey trunk with
strict JS warning enabled.
Status: RESOLVED → VERIFIED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: