Closed Bug 36483 Opened 20 years ago Closed 19 years ago

AddressBook: DE: Import window title is hardcoded.

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 39036

People

(Reporter: Burnsjo, Assigned: tonyr)

References

Details

(Whiteboard: [nsbeta2-])

Bug : The Import window title in the "Address Book" Componant of Netscape 6 is 
hardcoded and cannot be localised for the Beta build.

Steps to repro:
1. Launch The "Address Book" Componant of Netscape 6.
2. Click on the "File" ("Datei") Menu.
3. Click on "Import" ("Importieren")

The title of the window that shows is "Open File". This should be localisable.
Keywords: de
QA Contact: lchiang
Scott - does this really belong to you?
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: rchen
it looks like this is happening in AB backend code.  reassigning to chuang.
Assignee: putterman → chuang
Target M17.
Target Milestone: --- → M17
The "Import..." has switching to use import utility.  "Open File" has changed to 
"Select Address Book File".  It should put in properties file and use 
GetBundleString() in importDialog.js.
Assignee: chuang → tonyr
The problem isn't really gone away. I found the following lines with strings 
hardcoded in importDialog.js. Please move them to properties file:

filePicker.chooseInputFile( "Select settings file", filePicker.eAllFiles, null, 
null);
filePicker.chooseDirectory( "Select mail directory");
filePicker.chooseDirectory( "Select address book directory");
filePicker.chooseInputFile( "Select address book file", filePicker.eAllFiles, 
null, null);
				
										
						
Blocks: 12394
Keywords: densbeta2
Putting on [nsbeta2-] radar.  
Whiteboard: [nsbeta2-]
If we don't fix this bug, we won't be able to localize the title of the window. 
The fix is simple and reliable.
removing nsbeta2-. rchen can fix it and give the file to the owner ffor  
checkin. deal?
Whiteboard: [nsbeta2-]
tonyr, do you prefer me to fix it or you can do it? I will give you the patch to 
checkin if I fix it. 
Putting on [nsbeta2+] radar.
Whiteboard: [nsbeta2+]
Group: netscapeconfidential?
Just waiting on a simple code review before checking in the fix.
Status: NEW → ASSIGNED
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Adding verifyme keyword.
Keywords: verifyme
I reopen the bug because...

The strings are in importMsg.properties. But after I localized them in unicode. 
They are not displayed correctly. Here is the sample data, I replace "directory" 
with two Japanese:

ImportSelectAddrFile=Select address book \u30a2\u30c9
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Per today's PDT mtg, moving from [nsbeta2+] to [nsbeta2-]

Localizabiity bug to be fixed before UI freeze.
Keywords: nsbeta3
Whiteboard: [nsbeta2+] → [nsbeta2-]
What does "not displayed correctly" mean?  The strings are loaded from the 
.properties file using nsIStringBundle.GetStringFromName.  There's really nothing 
else I can do with it.
Ftang, can you help tonyr? I believe it is very close, It might be just the 
unicode handling issue. 
remove [nsbeta2-]
>Localizabiity bug to be fixed before UI freeze.
We are shipping a Japanese nsbeta2 the same day we ship English nsbeta2. 
Localizability problem have to be fixed before nsbeta2.
Assignee: tonyr → ftang
Status: REOPENED → NEW
Whiteboard: [nsbeta2-]
Status: NEW → ASSIGNED
The problem is the current code use nsFileSpecWithUI as file picker while we 
should move to use nsIFilePicker instead. The nsFileSpecWithUI interface does 
not support unicode. 
reassign back to tonyr@fbdesigns.com
tonyr- please switch your nsIFileSpecWithUI code to nsIFilePicker. Currently, 
most of the code in mozilla are already switch to nsIFilePicker except some code 
in mailnews and addressbook.

Please talk to law@netscape.com and pavlov@netscape.com about how to switch the 
code from nsIFileSpecWithUI to nsIFilePicker.

The problem code which using nsIFileSpecWithUI is under 
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/import/resources/co
ntent/importDialog.js

There are 3 places in this javascript file have this problem
/mailnews/import/resources/content/importDialog.js, line 453 -- filePicker = 
filePicker.QueryInterface(
Components.interfaces.nsIFileSpecWithUI);
/mailnews/import/resources/content/importDialog.js, line 526 -- filePicker = 
filePicker.QueryInterface(
Components.interfaces.nsIFileSpecWithUI);
/mailnews/import/resources/content/importDialog.js, line 617 -- filePicker = 
filePicker.QueryInterface(
Components.interfaces.nsIFileSpecWithUI);

law, can you help ?
Assignee: ftang → tonyr
Status: ASSIGNED → NEW
Here's a link to an example of JS code that calls nsIFilePicker:

http://lxr.mozilla.org/seamonkey/source/xpfe/components/ucth/resources/helperApp
Launcher.js#134
Bill- thanks. some of tonyr's code need to pass nsIFileSpec to native code. How 
can we get nsIFileSpec from nsIFilePicker (indirectly) ?
nsIFile and nsILocalFile have methods/attributes that get the path name.  That
might be what you need for calling native code, but you can also use it to
construct an nsIFileSpec.  There's code in nsStreamTransfer.cpp that does that,
I think.
Putting on [nsbeta2-] radar. Not critical to beta2. 
Whiteboard: [nsbeta2-]
As long as I can convert an nsIFile to an nsIFileSpec in JS, this should be easy 
to fix.
Status: NEW → ASSIGNED


*** This bug has been marked as a duplicate of 39036 ***
Status: ASSIGNED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
tonyr: are you sure this is a duplicate? please verify/reopen this bug.
Hello world? That other bug's summary is "Linux filepicker or file:// view
doesn't show hidden directories or files". I can't see how that is supposed to
be a duplicate of this?
2000-09-27 15:12:19 bryner@netscape.com changed bug 39036 short_desc:
Import addressbook open dialog doesn't show hidden directories or files => 
Linux filepicker doesn't show hidden directories or files.
.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.