If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

VERIFIED FIXED in mozilla1.9alpha1

Status

MailNews Core
Address Book
--
minor
VERIFIED FIXED
13 years ago
9 years ago

People

(Reporter: sgautherie, Assigned: standard8)

Tracking

Trunk
mozilla1.9alpha1
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

13 years ago
[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 !
(Assignee)

Comment 1

12 years ago
Fixes coming up...
Assignee: mail → bugzilla
QA Contact: addressbook
(Assignee)

Updated

12 years ago
Component: Address Book → MailNews: Address Book
Product: Mozilla Application Suite → Core
(Assignee)

Comment 2

12 years ago
Created attachment 193205 [details] [diff] [review]
Fix the warnings (checked in)

Simple patch to fix the warnings for both tb & sm.
Attachment #193205 - Flags: superreview?(bienvenu)
Attachment #193205 - Flags: review?(bienvenu)

Updated

12 years ago
Attachment #193205 - Flags: superreview?(bienvenu)
Attachment #193205 - Flags: superreview+
Attachment #193205 - Flags: review?(bienvenu)
Attachment #193205 - Flags: review+

Comment 3

12 years ago
Comment on attachment 193205 [details] [diff] [review]
Fix the warnings (checked in)

I would just have written one really big ?:?: ;-)
(Assignee)

Comment 4

12 years ago
(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 ;-)
(Assignee)

Comment 5

12 years ago
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)
(Assignee)

Updated

12 years ago
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

12 years ago
Created attachment 193330 [details] [diff] [review]
Followup patch (checked in)

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)

Updated

12 years ago
Attachment #193330 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #193330 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #193330 - Flags: review+
(Reporter)

Comment 7

12 years ago
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)...

Comment 8

12 years ago
IIRC Mozilla style specifies that the last case should always have a break too.
(Assignee)

Updated

12 years ago
Attachment #193330 - Flags: superreview?(bienvenu)

Updated

12 years ago
Attachment #193330 - Flags: superreview?(bienvenu) → superreview+
(Assignee)

Comment 9

12 years ago
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)
(Reporter)

Updated

12 years ago
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.