I have come up with pretty much the same approach, see the attached file...
If have also tested mine with the browser part, which uses a slightly different format (multiple vars, arrays etc.) There is also the audio player ui which uses a MessageFormat *inside* the "variable". I fell asleep after doing and shortly verifying this, but take a look at the attached files and let me know if it makes sense...
It contains the source code (is it readable enough?... it's still lots of regexes) as well as a proposed output (and folder structure).