I18N - Proposal for managing the resource bundles

Jay Shaughnessy jshaughn at redhat.com
Tue May 31 14:26:44 UTC 2011


This is relevant for anyone writing GUI code or performing localization.

Last Friday I wanted to add and remove some messages while working on 
the resource factory wizard (for creating child resources).  I quickly 
realized that folks out there have been doing localization (thanks!) 
because there are now several local-specific files.

This of course makes it more challenging to add/remove/change properties 
as each file needs to be touched.  So, after a little searching I found 
an Eclipse plugin that does just what I wanted, manages all the resource 
bundles through a special Eclipse UI.  I used this and quickly made the 
changes I wanted.

But there was a catch, and I should have seen it coming.  The IDE plugin 
basically now manages the underlying resource bundle files.  After 
committing the changes to Git I realized that it had reordered the files 
(alphabetically).    This completely throws off the previous structure 
of the file and the existing comment placement.

Instead of reverting I've decided to promote the change and would like 
to solicit feedback.  I think moving forward it will be much easier to 
use the IDE plugins for resource bundle handling.  And I know that 
IntelliJ also has a resource bundle feature/plugin.  I've started a wiki 
page for this, to discuss the different IDE setup and to collect 
conventions for working on the resource bundles. It's here:

   http://rhq-project.org/display/RHQ/Working+with+the+Resource+Bundles

In short, working with the plugin makes it much easier to manage the 
several files in play, to locate undefined properties, and to quickly 
compare the default to the localized strings.  The alphabetical 
structure is actually better, I think, even when inspecting the files 
outside of the plugin view, because the hierarchical property names 
provide structure already. In fact, the plugin can give you a tree view 
using that structure.

So, I propose from this point forward the resource bundles be 
manipulated only (at least by devs, if not localizers as well) via 
Eclipse or IJ resource bundle plugins.  Please let me know your thoughts 
and/or proposed conventions.  Thanks, Jay



More information about the rhq-devel mailing list