views:

154

answers:

1

Hi,

I have created 2 plugins, implementing an ODA driver plugin and its UI plugin for the BIRT extension to Eclipse.

My plugins both work as expected when eclipse starts up another eclipse application where I can then test the plugins I am developing. However, when I install my plugins into an Eclipse application and then start it from a Windows shortcut, the plugins work but and language keys specified in the plugin.xml files are not found.

For example, in my plugin.xml file for the ODA Driver plugin I set the attributes 'id' to '%oda.data.source.id' and the data source 'defaultDisplayName' to '%data.source.name'. I then, in a file 'language.properties', have defined the values for both of these keys (where the keys don't have the preceeding % character).

When running the plugins that have been installed into the dropins/plugins directory of an Eclipse application, the wizard for creating my ODA data source names is as '%data.source.name' and saves the data source in the rptdesign (XML) file with an ID of '%oda.data.source.id'.

Since 'language' is not the default name for the properties file I went into the manifest for both plugins and changed the 'Bundle-Localization' attribute to 'language'. The language file is located in the root directory of both of my plugins.

The properties file is definitely found, since I use the two language files to store other strings used by the plugins, looked up using a java ResourceBundle. The strings are always found whether the plugins are run from Eclipse application loading another, or when properly installed in the dropins/plugins directory of an Eclipse application.

Why are the installed plugins not finding language keys reference in the plugin.xml files? There are not errors in the logs and the language.properties files are clearly accessible...

Thanks in advance.

+1  A: 

It should work. The plugin manifest file should have a line:

Bundle-Localization:language

and at the toplevel of your plugin put the different translations of your property file, like

language_en_US.properties
language_fr.properties
language_ja_JP.properties

I've got once an (silent) error with a property file, because of the BOM prefix in file. Since then, I always put a comment at first line (starting with #) to be sure the OS is not getting in the way... Also check the newline is correct without a \ before, encoding is unicode, etc.

Good luck!

kabado