Closed Bug 623169 Opened 14 years ago Closed 14 years ago

importDialog.js uses different strings to back-end code to try and work out what it is doing

Categories

(MailNews Core :: Import, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.3a2

People

(Reporter: standard8, Assigned: standard8)

Details

(Keywords: intl)

Attachments

(1 file)

Attached patch The fixSplinter Review
I noticed this during the .na2 cleanup.

For both vcard and comm4x we have code in importDialog.js that is comparing the selectedModuleName against a string obtained from importMsgs.properties.

However the selectedModuleName originates from the respective ::GetName function, and hence from vCardImportMsgs.properties and comm4xMailImportMsgs.properties.

So for the code to work properly, localisers have to realise that both names should match, and that they don't make a mistake with one of them. What's even better is that the names of the comm4x strings are so different, they are unlikely to realise.

It is therefore far better just to use one string as then we're guaranteed to get it right.

Note: vcard hasn't been released in a full build yet. comm4x has, but I took a brief look through the l10n repos and didn't spot any obvious errors.
Attachment #501298 - Flags: review?(neil)
Attachment #501298 - Flags: review?(bienvenu)
Attachment #501298 - Flags: review?(bienvenu) → review+
Comment on attachment 501298 [details] [diff] [review]
The fix

>-                    nsString name;
>-                    rv = m_pBundle->GetStringFromID( COMM4XMAILIMPORT_NAME, getter_Copies(name));
>+                    PRUnichar* name = nsnull;
>+                    rv = GetName(&name);
>+                    NS_ENSURE_SUCCESS(rv, rv);
>+
>+                    nsString nameStr;
>+                    nameStr.Adopt(name);
Just use rv = GetName(getter_Copies(name)); etc. r=me with that fixed.
Attachment #501298 - Flags: review?(neil) → review+
(In reply to comment #1)
> Just use rv = GetName(getter_Copies(name)); etc. r=me with that fixed.

Damn, I'm out of practice on my string foo.


Checked in with that fixed: http://hg.mozilla.org/comm-central/rev/d37bde1f44fc
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.3a2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: