Closed Bug 157979 Opened 22 years ago Closed 22 years ago

Need seperate header for printing

Categories

(MailNews Core :: Printing, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: yinglinxia, Assigned: nhottanscp)

References

(Depends on 1 open bug)

Details

(Keywords: l12y, Whiteboard: [ish1+][fixedish1])

Attachments

(1 file, 1 obsolete file)

Currently the mail printing header is sharing same strings with mail 
forward-as-attachment, in file mimeheader.properties. We need to seperate them, 
cause for localization, we need to keep the forward header in English, but 
localize the print header.
Keywords: l12y
This is mail specific.
Assignee: rods → nhotta
Product: Browser → MailNews
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
QA Contact: sujay → marina
This problem is found in bugscape bug 15671:

With the current Ja build, when a mail is printed out, the header lables, like
Subject: To: and etc. are still in English.
Please refer the following fixed i18n bug:
http://bugzilla.mozilla.org/show_bug.cgi?id=86980
and bug for l10n notes:
http://bugzilla.mozilla.org/show_bug.cgi?id=125446,

But please make sure the fix for this bug doesn't introduce regressions to bug 
14230

------- Additional Comment #4 From rchen@netscape.com 2002-07-17 10:49 -------

According to nhotta, we won't localized the header lables, like
Subject: To: and etc. They should be in English.

------- Additional Comment #5 From Naoki Hotta 2002-07-17 11:10 -------

That is true for message compose/send (for JA build). For message view/print, 
we
can localize them. I think the current problem is that the strings are shared
for view and compose.

------- Additional Comment #6 From Ying-Lin Xia 2002-07-17 13:48 -------

Right, I just made a test. The strings in file mimeheader.properties are shared 
by both print and forward-as-attachment. Which means we can not translate it 
now.
There is another file called "mime.properties" which also has "To", "From", etc.
Target Milestone: --- → mozilla1.2alpha
Blocks: 157673
Target Milestone: mozilla1.2alpha → ---
Whiteboard: [ish]
Whiteboard: [ish] → [ish1+]
I think I can change nsMimeBaseEmitter::MimeGetStringByName to get the string
differently based on 'mFormat' value. We want to avoid the localized strings to
be quoted and sent out (e.g. to the receiver who cannot handle the localized
strings).
The function currently uses mimeheader.properties. I can change it to use
mime.properties for quoting if we are sure that is not localized.
Basically, either mimeheader.properties or mime.properties has to stay unlocalized.


Comment on attachment 104195 [details] [diff] [review]
Use tranlated strings for headers if not quoting.

R=ducarroz
Attachment #104195 - Flags: review+
I think nsCRT::strcmp is deprecated, though it does check for null args, so if
the strings might be null, you could still use it, I guess.

doesn't this leak val? should we use nsXPIDLString?
+    PRUnichar *val = nsnull;
+
+    res = m_stringBundle->GetStringFromID(aID, &val);
+
+    if (NS_FAILED(res)) 
+      return nsnull;
+
+    return ToNewUTF8String(nsAutoString(val));
+  }
Attachment #104195 - Attachment is obsolete: true
Comment on attachment 104207 [details] [diff] [review]
Changed to use strcmp, fixed the leaks.

sr=bienvenu
Attachment #104207 - Flags: superreview+
Whiteboard: [ish1+] → [ish1+][fixedish1]
Target Milestone: --- → mozilla1.3alpha
checked in to the trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Depends on: 180372
No longer blocks: 157673
Product: MailNews → Core
Product: Core → MailNews Core
Depends on: 471487
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: