jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Metske" <harry.met...@gmail.com>
Subject Re: New migration tool coming
Date Wed, 14 Jan 2009 17:11:43 GMT

assuming you don't want to have message keys in both locations, I would
think that "move" is the best choice, with the option to specify a new name:

BundleMigrator error.oldname error.newname

- this should delete the error.oldname from
i18n/templates/default*.properties (can you also handle the non-ASCII keys
in the Chinese and Russian version ?)
- create new key with error.newname in CoreResources*.properties (with the
same value as in the old ones)
- search in java source and JSP's and change occurrences of error.oldname to
error.newname ?

(or I have not understood the intention of the BundleMigrator off course :-)


2009/1/14 Andrew Jaquith <andrew.r.jaquith@gmail.com>

> All--
> I got frustrated with the labor intensiveness of moving and renaming
> message keys in all of our localized bundles, so I decided to do
> something about it. Last night I coded up 'BundleMigrator', which will
> copy, move, rename or delete message keys from or between resource
> bundles, in bulk.
> The core code works beautifully, though there's no interface per se.
> Tonight I'll write a command-line interface. Any preferences? I'm
> thinking of something like this:
> BundleMigrator rename src/i18n/CoreResources error.oldname error.newname
> BundleMigrator delete src/i18n/CoreResources error.oldname
> BundleMigrator copy src/i18n/CoreResources src/i18n/templates/default
> error.oldname
> BundleMigrator move src/i18n/CoreResources src/i18n/templates/default
> error.oldname
> Another consideration: because we also have the ability to parse and
> modify JSPs (JSPMigrator), it would also be a fairly simple thing to
> add a 'find' command:
> BundleMigrator -jsp src/webdocs find error.oldname
> ...although grep works pretty well for this also.
> Thoughts?
> Andrew

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message