On Tuesday 24 May 2005 01:25 am, Daniel Leidert wrote:
> Please have a look and tell me your opinion. TODO-notes are at the
> beginning of the file.

Ok, Daniel and I got things worked out in CVS.

The new build-i18n.xml does the gettext extraction, po update stuff etc, and 
creates Messages_LANG.class files which are used by org.jmol.util.GT.java to
extract the right string.

So translators just have to update a .po file, using one of the many freely 
available and rather user friendly .po editors. No manual checking of updates 
in the main Jmol.properties required anymore.

For the developers this changes. Right now we have stuff in CVS like:

periodPanel.setBorder(new TitledBorder(
       JmolResourceHandler.translateX("AtomSetChooser.vector.period.label")));

Which uses  the Jmol.properties file as backend. With the new system this 
becomes:

periodPanel.setBorder(new TitledBorder(GT._("Period")));

So no longer the use of weird keys, adding strings to Jmol.properties etc. 
Just add the translatable text and be done with it.

If you have strings where something needs to be inserted in the text, use 
something like this:

System.out.println(GT._(
  "{0} is not a valid command!", new Object[] { someObject }
));

Egon


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to