Please Update your module code.

Old:

// HOME breadcrumb generation
$home_text = variable_get('taxonomy_breadcrumb_home', '');
if ($home_text != '') {
  $breadcrumb[] = l($home_text, NULL);
}

New:

// HOME breadcrumb generation
$home_text = variable_get('taxonomy_breadcrumb_home', '');
if ($home_text != '') {
  $breadcrumb[] = l(t($home_text), NULL);
}

Comments

_craig’s picture

Help me understand this a bit. I don't use any of the translation features.

Why does

113:  $breadcrumb[] = l($home_text, NULL);

need t()? Can't it just be set "correctly" on the config page to begin with?

If it does need it, I've got a followup question. Why don't a few other areas of code require t(), such as a few lines below:

120:  $breadcrumb[] = l($vocabulary->name, $vocabulary_path);
130:  $breadcrumb[] = l($parent_term->name, $term_path);

Thanks,
Craig

tropic’s picture

Version: 4.7.x-2.0 » 5.x-1.0

Why does
113: $breadcrumb[] = l($home_text, NULL);

need t()? Can't it just be set "correctly" on the config page to begin with?

is it better to include the t() function because the 'Home' term (or any another term entered as root breadcrumb) can be translated to the current locale.

For example if the breadcrumb in english is:
Home >> term1
the same breadcrumb in spanish can be:
Inicio >> term1

_craig’s picture

$home_text is configurable on the taxonomy_breadcrumb admin page ("Home breadcrumb text" on /admin/settings/taxonomy-breadcrumb). Wouldn't the user simply put the text "Inicio" there?

tropic’s picture

Wouldn't the user simply put the text "Inicio" there?

yes, but in this way all the users will see "Inicio", no other string.
Vice versa, If you use the t() translation function, the registered user who has the configuration with english can see "Home", and the registered user who has spanish can see "Inicio": isn't better?

best regards,

/p

_craig’s picture

Fixed in 5.x branch http://drupal.org/node/111061. Will be included in next release.

_craig’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)