Why are properties translated in one project but not the other? [message #524149] |
Tue, 30 March 2010 22:39 |
Michael Moser Messages: 914 Registered: July 2009 |
Senior Member |
|
|
I have an odd effect, that I have two plugin projects with a plugin.xml and
plugin.properties file in each (one project was automatically created by the
EMF generator, the other is my own plugin).
For some odd reason, in the generated project all placeholders in the
properties.xml file are replaced by the corresponding values from the
..properties file, while in my own plugin this is not the case and all items
like perspective name, menu items, view category and name, etc. are always
labeled as "%placeHolderName", i.e. no properties-translation takes place.
Any idea, what could cause this? Is there some flag or option that needs to
be enabled in the project settings or programmatically to trigger this
..properties-translation? I compared all project settings in detail and
didn't find any difference that could explain this (to me at least...).
Michael
|
|
|
Re: Why are properties translated in one project but not the other? [message #524248 is a reply to message #524149] |
Wed, 31 March 2010 10:26 |
Ralf Ebert Messages: 168 Registered: July 2009 |
Senior Member |
|
|
Hi Michael,
> For some odd reason, in the generated project all placeholders in the
> properties.xml file are replaced by the corresponding values from the
> .properties file, while in my own plugin this is not the case and all
> items like perspective name, menu items, view category and name, etc.
> are always labeled as "%placeHolderName", i.e. no properties-translation
> takes place.
check the Bundle-Localization header in the MANIFEST.MF. If it's not specified, the
properties file has to be located at /OSGI-INF/l10n/bundle.properties. Before Eclipse 3.5
the default was to be at /plugin.properties. If you want this old behaviour, you have to
specify this in the manifest:
Bundle-Localization: plugin
Greetings,
Ralf
--
http://www.ralfebert.de/blog/eclipsercp/
|
|
|
|
Re: Why are properties translated in one project but not the other? [message #605328 is a reply to message #524149] |
Wed, 31 March 2010 10:26 |
Ralf Ebert Messages: 168 Registered: July 2009 |
Senior Member |
|
|
Hi Michael,
> For some odd reason, in the generated project all placeholders in the
> properties.xml file are replaced by the corresponding values from the
> .properties file, while in my own plugin this is not the case and all
> items like perspective name, menu items, view category and name, etc.
> are always labeled as "%placeHolderName", i.e. no properties-translation
> takes place.
check the Bundle-Localization header in the MANIFEST.MF. If it's not specified, the
properties file has to be located at /OSGI-INF/l10n/bundle.properties. Before Eclipse 3.5
the default was to be at /plugin.properties. If you want this old behaviour, you have to
specify this in the manifest:
Bundle-Localization: plugin
Greetings,
Ralf
--
http://www.ralfebert.de/blog/eclipsercp/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02164 seconds