[drupal-devel] Internationalization, Usability and changes in
the coding conventions
Carl McDade
carl_mcdade at yahoo.com
Sat Feb 19 20:45:11 UTC 2005
This is something that should be addressed for the next release. I don't
have all modules installed. But a search through the ones I have turned
up 31 calls to message_access. Even node has one.
Or does it have to be done on a module by maintainer level?
Regardless I am cleaning out the baggage from my code.
Carl McDade
Gabor Hojtsy wrote:
>> Second guessing but,
>>
>> Can someone tell me why this is like this:
>>
>> print theme("page", message_access(), t("Access denied"));
>>
>> rather than this?
>>
>> print theme("page", t('Please login or register to see this
> material'),
>> t("Access denied"));
>>
>> Why is there a call to a Function like this anyway? Is is a mistake
> in
>> the filestore2 module or is this something that has to be used? I
>> noticed this after killes posted. Is this legacy code and should be
> removed?
>
> The role of this was not to repeat the same t() at multiple places. But
> see the patch submitted by Killes. It is a good step forward. You
> proposed to change message_access() to
>
> function message_access($message = 'You are not authorized to access
> this page.') {
> return t($message);
> }
>
> Which would be easy to reduce to a single t() call instead of passing a
> string into message_access, and that single t() call would actually
> enable the automatic translation template generation, unlike this
> solution you proposed.
>
> Goba
>
More information about the drupal-devel
mailing list