Closed Bug 207550 Opened 21 years ago Closed 18 years ago

hardcoded ASCII strings in Junk logging / Filter logging code

Categories

(MailNews Core :: Internationalization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: yinglinxia, Assigned: smontagu)

References

(Blocks 1 open bug)

Details

(Keywords: fixed1.8.1, intl, l12y, Whiteboard: [adt2])

Attachments

(4 files, 4 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.4b) Gecko/20030506 Netscape/7.02+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.4b) Gecko/20030506 Netscape/7.02+

Please move this hardcoded string into en-US.jar, so l10n can translate it:

http://lxr.mozilla.org/seamonkey/source/mailnews/base/src/nsSpamSettings.cpp#479

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Keywords: l12y
nominating
Assignee: smontagu → ftang
Keywords: nsbeta1
actually i wanted to nominate anothet bug for Junk folder
Keywords: nsbeta1
still, we need this to be fixed as well,
nominating
Keywords: nsbeta1
Attached image screenshot JA
this is copied from bugscape bug http://bugscape/show_bug.cgi?id=28361
reassigning to Seth
Assignee: ftang → sspitzer
cc'ed rcloseirl
adt: nsbeta1+/adt2

Seth, can you work with the 18n/l10n folks to get this change in?  Thanks.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: nsbeta1nsbeta1+
Whiteboard: [adt2]
accepting, I'll fix this.

I think I might have an old dup of this.

something to note, we also have some old, hardcoded filter logging code.

the fix for the logging issues will be to nsMsgFilter::LogRuleHit() and
nsSpamSettings::LogJunkHit()

bobj/robinf this will require moving some strings from C++ to .properties.  does
that have a= from i18n at this stage?
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.4final
There's no help impact for this change.
when you fix, can you make the strings somthing like:
   # %1=author, %2=subject, %3=date
   messageID="Detected junk message from  %1 - %2 at %3\n";
   #%1=message, %2=folder
   messageID= "Move message id = %1 to %2\n";
this way, other languages can change the replacement symbol order in their needs.

thanks
> bobj/robinf this will require moving some strings from C++ to .properties.
> does that have a= from i18n at this stage?

Yes, a=bobj for UI change.  Thanks!
Summary: hardcoded string for Junk log → hardcoded ASCII strings in Junk logging / Filter logging code
in case anyone is watching that's not my final patch.  (it's got some testing
foo in junkLogDetectStr, and I still need to test.)
Keywords: intl
What happened with this path? Why is it not in the tree? 
It seems that you still forgot to fix the time notation format to the one used
by OS. See bug #201248.
Flags: blocking1.7a?
Flags: blocking1.7a? → blocking1.7a+
only drivers can set (+) blocking flags.  you can request (?) them.
Flags: blocking1.7a+
Flags: blocking1.7a?
is this patch ready to request reviews on?  lets get reviews and try for landing
in 1.7b
*** Bug 174843 has been marked as a duplicate of this bug. ***
Flags: blocking1.7a? → blocking1.7a-
Flags: blocking1.7b?
still needs some testing.  can anyone help to move the testing and patch along?
 think seth is swamped with other stuff...  thanks     if something shows before
1.7 final renominate
Flags: blocking1.7b? → blocking1.7b-
No longer blocks: 174843
Flags: blocking-aviary1.0RC1?
out of time for the pre-view release.  re-nominate if the testing happens
Flags: blocking-aviary1.0PR? → blocking-aviary1.0PR-
Product: MailNews → Core
Requesting blocking TB 2.
Flags: blocking-thunderbird2?
This patch likely doesn't apply anymore. From a l12y point of view, it looks like
the right thing to do, though. We'd like this for a2, due to the l10n impact.
Target Milestone: mozilla1.4final → ---
Assignee: sspitzer → smontagu
Status: ASSIGNED → NEW
Attachment #124918 - Attachment is obsolete: true
The merged patch seems to cause problems with filter logging: the actions dropdowns don't appear in the Filter Rules dialog, and the log doesn't get written. Junk mail logging seems fine.
nit, please chane the LOCALIZATION NOTES to LOCALIZATION NOTE?
(In reply to comment #24)
> The merged patch seems to cause problems with filter logging: the actions
> dropdowns don't appear in the Filter Rules dialog

This wasn't caused by the patch: it's bug 341010
Depends on: 341010
Seth, could you try to remember how the filterActionX stuff ended up to be used?
I.e., do we need to support grammar for those, too?
The patch just lost me a few times when trying to find that out.
Attached patch slightly enhanced version (obsolete) — Splinter Review
This is a more intelligent merge allowing for new filter actions that have been added in the meantime. It also fixes the bug with the log not being written, and adds localization of the dates.

I'll hold on review requests until I can test it after bug 341010 is fixed.
Attachment #225254 - Attachment is obsolete: true
Blocks: 191183
Comment on attachment 225322 [details] [diff] [review]
slightly enhanced version

It turns out that a patch was checked in some time ago for bug 341010, but it wasn't marked as fixed; I am no longer seeing the problem that I was seeing before.
Attachment #225322 - Flags: superreview?(mscott)
Attachment #225322 - Flags: review?(bienvenu)
Comment on attachment 225322 [details] [diff] [review]
slightly enhanced version

Thx very much for doing this!

r=bienvenu, with some nits:

+      mDateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID);
+      if (!mDateFormatter) {
+        return NS_ERROR_FAILURE;


won't do_CreateInstance return an rv as an out value when it fails? I'd prefer to return that rv instead of NS_ERROR_FAILURE.

the other thing is that I'd prefer the braces style to be this:

if (a)
{
  ...
}

which should be pretty much the prevailing style in this file.
*** Bug 191183 has been marked as a duplicate of this bug. ***
Comment on attachment 225322 [details] [diff] [review]
slightly enhanced version

should these strings be in filter.properties instead of messenger.properties?

We could use a space after the comma here:
+    NS_ENSURE_SUCCESS(rv,rv);

rest of it looks good modulo the suggestions David already made.
I think Scott's right about using filter.properties. With those changes, I think we're good. If you can attach a new patch, I can slap an r/sr on it. Thx!
Attachment #225322 - Attachment is obsolete: true
Attachment #233446 - Flags: superreview?
Attachment #233446 - Flags: review?
Attachment #225322 - Flags: superreview?(mscott)
Attachment #225322 - Flags: review?(bienvenu)
Attachment #233446 - Flags: superreview?(bienvenu)
Attachment #233446 - Flags: superreview?
Attachment #233446 - Flags: review?(bienvenu)
Attachment #233446 - Flags: review?
Comment on attachment 233446 [details] [diff] [review]
Patch addressing comments

looks good, thx a lot, Simon. One nit, which you can address or not, before you checkin, up to you:

+      if (actionType == nsMsgFilterAction::MoveToFolder)
+        rv = bundle->FormatStringFromName(
+          NS_LITERAL_STRING("logMoveStr").get(),
+          logMoveFormatStrings, 2,
+          getter_Copies(logMoveStr));
+      else // CopyToFolder
+        rv = bundle->FormatStringFromName(
+          NS_LITERAL_STRING("logCopyStr").get(),
+          logMoveFormatStrings, 2,
+          getter_Copies(logMoveStr));

this can be something like:

+        rv = bundle->FormatStringFromName(
+          actionType == nsMsgFilterAction::MoveToFolder ? NS_LITERAL_STRING("logMoveStr").get() : NS_LITERAL_STRING("logCopyStr").get(),
+          logMoveFormatStrings, 2,
+          getter_Copies(logMoveStr));
Attachment #233446 - Flags: superreview?(bienvenu)
Attachment #233446 - Flags: superreview+
Attachment #233446 - Flags: review?(bienvenu)
Attachment #233446 - Flags: review+
Checked in with the change from comment 35
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Because of thunderbirds latest improvements:

filterAction7 should be "starred"

filterAction8 should be "tagged"
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Am I right that the change from "labeled" to "tagged" should be made for both Seamonkey mail and Thunderbird, but the change from "flagged" to "starred" should only be made for Thunderbird?
Attachment #233952 - Flags: superreview?(bienvenu)
Attachment #233952 - Flags: review?(bienvenu)
Attachment #233952 - Flags: superreview?(bienvenu)
Attachment #233952 - Flags: superreview+
Attachment #233952 - Flags: review?(bienvenu)
Attachment #233952 - Flags: review+
Re TB vs SM for starred, I think that's up to the SM owners like Neil or Karsten
Checked in the correction.

> Re TB vs SM for starred, I think that's up to the SM owners like Neil or
> Karsten

The filter descriptions are now consistent with the menus in both versions so if they change they can all change together.

Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
not a stop ship bug but if Simon is interested in moving this to the branch we'd probably approve it.
Flags: blocking-thunderbird2? → blocking-thunderbird2-
Does l10n freeze not apply to thunderbird-2?
No, we haven't had our l10n freeze yet. We haven't even had our first beta yet :)
Attachment #237617 - Flags: approval-thunderbird2?
Attachment #237617 - Flags: approval-thunderbird2? → approval-thunderbird2+
Keywords: fixed1.8.1
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: