[plug] Save a soul from scripting insanity...

Russell Steicke russells at plug.linux.org.au
Tue Aug 13 12:05:09 WST 2002


On Tue, Aug 13, 2002 at 11:38:11AM +0800, Russell Keith-Magee wrote:
> 
> Ok - I'm about to go mad (more so than normal).
> 
> I have a large number of Java source files, which contain a large number of
> function calls to a translation engine:
> 
> 	Translator.translate("Foobar");

Do you have the source to Translator?  If so you could modify it to save
each string it translates to a file.  This has two disadvantages: it isn't
guraranteed to cover all the translate() calls when you run the program,
and it doesn't meet your requirement for no human intervention.  Oops.

It really looks like you need to parse java source, rather than parse text
file (.java) contents.  Perhaps there's a java grammar and parser around
that you could grab and modify for this case?



More information about the plug mailing list