Project:Taxonomy hide
Version:6.x-1.02
Component:Code
Category:bug report
Priority:normal
Assigned:rondev
Status:needs review

Issue Summary

I introduce a modification to sort terms in the function function _taxonomy_hide_sort($a, $b) from taxonomy_hide.inc:

  elseif ($string = strcasecmp(t($a->name), t($b->name))) {
    return $string;
  }

With t(), that is the translated terms that are compared.

I'm not sure of my code because I'm not a i18n specialist but that works for me. I use the "Localize terms. Terms are common for all languages, but their name and description may be localized." option for my vocabularies when i18n module is enabled.

I noted the modification proposed here for the hook:
http://drupal.org/node/308133#comment-1111973
But as I don't understand how to implement it, I used the official published code.

It would be nice to display the vocabulary title too.

Comments

#1

Here's a patch with the above adapted to use the new i18nstrings approach. Tested (and used in production) with i18n 6.x-1.9.

AttachmentSize
364490-D6.patch 432 bytes

#2

Same thing, but calling i18nstrings instead of the obsolete tt()... and making sure the function is available and that the vocabulary is translatable first.

Note that this does not solve sorting issues. The call to strcasecmp() should be using whatever was defined by setlocale(), but it doesn't seem to work too well for me. That's a different issue, I guess.

AttachmentSize
364490_2-D6.patch 837 bytes
nobody click here