From: Egon W. <e.w...@sc...> - 2005-05-24 13:19:26
|
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 |