Please add t() function to breadcrumb, in 63 string (in 6.x-1.4 version).

$trail[] = l($title, trim($paths[$i]));
change to
$trail[] = l(t($title), trim($paths[$i]));

Please fix this problem in new relises.

Thanks!
Sorry for my English =(

Comments

MGN’s picture

Status: Active » Closed (won't fix)

Sorry, I don't think that's an appropriate use of t() - its meant for static strings, not user input.

See the Drupal api page at http://api.drupal.org/api/function/t

However tempting it is, custom data from user input or other non-code sources should not be passed through t(). Doing so leads to the following problems and errors: ...

The api page goes on to explain why.

I am marking this as "wont fix" because it doesn't satsify Drupal coding standards. If there is another way to accomplish the same thing that meets the Drupal coding standards, please let me know.

Thanks.

Anonymous’s picture

Title: Breadcrumbs didn't translates » Option to keep system default 'Home' link
Status: Closed (won't fix) » Active

In core Drupal the 'Home' link translates according to the current language, but as I understand it's overwritten by Custom Breadcrumbs. So this module gives me two options: either don't have 'Home' in my breadcrumbs at all or specify a single string which will overwrite default Drupal behaviour and won't translate. Do you think it's possible to expand the module with a third option to keep the system defaults?

MGN’s picture

@Edith Illyes, I think this is acceptable feature request (but please open a new request so I can better keep track of what needs to be done). But if you are using i18N I believe you can also accomplish your goal with the existing code. See #504400: home reference and i18n for details.

Anonymous’s picture

Status: Active » Closed (won't fix)

Thanks for your reply. I've just realized I'm using 2.0-beta1. Downgraded to 1.5 and it works. I'll file a bug report against beta1. Resetting this to won't fix.

Anonymous’s picture

Bug report filed against 2.x-dev at #647570: 'Home' breadcrumb i18n not working.