Translation Helpers


#1

The Projucer’s translations helper searches for the old TRANS macros, but ignores all translate ("") occurences.

perhaps that could be fixed with a small change like that ?
diff.txt (1,1 Ko)


#2

That would still miss arguments that are not string literals, or just get things wrong:

String suffix ("important bit");
translate ("prefix " + suffix, "default");

#3

but your example is already not working with the TRANS macro anyway no?


#4

Yes, you’re right.

If you are dealing with macros then I think you’re unlikely to put anything other than a string literal in, but with a regular function it’s more tempting to bend the rules. The docs say that the argument should be a string literal but it’s not enforced anywhere…