Introjucer's translation tool utility


#1

Hey Jules
I’ve noticed that the new translation tool utility only looks for the TRANS macro and not the translate() function.
Would it be possible to add this functionality? I tend to use the function rather than the MACRO.

While we’re on the subject, do you recommend using the TRANS macro rather than the translate() function?


#2

Could do - I’m certainly not finished with that utility yet, and will be tinkering with it some more. It might be best if it’s more flexible about letting you enter whatever patterns you want to match for, in case you’ve used other custom macros to do the same thing.

Personally, I’d suggest the TRANS macro for literals, and the translate() function for non-literal expressions… But that’s not a hard-and-fast rule, you can obviously do whatever works best for you.

Also worth noting is the NEEDS_TRANS macro, which is handy in places where you have e.g. an array of const char*s which you don’t want to wrap in a function call but which you’ll be translating later on, and will need to add to the list.


#3

[quote=“jules”]Could do - I’m certainly not finished with that utility yet, and will be tinkering with it some more. It might be best if it’s more flexible about letting you enter whatever patterns you want to match for, in case you’ve used other custom macros to do the same thing.
[/quote]
+1 from me for a user definable pattern