On 30.08.2020 22:19, michael michaud via Jump-pilot-devel wrote: > Ede, > The I18NPlug class I use in csv may not be the best way to internationalize > csv extension, but the problem is not there. > > I'll try to give a more complete description : > In OpenJUMP, SelectFilesOptionPanel internationalize option names as follows : > ~~~ > String label = I18N.get(loader.getClass().getName() + "."+ name); > ~~~ > But in case of extension like csv driver, > - I internationalize option names in the driver => SelectFilesOptionPanel try > to use these internationalized name as keys. It does not find any value for > these keys (especially in OpenJUMP language file), but as in this case, it > uses the key itself as a default value, everything looks OK in the UI (and a > warning is emitted because the key has not been found) -> it works, but it > sounds twisted
hmmm, ok now i understand. sounds it was never meant to work with external extensions but only loaders in core. > - If I do not translate option names in the extension, maybe I can do it from > SelectFilesOptionPanel with the categoryPrefixOrPath parameter (your > suggestion ?), but how will SelectFilesOptionPanel know which > categoryPrefixOrPath to use ? yeah, someone didn't have your use case in mind creating the code you described. not sure how to tackle this of the top of my hat. still you should switch I18N implementations, if only to get rid of the I18N class in the future ;) > - I thought that maybe it would be easier if SelectFilesOptionPanel was > using directly internationalized option name, so that it is the > responsability of the FileLoader to internationalize strings, not the > responsability of SelectFilesOptionPanel. But it means that Option names are > internationalized names. I'm not very comfortable with this idea either... let me think on it and come back with a suggestion in some days. will need to have a more detailed look at it. ..ede _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel