I couldn’t seem to find any kind of tool or application that can automatically create a Juce translation file, based on your source code, for use with the LocalisedStrings class, so I made one myself! Its a very simple application, but I found it very useful so I thought I’d share it incase it could be useful for anyone else.
Its a very simple GUI app that searches through a directory or a single file for instances of the TRANS("") macro or translate("") function, extracts the String within the quotes that needs translating, and adds them to a correctly formatted LocalisedStrings translation file all ready to have translations added. It also allows Strings to be added to existing translation files without adding duplicates of strings already within the file.
However it only works for quoted text wrapped with the translate macro or function, not variables - not sure of the best way to handle this. Any suggestions? Maybe if any TRANS() or translate() instances with non-quoted text are found, it makes a note of the file and line number so you can manually add the String to the translation file afterwards.
Below is a link to the GitHub repo for the project which currently only has an Xcode build and an OS X binary of the application. I’m sure the more advanced programmers of you will find many flaws and inefficiencies in the code, but if it could be useful please take it and do as you will! Any feedback would be appreciated though.
Juce translation file generator - https://github.com/liamlacey/JUCE-Translation-File-Generator