Drupal core has a method to have something other than the core module handle taxonomy, variable taxonomy_override_selector. It doesn't add the taxonomy forum element in those cases.
i18ntaxonomy alters the forum node forum no matter what along as $form['taxonomy'] is there, setting anything of $form['taxonomy'][$vid], and it's weighted at 5? so anything that wants to avoid it would have to be weighted higher, but if something is supplying the taxonomy forum it wants to run at around -1 so other modules (content_taxonomy, comment taxonomy add, etc.) can perform their alterations.
The simplest way is to check on taxonomy override selector.
A more complex way is to not override the values unrelated to it, like #type, but it's sharing code so that's more complex.
Comment | File | Size | Author |
---|---|---|---|
#11 | 1i18ntaxonomy_override.patch | 920 bytes | domidc |
#1 | 619726_i18n_taxonomy_override.txt | 633 bytes | hefox |
i18n_taxonomy_override.patch | 639 bytes | hefox | |
Comments
Comment #1
hefox CreditAttribution: hefox commentedas noted in http://drupal.org/node/601500#comment-2368706 this patch had a syntax error, this one should be fixed (manually edited) but didn't test it (bad fox, bad :( ).
Comment #2
TripleEmcoder CreditAttribution: TripleEmcoder commentedI confirm all what hefox says ;)
Comment #3
Wim LeersNot sure what's holding back this patch from being committed. Code style isn't perfect, but since it's a single-line patch to commit, that can easily be fixed by the committer.
Please commit this :)
Comment #4
YK85 CreditAttribution: YK85 commentedtested and +1 for commit
Comment #5
Alan D. CreditAttribution: Alan D. commentedMarked #599088: Taxonomy translation ignores taxonomy_override_selector as dup
Comment #6
Wim LeersThanks Alan!
Comment #7
Jose Reyero CreditAttribution: Jose Reyero commentedOk, committed.
Thanks.
Comment #8
Wim LeersThanks!
Comment #10
domidc CreditAttribution: domidc commentedWhen some module alters this setting the terms dont get localized anymore on the node form. In my specific case hierarchical select alters the setting, this is causing the terms not being localized anymore. Can someone explain why this implemented like this?
When removing the !variable_get('taxonomy_override_selector', FALSE) terms are getting localized again.
Comment #11
domidc CreditAttribution: domidc commentedThis removes the support and fixes my problem but I there is probably a better way to fix the issue
Comment #12
hefox CreditAttribution: hefox commentedwhen taxonomy_override_selector is enabled, cannot assume the taxonomy input will be what core provides (which i18n alterations assume), so yeah, go check the module you're using for taxonomy selection to see if there is an issue queue about this/move this issue there/create a new issue there.
Comment #13
domidc CreditAttribution: domidc commentedComment #14
hefox CreditAttribution: hefox commentedTitle doesn't make sense. I believe it's not HS that isn't getting translated, corrected, just the normal taxonomy selection?
Comment #15
Wim LeersI think I understand what's happening.
HS needs to set the taxonomy_override_selector variable, so it can use HS instead of the regular taxonomy form. HS then uses the regular taxonomy form (by duplicating its code) when HS is not enabled for that vocabulary, and it uses the HS taxonomy form otherwise (there's slightly more nuance to it than just this, but this is the essence). However, when the regular taxonomy form has been generated by HS, then i18n won't be applied to it.
Committed a patch that should fix it: http://drupal.org/cvs?commit=389256.
This really is a stellar example of the hell that aspect-oriented programming can trigger: one needs an override to insert HS form items without also generating the non-HS form items. But it needs to duplicate the original code, too, just to also support forms that use Taxonomy without HS. And then one needs to alter *both* paths to support i18n. So, now if either of the following change, I need to replicate the changes: the Taxonomy core form, i18n or when modules such as Taxonomy Access, Taxonomy Access Lite, Term Permissions need to be supported. If this ain't FAPI hell, then I don't know what is. The most demotivating aspect of Drupal module maintenance for sure.