I added the method
GT.escapeHTML(String msg)
Translators do not need to do anything special in translating the HTML now.
If Angel wants, he can use á, although I think but he can just as
well just do as he has been doing for all Jmol translations.
Users can enter the page title in natural language format. Jmol will
automatically escape any special characters that are 2-byte Unicode into the
proper &#nnnn; codes.
Jonathan, if you edit the Java, just wrap any GT._(...) that is going to be
actual HTML text with GT.escapeHTML() -- so, for example,
GT.escapeHTML(GT._("To get a 3-D model you can manipulate, click {0}here{1}.
Download time may be significant the first time the applet is loaded.", new
String[] {"<a href=\"HREF\">", "</a>"})),
This way any 2-byte Unicode characters will be properly escaped.
Note that in the case of the title, which is first translated into the text
box, we don't wrap it at that point, only when we USE the text to put it
into the HTML:
html = TextFormat.simpleReplace(html, "@TITLE@",
GT.escapeHTML(webPageTitle.getText()));
Bob
On Sat, Aug 30, 2008 at 11:52 AM, Jonathan Gutow <[EMAIL PROTECTED]> wrote:
>
> On Aug 30, 2008, at 10:59 AM, Angel Herráez wrote:
> >
> >
> > I still have a doubt: does the original version, trans test es
> > 2.html
> > look also wrong for you when read it from local disk? Are you using
> > Mac?
> I get the same result locally on a mac. I haven't tried the files
> locally on Linux or Windows.
>
> > OK, here's another simple possibility. We simply change those
> > character codes entered by the translator or user that are going to
> > HTML by converting them to the hex value:
> >
> > á
> >
> >
> > for example. That way it's our job, not the translator's or user's
> > job, to manage this.
> >
> I'm inclined to just use the entity codes and let people figure it
> out if their server has problems. I have a server that I have
> control of the settings on. If I have a chance I will try it there,
> but since the users this is aimed at are unlikely to have control of
> their server, I'm not sure it matters. For the time being, I think
> we should just leave it as it is. Let's just depend on Angel's
> documentation on the wiki. If it causes problems we can revisit
> this. I also suspect that the way browsers handle characters will
> continue to evolve.
>
> Jonathan
> Dr. Jonathan H. Gutow
> Chemistry Department [EMAIL PROTECTED]
> UW-Oshkosh Office:920-424-1326
> 800 Algoma Boulevard FAX:920-424-2042
> Oshkosh, WI 54901
> http://www.uwosh.edu/faculty_staff/gutow/
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers