Patch suggested...

--- apachesolr.module_orig 2008-06-11 15:56:54.881082000 -0500
+++ apachesolr.module 2008-06-11 15:57:00.315927000 -0500
@@ -764,7 +764,7 @@
*/
function theme_apachesolr_breadcrumb_tid($tid) {
$term = taxonomy_get_term($tid);
- return $term->name;
+ return t($term->name);
}

/**

CommentFileSizeAuthor
#1 apachesolr.patch1.17 KBrobertdouglass

Comments

robertdouglass’s picture

StatusFileSize
new1.17 KB

Is it standard practice (or wise) to translate term names (seeing as they are not translated by core)? I must confer with Gábor on this.

If we do go with translated terms, I would think we'd need the term translated in the block as well. Patch attached.

gábor hojtsy’s picture

t() is not designed and not supposed to be used on dynamic data. Core never translates user entered data, whenever it can distinguish between data coming from the static code and data coming from user entered input.

robertdouglass’s picture

Status: Needs review » Closed (won't fix)

@janusman: I think we'll leave it as it is now. The theme system lets you add the t() easily enough.

janusman’s picture

Underlining is mine...

t() is not designed and not supposed to be used on dynamic data

@Gábor: and... what *IS*? =)

I'm sure you've gone at this issue before... It's just that I just keep finding module after module where adding a t() fixes my immediate problems for showing taxonomy terms, breadcrumbs, field labels and a bunch of other stuff...!

Please help... or please point me to the right place for this discussion =)

aufumy’s picture

Maybe the http://drupal.org/project/i18n module can help.

gábor hojtsy’s picture

Docs on translating user provided content: http://drupal.org/node/304002

janusman’s picture

Funny, this is issue is over a year old and now I could have answered myself. Sorry for not having closed it before.

Thanks anyway!