Closed aarvid closed 7 years ago
Hello.
I don't think there's a better way. Your approach sounds correct. That's what I would do. Match translation variables on the parsed template representation.
Note that I've changed the internal parsing of translations. It is not :unparsed-translation-variable
anymore. I've switched it to :unparsed-translation
. Please look at the last commit of the repo.
You may want to release it as a separate project, or you can integrate it directly to Djula and make a pull request. I think it would be a useful thing in general to be integrated into Djula.
I will look into integrating it into djula given that it uses an internal function liable to change.
merged
I have a one-off project to generate and update cl-locale's message.lisp dictionary files from Djula Html Template files. I have decided to clean it up and release it figuring others could use it.
Currently the project uses the internal function
djula::parse-template-string
and searches for:unparsed-translation-variable
to find the strings that need to be translated.Is there a better way without accessing this internal function?