Hi,

On Wed, Oct 8, 2008 at 11:19 PM, Robert Hanson <[EMAIL PROTECTED]> wrote:

> They have to be in separate packages. Once one class of a package is
> accessed, all classes of that package must be loaded. So each has to be in
> its own package. It's own name space.
>

Ok, it's easy to do by putting each translation in a sub package using the
language name.
I did it yesterday evening in a few minutes, the only thing that I still
need to do is to modify build.xml to create JmolApplet_i18n_xx.jar files
instead of JmolApplet_i18n.jar.



> BUT
>
> I have another idea.
>
> We don't necessarily have to use the gettext routines for creating classes
> this way. We could just have have flat property files and load them
> directly. Like we can do with menus. In essence, read the .po files
> directly.
>
> The class for Catalonian, for example, is 46K uncompressed, 22K compressed.
> The simple flat list of msgid/msgstr for that is 28K uncompressed. I don't
> see what the big deal is in creating a class to handle these. It's just a
> property table, really. Who needs a whole class?
>
> For example, we might consider just making the property files and then
> using a PropertyResourceBundle instead. (
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/PropertyResourceBundle.html
> ).
>
> I guess I don't see why it couldn't be simply a file on the host that is
> read when a language is accessed. If the file isn't there, it just isn't
> there. No translation.
>
> In fact, the signed applet or application could even just load these from
> sourceforge on the fly if we wanted that. No need to install ever.
>
> Bob
>

I think it requires more work to do this and a few problems to solve :
* parsing all the specific situations of a .po file : fuzzy, java-format,
translations on several lines, ...
* writing a correct .properties file when msgid contains special characters
(like '=')
* PropertyResourceBundle are not so nice, they tend to send a lot of
requests to the webserver

I'd like to try the multiple JmolApplet_i18n_xxx.jar files before going on
with more development.

Nico
-------------------------------------------------------------------------
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

Reply via email to