Hi,

Some more thoughts about internationalization problems

Today, one can see internationalization code in
1) final static fields (like MenuNames)
2) final static plugin fields (I did that more than one time)
3) object fields initialized in the class definition (I don't know if it is equivalent with an initialization made in the constructor) 4) object fields initialized at execution time for plugins (i think for some plugins, you duplicated code from 2 or 3 to the execution method to solve pb and I saw L. Becker let also internationalization in execute method for the buffer plugin)

I'm not sure it is necessary to execute I18N.get(key) at each execution.
IMHO
- we should avoid static fields (I have to review every plugin I worked on),
- we could let internationalization in class definition, where fields are declared (but as object fields, not static fields) or in contructors, except if we want to make dynamic language changes (without re-starting jump)
- we should initialize MenuNames fields somewhere in JUMP Configuration

I think also that JUMPWorkbench I18N option could be removed, as there is a standard and more robust way to choose the language with -Duser option.

any comment welcome

Michael

PS. I still cannot understand why there is a difference in 1.2D and NB about the top-menus defined in the MenuNames.



Stefan Steiniger a écrit :

Ok, now my 2cents:

- as far as i know the -Duser option was unknown before.
- we had before OJ 1.0 a lot of problems - that menus were mixed languages. The only ways we could avoid this a) using DUser option (that has been proposed when the mixup problem was repoted) b) make a second initialization for PlugIn-Names by use of getName() [at least i remember that i assign the strings a second time in initialize: btw: note also the hint by holger: http://openjump.org/wiki/show/Example+plugin+for+internationalization which i never tried - since i think i haven't done a plugin since that ever]

why the nightly-built does not work is also unclear to me.
With which nightly built did Pepe test? (that gives us a couple of days less to check - actually we got the new startup option?)

stefan

Michaël Michaud schrieb:


which are the codes for -Duser.language  that OJ
actuallt support?
en_EN is British English, I suppose. I tried
-Duser.language=de_DE and -Duser.language=fr_FR but it
seems not to work

Proper syntax appears to be

java -Duser.language=fr -Duser.region=FR
see also  http://www.exampledepot.com/egs/java.util/SetDefLocale.html

BTW everything works fine with -i18n in the OpenJUMP
1.2D stable version.

Hey you're right ! Really, I cannot explain that as I cannot imagine any modified code to explain this difference.
with 1.2D, de_DE woks fine, even for main menus
with NB, I get a mixture with default locale main-menus and de_DE menus-items

Michael

Peppe
Peppe


     ___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users





_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users


_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users



_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users

Reply via email to