Closed Bug 511602 Opened 15 years ago Closed 15 years ago

import labs'/myk's StringBundle.js JS module into mailnews/core/utils

Categories

(MailNews Core :: Backend, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: asuth, Assigned: asuth)

References

()

Details

Attachments

(1 file)

We have come to the point where gloda needs to expose extensible parts of itself to the UI.  This means gloda and gloda plugins want an easy way to have localizations happen.

myk's StringBundle.js meets the goal of easy, since, apart from importing the module, getting a string bundle becomes a matter of 'new StringBundle("chrome://messenger/locale/gloda.properties")' or the like.

I believe this had been proposed some time ago, but for various reasons it petered out.

The review is really just a sign-off request rather than a review request... snowl and friends have been using the module for a while...

This has to go in mailnews/ because gloda lives there.
Attachment #395530 - Flags: superreview?(bienvenu)
Attachment #395530 - Flags: review?(bienvenu)
I know this is a straight import, but do we really need the "deprecated XBL binding-compatible API"?

That seems like we're just going to get people using the deprecated API because they've not read the docs properly - so why not just dump that bit.

That then just leaves a couple of wrappers - wouldn't this be much better for FUEL/STEEL/SMILE to do?
(In reply to comment #1)
> I know this is a straight import, but do we really need the "deprecated XBL
> binding-compatible API"?

No.
 
> That seems like we're just going to get people using the deprecated API because
> they've not read the docs properly - so why not just dump that bit.

That requires work and it seems preferable to not fork, even for the noblest of reasons.

> That then just leaves a couple of wrappers - wouldn't this be much better for
> FUEL/STEEL/SMILE to do?

Yes, although getting at Application from within a JS module is uglier than an import.  (But can be mitigated by introducing a "steel.js" module.)

I really want something that can land in the next few days and requires no work on my part.  If you have the time to implement it or know someone else who can, that would be great.  It is probably worth weighing the complexity where we are unlikely to be able to get authorization to land the change in the common FUEL/STEEL bit that lives in mozilla-central and would instead have to host it in STEEL and then migrate that to the trunk, etc.

To avoid this losing momentum, I'm going to declare that my patch is still in play until replaced by an alternate patch.  If you feel strongly about losing the deprecate part, please put a patch up with that.
Comment on attachment 395530 [details] [diff] [review]
add StringBundle.js to mailnews/core/utils

I had the same reaction as Standard8 about the deprecated part, but I'd rather have gloda land...
Attachment #395530 - Flags: superreview?(bienvenu)
Attachment #395530 - Flags: superreview+
Attachment #395530 - Flags: review?(bienvenu)
Attachment #395530 - Flags: review+
pushed (on August 20th, not sure why I didn't comment here...):
http://hg.mozilla.org/comm-central/rev/fa0e60d35748
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: