use tt() from i18n to translate the node types shown in the filter by type block

CommentFileSizeAuthor
#2 603362.patch1.79 KBaufumy
apachesolr_i18n_nodetype.patch1.78 KBaufumy

Comments

Scott Reynolds’s picture

Status: Needs review » Needs work
aufumy’s picture

Status: Needs work » Needs review
StatusFileSize
new1.79 KB

using a wrapper function for tt().

jpmckinney’s picture

jpmckinney’s picture

Component: Code » Language
pwolanin’s picture

function_exists() is surely faster than module_exists(), so I would still tend to go that route.

Scott Reynolds’s picture

really? module_exists uses module_list's static cache. And module_list is called all over the place. In fact, I'm the one who suggested for these related patches to use module_exists. And array_key_exists() has to be way faster then function_exists() assuming the module comes out of the static cache.

jpmckinney’s picture

A call to function_exists() isn't as self-documenting as a call to module_exists(), and as the call is not in a critical path and as the speed difference is not significant, I favor module_exists().

mkalkbrenner’s picture

I was asked at http://drupal.org/node/394728#comment-3145722 if this issue could be moved to Apache Solr Multilingual.

Like I pointed out at http://drupal.org/node/436578#comment-2829254 it has to be solved in Apache Solr Search Integration itself.

pwolanin’s picture

ok, so let's get it done.

jpmckinney’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

Based on http://drupal.org/node/609364 and http://drupal.org/node/304002 this seems like a sensible way to do it.

Applied to 5--2, 6--1, and 6--2. Didn't commit to HEAD as I don't know how tt() changed in D7.

jpmckinney’s picture

Status: Patch (to be ported) » Fixed

Create issue in Facet API queue if still an issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.