re: Re: [development] hook_perm() and t()
I assume this is true for 4.7 as well? Anyone with CVS access can checkout and update these docs- see: http://cvs.drupal.org/viewcvs/drupal/contributions/docs/developer/hooks/ -Peter Date: Wed, 6 Sep 2006 19:42:55 +0800 From: "Augustin (Beginner)" <drupal.beginner@wechange.org> Subject: Re: [development] hook_perm() and t() To: development@drupal.org Message-ID: <200609061942.55998.drupal.beginner@wechange.org> Content-Type: text/plain; charset="iso-8859-1" On Wednesday 06 September 2006 07:19 pm, Gabor Hojtsy wrote:
http://api.drupal.org/api/HEAD/function/hook_perm makes no mention of t() either way.
There is no need to use t() here, since the string extractor takes care of extracting permission names defined in the perm hook for translation. It might be more consistent to use t() all over the user_acess() calls, but it seems superfluos. The permission names are translateable, they are just a special case in the extractor, and are t()-ed on the display of the permission table.
Thanks Gabor for the explanation. :) Maybe someone who has the power to do that could add a small comment about this on the api documentation: http://api.drupal.org/api/HEAD/function/hook_perm
makes no mention of t() either way.
On Wednesday 06 September 2006 09:38 pm, Peter Wolanin wrote:
I assume this is true for 4.7 as well? Anyone with CVS access can checkout and update these docs- see:
http://cvs.drupal.org/viewcvs/drupal/contributions/docs/developer/hooks/
thanks Peter, I didn't know I could do that. http://cvs.drupal.org/viewcvs/drupal/contributions/docs/developer/hooks/core... Augustin.
There is no need to use t() here, since the string extractor takes care of extracting permission names defined in the perm hook for translation. It might be more consistent to use t() all over the user_acess() calls, but it seems superfluos. The permission names are translateable, they are just a special case in the extractor, and are t()-ed on the display of the permission table.
-- http://www.wechange.org/ Because we and the world need to change. http://www.reuniting.info/ Intimate Relationships, peace and harmony in the couple.
participants (2)
-
Augustin (Beginner) -
Peter Wolanin