Closed Bug 46684 Opened 24 years ago Closed 24 years ago

File Types are not localizable in Save as dialog

Categories

(Core :: Internationalization, defect, P2)

x86
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla0.8

People

(Reporter: teruko, Assigned: shanjian)

References

Details

(Keywords: l12y)

File types in "Save as" dialog are displayed as "..." Steps of reproduce 1. Open Composer 2. Type something in Composer 3. Select menu File|Save As... In the "Save as" dialog, Japanese File type lists are displayed as "...". Japanese File type are displayed correctly in Open File dialog. Tested 2000-07-21 Win32 Ja build. This bug was logged in bugscape 1636. We found this is I18n bug. I put Frank's last comment from the bugscape 1636. ------- Additional Comments From ftang@netscape.com 2000-07-27 12:40 ------- I think the problem code is in http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsFileWidget.cpp#48 120 GetFilterListArray(filterList); 121 char *filterBuffer = filterList.ToNewCString(); 122 char *title = ConvertToFileSystemCharset(mTitle.GetUnicode()); 123 if (nsnull == title) We should change line 121 to 121 char *filterBuffer = ConvertToFileSystemCharset(filterList.GetUnicode()); 124 title = mTitle.ToNewCString();
Since "filterList" contains array of string, we need to convert all of them not just first one (see nsFileWidget::GetFilterListArray). Also nsFileWidget for other platform may have similar conversion problem.
I already reported this bug and send a patch in 2000/5/14. dup of bug 39234
add me to CC.
Addtional information. My patch don't use nsIFileWidget. And there is same bug in <INPUT TYPE="FILE"> ... But nsIFileWidget is obsolete class. We should not use nsIFileWidget.
Depends on: 39234
we need to fix this to make it localizable. Either we take 39234 and make sure no other code use nsFileWidget or we we fix in here.
Status: NEW → ASSIGNED
Keywords: correctness, nsbeta3
nsbeta3+ per i18n bug meeting
Whiteboard: [nsbeta3+]
Whiteboard: [nsbeta3+] → [nsbeta3+]ETA:8/4
Index: nsFileWidget.h =================================================================== RCS file: /m/pub/mozilla/widget/src/windows/nsFileWidget.h,v retrieving revision 3.18 diff -u -r3.18 nsFileWidget.h --- nsFileWidget.h 2000/01/28 00:30:51 3.18 +++ nsFileWidget.h 2000/08/03 19:21:26 @@ -82,7 +82,7 @@ protected: static void GetFileSystemCharset(nsString & fileSystemCharset); - char * ConvertToFileSystemCharset(const PRUnichar *inString); + char * ConvertToFileSystemCharset(const PRUnichar *inString, PRInt32 inLength=-1); PRUnichar * ConvertFromFileSystemCharset(const char *inString); HWND mWnd; Index: nsFileWidget.cpp =================================================================== RCS file: /m/pub/mozilla/widget/src/windows/nsFileWidget.cpp,v retrieving revision 3.35 diff -u -r3.35 nsFileWidget.cpp --- nsFileWidget.cpp 2000/06/26 21:16:01 3.35 +++ nsFileWidget.cpp 2000/08/03 19:21:26 @@ -118,7 +118,7 @@ nsString filterList; GetFilterListArray(filterList); - char *filterBuffer = filterList.ToNewCString(); + char *filterBuffer = ConvertToFileSystemCharset(filterList.GetUnicode(), filterList.Length()); char *title = ConvertToFileSystemCharset(mTitle.GetUnicode()); if (nsnull == title) title = mTitle.ToNewCString(); @@ -391,7 +391,7 @@ } //------------------------------------------------------------------------- -char * nsFileWidget::ConvertToFileSystemCharset(const PRUnichar *inString) +char * nsFileWidget::ConvertToFileSystemCharset(const PRUnichar *inString, PRInt32 inLength) { char *outString = nsnull; nsresult rv = NS_OK; @@ -409,7 +409,8 @@ // converts from unicode to the file system charset if (NS_SUCCEEDED(rv)) { - PRInt32 inLength = nsCRT::strlen(inString); + if(inLength < 0) + inLength = nsCRT::strlen(inString); PRInt32 outLength; rv = mUnicodeEncoder->GetMaxLength(inString, inLength, &outLength); if (NS_SUCCEEDED(rv)) {
Whiteboard: [nsbeta3+]ETA:8/4 → [nsbeta3+]ETA:8/4. Fix in hand. Need review
fix check in for M18 tip. rchen- please change the japanese localization form English to Japanese.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified as fixed in 2000-09-29-MN6 Win32 JA build.
Status: RESOLVED → VERIFIED
This is fixed on only Windows. This is not fixed in Linux build. The bug for Linux localized version is http://bugscape/show_bug.cgi?id=3464 I reopen this bug.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Teruko san, does this bug occur on Composer?
Added nsbeta1 and intl keywords.
Keywords: intl, nsbeta1
Keywords: intll12y
reassign this to shanjian and cc bstell. The window problem is gone. teruko, is this a problem on Mac? Mark it as Moz0.8 P2.
Assignee: ftang → shanjian
Status: REOPENED → NEW
Keywords: nsbeta3intl
OS: All → Linux
Priority: P3 → P2
Hardware: All → PC
Whiteboard: [nsbeta3+]ETA:8/4. Fix in hand. Need review
Target Milestone: --- → mozilla0.8
This is Linux problem. Save as dialog in Mac is different from the one in Windows and Linux build. I do not see the file type in Save as dialog in Mac build.
Teruko-san, can you reproduce this using latest build? Because Compoer's filepicker is changed to nsIFilePicker at 2001/01/09.
*** Bug 65767 has been marked as a duplicate of this bug. ***
Keywords: intl
I tested this in 200101904 Mtrunk Win32 and Linux build. I put the Japanese characters in the filepicker.properties file of en-US.jar file, then converted to unicode. Japanese file type names are displayed correctly. I mark this bug as fixed.
Status: NEW → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.