Jucer and TRANS macro


#1

Hi !

In order to have the jucer support Juce’s translation, I changed a line in jucer_UtilityFunctions.cpp

Line 128 :

is now :

This way, generated code uses macro TRANS instead of T.

Maybe that would be worth commiting, as, as far as I know, this doesn’t change anything, except, for those who add translation features to their apps ?


#2

Hacking that function means that all strings will be translated, even ones that weren’t designed to be translated - that could break things in subtle, impossible-to-debug ways if you happen to provide a translation that matches a string that’s being used internally for a particular purpose, so it’s not really a safe thing to do…


#3

Woops, yeah I noticed that later :confused:
Gotta find a more subtle way to hack it then :slight_smile:


#4

We added a similar line of code to our Jucer. When you enter text in the Jucer that begins with ‘##’ we put in the TRANS macro. Simple but effective.