Taxonomy translation

Roberto Gerola - December 20, 2006 - 09:51
Project:Localizer
Version:4.7.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Roberto Gerola
Status:closed
Description

Taxonomy translation doesn't work with PHP 4.

#1

ray007 - December 20, 2006 - 10:38

Got an idea where the problem is? Maybe I can help then ...

#2

Roberto Gerola - December 20, 2006 - 10:47

Yes. It seems to me that in PHP 4, at least on my hosting service, object parameters
are passed by value. In PHP 5 they are passed by reference.
The problem is the function taxonomy_translate.
I'm trying to find a different solution.

#3

Roberto Gerola - December 20, 2006 - 14:05

The attached patch should solve this issue in the meantime.

Let me know.

AttachmentSize
taxonomy.patch_5.txt 6.57 KB

#4

Roberto Gerola - December 21, 2006 - 08:59
Status:active» fixed

Here it is possible to download the last files version for this issue :
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...

The implementation for taxonomy will be used also to add localization support to other
modules.
It would be helpful if someone can make some tests.
Probably I'll release only this changes in a 2.2 version.

#5

ray007 - December 21, 2006 - 10:40

I've done some quick tests and seen some promising results.
I now can edit the translations, and they are then used in the translated pages.

There is a little problem with editing vocabulary names and terms.
It seems, the string shown for the original term is the string for the current language.
Changes to this field are written to the original location, but not shown until you switch back to english ...
It also means, if you only change a translated term and don't touch the field for "original term", it gets overwritten with the term in your current language.

Vocabulary names don't have the same problem.

Ok, if you need more info, just ask ;-)

#6

Roberto Gerola - December 21, 2006 - 13:05

Thank you.
Now it should be fixed.
Updated patch :
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...

Or simply remove the line 1043 from taxonomy.module file :

if(function_exists('tobject')) $term=tobject('taxonomy_term', $term->tid, $term);

in function taxonomy_get_term($tid) {

#7

Roberto Gerola - December 25, 2006 - 09:02
Status:fixed» closed

Fixed in 2.2 release.

 
 

Drupal is a registered trademark of Dries Buytaert.