Quantcast

Use a custom Bundle.properties file stored in external library

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Use a custom Bundle.properties file stored in external library

winder
I'm porting a swing app into netbeans platform which has a few hundred strings already localized to about 20 languages (and an existing SaaS framework to assist with keeping these files up to date). I would like to continue using these strings without splitting them up into separate Bundle.properties files for each package.

My existing properties files are in a library jar which I've included as a project dependency with resources named like MessagesBundle_en_US.properties. I've updated OpenIDE-Module-Localizing-Bundle accordingly:
OpenIDE-Module-Localizing-Bundle: resources/MessagesBundle_en_US.properties

Dispite that it seems that the original Bundle.properties file is still required:
com/willwinder/ugs/nbp/core/actions/StartAction.java:[51,13] error: Cannot find resource com/willwinder/ugs/nbp/core/actions/Bundle.properties

Also, even though there are no references anywhere to Bundle.properties in the IDE the @ActionRegistration annotation has an inline error stating "No key 'my-key' found in path.to.this.package.Bundle"

Is it possible to change the name/location of Bundle.properties?




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Use a custom Bundle.properties file stored in external library

Emilian Bold-2
> Is it possible to change the name/location of Bundle.properties?

I'm not certain it is possible.

Still, you could either:

1. generate the Bundle.properties at build-time or
2. patch the NetBeans Platform and compile it yourself



--emi

On Sun, Apr 23, 2017 at 7:26 PM, winder <[hidden email]> wrote:
I'm porting a swing app into netbeans platform which has a few hundred strings already localized to about 20 languages (and an existing SaaS framework to assist with keeping these files up to date). I would like to continue using these strings without splitting them up into separate Bundle.properties files for each package.

My existing properties files are in a library jar which I've included as a project dependency with resources named like MessagesBundle_en_US.properties. I've updated OpenIDE-Module-Localizing-Bundle accordingly:
OpenIDE-Module-Localizing-Bundle: resources/MessagesBundle_en_US.properties

Dispite that it seems that the original Bundle.properties file is still required:
com/willwinder/ugs/nbp/core/actions/StartAction.java:[51,13] error: Cannot find resource com/willwinder/ugs/nbp/core/actions/Bundle.properties

Also, even though there are no references anywhere to Bundle.properties in the IDE the @ActionRegistration annotation has an inline error stating "No key 'my-key' found in path.to.this.package.Bundle"

Is it possible to change the name/location of Bundle.properties?





Loading...