Maybe walking the result of
(read-string (str "(" (slurp "somefile.clj") ")"))
On Wednesday, April 11, 2012 9:20:31 AM UTC-7, Mark Fredrickson wrote:
>
> Hello,
>
> I have a web survey/survey experiment written in Clojure. The survey is
> currently in English and needs to be translated into French as well. Since
> the program has a relatively short life span (only a few weeks) and to make
> life easiest for my translator, I figured my best solution would be to
> export all the strings embedded in the source into a .csv file. The
> translator could add a column for translations, and I could branch the code
> and make the changes.
>
> This seems like a great time to take advantage of Clojure's code-as-data
> structure, but the obvious choices for loading the source as data seem to
> all evaluate immediately. The best solution for me would be to get back a
> parse tree for each source file or namespace that I could walk/filter for
> the strings, even better if it had line numbers.
>
> Does anyone have suggestions where to look for such a tool? Would I just
> be better off writing a regex?
>
> Thanks,
> -Mark
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en