Closed (fixed)
Project:
Taxonomy Breadcrumb
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2006 at 23:33 UTC
Updated:
4 Mar 2007 at 01:30 UTC
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
Comment #1
_craig commentedHelp me understand this a bit. I don't use any of the translation features.
Why does
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:
Thanks,
Craig
Comment #2
tropic commentedis 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 >> term1the same breadcrumb in spanish can be:
Inicio >> term1Comment #3
_craig commented$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?
Comment #4
tropic commentedyes, 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
Comment #5
_craig commentedFixed in 5.x branch http://drupal.org/node/111061. Will be included in next release.
Comment #6
_craig commentedComment #7
(not verified) commented