« Return to Thread: Use of variables in t()

Re: Use of variables in t()

by Hans Salvisberg :: Rate this Message:

Reply to Author | View in Thread

Derek Wright wrote:
> B) I seem to have an example in one of my contribs where this edge  
> case is being hit.  Once I add t($foo) to my code (where all possible  
> values of $foo are listed via t() around string literals elsewhere in  
> the code), potx.php starts throwing error messages about "Invalid  
> marker content ...".  Is there anything I can do to tell potx "yes, I  
> know, but this is that edge case where it's ok, please shut up  
> again"? ;)
>  

Here's what I do to get potx to shut up:

$tr = 't';
$tr($foo)

I forgot why I'm not using $t, but I think there was a reason...

Hans (salvis)

_______________________________________________
translations mailing list
translations@...
http://lists.drupal.org/mailman/listinfo/translations

 « Return to Thread: Use of variables in t()