I had to do some exploring and experiments, so maybe this will help others.
To remove the juce T() macro can be a huge pain manually, and the best way seems to be a RegEx (regular expression). These notes are specific to Xcode, but it will be similar in any text editor that supports RegEx.
You’re going to search for:
And replace with
In the search, you have:
T(" - this searches for T(" - the paranthesis open is escaped, since it’s a special character in a regex.
b [/b] - this looks for any string, with . being any single character, and * being any number of them. The ? makes it non-greedy, so the first match of the next chunk will stop it. Without the ?, a line with multiple T() macros would be in one result together. The b[/b] parantheses surrounding the pattern makes regex ‘store’ the found characters as a sort of variable. We can use that in the replace.
") - this matches the end of a macro, with the paranthesis escaped, as before.
Replace is simply - “\1” - where the quote marks are literal, and \1 means 'the first variable you found in parantheses in the find operation. I understand some systems expect $1 instead, FYI.
It’s not perfect - I’m sure there’s patterns within a legal string that would cause a false positive, but it’s the simplest workable version.
To use in xcode, use the find in project dialog, set it to regular expression, and disable ignore case, so splat(“etc”) type strings don’t get caught. I recommend you use the ‘Selected Project Items’ choice, and in the left hand list of groups in your project, select only groups containing your files, not external files or text files.
Hope that helps!