« Return to Thread: Use of variables in t()
Slick! ;) Very clever, thanks!
On Dec 23, 2008, at 6:53 PM, Hans Salvisberg wrote:
> Here's what I do to get potx to shut up:
>
> $tr = 't';
> $tr($foo)
Because potx still sees "$t($foo)" as if it's "t($foo)" and it gives
> I forgot why I'm not using $t, but I think there was a reason...
the warning, anyway. By using $tr($foo) it all works.
I guess it's a minor performance hit to do this, and it slightly
obfuscates the code, so I doubt we can convince core to either
implement or document this practice...
@Gabor: thoughts? ;)
Thanks,
-Derek (dww)
_______________________________________________
translations mailing list
translations@...
http://lists.drupal.org/mailman/listinfo/translations
« Return to Thread: Use of variables in t()
| Free embeddable forum powered by Nabble | Forum Help |