Posted by scotthoff on April 7, 2010 at 8:11pm
5 followers
| Project: | Taxonomy VTN |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I have the Taxonomy Translation module enabled. I can set up translations for the appropriate modules.
However, the terms are not going throught the translate function and thus are not being translated.
It seems like this is not in effect anywhere.
Is this something that can be done? Does it require a patch of some sort?
Comments
#1
Everything can be done, but I'm afraid that it would require a patch...
#2
I might be willing to write a patch. However, I would need to figure out how to do that. I mean, a patch would be better than trying to go in and touch the module code b/c my changes would be overwritten with any module updates.
I need to wrap my head around patches I guess.
It does not look like anyone has every asked for this before?
#3
There are people using Taxonomy VTN in other languages, but not with multiple languages at once (that I know of.)
There is help on the system about how you can generate a patch.
One way is to get the current CVS version from this module, do the changes in your copy and then send the output of:
cvs diff -duin a text file.
I will be happy to apply the patches as long as they don't break the module 8-)
Thank you.
Alexis
#4
Yeah,
So I'm looking to have a site with categories. If I want to have categories of body parts, I might have a category of head for the ear, lip, and nose.
However, If I'm a spanish user, I would want to have a category of "Cabeza".
#5
I don't really understand patching or CVS and am doing research.
#6
I understand the concept. Seen the i18n warning? You want to upgrade...
I think that most of the current users are all English or all Spanish, not a mix.
Are you under MS-Windows? If so, I cannot help much... Under Linux, it's very easy. You install the CVS client, go in a folder, do a check out, then make your changes. Once ready, do the cvs diff. Voila. With Windows, the process is certainly similar. I just have no clue how you get the tools. 8-}
#7
Hmm... what warning?
Well, I have a hosted solution so there is another level of confusion there.
I have a rather ambitious project I would like to use module for an I'm not sure if it is the right one in the end.
I'm figuring out the details in my head as I go along. In any case, this is one of the things I would need to get it to work.
#8
The Drupal team generate security warnings every Wednesday about modules that have security issues. The i18n is affected this week.
#9
Any updates on this? I have multilanguage site and want to have translated descriptions for vocabularies, because I have plans to use Taxonomy_vtn as main navigation tool for Categories. Having untranslated descriptions will be confusing for users.
#10
Here's a start.... It works fine for me, but I've tested this for only ten minutes.
This patch requires that your taxonomies be setup as "Localize terms. Terms are common for all languages, but their name and description may be localized.".
I'm using i18n-6.x-1.9.
#11
This looks pretty good. I would appreciate someone else who uses i18n to give it a try and mark the issue as reviewed by the community.
Notes about the patch:
a) the "else" must appear on the next line:
<?php[...]
}
else {
[...]
?>
b) the test, whether i18n is installed, should not appear in the loop; instead save the result in a variable and then use the variable so we avoid a function call on each iteration
c) I would need to check, but I think that in one loop all the terms are from a specific vocabulary rendering this test redundant on the 2nd+ iterations: i18ntaxonomy_vocabulary($term->vid) [as with (b), test once before the loop and then save the result in a variable would make it a lot more effective!]
Thank you.
Alexis Wilke
#12
Thanks for the review Alexis. Here's a new patch. I think that indeed the loop deals with terms from a single vocabulary, so the check can be done only once.
..Works for me, would be nice if someone else tried it.
#13
mathieu,
Hmmm.... your second patch doesn't include the code necessary to define the $use_i18n variable in the else part of the if()... statement. I would imagine that means it's always FALSE there.
Also, you want to set the variable with the test in the if() expression. Something like this:
$use_i18n = module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($voc_obj->vid) == I18N_TAXONOMY_LOCALIZE;
That way it is set in all cases and does not generate a warning when used later.
Thank you.
Alexis
#14
Dear Mathieu,
Are you planning to have Taxonomy VTN and this patch in Drupal7?
Best,
Vincent
#15
vlalieu,
You may want to subscribe to this issue instead:
#1029640: D7 port of Taxonomy VTN needs co-maintainer
Thank you.
Alexis