On Jul 18, 2007, at 7:54 PM, Jeff Genender wrote:
So what is it, out of interest?
Using it now to get me started on the new i18n messages for the
validation rules I've whipped up. Spits out text like this:
<output>
# fail("MethodPermission", "methodPermission.noSuchEjbName",
method.getEjbName(), join(permission.getRoleName(), ","));
1.methodPermission.noSuchEjbName =
2.methodPermission.noSuchEjbName =
3.methodPermission.noSuchEjbName =
</output>
You then paste it into the right Messages.properties file and start
filling in text.
-David
Jeff
David Blevins wrote:
Sending this to the list for backup purposes :) Not intended to be
understood :)
I'm sure if I stick it in a script on my machine I'll loose it and
then
in another year when I want to do it again I'll never remember
where I
put it. I have no intention of supporting this, just trying to
save my
future self some time -- if you understand the technique, bonus :)
step 1. Do a regex find across files in intellij
step 2. In the results window, click Export To file and highlight/
copy
the chunk of text you want.
step 3. $ pbpaste | perl -pe 's/ *\([0-9]+ usages?\)//; s/^ */#
/;s/.*(fail|warn)/# $1/; ($n, $c) = /(fail|warn).*?, *\"(.*?)\"/;
$_ .=
"1.$c = \n2.$c = \n3.$c = \n\n" if $c' | pbcopy
step 4. paste into the Messages.properties file
-David