Last Comment Bug 317096 - Allow SM to download localized dictionary from MailNews start page
: Allow SM to download localized dictionary from MailNews start page
Status: RESOLVED FIXED
: fixed1.8
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Message Display (show other bugs)
: Trunk
: All All
: -- trivial (vote)
: ---
Assigned To: Giacomo Magnini
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-19 02:42 PST by Giacomo Magnini
Modified: 2005-12-22 05:36 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Easy patch, as explained (1.76 KB, patch)
2005-11-19 02:43 PST, Giacomo Magnini
kairo: review-
Details | Diff | Review
Simplified approach (2.14 KB, patch)
2005-11-19 09:05 PST, Giacomo Magnini
no flags Details | Diff | Review
Robert, is this better? (2.25 KB, patch)
2005-11-20 03:36 PST, Giacomo Magnini
kairo: review+
Details | Diff | Review
Implemented Kairo suggestion. Same as before for the rest. (2.27 KB, patch)
2005-12-05 09:32 PST, Giacomo Magnini
iann_bugzilla: review+
kairo: review+
Details | Diff | Review
What Neil asked. (2.35 KB, patch)
2005-12-07 01:11 PST, Giacomo Magnini
prometeo.bugs: review+
neil: superreview+
iann_bugzilla: approval‑seamonkey1.0+
Details | Diff | Review

Description Giacomo Magnini 2005-11-19 02:42:08 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7
Build Identifier: 

Given the problems with redistribution of several localized dictionaries, provide a way of installing dictionaries licensed under a non compatible license (eg. GPL or LGPL only).


Reproducible: Always




Following on TB solution for this, add an empty identity to start.dtd and add it to start.xhtml: it will be empty (ie, not shown) for en-US, but can be localized for the other languages in some way.
Not sure if MT can deal with this, or localizers will have to manually edit the file, tho.
This is needed for having correct localizations, to avoid license problems and for parity with TB. ;)
Comment 1 Giacomo Magnini 2005-11-19 02:43:16 PST
Created attachment 203627 [details] [diff] [review]
Easy patch, as explained
Comment 2 Giacomo Magnini 2005-11-19 02:51:14 PST
This should be added (and adapted) by localizers to their langpack in start.dtd:

<!ENTITY extra.label '<script type="text/javascript">

<![CDATA[

function installDic(anchor)

{

   var params = {

       "Dictionary for xx-YY": {

           URL: anchor.getAttribute("href"),

           IconURL: "<url for install-spell.png>",

           toString: function() { return this.URL; }

       }

   }

   InstallTrigger.install(params);

}

]]>

</script>

<h2>Dictionaries</h2>

<p>To install the ZZZZZZ dictionary <a href="<url to localized spell.xpi file>" 

onclick="installDic(this);return false">click here</a>.</p><p>For additional information on dictionaries or for installing one in a different language 

<a 

href="<url for additional infos and/or additional dictionaries>">click here</a>.</p>

'>
Comment 3 Giacomo Magnini 2005-11-19 02:59:17 PST
Last comment and I'll shut up: we probably will want this for 1.0...
Sorry for bug spam and for the overlong previous comment.
Comment 4 Robert Kaiser (not working on stability any more) 2005-11-19 05:54:16 PST
Comment on attachment 203627 [details] [diff] [review]
Easy patch, as explained

This solution seems plain wrong to me, as this is very unclear to localizers (i.e. almost all localizers won't do it correctly, as they don't know what to do), as well as complex XHTML code should not go into a L10n .dtd file, the relevant code should be added to the content/ file (start.xhtml in this case) - it's much too easy for localizers to make mistakes there. Additionally, there might be people who download en-US and want to have additional dictionaries, so it might make sense for them to have the link as well. The next point is that it's easy for localizers to ship the dictionaries in their XPI and localized builds themselves, as I do in the German packages. And above all, the L10n note in your patch is in wrong format.
Comment 5 Giacomo Magnini 2005-11-19 06:18:42 PST
(In reply to comment #4)
The next point is that
> it's easy for localizers to ship the dictionaries in their XPI and localized
> builds themselves, as I do in the German packages.

While this is true (and I've done it myself until now), recent messages on the ng suggest (gerv?) that this may not be true anymore. For one, our dictionary can't be shipped in the LP for mozilla.org since the author has refused to relicense it, so it's strictly GPL/LGPL. This maybe true for most, if not all, of the dictionaries coming from OOo.

> And above all, the L10n note
> in your patch is in wrong format.

Didn't get this... It's a verbatim copy of TB equivalent.
Comment 6 Robert Kaiser (not working on stability any more) 2005-11-19 06:23:44 PST
(In reply to comment #5)
> While this is true (and I've done it myself until now), recent messages on the
> ng suggest (gerv?) that this may not be true anymore. For one, our dictionary
> can't be shipped in the LP for mozilla.org since the author has refused to
> relicense it, so it's strictly GPL/LGPL. This maybe true for most, if not all,
> of the dictionaries coming from OOo.

I think noone says that all contents of your XPI package need to be tri-license. For the L10n source in the mozilla.org code repository, this is different though, so it's right that we'll need to come to a good solution once we have our L10n source there as well, like TB does already.

> > And above all, the L10n note
> > in your patch is in wrong format.
> 
> Didn't get this... It's a verbatim copy of TB equivalent.

Well, then TB has a wrongly formatted L10n note there as well. I don't really wonder about crap code in their files ;-)
Comment 7 Giacomo Magnini 2005-11-19 09:05:44 PST
Created attachment 203641 [details] [diff] [review]
Simplified approach
Comment 8 Robert Kaiser (not working on stability any more) 2005-11-19 12:31:25 PST
This sounds better to me, at least as a first step - and it might even be doable for branch (as long as it goes in before Beta, which is planned to be feature and L10n freeze)...

I only would prefer if it would make clear what those dictionaries are for, so be sure to make up a text that somewhere mentions they are for the spell checker. Normal users might not know what dicitionaries in a mail program are for ;-)
Comment 9 Giacomo Magnini 2005-11-20 03:36:53 PST
Created attachment 203704 [details] [diff] [review]
Robert, is this better?
Comment 10 Robert Kaiser (not working on stability any more) 2005-12-05 05:52:31 PST
Comment on attachment 203704 [details] [diff] [review]
Robert, is this better?

This is good as an intermediate fix for me, though it would be nice to have a more complete solution one day, at least for trunk.
BTW, it might be even better to use a text like "...other languages, go to dictionaries.mozdev.org" (with that host name linked), as "click here" link labels are not really good style...
Comment 11 Giacomo Magnini 2005-12-05 09:32:21 PST
Created attachment 205053 [details] [diff] [review]
Implemented Kairo suggestion. Same as before for the rest.
Comment 12 neil@parkwaycc.co.uk 2005-12-06 16:14:07 PST
Comment on attachment 205053 [details] [diff] [review]
Implemented Kairo suggestion. Same as before for the rest.

How about "Many additional languages may be _installed_ from the _dictionaries_ project at _mozdev_" (linked as appropriate)?
Comment 13 neil@parkwaycc.co.uk 2005-12-06 16:15:16 PST
By the way, shouldn't someone ping the dictionaries project owner to tweak the instructions to mention SeaMonkey?
Comment 14 Giacomo Magnini 2005-12-07 01:11:04 PST
Created attachment 205208 [details] [diff] [review]
What Neil asked.

Pinging project maintainer right now...
Comment 15 Giacomo Magnini 2005-12-09 03:00:14 PST
Still no answer from the maintainer... Can someone else try to get in contact with him, too?
Comment 16 neil@parkwaycc.co.uk 2005-12-11 08:59:11 PST
Comment on attachment 205208 [details] [diff] [review]
What Neil asked.

Looks like nobody is willing to admit to better English qualifications than my 'B' at O-level :-P
Comment 17 Stefan [:stefanh] 2005-12-11 09:18:24 PST
Comment on attachment 205208 [details] [diff] [review]
What Neil asked.

Time is short here, but this is a safe fix that I believe we should take for beta. Not to mention that there's a string freeze soon... (3 days?)
Comment 18 Chris Thomas (CTho) [formerly cst@andrew.cmu.edu cst@yecc.com] 2005-12-11 09:55:13 PST
Comment on attachment 205208 [details] [diff] [review]
What Neil asked.

first a=me
Comment 19 Ian Neal 2005-12-11 10:35:11 PST
Comment on attachment 205208 [details] [diff] [review]
What Neil asked.

a=me, 2nd one :-)
Comment 20 Karsten Düsterloh 2005-12-11 13:17:09 PST
Checked in on trunk and 1.8 branch.
Comment 21 Karsten Düsterloh 2005-12-22 05:36:52 PST
Checked in on MOZILLA_1_8_0_BRANCH.

Note You need to log in before you can comment on or make changes to this bug.